Version 2.18.0-234.0.dev

Merge commit '759bb4ca3127119c18f0a8490fe9e72d9b1a44e6' into 'dev'
diff --git a/DEPS b/DEPS
index 3a4ccc5..73593dd 100644
--- a/DEPS
+++ b/DEPS
@@ -108,7 +108,7 @@
   # For more details, see https://github.com/dart-lang/sdk/issues/30164.
   "dart_style_rev": "d7b73536a8079331c888b7da539b80e6825270ea", # manually rev'd
 
-  "dartdoc_rev": "58348a98b992ce99b95d23131b67227bdb2b4875",
+  "dartdoc_rev": "d8195107d3e65e20094bb2ca0a8e8576e3a765bf",
   "devtools_rev": "0aa619c42a68d6db4c94a7838121811aba8f5eb1",
   "ffi_rev": "18b2b549d55009ff594600b04705ff6161681e07",
   "file_rev": "0132eeedea2933513bf230513a766a8baeab0c4f",
@@ -135,7 +135,7 @@
   "path_rev": "7a0ed40280345b1c11df4c700c71e590738f4257",
   "ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
   "pool_rev": "fa84ddd0e39f45bf3f09dcc5d6b9fbdda7820fef",
-  "protobuf_rev": "58f49c50f93d190adaec213ad500d7de5fe20b2f",
+  "protobuf_rev": "7ac39080eb886e6eec55983dcba76e855c038701",
   "pub_rev": "9bf4289d6fd5d6872a8929d6312bbd7098f3ea9c", # manually rev'd
   "pub_semver_rev": "5c0b4bfd5ca57fe16f1319c581dc8c882e9b8cb2",
   "root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
diff --git a/benchmarks/Omnibus/dart/Omnibus.dart b/benchmarks/Omnibus/dart/Omnibus.dart
index 9965376..90d4ca2 100644
--- a/benchmarks/Omnibus/dart/Omnibus.dart
+++ b/benchmarks/Omnibus/dart/Omnibus.dart
@@ -14,6 +14,7 @@
 import '../../BigIntParsePrint/dart/BigIntParsePrint.dart'
     as lib_BigIntParsePrint;
 import '../../ListCopy/dart/ListCopy.dart' as lib_ListCopy;
+import '../../MapCopy/dart/MapCopy.dart' as lib_MapCopy;
 import '../../MD5/dart/md5.dart' as lib_MD5;
 import '../../RuntimeType/dart/RuntimeType.dart' as lib_RuntimeType;
 import '../../SHA1/dart/sha1.dart' as lib_SHA1;
@@ -28,8 +29,9 @@
 import '../../Utf8Encode/dart/Utf8Encode.dart' as lib_Utf8Encode;
 
 final Map<String, Function()> benchmarks = {
-  'ListCopy': lib_ListCopy.main,
   'BigIntParsePrint': lib_BigIntParsePrint.main,
+  'ListCopy': lib_ListCopy.main,
+  'MapCopy': () => lib_MapCopy.main([]),
   'MD5': lib_MD5.main,
   'RuntimeType': lib_RuntimeType.main,
   'SHA1': lib_SHA1.main,
diff --git a/benchmarks/Omnibus/dart2/Omnibus.dart b/benchmarks/Omnibus/dart2/Omnibus.dart
index 3224fd2..3fe59db 100644
--- a/benchmarks/Omnibus/dart2/Omnibus.dart
+++ b/benchmarks/Omnibus/dart2/Omnibus.dart
@@ -16,6 +16,7 @@
 import '../../BigIntParsePrint/dart2/BigIntParsePrint.dart'
     as lib_BigIntParsePrint;
 import '../../ListCopy/dart2/ListCopy.dart' as lib_ListCopy;
+import '../../MapCopy/dart2/MapCopy.dart' as lib_MapCopy;
 import '../../MD5/dart2/md5.dart' as lib_MD5;
 import '../../RuntimeType/dart2/RuntimeType.dart' as lib_RuntimeType;
 import '../../SHA1/dart2/sha1.dart' as lib_SHA1;
@@ -30,8 +31,9 @@
 import '../../Utf8Encode/dart2/Utf8Encode.dart' as lib_Utf8Encode;
 
 final Map<String, Function()> benchmarks = {
-  'ListCopy': lib_ListCopy.main,
   'BigIntParsePrint': lib_BigIntParsePrint.main,
+  'ListCopy': lib_ListCopy.main,
+  'MapCopy': () => lib_MapCopy.main([]),
   'MD5': lib_MD5.main,
   'RuntimeType': lib_RuntimeType.main,
   'SHA1': lib_SHA1.main,
diff --git a/benchmarks/OmnibusDeferred/dart/OmnibusDeferred.dart b/benchmarks/OmnibusDeferred/dart/OmnibusDeferred.dart
index 3dc12f5..da0d6cc 100644
--- a/benchmarks/OmnibusDeferred/dart/OmnibusDeferred.dart
+++ b/benchmarks/OmnibusDeferred/dart/OmnibusDeferred.dart
@@ -14,6 +14,7 @@
 import '../../BigIntParsePrint/dart/BigIntParsePrint.dart'
     deferred as lib_BigIntParsePrint;
 import '../../ListCopy/dart/ListCopy.dart' deferred as lib_ListCopy;
+import '../../MapCopy/dart/MapCopy.dart' deferred as lib_MapCopy;
 import '../../MD5/dart/md5.dart' deferred as lib_MD5;
 import '../../RuntimeType/dart/RuntimeType.dart' deferred as lib_RuntimeType;
 import '../../SHA1/dart/sha1.dart' deferred as lib_SHA1;
@@ -34,13 +35,17 @@
 }
 
 final Map<String, Lib> benchmarks = {
+  'BigIntParsePrint': Lib(
+    lib_BigIntParsePrint.loadLibrary,
+    () => lib_BigIntParsePrint.main(),
+  ),
   'ListCopy': Lib(
     lib_ListCopy.loadLibrary,
     () => lib_ListCopy.main(),
   ),
-  'BigIntParsePrint': Lib(
-    lib_BigIntParsePrint.loadLibrary,
-    () => lib_BigIntParsePrint.main(),
+  'MapCopy': Lib(
+    lib_MapCopy.loadLibrary,
+    () => lib_MapCopy.main([]),
   ),
   'MD5': Lib(
     lib_MD5.loadLibrary,
diff --git a/benchmarks/OmnibusDeferred/dart2/OmnibusDeferred.dart b/benchmarks/OmnibusDeferred/dart2/OmnibusDeferred.dart
index 9e743ea..a4efeca 100644
--- a/benchmarks/OmnibusDeferred/dart2/OmnibusDeferred.dart
+++ b/benchmarks/OmnibusDeferred/dart2/OmnibusDeferred.dart
@@ -16,6 +16,7 @@
 import '../../BigIntParsePrint/dart2/BigIntParsePrint.dart'
     deferred as lib_BigIntParsePrint;
 import '../../ListCopy/dart2/ListCopy.dart' deferred as lib_ListCopy;
+import '../../MapCopy/dart/MapCopy.dart' deferred as lib_MapCopy;
 import '../../MD5/dart2/md5.dart' deferred as lib_MD5;
 import '../../RuntimeType/dart2/RuntimeType.dart' deferred as lib_RuntimeType;
 import '../../SHA1/dart2/sha1.dart' deferred as lib_SHA1;
@@ -36,13 +37,17 @@
 }
 
 final Map<String, Lib> benchmarks = {
+  'BigIntParsePrint': Lib(
+    lib_BigIntParsePrint.loadLibrary,
+    () => lib_BigIntParsePrint.main(),
+  ),
   'ListCopy': Lib(
     lib_ListCopy.loadLibrary,
     () => lib_ListCopy.main(),
   ),
-  'BigIntParsePrint': Lib(
-    lib_BigIntParsePrint.loadLibrary,
-    () => lib_BigIntParsePrint.main(),
+  'MapCopy': Lib(
+    lib_MapCopy.loadLibrary,
+    () => lib_MapCopy.main([]),
   ),
   'MD5': Lib(
     lib_MD5.loadLibrary,
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/api/builders.dart b/pkg/_fe_analyzer_shared/lib/src/macros/api/builders.dart
index 695f56b..937d9cf 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/api/builders.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/api/builders.dart
@@ -48,40 +48,49 @@
   Future<StaticType> resolve(TypeAnnotationCode type);
 }
 
-/// The api used to introspect on a [ClassDeclaration].
+/// The api used to introspect on any [TypeDeclaration] which also has the
+/// marker interface [IntrospectableType].
 ///
-/// Available in the declaration and definition phases, but limited in the
-/// declaration phase to immediately annotated [ClassDeclaration]s. This is
-/// done by limiting the access to the [TypeDeclarationResolver] to the
-/// definition phase.
-abstract class ClassIntrospector {
-  /// The fields available for [clazz].
+/// Available in the declaration and definition phases.
+abstract class TypeIntrospector {
+  /// The fields available for [type].
   ///
-  /// This may be incomplete if in the declaration phase and additional macros
-  /// are going to run on this class.
-  Future<List<FieldDeclaration>> fieldsOf(covariant ClassDeclaration clazz);
+  /// This may be incomplete if additional declaration macros are going to run
+  /// on [type].
+  Future<List<FieldDeclaration>> fieldsOf(covariant IntrospectableType type);
 
-  /// The methods available so far for the current class.
+  /// The methods available for [type].
   ///
-  /// This may be incomplete if additional declaration macros are running on
-  /// this class.
-  Future<List<MethodDeclaration>> methodsOf(covariant ClassDeclaration clazz);
+  /// This may be incomplete if additional declaration macros are going to run
+  /// on [type].
+  Future<List<MethodDeclaration>> methodsOf(covariant IntrospectableType type);
 
-  /// The constructors available so far for the current class.
+  /// The constructors available for [type].
   ///
-  /// This may be incomplete if additional declaration macros are running on
-  /// this class.
+  /// This may be incomplete if additional declaration macros are going to run
+  /// on [type].
   Future<List<ConstructorDeclaration>> constructorsOf(
-      covariant ClassDeclaration clazz);
+      covariant IntrospectableType type);
+}
 
-  /// The class that is directly extended via an `extends` clause.
-  Future<ClassDeclaration?> superclassOf(covariant ClassDeclaration clazz);
-
-  /// All of the classes that are mixed in with `with` clauses.
-  Future<List<ClassDeclaration>> mixinsOf(covariant ClassDeclaration clazz);
-
-  /// All of the classes that are implemented with an `implements` clause.
-  Future<List<ClassDeclaration>> interfacesOf(covariant ClassDeclaration clazz);
+/// The interface used by [Macro]s to resolve any [Identifier]s pointing to
+/// types to their type declarations.
+///
+/// Only available in the declaration and definition phases of macro expansion.
+abstract class TypeDeclarationResolver {
+  /// Resolves an [identifier] to its [TypeDeclaration].
+  ///
+  /// If [identifier] does not resolve to a [TypeDeclaration], then an
+  /// [ArgumentError] is thrown.
+  ///
+  /// In the declaration phase, this will return [IntrospectableType] instances
+  /// only for those types that are introspectable. Specifically, types are only
+  /// introspectable of the macro is running on a class declaration, and the
+  /// type appears in the type hierarchy of that class.
+  ///
+  /// In the definition phase, this will return [IntrospectableType] instances
+  /// for all type definitions which can have members (ie: not type aliases).
+  Future<TypeDeclaration> declarationOf(covariant Identifier identifier);
 }
 
 /// The api used by [Macro]s to contribute new (non-type)
@@ -89,7 +98,12 @@
 ///
 /// Can also be used to do subtype checks on types.
 abstract class DeclarationBuilder
-    implements Builder, IdentifierResolver, TypeResolver, ClassIntrospector {
+    implements
+        Builder,
+        IdentifierResolver,
+        TypeIntrospector,
+        TypeDeclarationResolver,
+        TypeResolver {
   /// Adds a new regular declaration to the surrounding library.
   ///
   /// Note that type declarations are not supported.
@@ -102,18 +116,6 @@
   void declareInClass(DeclarationCode declaration);
 }
 
-/// The interface used by [Macro]s to resolve any [Identifier]s pointing to
-/// types to their type declarations.
-///
-/// Only available in the definition phase of macro expansion.
-abstract class TypeDeclarationResolver {
-  /// Resolves an [identifier] to its [TypeDeclaration].
-  ///
-  /// If [identifier] does resolve to a [TypeDeclaration], then an
-  /// [ArgumentError] is thrown.
-  Future<TypeDeclaration> declarationOf(covariant Identifier identifier);
-}
-
 /// The interface used by [Macro]s to get the inferred type for an
 /// [OmittedTypeAnnotation].
 ///
@@ -133,10 +135,10 @@
     implements
         Builder,
         IdentifierResolver,
-        TypeResolver,
-        ClassIntrospector,
+        TypeIntrospector,
         TypeDeclarationResolver,
-        TypeInferrer {}
+        TypeInferrer,
+        TypeResolver {}
 
 /// The apis used by [Macro]s that run on classes, to fill in the definitions
 /// of any external declarations within that class.
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/api/code.dart b/pkg/_fe_analyzer_shared/lib/src/macros/api/code.dart
index cd0889c..fc67ba8 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/api/code.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/api/code.dart
@@ -103,7 +103,10 @@
 }
 
 /// A piece of code representing a type annotation.
-abstract class TypeAnnotationCode implements Code {
+abstract class TypeAnnotationCode implements Code, TypeAnnotation {
+  @override
+  TypeAnnotationCode get code => this;
+
   /// Returns a [TypeAnnotationCode] object which is a non-nullable version
   /// of this one.
   ///
@@ -127,6 +130,9 @@
   TypeAnnotationCode underlyingType;
 
   @override
+  TypeAnnotationCode get code => this;
+
+  @override
   CodeKind get kind => CodeKind.nullableTypeAnnotation;
 
   @override
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/api/introspection.dart b/pkg/_fe_analyzer_shared/lib/src/macros/api/introspection.dart
index 037c788..ff81f40 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/api/introspection.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/api/introspection.dart
@@ -113,6 +113,12 @@
   Iterable<TypeParameterDeclaration> get typeParameters;
 }
 
+/// A marker interface for the type declarations which are introspectable.
+///
+/// All type declarations which can have members will have a variant which
+/// implements this type.
+mixin IntrospectableType implements TypeDeclaration {}
+
 /// Class (and enum) introspection information.
 ///
 /// Information about fields, methods, and constructors must be retrieved from
@@ -125,18 +131,22 @@
   bool get isExternal;
 
   /// The `extends` type annotation, if present.
-  TypeAnnotation? get superclass;
+  NamedTypeAnnotation? get superclass;
 
   /// All the `implements` type annotations.
-  Iterable<TypeAnnotation> get interfaces;
+  Iterable<NamedTypeAnnotation> get interfaces;
 
   /// All the `with` type annotations.
-  Iterable<TypeAnnotation> get mixins;
+  Iterable<NamedTypeAnnotation> get mixins;
 
   /// All the type arguments, if applicable.
   Iterable<TypeParameterDeclaration> get typeParameters;
 }
 
+/// An introspectable class declaration.
+abstract class IntrospectableClassDeclaration
+    implements ClassDeclaration, IntrospectableType {}
+
 /// Type alias introspection information.
 abstract class TypeAliasDeclaration implements ParameterizedTypeDeclaration {
   /// The type annotation this is an alias for.
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/api/macros.dart b/pkg/_fe_analyzer_shared/lib/src/macros/api/macros.dart
index 5ab073a..ed4d97d 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/api/macros.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/api/macros.dart
@@ -64,15 +64,15 @@
 /// The interface for [Macro]s that can be applied to any class, and wants to
 /// contribute new non-type declarations to the program.
 abstract class ClassDeclarationsMacro implements Macro {
-  FutureOr<void> buildDeclarationsForClass(
-      ClassDeclaration clazz, ClassMemberDeclarationBuilder builder);
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
+      ClassMemberDeclarationBuilder builder);
 }
 
 /// The interface for [Macro]s that can be applied to any class, and wants to
 /// augment the definitions of members on the class.
 abstract class ClassDefinitionMacro implements Macro {
   FutureOr<void> buildDefinitionForClass(
-      ClassDeclaration clazz, ClassDefinitionBuilder builder);
+      IntrospectableClassDeclaration clazz, ClassDefinitionBuilder builder);
 }
 
 /// The interface for [Macro]s that can be applied to any field, and wants to
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/bootstrap.dart b/pkg/_fe_analyzer_shared/lib/src/macros/bootstrap.dart
index 18ceb87..f6c098c 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/bootstrap.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/bootstrap.dart
@@ -263,9 +263,13 @@
         sendRequest,
         remoteInstance: request.identifierResolver,
         serializationZoneId: request.serializationZoneId);
-    var classIntrospector = ClientClassIntrospector(
+    var typeIntrospector = ClientTypeIntrospector(
         sendRequest,
-        remoteInstance: request.classIntrospector,
+        remoteInstance: request.typeIntrospector,
+        serializationZoneId: request.serializationZoneId);
+    var typeDeclarationResolver = ClientTypeDeclarationResolver(
+        sendRequest,
+        remoteInstance: request.typeDeclarationResolver,
         serializationZoneId: request.serializationZoneId);
     var typeResolver = ClientTypeResolver(
         sendRequest,
@@ -273,8 +277,8 @@
         serializationZoneId: request.serializationZoneId);
 
     var result = await executeDeclarationsMacro(
-        instance, request.declaration, identifierResolver, classIntrospector,
-        typeResolver);
+        instance, request.declaration, identifierResolver, typeIntrospector,
+        typeDeclarationResolver, typeResolver);
     return new SerializableResponse(
         responseType: MessageType.macroExecutionResult,
         response: result,
@@ -311,9 +315,9 @@
         sendRequest,
         remoteInstance: request.typeDeclarationResolver,
         serializationZoneId: request.serializationZoneId);
-    var classIntrospector = ClientClassIntrospector(
+    var typeIntrospector = ClientTypeIntrospector(
         sendRequest,
-        remoteInstance: request.classIntrospector,
+        remoteInstance: request.typeIntrospector,
         serializationZoneId: request.serializationZoneId);
     var typeInferrer = ClientTypeInferrer(
         sendRequest,
@@ -321,7 +325,7 @@
         serializationZoneId: request.serializationZoneId);
 
     var result = await executeDefinitionMacro(
-        instance, request.declaration, identifierResolver, classIntrospector,
+        instance, request.declaration, identifierResolver, typeIntrospector,
         typeResolver, typeDeclarationResolver, typeInferrer);
     return new SerializableResponse(
         responseType: MessageType.macroExecutionResult,
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart
index 41ad9e3..06deca7 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor.dart
@@ -38,8 +38,9 @@
       MacroInstanceIdentifier macro,
       covariant Declaration declaration,
       IdentifierResolver identifierResolver,
+      TypeDeclarationResolver typeDeclarationResolver,
       TypeResolver typeResolver,
-      ClassIntrospector classIntrospector);
+      TypeIntrospector typeIntrospector);
 
   /// Runs the definitions phase for [macro] on a given [declaration].
   ///
@@ -48,9 +49,9 @@
       MacroInstanceIdentifier macro,
       covariant Declaration declaration,
       IdentifierResolver identifierResolver,
-      TypeResolver typeResolver,
-      ClassIntrospector classIntrospector,
       TypeDeclarationResolver typeDeclarationResolver,
+      TypeResolver typeResolver,
+      TypeIntrospector typeIntrospector,
       TypeInferrer typeInferrer);
 
   /// Combines multiple [MacroExecutionResult]s into a single library
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/builder_impls.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/builder_impls.dart
index b7391e9..f830cde 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/builder_impls.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/builder_impls.dart
@@ -55,12 +55,13 @@
 
 /// Base class for all [DeclarationBuilder]s.
 class DeclarationBuilderBase extends TypeBuilderBase
-    implements ClassIntrospector, TypeResolver {
-  final ClassIntrospector classIntrospector;
+    implements TypeIntrospector, TypeDeclarationResolver, TypeResolver {
+  final TypeIntrospector typeIntrospector;
+  final TypeDeclarationResolver typeDeclarationResolver;
   final TypeResolver typeResolver;
 
   DeclarationBuilderBase(IdentifierResolver identifierResolver,
-      this.classIntrospector, this.typeResolver,
+      this.typeIntrospector, this.typeDeclarationResolver, this.typeResolver,
       {Map<String, List<DeclarationCode>>? parentClassAugmentations,
       List<DeclarationCode>? parentLibraryAugmentations})
       : super(identifierResolver,
@@ -68,28 +69,23 @@
             parentLibraryAugmentations: parentLibraryAugmentations);
 
   @override
-  Future<List<ConstructorDeclaration>> constructorsOf(ClassDeclaration clazz) =>
-      classIntrospector.constructorsOf(clazz);
+  Future<TypeDeclaration> declarationOf(IdentifierImpl identifier) =>
+      typeDeclarationResolver.declarationOf(identifier);
 
   @override
-  Future<List<FieldDeclaration>> fieldsOf(ClassDeclaration clazz) =>
-      classIntrospector.fieldsOf(clazz);
+  Future<List<ConstructorDeclaration>> constructorsOf(
+          IntrospectableClassDeclaration clazz) =>
+      typeIntrospector.constructorsOf(clazz);
 
   @override
-  Future<List<ClassDeclaration>> interfacesOf(ClassDeclaration clazz) =>
-      classIntrospector.interfacesOf(clazz);
+  Future<List<FieldDeclaration>> fieldsOf(
+          IntrospectableClassDeclaration clazz) =>
+      typeIntrospector.fieldsOf(clazz);
 
   @override
-  Future<List<MethodDeclaration>> methodsOf(ClassDeclaration clazz) =>
-      classIntrospector.methodsOf(clazz);
-
-  @override
-  Future<List<ClassDeclaration>> mixinsOf(ClassDeclaration clazz) =>
-      classIntrospector.mixinsOf(clazz);
-
-  @override
-  Future<ClassDeclaration?> superclassOf(ClassDeclaration clazz) =>
-      classIntrospector.superclassOf(clazz);
+  Future<List<MethodDeclaration>> methodsOf(
+          IntrospectableClassDeclaration clazz) =>
+      typeIntrospector.methodsOf(clazz);
 
   @override
   Future<StaticType> resolve(TypeAnnotationCode code) =>
@@ -98,9 +94,13 @@
 
 class DeclarationBuilderImpl extends DeclarationBuilderBase
     implements DeclarationBuilder {
-  DeclarationBuilderImpl(IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector, TypeResolver typeResolver)
-      : super(identifierResolver, classIntrospector, typeResolver);
+  DeclarationBuilderImpl(
+      IdentifierResolver identifierResolver,
+      TypeIntrospector typeIntrospector,
+      TypeDeclarationResolver typeDeclarationResolver,
+      TypeResolver typeResolver)
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver);
 
   @override
   void declareInLibrary(DeclarationCode declaration) {
@@ -115,9 +115,11 @@
   ClassMemberDeclarationBuilderImpl(
       this.definingClass,
       IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector,
+      TypeIntrospector typeIntrospector,
+      TypeDeclarationResolver typeDeclarationResolver,
       TypeResolver typeResolver)
-      : super(identifierResolver, classIntrospector, typeResolver);
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver);
 
   @override
   void declareInClass(DeclarationCode declaration) {
@@ -129,27 +131,23 @@
 
 /// Base class for all [DefinitionBuilder]s.
 class DefinitionBuilderBase extends DeclarationBuilderBase
-    implements TypeDeclarationResolver, TypeInferrer {
-  final TypeDeclarationResolver typeDeclarationResolver;
+    implements TypeInferrer {
   final TypeInferrer typeInferrer;
 
   DefinitionBuilderBase(
       IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector,
+      TypeIntrospector typeIntrospector,
+      TypeDeclarationResolver typeDeclarationResolver,
       TypeResolver typeResolver,
-      this.typeDeclarationResolver,
       this.typeInferrer,
       {Map<String, List<DeclarationCode>>? parentClassAugmentations,
       List<DeclarationCode>? parentLibraryAugmentations})
-      : super(identifierResolver, classIntrospector, typeResolver,
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver,
             parentClassAugmentations: parentClassAugmentations,
             parentLibraryAugmentations: parentLibraryAugmentations);
 
   @override
-  Future<TypeDeclaration> declarationOf(IdentifierImpl identifier) =>
-      typeDeclarationResolver.declarationOf(identifier);
-
-  @override
   Future<TypeAnnotation> inferType(OmittedTypeAnnotationImpl omittedType) =>
       typeInferrer.inferType(omittedType);
 }
@@ -157,19 +155,19 @@
 class ClassDefinitionBuilderImpl extends DefinitionBuilderBase
     implements ClassDefinitionBuilder {
   /// The declaration this is a builder for.
-  final ClassDeclaration declaration;
+  final IntrospectableClassDeclaration declaration;
 
   ClassDefinitionBuilderImpl(
       this.declaration,
       IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector,
+      TypeIntrospector typeIntrospector,
       TypeResolver typeResolver,
       TypeDeclarationResolver typeDeclarationResolver,
       TypeInferrer typeInferrer,
       {Map<String, List<DeclarationCode>>? parentClassAugmentations,
       List<DeclarationCode>? parentLibraryAugmentations})
-      : super(identifierResolver, classIntrospector, typeResolver,
-            typeDeclarationResolver, typeInferrer,
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver, typeInferrer,
             parentClassAugmentations: parentClassAugmentations,
             parentLibraryAugmentations: parentLibraryAugmentations);
 
@@ -177,30 +175,30 @@
   Future<ConstructorDefinitionBuilder> buildConstructor(
       Identifier identifier) async {
     ConstructorDeclaration constructor =
-        (await classIntrospector.constructorsOf(declaration))
+        (await typeIntrospector.constructorsOf(declaration))
             .firstWhere((constructor) => constructor.identifier == identifier);
     return new ConstructorDefinitionBuilderImpl(constructor, identifierResolver,
-        classIntrospector, typeResolver, typeDeclarationResolver, typeInferrer,
+        typeIntrospector, typeDeclarationResolver, typeResolver, typeInferrer,
         parentClassAugmentations: _classAugmentations,
         parentLibraryAugmentations: _libraryAugmentations);
   }
 
   @override
   Future<VariableDefinitionBuilder> buildField(Identifier identifier) async {
-    FieldDeclaration field = (await classIntrospector.fieldsOf(declaration))
+    FieldDeclaration field = (await typeIntrospector.fieldsOf(declaration))
         .firstWhere((field) => field.identifier == identifier);
     return new VariableDefinitionBuilderImpl(field, identifierResolver,
-        classIntrospector, typeResolver, typeDeclarationResolver, typeInferrer,
+        typeIntrospector, typeDeclarationResolver, typeResolver, typeInferrer,
         parentClassAugmentations: _classAugmentations,
         parentLibraryAugmentations: _libraryAugmentations);
   }
 
   @override
   Future<FunctionDefinitionBuilder> buildMethod(Identifier identifier) async {
-    MethodDeclaration method = (await classIntrospector.methodsOf(declaration))
+    MethodDeclaration method = (await typeIntrospector.methodsOf(declaration))
         .firstWhere((method) => method.identifier == identifier);
     return new FunctionDefinitionBuilderImpl(method, identifierResolver,
-        classIntrospector, typeResolver, typeDeclarationResolver, typeInferrer,
+        typeIntrospector, typeDeclarationResolver, typeResolver, typeInferrer,
         parentClassAugmentations: _classAugmentations,
         parentLibraryAugmentations: _libraryAugmentations);
   }
@@ -214,14 +212,14 @@
   FunctionDefinitionBuilderImpl(
       this.declaration,
       IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector,
-      TypeResolver typeResolver,
+      TypeIntrospector typeIntrospector,
       TypeDeclarationResolver typeDeclarationResolver,
+      TypeResolver typeResolver,
       TypeInferrer typeInferrer,
       {Map<String, List<DeclarationCode>>? parentClassAugmentations,
       List<DeclarationCode>? parentLibraryAugmentations})
-      : super(identifierResolver, classIntrospector, typeResolver,
-            typeDeclarationResolver, typeInferrer,
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver, typeInferrer,
             parentClassAugmentations: parentClassAugmentations,
             parentLibraryAugmentations: parentLibraryAugmentations);
 
@@ -247,14 +245,14 @@
   ConstructorDefinitionBuilderImpl(
       this.declaration,
       IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector,
-      TypeResolver typeResolver,
+      TypeIntrospector typeIntrospector,
       TypeDeclarationResolver typeDeclarationResolver,
+      TypeResolver typeResolver,
       TypeInferrer typeInferrer,
       {Map<String, List<DeclarationCode>>? parentClassAugmentations,
       List<DeclarationCode>? parentLibraryAugmentations})
-      : super(identifierResolver, classIntrospector, typeResolver,
-            typeDeclarationResolver, typeInferrer,
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver, typeInferrer,
             parentClassAugmentations: parentClassAugmentations,
             parentLibraryAugmentations: parentLibraryAugmentations);
 
@@ -278,14 +276,14 @@
   VariableDefinitionBuilderImpl(
       this.declaration,
       IdentifierResolver identifierResolver,
-      ClassIntrospector classIntrospector,
-      TypeResolver typeResolver,
+      TypeIntrospector typeIntrospector,
       TypeDeclarationResolver typeDeclarationResolver,
+      TypeResolver typeResolver,
       TypeInferrer typeInferrer,
       {Map<String, List<DeclarationCode>>? parentClassAugmentations,
       List<DeclarationCode>? parentLibraryAugmentations})
-      : super(identifierResolver, classIntrospector, typeResolver,
-            typeDeclarationResolver, typeInferrer,
+      : super(identifierResolver, typeIntrospector, typeDeclarationResolver,
+            typeResolver, typeInferrer,
             parentClassAugmentations: parentClassAugmentations,
             parentLibraryAugmentations: parentLibraryAugmentations);
 
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/execute_macro.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/execute_macro.dart
index 67b8171..ec322d5 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/execute_macro.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/execute_macro.dart
@@ -43,18 +43,32 @@
     Macro macro,
     Declaration declaration,
     IdentifierResolver identifierResolver,
-    ClassIntrospector classIntrospector,
+    TypeIntrospector typeIntrospector,
+    TypeDeclarationResolver typeDeclarationResolver,
     TypeResolver typeResolver) async {
   if (declaration is ClassDeclaration && macro is ClassDeclarationsMacro) {
+    if (declaration is! IntrospectableClassDeclaration) {
+      throw new ArgumentError(
+          'Class declarations annotated with a macro should be introspectable '
+          'in the declarations phase.');
+    }
     ClassMemberDeclarationBuilderImpl builder =
-        new ClassMemberDeclarationBuilderImpl(declaration.identifier,
-            identifierResolver, classIntrospector, typeResolver);
+        new ClassMemberDeclarationBuilderImpl(
+            declaration.identifier,
+            identifierResolver,
+            typeIntrospector,
+            typeDeclarationResolver,
+            typeResolver);
     await macro.buildDeclarationsForClass(declaration, builder);
     return builder.result;
   } else if (declaration is ClassMemberDeclaration) {
     ClassMemberDeclarationBuilderImpl builder =
-        new ClassMemberDeclarationBuilderImpl(declaration.definingClass,
-            identifierResolver, classIntrospector, typeResolver);
+        new ClassMemberDeclarationBuilderImpl(
+            declaration.definingClass,
+            identifierResolver,
+            typeIntrospector,
+            typeDeclarationResolver,
+            typeResolver);
     if (declaration is FunctionDeclaration) {
       if (macro is ConstructorDeclarationsMacro &&
           declaration is ConstructorDeclaration) {
@@ -75,7 +89,10 @@
         return builder.result;
       } else if (macro is VariableDeclarationsMacro) {
         DeclarationBuilderImpl builder = new DeclarationBuilderImpl(
-            identifierResolver, classIntrospector, typeResolver);
+            identifierResolver,
+            typeIntrospector,
+            typeDeclarationResolver,
+            typeResolver);
         await macro.buildDeclarationsForVariable(
             declaration as VariableDeclaration, builder);
         return builder.result;
@@ -83,7 +100,10 @@
     }
   } else {
     DeclarationBuilderImpl builder = new DeclarationBuilderImpl(
-        identifierResolver, classIntrospector, typeResolver);
+        identifierResolver,
+        typeIntrospector,
+        typeDeclarationResolver,
+        typeResolver);
     if (declaration is FunctionDeclaration &&
         macro is FunctionDeclarationsMacro) {
       await macro.buildDeclarationsForFunction(declaration, builder);
@@ -103,7 +123,7 @@
     Macro macro,
     Declaration declaration,
     IdentifierResolver identifierResolver,
-    ClassIntrospector classIntrospector,
+    TypeIntrospector typeIntrospector,
     TypeResolver typeResolver,
     TypeDeclarationResolver typeDeclarationResolver,
     TypeInferrer typeInferrer) async {
@@ -114,9 +134,9 @@
           new ConstructorDefinitionBuilderImpl(
               declaration,
               identifierResolver,
-              classIntrospector,
-              typeResolver,
+              typeIntrospector,
               typeDeclarationResolver,
+              typeResolver,
               typeInferrer);
       await macro.buildDefinitionForConstructor(declaration, builder);
       return builder.result;
@@ -124,9 +144,9 @@
       FunctionDefinitionBuilderImpl builder = new FunctionDefinitionBuilderImpl(
           declaration,
           identifierResolver,
-          classIntrospector,
-          typeResolver,
+          typeIntrospector,
           typeDeclarationResolver,
+          typeResolver,
           typeInferrer);
       if (macro is MethodDefinitionMacro && declaration is MethodDeclaration) {
         await macro.buildDefinitionForMethod(declaration, builder);
@@ -140,9 +160,9 @@
     VariableDefinitionBuilderImpl builder = new VariableDefinitionBuilderImpl(
         declaration,
         identifierResolver,
-        classIntrospector,
-        typeResolver,
+        typeIntrospector,
         typeDeclarationResolver,
+        typeResolver,
         typeInferrer);
     if (macro is FieldDefinitionMacro && declaration is FieldDeclaration) {
       await macro.buildDefinitionForField(declaration, builder);
@@ -152,10 +172,15 @@
       return builder.result;
     }
   } else if (macro is ClassDefinitionMacro && declaration is ClassDeclaration) {
+    if (declaration is! IntrospectableClassDeclaration) {
+      throw new ArgumentError(
+          'Class declarations annotated with a macro should be introspectable '
+          'in the definitions phase.');
+    }
     ClassDefinitionBuilderImpl builder = new ClassDefinitionBuilderImpl(
         declaration,
         identifierResolver,
-        classIntrospector,
+        typeIntrospector,
         typeResolver,
         typeDeclarationResolver,
         typeInferrer);
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/executor_base.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/executor_base.dart
index 69c0745..6bd0a41 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/executor_base.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/executor_base.dart
@@ -196,16 +196,16 @@
               sendResult(serializer);
               break;
             case MessageType.constructorsOfRequest:
-              ClassIntrospectionRequest request =
-                  new ClassIntrospectionRequest.deserialize(
+              InterfaceIntrospectionRequest request =
+                  new InterfaceIntrospectionRequest.deserialize(
                       deserializer, messageType, zoneId);
-              ClassIntrospector classIntrospector =
-                  request.classIntrospector.instance as ClassIntrospector;
+              TypeIntrospector typeIntrospector =
+                  request.typeIntrospector.instance as TypeIntrospector;
               SerializableResponse response = new SerializableResponse(
                   requestId: request.id,
                   responseType: MessageType.declarationList,
-                  response: new DeclarationList((await classIntrospector
-                          .constructorsOf(request.classDeclaration))
+                  response: new DeclarationList((await typeIntrospector
+                          .constructorsOf(request.type))
                       // TODO: Consider refactoring to avoid the need for this.
                       .cast<ConstructorDeclarationImpl>()),
                   serializationZoneId: zoneId);
@@ -214,16 +214,16 @@
               sendResult(serializer);
               break;
             case MessageType.fieldsOfRequest:
-              ClassIntrospectionRequest request =
-                  new ClassIntrospectionRequest.deserialize(
+              InterfaceIntrospectionRequest request =
+                  new InterfaceIntrospectionRequest.deserialize(
                       deserializer, messageType, zoneId);
-              ClassIntrospector classIntrospector =
-                  request.classIntrospector.instance as ClassIntrospector;
+              TypeIntrospector typeIntrospector =
+                  request.typeIntrospector.instance as TypeIntrospector;
               SerializableResponse response = new SerializableResponse(
                   requestId: request.id,
                   responseType: MessageType.declarationList,
-                  response: new DeclarationList((await classIntrospector
-                          .fieldsOf(request.classDeclaration))
+                  response: new DeclarationList((await typeIntrospector
+                          .fieldsOf(request.type))
                       // TODO: Consider refactoring to avoid the need for this.
                       .cast<FieldDeclarationImpl>()),
                   serializationZoneId: zoneId);
@@ -231,35 +231,17 @@
               response.serialize(serializer);
               sendResult(serializer);
               break;
-            case MessageType.interfacesOfRequest:
-              ClassIntrospectionRequest request =
-                  new ClassIntrospectionRequest.deserialize(
-                      deserializer, messageType, zoneId);
-              ClassIntrospector classIntrospector =
-                  request.classIntrospector.instance as ClassIntrospector;
-              SerializableResponse response = new SerializableResponse(
-                  requestId: request.id,
-                  responseType: MessageType.declarationList,
-                  response: new DeclarationList((await classIntrospector
-                          .interfacesOf(request.classDeclaration))
-                      // TODO: Consider refactoring to avoid the need for this.
-                      .cast<ClassDeclarationImpl>()),
-                  serializationZoneId: zoneId);
-              Serializer serializer = serializerFactory();
-              response.serialize(serializer);
-              sendResult(serializer);
-              break;
             case MessageType.methodsOfRequest:
-              ClassIntrospectionRequest request =
-                  new ClassIntrospectionRequest.deserialize(
+              InterfaceIntrospectionRequest request =
+                  new InterfaceIntrospectionRequest.deserialize(
                       deserializer, messageType, zoneId);
-              ClassIntrospector classIntrospector =
-                  request.classIntrospector.instance as ClassIntrospector;
+              TypeIntrospector typeIntrospector =
+                  request.typeIntrospector.instance as TypeIntrospector;
               SerializableResponse response = new SerializableResponse(
                   requestId: request.id,
                   responseType: MessageType.declarationList,
-                  response: new DeclarationList((await classIntrospector
-                          .methodsOf(request.classDeclaration))
+                  response: new DeclarationList((await typeIntrospector
+                          .methodsOf(request.type))
                       // TODO: Consider refactoring to avoid the need for this.
                       .cast<MethodDeclarationImpl>()),
                   serializationZoneId: zoneId);
@@ -267,42 +249,6 @@
               response.serialize(serializer);
               sendResult(serializer);
               break;
-            case MessageType.mixinsOfRequest:
-              ClassIntrospectionRequest request =
-                  new ClassIntrospectionRequest.deserialize(
-                      deserializer, messageType, zoneId);
-              ClassIntrospector classIntrospector =
-                  request.classIntrospector.instance as ClassIntrospector;
-              SerializableResponse response = new SerializableResponse(
-                  requestId: request.id,
-                  responseType: MessageType.declarationList,
-                  response: new DeclarationList((await classIntrospector
-                          .mixinsOf(request.classDeclaration))
-                      // TODO: Consider refactoring to avoid the need for this.
-                      .cast<ClassDeclarationImpl>()),
-                  serializationZoneId: zoneId);
-              Serializer serializer = serializerFactory();
-              response.serialize(serializer);
-              sendResult(serializer);
-              break;
-            case MessageType.superclassOfRequest:
-              ClassIntrospectionRequest request =
-                  new ClassIntrospectionRequest.deserialize(
-                      deserializer, messageType, zoneId);
-              ClassIntrospector classIntrospector =
-                  request.classIntrospector.instance as ClassIntrospector;
-              SerializableResponse response = new SerializableResponse(
-                  requestId: request.id,
-                  responseType: MessageType.remoteInstance,
-                  response: (await classIntrospector
-                          .superclassOf(request.classDeclaration))
-                      // TODO: Consider refactoring to avoid the need for this.
-                      as ClassDeclarationImpl?,
-                  serializationZoneId: zoneId);
-              Serializer serializer = serializerFactory();
-              response.serialize(serializer);
-              sendResult(serializer);
-              break;
             default:
               throw new StateError('Unexpected message type $messageType');
           }
@@ -325,8 +271,9 @@
           MacroInstanceIdentifier macro,
           DeclarationImpl declaration,
           IdentifierResolver identifierResolver,
+          TypeDeclarationResolver typeDeclarationResolver,
           TypeResolver typeResolver,
-          ClassIntrospector classIntrospector) =>
+          TypeIntrospector typeIntrospector) =>
       _sendRequest((zoneId) => new ExecuteDeclarationsPhaseRequest(
           macro,
           declaration,
@@ -335,13 +282,17 @@
               id: RemoteInstance.uniqueId,
               kind: RemoteInstanceKind.identifierResolver),
           new RemoteInstanceImpl(
+              instance: typeDeclarationResolver,
+              id: RemoteInstance.uniqueId,
+              kind: RemoteInstanceKind.typeDeclarationResolver),
+          new RemoteInstanceImpl(
               instance: typeResolver,
               id: RemoteInstance.uniqueId,
               kind: RemoteInstanceKind.typeResolver),
           new RemoteInstanceImpl(
-              instance: classIntrospector,
+              instance: typeIntrospector,
               id: RemoteInstance.uniqueId,
-              kind: RemoteInstanceKind.classIntrospector),
+              kind: RemoteInstanceKind.typeIntrospector),
           serializationZoneId: zoneId));
 
   @override
@@ -349,9 +300,9 @@
           MacroInstanceIdentifier macro,
           DeclarationImpl declaration,
           IdentifierResolver identifierResolver,
-          TypeResolver typeResolver,
-          ClassIntrospector classIntrospector,
           TypeDeclarationResolver typeDeclarationResolver,
+          TypeResolver typeResolver,
+          TypeIntrospector typeIntrospector,
           TypeInferrer typeInferrer) =>
       _sendRequest((zoneId) => new ExecuteDefinitionsPhaseRequest(
           macro,
@@ -365,9 +316,9 @@
               id: RemoteInstance.uniqueId,
               kind: RemoteInstanceKind.typeResolver),
           new RemoteInstanceImpl(
-              instance: classIntrospector,
+              instance: typeIntrospector,
               id: RemoteInstance.uniqueId,
-              kind: RemoteInstanceKind.classIntrospector),
+              kind: RemoteInstanceKind.typeIntrospector),
           new RemoteInstanceImpl(
               instance: typeDeclarationResolver,
               id: RemoteInstance.uniqueId,
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/introspection_impls.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/introspection_impls.dart
index 78ce58e..903c48c 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/introspection_impls.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/introspection_impls.dart
@@ -588,10 +588,14 @@
   }
 }
 
+class IntrospectableClassDeclarationImpl = ClassDeclarationImpl
+    with IntrospectableType
+    implements IntrospectableClassDeclaration;
+
 class ClassDeclarationImpl extends ParameterizedTypeDeclarationImpl
     implements ClassDeclaration {
   @override
-  final List<TypeAnnotationImpl> interfaces;
+  final List<NamedTypeAnnotationImpl> interfaces;
 
   @override
   final bool isAbstract;
@@ -600,13 +604,15 @@
   final bool isExternal;
 
   @override
-  final List<TypeAnnotationImpl> mixins;
+  final List<NamedTypeAnnotationImpl> mixins;
 
   @override
-  final TypeAnnotationImpl? superclass;
+  final NamedTypeAnnotationImpl? superclass;
 
   @override
-  RemoteInstanceKind get kind => RemoteInstanceKind.classDeclaration;
+  RemoteInstanceKind get kind => this is IntrospectableClassDeclaration
+      ? RemoteInstanceKind.introspectableClassDeclaration
+      : RemoteInstanceKind.classDeclaration;
 
   ClassDeclarationImpl({
     // Declaration fields
@@ -629,7 +635,7 @@
     if (serializationMode.isClient) return;
 
     serializer.startList();
-    for (TypeAnnotationImpl interface in interfaces) {
+    for (NamedTypeAnnotationImpl interface in interfaces) {
       interface.serialize(serializer);
     }
     serializer
@@ -637,7 +643,7 @@
       ..addBool(isAbstract)
       ..addBool(isExternal)
       ..startList();
-    for (TypeAnnotationImpl mixin in mixins) {
+    for (NamedTypeAnnotationImpl mixin in mixins) {
       mixin.serialize(serializer);
     }
     serializer..endList();
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/multi_executor.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/multi_executor.dart
index e5b11af..b8eb740 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/multi_executor.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/multi_executor.dart
@@ -99,29 +99,35 @@
           MacroInstanceIdentifier macro,
           DeclarationImpl declaration,
           IdentifierResolver identifierResolver,
+          TypeDeclarationResolver typeDeclarationResolver,
           TypeResolver typeResolver,
-          ClassIntrospector classIntrospector) =>
+          TypeIntrospector typeIntrospector) =>
       _instanceExecutors[macro]!._withInstance((executor) =>
-          executor.executeDeclarationsPhase(macro, declaration,
-              identifierResolver, typeResolver, classIntrospector));
+          executor.executeDeclarationsPhase(
+              macro,
+              declaration,
+              identifierResolver,
+              typeDeclarationResolver,
+              typeResolver,
+              typeIntrospector));
 
   @override
   Future<MacroExecutionResult> executeDefinitionsPhase(
           MacroInstanceIdentifier macro,
           DeclarationImpl declaration,
           IdentifierResolver identifierResolver,
-          TypeResolver typeResolver,
-          ClassIntrospector classIntrospector,
           TypeDeclarationResolver typeDeclarationResolver,
+          TypeResolver typeResolver,
+          TypeIntrospector typeIntrospector,
           TypeInferrer typeInferrer) =>
       _instanceExecutors[macro]!._withInstance((executor) =>
           executor.executeDefinitionsPhase(
               macro,
               declaration,
               identifierResolver,
-              typeResolver,
-              classIntrospector,
               typeDeclarationResolver,
+              typeResolver,
+              typeIntrospector,
               typeInferrer));
 
   @override
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/protocol.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/protocol.dart
index d763d12..26c47bf 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/protocol.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/protocol.dart
@@ -289,11 +289,17 @@
   final DeclarationImpl declaration;
 
   final RemoteInstanceImpl identifierResolver;
+  final RemoteInstanceImpl typeDeclarationResolver;
   final RemoteInstanceImpl typeResolver;
-  final RemoteInstanceImpl classIntrospector;
+  final RemoteInstanceImpl typeIntrospector;
 
-  ExecuteDeclarationsPhaseRequest(this.macro, this.declaration,
-      this.identifierResolver, this.typeResolver, this.classIntrospector,
+  ExecuteDeclarationsPhaseRequest(
+      this.macro,
+      this.declaration,
+      this.identifierResolver,
+      this.typeDeclarationResolver,
+      this.typeResolver,
+      this.typeIntrospector,
       {required int serializationZoneId})
       : super(serializationZoneId: serializationZoneId);
 
@@ -304,8 +310,9 @@
       : macro = new MacroInstanceIdentifierImpl.deserialize(deserializer),
         declaration = RemoteInstance.deserialize(deserializer),
         identifierResolver = RemoteInstance.deserialize(deserializer),
+        typeDeclarationResolver = RemoteInstance.deserialize(deserializer),
         typeResolver = RemoteInstance.deserialize(deserializer),
-        classIntrospector = RemoteInstance.deserialize(deserializer),
+        typeIntrospector = RemoteInstance.deserialize(deserializer),
         super.deserialize(deserializer, serializationZoneId);
 
   void serialize(Serializer serializer) {
@@ -313,8 +320,9 @@
     macro.serialize(serializer);
     declaration.serialize(serializer);
     identifierResolver.serialize(serializer);
+    typeDeclarationResolver.serialize(serializer);
     typeResolver.serialize(serializer);
-    classIntrospector.serialize(serializer);
+    typeIntrospector.serialize(serializer);
 
     super.serialize(serializer);
   }
@@ -328,7 +336,7 @@
 
   final RemoteInstanceImpl identifierResolver;
   final RemoteInstanceImpl typeResolver;
-  final RemoteInstanceImpl classIntrospector;
+  final RemoteInstanceImpl typeIntrospector;
   final RemoteInstanceImpl typeDeclarationResolver;
   final RemoteInstanceImpl typeInferrer;
 
@@ -337,7 +345,7 @@
       this.declaration,
       this.identifierResolver,
       this.typeResolver,
-      this.classIntrospector,
+      this.typeIntrospector,
       this.typeDeclarationResolver,
       this.typeInferrer,
       {required int serializationZoneId})
@@ -351,7 +359,7 @@
         declaration = RemoteInstance.deserialize(deserializer),
         identifierResolver = RemoteInstance.deserialize(deserializer),
         typeResolver = RemoteInstance.deserialize(deserializer),
-        classIntrospector = RemoteInstance.deserialize(deserializer),
+        typeIntrospector = RemoteInstance.deserialize(deserializer),
         typeDeclarationResolver = RemoteInstance.deserialize(deserializer),
         typeInferrer = RemoteInstance.deserialize(deserializer),
         super.deserialize(deserializer, serializationZoneId);
@@ -362,7 +370,7 @@
     declaration.serialize(serializer);
     identifierResolver.serialize(serializer);
     typeResolver.serialize(serializer);
-    classIntrospector.serialize(serializer);
+    typeIntrospector.serialize(serializer);
     typeDeclarationResolver.serialize(serializer);
     typeInferrer.serialize(serializer);
 
@@ -477,30 +485,30 @@
 }
 
 /// A general request class for all requests coming from methods on the
-/// [ClassIntrospector] interface.
-class ClassIntrospectionRequest extends Request {
-  final ClassDeclarationImpl classDeclaration;
-  final RemoteInstanceImpl classIntrospector;
+/// [TypeIntrospector] interface.
+class InterfaceIntrospectionRequest extends Request {
+  final IntrospectableType type;
+  final RemoteInstanceImpl typeIntrospector;
   final MessageType requestKind;
 
-  ClassIntrospectionRequest(
-      this.classDeclaration, this.classIntrospector, this.requestKind,
+  InterfaceIntrospectionRequest(
+      this.type, this.typeIntrospector, this.requestKind,
       {required int serializationZoneId})
       : super(serializationZoneId: serializationZoneId);
 
   /// When deserializing we have already consumed the message type, so we don't
   /// consume it again and it should instead be passed in here.
-  ClassIntrospectionRequest.deserialize(
+  InterfaceIntrospectionRequest.deserialize(
       Deserializer deserializer, this.requestKind, int serializationZoneId)
-      : classDeclaration = RemoteInstance.deserialize(deserializer),
-        classIntrospector = RemoteInstance.deserialize(deserializer),
+      : type = RemoteInstance.deserialize(deserializer),
+        typeIntrospector = RemoteInstance.deserialize(deserializer),
         super.deserialize(deserializer, serializationZoneId);
 
   @override
   void serialize(Serializer serializer) {
     serializer.addInt(requestKind.index);
-    classDeclaration.serialize(serializer);
-    classIntrospector.serialize(serializer);
+    (type as Serializable).serialize(serializer);
+    typeIntrospector.serialize(serializer);
     super.serialize(serializer);
   }
 }
@@ -667,9 +675,9 @@
             serializationZoneId: serializationZoneId);
 }
 
-/// Client side implementation of the [ClientClassIntrospector], converts all
-/// invocations into remote RPC calls.
-class ClientClassIntrospector implements ClassIntrospector {
+/// Client side implementation of the [ClientTypeIntrospector], converts
+/// all invocations into remote RPC calls.
+class ClientTypeIntrospector implements TypeIntrospector {
   /// The actual remote instance of this class introspector.
   final RemoteInstanceImpl remoteInstance;
 
@@ -680,14 +688,14 @@
   /// arbitrary communication channel.
   final Future<Response> Function(Request request) sendRequest;
 
-  ClientClassIntrospector(this.sendRequest,
+  ClientTypeIntrospector(this.sendRequest,
       {required this.remoteInstance, required this.serializationZoneId});
 
   @override
   Future<List<ConstructorDeclaration>> constructorsOf(
-      ClassDeclarationImpl clazz) async {
-    ClassIntrospectionRequest request = new ClassIntrospectionRequest(
-        clazz, remoteInstance, MessageType.constructorsOfRequest,
+      IntrospectableType type) async {
+    InterfaceIntrospectionRequest request = new InterfaceIntrospectionRequest(
+        type, remoteInstance, MessageType.constructorsOfRequest,
         serializationZoneId: serializationZoneId);
     return _handleResponse<DeclarationList>(await sendRequest(request))
         .declarations
@@ -696,9 +704,9 @@
   }
 
   @override
-  Future<List<FieldDeclaration>> fieldsOf(ClassDeclarationImpl clazz) async {
-    ClassIntrospectionRequest request = new ClassIntrospectionRequest(
-        clazz, remoteInstance, MessageType.fieldsOfRequest,
+  Future<List<FieldDeclaration>> fieldsOf(IntrospectableType type) async {
+    InterfaceIntrospectionRequest request = new InterfaceIntrospectionRequest(
+        type, remoteInstance, MessageType.fieldsOfRequest,
         serializationZoneId: serializationZoneId);
     return _handleResponse<DeclarationList>(await sendRequest(request))
         .declarations
@@ -707,46 +715,15 @@
   }
 
   @override
-  Future<List<ClassDeclaration>> interfacesOf(
-      ClassDeclarationImpl clazz) async {
-    ClassIntrospectionRequest request = new ClassIntrospectionRequest(
-        clazz, remoteInstance, MessageType.interfacesOfRequest,
+  Future<List<MethodDeclaration>> methodsOf(IntrospectableType type) async {
+    InterfaceIntrospectionRequest request = new InterfaceIntrospectionRequest(
+        type, remoteInstance, MessageType.methodsOfRequest,
         serializationZoneId: serializationZoneId);
     return _handleResponse<DeclarationList>(await sendRequest(request))
         .declarations
         // TODO: Refactor so we can remove this cast
         .cast();
   }
-
-  @override
-  Future<List<MethodDeclaration>> methodsOf(ClassDeclarationImpl clazz) async {
-    ClassIntrospectionRequest request = new ClassIntrospectionRequest(
-        clazz, remoteInstance, MessageType.methodsOfRequest,
-        serializationZoneId: serializationZoneId);
-    return _handleResponse<DeclarationList>(await sendRequest(request))
-        .declarations
-        // TODO: Refactor so we can remove this cast
-        .cast();
-  }
-
-  @override
-  Future<List<ClassDeclaration>> mixinsOf(ClassDeclarationImpl clazz) async {
-    ClassIntrospectionRequest request = new ClassIntrospectionRequest(
-        clazz, remoteInstance, MessageType.mixinsOfRequest,
-        serializationZoneId: serializationZoneId);
-    return _handleResponse<DeclarationList>(await sendRequest(request))
-        .declarations
-        // TODO: Refactor so we can remove this cast
-        .cast();
-  }
-
-  @override
-  Future<ClassDeclaration?> superclassOf(ClassDeclarationImpl clazz) async {
-    ClassIntrospectionRequest request = new ClassIntrospectionRequest(
-        clazz, remoteInstance, MessageType.superclassOfRequest,
-        serializationZoneId: serializationZoneId);
-    return _handleResponse<ClassDeclaration?>(await sendRequest(request));
-  }
 }
 
 /// Client side implementation of a [TypeDeclarationResolver], converts all
@@ -830,10 +807,7 @@
   declarationOfRequest,
   declarationList,
   fieldsOfRequest,
-  interfacesOfRequest,
   methodsOfRequest,
-  mixinsOfRequest,
-  superclassOfRequest,
   error,
   executeDeclarationsPhaseRequest,
   executeDefinitionsPhaseRequest,
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/remote_instance.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/remote_instance.dart
index 666ff65..5a7565a 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/remote_instance.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/remote_instance.dart
@@ -90,7 +90,6 @@
 // The kinds of instances.
 enum RemoteInstanceKind {
   classDeclaration,
-  classIntrospector,
   constructorDeclaration,
   fieldDeclaration,
   functionDeclaration,
@@ -98,6 +97,8 @@
   functionTypeParameter,
   identifier,
   identifierResolver,
+  typeIntrospector,
+  introspectableClassDeclaration,
   namedStaticType,
   methodDeclaration,
   namedTypeAnnotation,
diff --git a/pkg/_fe_analyzer_shared/lib/src/macros/executor/serialization_extensions.dart b/pkg/_fe_analyzer_shared/lib/src/macros/executor/serialization_extensions.dart
index 9ac4f12..ca06efe 100644
--- a/pkg/_fe_analyzer_shared/lib/src/macros/executor/serialization_extensions.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/macros/executor/serialization_extensions.dart
@@ -16,7 +16,7 @@
     moveNext();
     RemoteInstanceKind kind = RemoteInstanceKind.values[expectInt()];
     switch (kind) {
-      case RemoteInstanceKind.classIntrospector:
+      case RemoteInstanceKind.typeIntrospector:
       case RemoteInstanceKind.identifierResolver:
       case RemoteInstanceKind.namedStaticType:
       case RemoteInstanceKind.staticType:
@@ -46,6 +46,9 @@
       case RemoteInstanceKind.identifier:
         moveNext();
         return _expectIdentifier(id) as T;
+      case RemoteInstanceKind.introspectableClassDeclaration:
+        moveNext();
+        return _expectIntrospectableClassDeclaration(id) as T;
       case RemoteInstanceKind.methodDeclaration:
         moveNext();
         return _expectMethodDeclaration(id) as T;
@@ -224,6 +227,20 @@
             (this..moveNext()).checkNull() ? null : expectRemoteInstance(),
       );
 
+  IntrospectableClassDeclaration _expectIntrospectableClassDeclaration(
+          int id) =>
+      new IntrospectableClassDeclarationImpl(
+        id: id,
+        identifier: expectRemoteInstance(),
+        typeParameters: (this..moveNext())._expectRemoteInstanceList(),
+        interfaces: (this..moveNext())._expectRemoteInstanceList(),
+        isAbstract: (this..moveNext()).expectBool(),
+        isExternal: (this..moveNext()).expectBool(),
+        mixins: (this..moveNext())._expectRemoteInstanceList(),
+        superclass:
+            (this..moveNext()).checkNull() ? null : expectRemoteInstance(),
+      );
+
   TypeAliasDeclaration _expectTypeAliasDeclaration(int id) =>
       new TypeAliasDeclarationImpl(
         id: id,
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 e6fcee3..5ae894f 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -5011,15 +5011,6 @@
     correctionMessage: r"""Try removing the 'const' modifier.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Null> codeFunctionAsTypeParameter = messageFunctionAsTypeParameter;
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageFunctionAsTypeParameter = const MessageCode(
-    "FunctionAsTypeParameter",
-    problemMessage:
-        r"""'Function' is a built-in identifier, could not used as a type identifier.""");
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeFunctionTypeDefaultValue = messageFunctionTypeDefaultValue;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5041,30 +5032,6 @@
     correctionMessage: r"""Try replacing the keyword with a return type.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
-    Message Function(String name)> templateFunctionUsedAsDec = const Template<
-        Message Function(String name)>(
-    problemMessageTemplate:
-        r"""'Function' is a built-in identifier, could not used as a #name name.""",
-    withArguments: _withArgumentsFunctionUsedAsDec);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name)> codeFunctionUsedAsDec =
-    const Code<Message Function(String name)>(
-  "FunctionUsedAsDec",
-);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsFunctionUsedAsDec(String name) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  return new Message(codeFunctionUsedAsDec,
-      problemMessage:
-          """'Function' is a built-in identifier, could not used as a ${name} name.""",
-      arguments: {'name': name});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeGeneratorReturnsValue = messageGeneratorReturnsValue;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
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 f928d0a..755066d4 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart
@@ -6828,14 +6828,26 @@
   TypeInfo computeTypeAfterIsOrAs(Token token) {
     TypeInfo typeInfo = computeType(token, /* required = */ true);
     if (typeInfo.isNullable) {
-      Token next = typeInfo.skipType(token).next!;
-      if (!isOneOfOrEof(
+      Token skipToken = typeInfo.skipType(token);
+      Token next = skipToken.next!;
+      if (isOneOfOrEof(
           next, const [')', '}', '?', '??', ',', ';', ':', 'is', 'as', '..'])) {
         // TODO(danrubel): investigate other situations
         // where `?` should be considered part of the type info
         // rather than the start of a conditional expression.
-        typeInfo = typeInfo.asNonNullable;
+        return typeInfo;
       }
+      if (optional('{', next)) {
+        // <expression> is/as <type> ? {
+        // This could be either a nullable type (e.g. last initializer in a
+        // constructor with a body), or a non-nullable type and a conditional.
+        // As with "?[" we check and have it as a conditional if it can be.
+        bool isConditional = canParseAsConditional(skipToken);
+        if (!isConditional) {
+          return typeInfo;
+        }
+      }
+      typeInfo = typeInfo.asNonNullable;
     }
     return typeInfo;
   }
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 a9c8bedb..e3de0f9 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/stack_listener.dart
@@ -9,6 +9,7 @@
         Code,
         LocatedMessage,
         Message,
+        codeBuiltInIdentifierInDeclaration,
         codeCatchSyntaxExtraParameters,
         codeNativeClauseShouldBeAnnotation,
         templateInternalProblemStackNotEmpty,
@@ -216,6 +217,8 @@
   @override
   Uri get uri;
 
+  Uri get importUri;
+
   void discard(int n) {
     for (int i = 0; i < n; i++) {
       pop();
@@ -498,6 +501,10 @@
     } else if (code == codeCatchSyntaxExtraParameters) {
       // Ignored. This error is handled by the BodyBuilder.
       return true;
+    } else if (code == codeBuiltInIdentifierInDeclaration) {
+      if (importUri.isScheme("dart")) return true;
+      if (uri.isScheme("org-dartlang-sdk")) return true;
+      return false;
     } else {
       return false;
     }
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 90c69c8..43361d0 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/type_info.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/type_info.dart
@@ -138,6 +138,7 @@
     return type.isPseudo ||
         (type.isBuiltIn && optional('.', token.next!)) ||
         (identical(value, 'dynamic')) ||
+        (identical(value, 'Function')) ||
         (identical(value, 'void'));
   }
   return false;
diff --git a/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart b/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart
index 63c9ba7..604b880 100644
--- a/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/scanner/token.dart
@@ -197,7 +197,7 @@
   static const Keyword FOR = const Keyword("for", "FOR", KeywordStyle.reserved);
 
   static const Keyword FUNCTION =
-      const Keyword("Function", "FUNCTION", KeywordStyle.pseudo);
+      const Keyword("Function", "FUNCTION", KeywordStyle.builtIn);
 
   static const Keyword GET = const Keyword("get", "GET", KeywordStyle.builtIn);
 
diff --git a/pkg/_fe_analyzer_shared/test/macros/api/api_test_data.dart b/pkg/_fe_analyzer_shared/test/macros/api/api_test_data.dart
index ad5e78b..1508116 100644
--- a/pkg/_fe_analyzer_shared/test/macros/api/api_test_data.dart
+++ b/pkg/_fe_analyzer_shared/test/macros/api/api_test_data.dart
@@ -18,7 +18,7 @@
 }
 
 @ClassMacro()
-abstract class Class2 {}
+abstract class Class2 extends Object {}
 
 @ClassMacro()
 class Class3 extends Class2 implements Interface1 {
diff --git a/pkg/_fe_analyzer_shared/test/macros/api/api_test_expectations.dart b/pkg/_fe_analyzer_shared/test/macros/api/api_test_expectations.dart
index 8c5a201..a5c63c31 100644
--- a/pkg/_fe_analyzer_shared/test/macros/api/api_test_expectations.dart
+++ b/pkg/_fe_analyzer_shared/test/macros/api/api_test_expectations.dart
@@ -5,23 +5,20 @@
 import 'package:_fe_analyzer_shared/src/macros/api.dart';
 
 const Map<String, ClassData> expectedClassData = {
-  'Class1': ClassData(
-      superclassOf: 'Object', fieldsOf: ['field1'], constructorsOf: ['']),
-  'Class2': ClassData(isAbstract: true, superclassOf: 'Object'),
-  'Class3': ClassData(
-      superclassOf: 'Class2',
-      superSuperclassOf: 'Object',
-      interfacesOf: [
-        'Interface1'
-      ],
-      // TODO(johnniwinther): Should we require a specific order?
-      fieldsOf: [
+  'Class1': ClassData(fieldsOf: ['field1'], constructorsOf: ['']),
+  'Class2': ClassData(isAbstract: true, superclass: 'Object'),
+  'Class3':
+      ClassData(superclass: 'Class2', superSuperclass: 'Object', interfaces: [
+    'Interface1'
+  ],
+          // TODO(johnniwinther): Should we require a specific order?
+          fieldsOf: [
         'field1',
         'field2',
         'staticField1',
       ],
-      // TODO(johnniwinther): Should we require a specific order?
-      methodsOf: [
+          // TODO(johnniwinther): Should we require a specific order?
+          methodsOf: [
         'method1',
         'method2',
         'getter1',
@@ -30,25 +27,22 @@
         'setter1',
         'property1',
       ],
-      // TODO(johnniwinther): Should we require a specific order?
-      constructorsOf: [
+          // TODO(johnniwinther): Should we require a specific order?
+          constructorsOf: [
         // TODO(johnniwinther): Should we normalize no-name constructor names?
         '',
         'named',
         'fact',
         'redirect',
       ]),
-  'Class4': ClassData(
-      superclassOf: 'Class1',
-      superSuperclassOf: 'Object',
-      mixinsOf: ['Mixin1']),
+  'Class4': ClassData(superclass: 'Class1', mixins: ['Mixin1']),
   'Class5': ClassData(
-      superclassOf: 'Class2',
-      superSuperclassOf: 'Object',
-      mixinsOf: ['Mixin1', 'Mixin2'],
-      interfacesOf: ['Interface1', 'Interface2']),
-  'Interface1': ClassData(isAbstract: true, superclassOf: 'Object'),
-  'Interface2': ClassData(isAbstract: true, superclassOf: 'Object'),
+      superclass: 'Class2',
+      superSuperclass: 'Object',
+      mixins: ['Mixin1', 'Mixin2'],
+      interfaces: ['Interface1', 'Interface2']),
+  'Interface1': ClassData(isAbstract: true),
+  'Interface2': ClassData(isAbstract: true),
 };
 
 const Map<String, FunctionData> expectedFunctionData = {
@@ -120,42 +114,53 @@
 }
 
 Future<void> checkClassDeclaration(ClassDeclaration declaration,
-    {ClassIntrospector? classIntrospector}) async {
+    {TypeDeclarationResolver? typeDeclarationResolver,
+    TypeIntrospector? typeIntrospector}) async {
   String name = declaration.identifier.name;
   ClassData? expected = expectedClassData[name];
   if (expected != null) {
     expect(expected.isAbstract, declaration.isAbstract, '$name.isAbstract');
     expect(expected.isExternal, declaration.isExternal, '$name.isExternal');
-    if (classIntrospector != null) {
-      ClassDeclaration? superclassOf =
-          await classIntrospector.superclassOf(declaration);
-      expect(expected.superclassOf, superclassOf?.identifier.name,
-          '$name.superclassOf');
-      if (superclassOf != null) {
-        ClassDeclaration? superSuperclassOf =
-            await classIntrospector.superclassOf(superclassOf);
-        expect(expected.superSuperclassOf, superSuperclassOf?.identifier.name,
-            '$name.superSuperclassOf');
-      }
-      List<ClassDeclaration> mixinsOf =
-          await classIntrospector.mixinsOf(declaration);
+    if (typeDeclarationResolver != null) {
+      TypeDeclaration? superclass = declaration.superclass == null
+          ? null
+          : await typeDeclarationResolver
+              .declarationOf(declaration.superclass!.identifier);
       expect(
-          expected.mixinsOf.length, mixinsOf.length, '$name.mixinsOf.length');
-      for (int i = 0; i < mixinsOf.length; i++) {
-        expect(expected.mixinsOf[i], mixinsOf[i].identifier.name,
-            '$name.mixinsOf[$i]');
+          expected.superclass, superclass?.identifier.name, '$name.superclass');
+      if (superclass is ClassDeclaration) {
+        TypeDeclaration? superSuperclass = superclass.superclass == null
+            ? null
+            : await typeDeclarationResolver
+                .declarationOf(superclass.superclass!.identifier);
+        expect(expected.superSuperclass, superSuperclass?.identifier.name,
+            '$name.superSuperclass');
       }
-      List<ClassDeclaration> interfacesOf =
-          await classIntrospector.interfacesOf(declaration);
-      expect(expected.interfacesOf.length, interfacesOf.length,
-          '$name.interfacesOf.length');
-      for (int i = 0; i < interfacesOf.length; i++) {
-        expect(expected.interfacesOf[i], interfacesOf[i].identifier.name,
-            '$name.interfacesOf[$i]');
+      List<TypeDeclaration> mixins = [
+        for (NamedTypeAnnotation mixin in declaration.mixins)
+          await typeDeclarationResolver.declarationOf(mixin.identifier),
+      ];
+      expect(expected.mixins.length, mixins.length, '$name.mixins.length');
+      for (int i = 0; i < mixins.length; i++) {
+        expect(
+            expected.mixins[i], mixins[i].identifier.name, '$name.mixins[$i]');
       }
 
+      List<TypeDeclaration> interfaces = [
+        for (NamedTypeAnnotation interface in declaration.interfaces)
+          await typeDeclarationResolver.declarationOf(interface.identifier),
+      ];
+      expect(expected.interfaces.length, interfaces.length,
+          '$name.interfaces.length');
+      for (int i = 0; i < interfaces.length; i++) {
+        expect(expected.interfaces[i], interfaces[i].identifier.name,
+            '$name.interfaces[$i]');
+      }
+    }
+    if (typeIntrospector != null &&
+        declaration is IntrospectableClassDeclaration) {
       List<FieldDeclaration> fieldsOf =
-          await classIntrospector.fieldsOf(declaration);
+          await typeIntrospector.fieldsOf(declaration);
       expect(
           expected.fieldsOf.length, fieldsOf.length, '$name.fieldsOf.length');
       for (int i = 0; i < fieldsOf.length; i++) {
@@ -164,7 +169,7 @@
       }
 
       List<MethodDeclaration> methodsOf =
-          await classIntrospector.methodsOf(declaration);
+          await typeIntrospector.methodsOf(declaration);
       expect(expected.methodsOf.length, methodsOf.length,
           '$name.methodsOf.length');
       for (int i = 0; i < methodsOf.length; i++) {
@@ -173,7 +178,7 @@
       }
 
       List<ConstructorDeclaration> constructorsOf =
-          await classIntrospector.constructorsOf(declaration);
+          await typeIntrospector.constructorsOf(declaration);
       expect(expected.constructorsOf.length, constructorsOf.length,
           '$name.constructorsOf.length');
       for (int i = 0; i < constructorsOf.length; i++) {
@@ -279,10 +284,10 @@
 class ClassData {
   final bool isAbstract;
   final bool isExternal;
-  final String superclassOf;
-  final String? superSuperclassOf;
-  final List<String> interfacesOf;
-  final List<String> mixinsOf;
+  final String? superclass;
+  final String? superSuperclass;
+  final List<String> interfaces;
+  final List<String> mixins;
   final List<String> fieldsOf;
   final List<String> methodsOf;
   final List<String> constructorsOf;
@@ -290,10 +295,10 @@
   const ClassData(
       {this.isAbstract: false,
       this.isExternal: false,
-      required this.superclassOf,
-      this.superSuperclassOf,
-      this.interfacesOf: const [],
-      this.mixinsOf: const [],
+      this.superclass,
+      this.superSuperclass,
+      this.interfaces: const [],
+      this.mixins: const [],
       this.fieldsOf: const [],
       this.methodsOf: const [],
       this.constructorsOf: const []});
diff --git a/pkg/_fe_analyzer_shared/test/macros/api/api_test_macro.dart b/pkg/_fe_analyzer_shared/test/macros/api/api_test_macro.dart
index 3e04aae..d36c261 100644
--- a/pkg/_fe_analyzer_shared/test/macros/api/api_test_macro.dart
+++ b/pkg/_fe_analyzer_shared/test/macros/api/api_test_macro.dart
@@ -6,50 +6,55 @@
 import 'package:_fe_analyzer_shared/src/macros/api.dart';
 import 'api_test_expectations.dart';
 
-macro class ClassMacro
+macro
+
+class ClassMacro
     implements ClassTypesMacro, ClassDeclarationsMacro, ClassDefinitionMacro {
   const ClassMacro();
 
-  FutureOr<void> buildTypesForClass(
-      ClassDeclaration clazz, TypeBuilder builder) async {
+  FutureOr<void> buildTypesForClass(ClassDeclaration clazz,
+      TypeBuilder builder) async {
     await checkClassDeclaration(clazz);
   }
 
   FutureOr<void> buildDeclarationsForClass(
       ClassDeclaration clazz, ClassMemberDeclarationBuilder builder) async {
-    await checkClassDeclaration(clazz, classIntrospector: builder);
+    await checkClassDeclaration(
+      clazz, typeDeclarationResolver: builder, typeIntrospector: builder);
   }
 
   FutureOr<void> buildDefinitionForClass(
       ClassDeclaration clazz, ClassDefinitionBuilder builder) async {
-    await checkClassDeclaration(clazz, classIntrospector: builder);
+    await checkClassDeclaration(clazz, typeIntrospector: builder);
     await checkIdentifierResolver(builder);
     await checkTypeDeclarationResolver(builder,
-        {clazz.identifier : clazz.identifier.name});
+        {clazz.identifier: clazz.identifier.name});
   }
 }
 
-macro class FunctionMacro
+macro
+
+class FunctionMacro
     implements
         FunctionTypesMacro,
         FunctionDeclarationsMacro,
         FunctionDefinitionMacro {
   const FunctionMacro();
 
-  FutureOr<void> buildTypesForFunction(
-      FunctionDeclaration function, TypeBuilder builder) async {
+  FutureOr<void> buildTypesForFunction(FunctionDeclaration function,
+      TypeBuilder builder) async {
     checkFunctionDeclaration(function);
     await checkIdentifierResolver(builder);
   }
 
-  FutureOr<void> buildDeclarationsForFunction(
-      FunctionDeclaration function, DeclarationBuilder builder) async {
+  FutureOr<void> buildDeclarationsForFunction(FunctionDeclaration function,
+      DeclarationBuilder builder) async {
     checkFunctionDeclaration(function);
     await checkIdentifierResolver(builder);
   }
 
-  FutureOr<void> buildDefinitionForFunction(
-      FunctionDeclaration function, FunctionDefinitionBuilder builder) async {
+  FutureOr<void> buildDefinitionForFunction(FunctionDeclaration function,
+      FunctionDefinitionBuilder builder) async {
     checkFunctionDeclaration(function);
     await checkIdentifierResolver(builder);
     await checkTypeDeclarationResolver(builder, {function.identifier: null});
diff --git a/pkg/_fe_analyzer_shared/test/macros/executor/executor_test.dart b/pkg/_fe_analyzer_shared/test/macros/executor/executor_test.dart
index 0da45e5..fde0f56 100644
--- a/pkg/_fe_analyzer_shared/test/macros/executor/executor_test.dart
+++ b/pkg/_fe_analyzer_shared/test/macros/executor/executor_test.dart
@@ -219,8 +219,9 @@
                     instanceId,
                     Fixtures.myFunction,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, isEmpty);
                 expect(
                     result.libraryAugmentations.single.debugString().toString(),
@@ -233,8 +234,9 @@
                     instanceId,
                     Fixtures.myMethod,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, isEmpty);
                 expect(
                     result.libraryAugmentations.single.debugString().toString(),
@@ -247,8 +249,9 @@
                     instanceId,
                     Fixtures.myConstructor,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, hasLength(1));
                 expect(
                     result.classAugmentations['MyClass']!.single
@@ -265,8 +268,9 @@
                     instanceId,
                     Fixtures.myVariableGetter,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, isEmpty);
                 expect(
                     result.libraryAugmentations.single.debugString().toString(),
@@ -279,8 +283,9 @@
                     instanceId,
                     Fixtures.myVariableSetter,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, isEmpty);
                 expect(
                     result.libraryAugmentations.single.debugString().toString(),
@@ -293,8 +298,9 @@
                     instanceId,
                     Fixtures.myVariable,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, isEmpty);
                 expect(
                     result.libraryAugmentations.single.debugString().toString(),
@@ -307,8 +313,9 @@
                     instanceId,
                     Fixtures.myField,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, hasLength(1));
                 expect(
                     result.classAugmentations['MyClass']!.single
@@ -325,8 +332,9 @@
                     instanceId,
                     Fixtures.myClass,
                     FakeIdentifierResolver(),
+                    Fixtures.testTypeDeclarationResolver,
                     Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector);
+                    Fixtures.testTypeIntrospector);
                 expect(result.classAugmentations, hasLength(1));
                 expect(
                     result.classAugmentations['MyClass']!.single
@@ -345,9 +353,9 @@
                     instanceId,
                     Fixtures.myFunction,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(result.classAugmentations, isEmpty);
                 expect(
@@ -368,9 +376,9 @@
                     instanceId,
                     Fixtures.myMethod,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(definitionResult.classAugmentations, hasLength(1));
                 var augmentationStrings = definitionResult
@@ -387,9 +395,9 @@
                     instanceId,
                     Fixtures.myConstructor,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(definitionResult.classAugmentations, hasLength(1));
                 expect(
@@ -405,9 +413,9 @@
                     instanceId,
                     Fixtures.myVariableGetter,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(result.classAugmentations, isEmpty);
                 expect(
@@ -428,9 +436,9 @@
                     instanceId,
                     Fixtures.myVariableSetter,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(result.classAugmentations, isEmpty);
                 expect(
@@ -452,9 +460,9 @@
                     instanceId,
                     Fixtures.myVariable,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(result.classAugmentations, isEmpty);
                 expect(
@@ -484,9 +492,9 @@
                     instanceId,
                     Fixtures.myField,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(definitionResult.classAugmentations, hasLength(1));
                 expect(
@@ -501,9 +509,9 @@
                     instanceId,
                     Fixtures.myClass,
                     FakeIdentifierResolver(),
-                    Fixtures.testTypeResolver,
-                    Fixtures.testClassIntrospector,
                     Fixtures.testTypeDeclarationResolver,
+                    Fixtures.testTypeResolver,
+                    Fixtures.testTypeIntrospector,
                     Fixtures.testTypeInferrer);
                 expect(definitionResult.classAugmentations, hasLength(1));
                 var augmentationStrings = definitionResult
diff --git a/pkg/_fe_analyzer_shared/test/macros/executor/simple_macro.dart b/pkg/_fe_analyzer_shared/test/macros/executor/simple_macro.dart
index fca496f..d653f77 100644
--- a/pkg/_fe_analyzer_shared/test/macros/executor/simple_macro.dart
+++ b/pkg/_fe_analyzer_shared/test/macros/executor/simple_macro.dart
@@ -58,8 +58,8 @@
       required this.myString});
 
   @override
-  FutureOr<void> buildDeclarationsForClass(
-      ClassDeclaration clazz, ClassMemberDeclarationBuilder builder) async {
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
+      ClassMemberDeclarationBuilder builder) async {
     var fields = await builder.fieldsOf(clazz);
     builder.declareInClass(DeclarationCode.fromParts([
       'static const List<String> fieldNames = [',
@@ -140,8 +140,8 @@
   }
 
   @override
-  Future<void> buildDefinitionForClass(
-      ClassDeclaration clazz, ClassDefinitionBuilder builder) async {
+  Future<void> buildDefinitionForClass(IntrospectableClassDeclaration clazz,
+      ClassDefinitionBuilder builder) async {
     // Apply ourself to all our members
     var fields = (await builder.fieldsOf(clazz));
     for (var field in fields) {
@@ -164,7 +164,7 @@
   Future<void> buildDefinitionForConstructor(ConstructorDeclaration constructor,
       ConstructorDefinitionBuilder builder) async {
     var clazz = await builder.declarationOf(constructor.definingClass)
-        as ClassDeclaration;
+        as IntrospectableClassDeclaration;
     var fields = (await builder.fieldsOf(clazz));
 
     builder.augment(
@@ -196,16 +196,19 @@
     await buildDefinitionForFunction(method, builder);
 
     // Test the type declaration resolver
-    var parentClass =
-        await builder.declarationOf(method.definingClass) as ClassDeclaration;
+    var parentClass = await builder.declarationOf(method.definingClass)
+        as IntrospectableClassDeclaration;
     // Should be able to find ourself in the methods of the parent class.
     (await builder.methodsOf(parentClass))
         .singleWhere((m) => m.identifier == method.identifier);
 
     // Test the class introspector
-    var superClass = (await builder.superclassOf(parentClass))!;
-    var interfaces = (await builder.interfacesOf(parentClass));
-    var mixins = (await builder.mixinsOf(parentClass));
+    var superClass =
+        (await builder.declarationOf(parentClass.superclass!.identifier));
+    var interfaces = await Future.wait(parentClass.interfaces
+        .map((interface) => builder.declarationOf(interface.identifier)));
+    var mixins = await Future.wait(parentClass.mixins
+        .map((mixins) => builder.declarationOf(mixins.identifier)));
     var fields = (await builder.fieldsOf(parentClass));
     var methods = (await builder.methodsOf(parentClass));
     var constructors = (await builder.constructorsOf(parentClass));
diff --git a/pkg/_fe_analyzer_shared/test/macros/util.dart b/pkg/_fe_analyzer_shared/test/macros/util.dart
index 6049823..fea0464 100644
--- a/pkg/_fe_analyzer_shared/test/macros/util.dart
+++ b/pkg/_fe_analyzer_shared/test/macros/util.dart
@@ -12,54 +12,33 @@
 import 'package:test/fake.dart';
 import 'package:test/test.dart';
 
-class FakeClassIntrospector extends Fake implements ClassIntrospector {}
+class FakeTypeIntrospector extends Fake implements TypeIntrospector {}
 
-class TestClassIntrospector implements ClassIntrospector {
-  final Map<ClassDeclaration, List<ConstructorDeclaration>> constructors;
-  final Map<ClassDeclaration, List<FieldDeclaration>> fields;
-  final Map<ClassDeclaration, List<ClassDeclarationImpl>> interfaces;
-  final Map<ClassDeclaration, List<ClassDeclarationImpl>> mixins;
-  final Map<ClassDeclaration, List<MethodDeclaration>> methods;
-  final Map<ClassDeclaration, ClassDeclaration?> superclass;
+class TestTypeIntrospector implements TypeIntrospector {
+  final Map<IntrospectableType, List<ConstructorDeclaration>> constructors;
+  final Map<IntrospectableType, List<FieldDeclaration>> fields;
+  final Map<IntrospectableType, List<MethodDeclaration>> methods;
 
-  TestClassIntrospector({
+  TestTypeIntrospector({
     required this.constructors,
     required this.fields,
-    required this.interfaces,
-    required this.mixins,
     required this.methods,
-    required this.superclass,
   });
 
   @override
   Future<List<ConstructorDeclaration>> constructorsOf(
-          covariant ClassDeclaration clazz) async =>
+          covariant IntrospectableType clazz) async =>
       constructors[clazz]!;
 
   @override
   Future<List<FieldDeclaration>> fieldsOf(
-          covariant ClassDeclaration clazz) async =>
+          covariant IntrospectableType clazz) async =>
       fields[clazz]!;
 
   @override
-  Future<List<ClassDeclaration>> interfacesOf(
-          covariant ClassDeclaration clazz) async =>
-      interfaces[clazz]!;
-
-  @override
   Future<List<MethodDeclaration>> methodsOf(
-          covariant ClassDeclaration clazz) async =>
+          covariant IntrospectableType clazz) async =>
       methods[clazz]!;
-
-  @override
-  Future<List<ClassDeclaration>> mixinsOf(
-          covariant ClassDeclaration clazz) async =>
-      mixins[clazz]!;
-
-  @override
-  Future<ClassDeclaration?> superclassOf(
-          covariant ClassDeclaration clazz) async =>
-      superclass[clazz];
 }
 
 class FakeIdentifierResolver extends Fake implements IdentifierResolver {}
@@ -73,9 +52,11 @@
   TestTypeDeclarationResolver(this.typeDeclarations);
 
   @override
-  Future<TypeDeclaration> declarationOf(
-          covariant Identifier identifier) async =>
-      typeDeclarations[identifier]!;
+  Future<TypeDeclaration> declarationOf(covariant Identifier identifier) async {
+    var declaration = typeDeclarations[identifier];
+    if (declaration != null) return declaration;
+    throw 'No declaration found for ${identifier.name}';
+  }
 }
 
 class TestTypeResolver implements TypeResolver {
@@ -355,7 +336,7 @@
       identifier: IdentifierImpl(id: RemoteInstance.uniqueId, name: 'MyClass'),
       isNullable: false,
       typeArguments: const []);
-  static final myClass = ClassDeclarationImpl(
+  static final myClass = IntrospectableClassDeclarationImpl(
       id: RemoteInstance.uniqueId,
       identifier: myClassType.identifier,
       typeParameters: [],
@@ -446,28 +427,23 @@
         TestNamedStaticType(stringType.identifier, 'dart:core', []),
     myClass.identifier: myClassStaticType,
   });
-  static final testClassIntrospector = TestClassIntrospector(
+  static final testTypeIntrospector = TestTypeIntrospector(
     constructors: {
       myClass: [myConstructor],
     },
     fields: {
       myClass: [myField],
     },
-    interfaces: {
-      myClass: [myInterface],
-    },
     methods: {
       myClass: [myMethod],
     },
-    mixins: {
-      myClass: [myMixin],
-    },
-    superclass: {
-      myClass: mySuperclass,
-    },
   );
-  static final testTypeDeclarationResolver =
-      TestTypeDeclarationResolver({myClass.identifier: myClass});
+  static final testTypeDeclarationResolver = TestTypeDeclarationResolver({
+    myClass.identifier: myClass,
+    mySuperclass.identifier: mySuperclass,
+    myInterface.identifier: myInterface,
+    myMixin.identifier: myMixin
+  });
 
   static final testTypeInferrer = TestTypeInferrer();
 }
diff --git a/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart b/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart
index c98694e..9e401a9 100644
--- a/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart
+++ b/pkg/_js_interop_checks/lib/src/transformations/static_interop_class_eraser.dart
@@ -6,6 +6,7 @@
 import 'package:kernel/clone.dart';
 import 'package:kernel/core_types.dart';
 import 'package:kernel/kernel.dart';
+import 'package:kernel/reference_from_index.dart';
 import 'package:kernel/src/replacement_visitor.dart';
 import 'package:_js_interop_checks/src/js_interop.dart';
 
@@ -28,9 +29,10 @@
   final Class _javaScriptObject;
   final CloneVisitorNotMembers _cloner = CloneVisitorNotMembers();
   late final _TypeSubstitutor _typeSubstitutor;
-  late Library currLibrary;
+  Component? currentComponent;
+  ReferenceFromIndex? referenceFromIndex;
 
-  StaticInteropClassEraser(CoreTypes coreTypes,
+  StaticInteropClassEraser(CoreTypes coreTypes, this.referenceFromIndex,
       {String libraryForJavaScriptObject = 'dart:_interceptors',
       String classNameOfJavaScriptObject = 'JavaScriptObject'})
       : _javaScriptObject = coreTypes.index
@@ -54,21 +56,33 @@
     var stubs = factoryClass.procedures
         .where((procedure) => procedure.name.text == stubName);
     if (stubs.isEmpty) {
-      // We should only create the stub if we're processing the library in which
-      // the stub should exist. Any static invocation of the factory that
-      // doesn't exist in the same library as the factory should be processed
-      // after the library in which the factory exists. In modular compilation,
-      // the outline of that library should already contain the needed stub.
-      assert(factoryClass.enclosingLibrary == currLibrary);
-      // Note that the return type of the cloned function is transformed.
+      // We should only create the stub if we're processing the component in
+      // which the stub should exist. Any static invocation of the factory that
+      // doesn't exist in the same component as the factory should be processed
+      // after the component in which the factory exists. In modular
+      // compilation, the outline of that component should already contain the
+      // needed stub.
+      if (currentComponent != null) {
+        assert(factoryTarget.enclosingComponent == currentComponent);
+      }
+      Name name = Name(stubName);
+      var staticMethod = Procedure(
+          name, ProcedureKind.Method, FunctionNode(null),
+          isStatic: true,
+          fileUri: factoryTarget.fileUri,
+          reference: referenceFromIndex
+              ?.lookupLibrary(factoryClass.enclosingLibrary)
+              ?.lookupIndexedClass(factoryClass.name)
+              ?.lookupGetterReference(name))
+        ..fileOffset = factoryTarget.fileOffset;
+      factoryClass.addProcedure(staticMethod);
+      // Clone function node after processing the stub in case of mutually
+      // recursive factories. Note that the return type of the cloned function
+      // is transformed.
       var functionNode = super
               .visitFunctionNode(_cloner.cloneInContext(factoryTarget.function))
           as FunctionNode;
-      var staticMethod = Procedure(
-          Name(stubName), ProcedureKind.Method, functionNode,
-          isStatic: true, fileUri: factoryTarget.fileUri)
-        ..fileOffset = factoryTarget.fileOffset;
-      factoryClass.addProcedure(staticMethod);
+      staticMethod.function = functionNode;
       return staticMethod;
     } else {
       assert(stubs.length == 1);
@@ -78,7 +92,7 @@
 
   @override
   TreeNode visitLibrary(Library node) {
-    currLibrary = node;
+    currentComponent = node.enclosingComponent;
     return super.visitLibrary(node);
   }
 
@@ -174,8 +188,7 @@
         var args = super.visitArguments(node.arguments) as Arguments;
         var stub = _findOrCreateFactoryStub(factoryTarget);
         return StaticInvocation(stub, args, isConst: node.isConst)
-          ..fileOffset = node.fileOffset
-          ..targetReference = stub.reference;
+          ..fileOffset = node.fileOffset;
       } else {
         // Add a cast so that the result gets typed as `JavaScriptObject`.
         var newInvocation = super.visitStaticInvocation(node) as Expression;
@@ -208,7 +221,7 @@
 
   @override
   void visitLibrary(Library node) {
-    _eraser.currLibrary = node;
+    _eraser.currentComponent = node.enclosingComponent;
     super.visitLibrary(node);
   }
 
diff --git a/pkg/analysis_server/analysis_options.yaml b/pkg/analysis_server/analysis_options.yaml
index 54612a2..9e70161 100644
--- a/pkg/analysis_server/analysis_options.yaml
+++ b/pkg/analysis_server/analysis_options.yaml
@@ -18,7 +18,6 @@
     implementation_imports: ignore
     non_constant_identifier_names: ignore
     overridden_fields: ignore
-    prefer_function_declarations_over_variables: ignore
     prefer_void_to_null: ignore
     provide_deprecation_message: ignore
 
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index b63c3f2..7ce4cd6 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -170,12 +170,12 @@
 </p>
 <p>
   Every request is required to have two fields and may have two
-  additional optional fields. The first required field is the ‘id’
+  additional optional fields. The first required field is the 'id'
   field, which is only used by the server to associate a response
   with the request that generated the response. The second
-  required field is the ‘method’ field, which is used to determine
+  required field is the 'method' field, which is used to determine
   what the server is being requested to do. One optional field is
-  the ‘params’ field, whose structure is dependent on the method
+  the 'params' field, whose structure is dependent on the method
   being requested. The structure of this field is described with
   each request for which it is required. The other optional field
   is the 'clientRequestTime' field, which is a number indicating
@@ -186,11 +186,11 @@
 </p>
 <p>
   Every response has up to three fields. The first field is the
-  ‘id’ field, which is always present and whose value is the
+  'id' field, which is always present and whose value is the
   identifier that was passed to the request that generated the
-  response. The second field is the ‘error’ field, which is only
+  response. The second field is the 'error' field, which is only
   present if an error was encountered while processing the
-  request. The third field is the ‘result’ field, whose structure
+  request. The third field is the 'result' field, whose structure
   is dependent on the method being responded to, and is described
   with each request that will produce it.
 </p>
@@ -209,9 +209,9 @@
   errors can be returned together at a later time.
 </p>
 <p>
-  Each notification has two fields. The first field is the ‘event’
+  Each notification has two fields. The first field is the 'event'
   field, which identifies the kind of notification. The second
-  field is the ‘params’ field, whose structure is dependent on the
+  field is the 'params' field, whose structure is dependent on the
   kind of notification being sent. The structure of this field is
   described with each notification.
 </p>
@@ -298,7 +298,7 @@
 <h3>Domains</h3>
 <p>
   For convenience, the API is divided into domains. Each domain is specified
-  in a separate section below. The specifications of the API’s refer to data
+  in a separate section below. The specifications of the API's refer to data
   structures beyond the standard JSON primitives. These data structures are
   documented in the section titled <a href="#types">Types</a>.
 </p>
@@ -434,7 +434,7 @@
 <h1>Domains</h1>
 <h2 class="domain"><a name="domain_server">server domain</a></h2>
   <p>
-    The server domain contains API’s related to the execution of
+    The server domain contains API's related to the execution of
     the server.
   </p>
   
@@ -628,7 +628,7 @@
       </dd></dl></dd></dl>
 <h2 class="domain"><a name="domain_analysis">analysis domain</a></h2>
   <p>
-    The analysis domain contains API’s related to the analysis of
+    The analysis domain contains API's related to the analysis of
     files.
   </p>
   
@@ -962,7 +962,7 @@
       file. If none is found, then the parents of the directory
       will be searched until such a file is found or the root of
       the file system is reached. If such a file is found, it will
-      be used to resolve package: URI’s within the file.
+      be used to resolve package: URI's within the file.
     </p>
     
   <h4>parameters:</h4><dl><dt class="field"><b>included: List&lt;<a href="#type_FilePath">FilePath</a>&gt;</b></dt><dd>
@@ -3142,7 +3142,7 @@
 
 <h2 class="domain"><a name="domain_flutter">flutter domain</a></h2>
   <p>
-    The analysis domain contains API’s related to Flutter support.
+    The analysis domain contains API's related to Flutter support.
   </p>
   
   
@@ -3230,7 +3230,7 @@
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
     This section contains descriptions of the data types referenced
-    in the API’s of the various domains.
+    in the API's of the various domains.
   </p>
   
   
@@ -4045,10 +4045,10 @@
             0x01 - set if the element is explicitly or implicitly abstract
           </li>
           <li>
-            0x02 - set if the element was declared to be ‘const’
+            0x02 - set if the element was declared to be 'const'
           </li>
           <li>
-            0x04 - set if the element was declared to be ‘final’
+            0x04 - set if the element was declared to be 'final'
           </li>
           <li>
             0x08 - set if the element is a static member of a class or is a
diff --git a/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
index c56e634..5606b50 100644
--- a/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist_core.dart
@@ -10,18 +10,6 @@
 ///
 /// Clients may not extend, implement or mix-in this class.
 class Assist {
-  /// A comparator that can be used to sort assists by their relevance. The most
-  /// relevant assists will be sorted before assists with a lower relevance.
-  /// Assists with the same relevance are sorted alphabetically.
-  static final Comparator<Assist> SORT_BY_RELEVANCE = (Assist a, Assist b) {
-    if (a.kind.priority != b.kind.priority) {
-      // A higher priority indicates a higher relevance
-      // and should be sorted before a lower priority.
-      return b.kind.priority - a.kind.priority;
-    }
-    return a.change.message.compareTo(b.change.message);
-  };
-
   /// A description of the assist being proposed.
   final AssistKind kind;
 
@@ -35,4 +23,17 @@
   String toString() {
     return 'Assist(kind=$kind, change=$change)';
   }
+
+  /// A function that can be used to sort assists by their relevance.
+  ///
+  /// The most relevant assists will be sorted before assists with a lower
+  /// relevance. Assists with the same relevance are sorted alphabetically.
+  static int compareAssists(Assist a, Assist b) {
+    if (a.kind.priority != b.kind.priority) {
+      // A higher priority indicates a higher relevance
+      // and should be sorted before a lower priority.
+      return b.kind.priority - a.kind.priority;
+    }
+    return a.change.message.compareTo(b.change.message);
+  }
 }
diff --git a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
index f3873dc..7f14241 100644
--- a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
@@ -11,18 +11,6 @@
 ///
 /// Clients may not extend, implement or mix-in this class.
 class Fix {
-  /// A comparator that can be used to sort fixes by their relevance. The most
-  /// relevant fixes will be sorted before fixes with a lower relevance. Fixes
-  /// with the same relevance are sorted alphabetically.
-  static final Comparator<Fix> SORT_BY_RELEVANCE = (Fix a, Fix b) {
-    if (a.kind.priority != b.kind.priority) {
-      // A higher priority indicates a higher relevance
-      // and should be sorted before a lower priority.
-      return b.kind.priority - a.kind.priority;
-    }
-    return a.change.message.compareTo(b.change.message);
-  };
-
   /// A description of the fix being proposed.
   final FixKind kind;
 
@@ -36,6 +24,19 @@
   String toString() {
     return 'Fix(kind=$kind, change=$change)';
   }
+
+  /// A finction that can be used to sort fixes by their relevance.
+  ///
+  /// The most relevant fixes will be sorted before fixes with a lower
+  /// relevance. Fixes with the same relevance are sorted alphabetically.
+  static int compareFixes(Fix a, Fix b) {
+    if (a.kind.priority != b.kind.priority) {
+      // A higher priority indicates a higher relevance
+      // and should be sorted before a lower priority.
+      return b.kind.priority - a.kind.priority;
+    }
+    return a.change.message.compareTo(b.change.message);
+  }
 }
 
 /// An object used to provide context information for [FixContributor]s.
diff --git a/pkg/analysis_server/lib/src/analytics/active_request_data.dart b/pkg/analysis_server/lib/src/analytics/active_request_data.dart
new file mode 100644
index 0000000..ab054c6
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analytics/active_request_data.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Data about a request that was received and is being handled.
+class ActiveRequestData {
+  /// The name of the request that was received.
+  final String method;
+
+  /// The time at which the client sent the request.
+  final int? clientRequestTime;
+
+  /// The time at which the request was received.
+  final DateTime startTime;
+
+  /// Initialize a newly created data holder.
+  ActiveRequestData(this.method, this.clientRequestTime, this.startTime);
+}
diff --git a/pkg/analysis_server/lib/src/analytics/analytics_manager.dart b/pkg/analysis_server/lib/src/analytics/analytics_manager.dart
index 8a7f5e2..bacaa3c 100644
--- a/pkg/analysis_server/lib/src/analytics/analytics_manager.dart
+++ b/pkg/analysis_server/lib/src/analytics/analytics_manager.dart
@@ -2,12 +2,21 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'dart:convert';
+
 import 'package:analysis_server/lsp_protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol_generated.dart';
-import 'package:analysis_server/src/analytics/google_analytics_manager.dart';
+import 'package:analysis_server/protocol/protocol_constants.dart';
+import 'package:analysis_server/src/analytics/active_request_data.dart';
+import 'package:analysis_server/src/analytics/notification_data.dart';
+import 'package:analysis_server/src/analytics/plugin_data.dart';
+import 'package:analysis_server/src/analytics/request_data.dart';
+import 'package:analysis_server/src/analytics/session_data.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
+import 'package:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/status/pages.dart';
 import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:collection/collection.dart';
 import 'package:telemetry/telemetry.dart';
 
 /// An interface for managing and reporting analytics.
@@ -16,60 +25,180 @@
 /// collect and even consolidate information to be reported later. Clients are
 /// required to invoke the [shutdown] method before the server shuts down in
 /// order to send any cached data.
-abstract class AnalyticsManager {
-  /// Return an analytics manager that will report results using the given
-  /// [analytics].
-  factory AnalyticsManager.forAnalytics(Analytics analytics) =
-      GoogleAnalyticsManager;
+class AnalyticsManager {
+  /// The object used to send analytics.
+  final Analytics analytics;
+
+  /// Data about the current session, or `null` if the [startUp] method has not
+  /// been invoked.
+  SessionData? _sessionData;
+
+  final PluginData _pluginData = PluginData();
+
+  /// A map from the id of a request to data about the request.
+  final Map<String, ActiveRequestData> _activeRequests = {};
+
+  /// A map from the name of a request to data about all such requests that have
+  /// been responded to.
+  final Map<String, RequestData> _completedRequests = {};
+
+  /// A map from the name of a notification to data about all such notifications
+  /// that have been handled.
+  final Map<String, NotificationData> _completedNotifications = {};
+
+  /// A map from the name of a lint to the number of contexts in which the lint
+  /// was enabled.
+  final Map<String, int> _lintUsageCounts = {};
+
+  /// A map from the name of a diagnostic to a map whose values are the number
+  /// of times that the severity of the diagnostic was changed to the severity
+  /// represented by the key.
+  final Map<String, Map<String, int>> _severityAdjustments = {};
+
+  /// Initialize a newly created analytics manager to report to the [analytics]
+  /// service.
+  AnalyticsManager(this.analytics);
 
   /// Record that the set of plugins known to the [pluginManager] has changed.
-  void changedPlugins(PluginManager pluginManager);
+  void changedPlugins(PluginManager pluginManager) {
+    _pluginData.recordPlugins(pluginManager);
+  }
 
   /// Record the number of [added] folders and [removed] folders.
   void changedWorkspaceFolders(
-      {required List<String> added, required List<String> removed});
+      {required List<String> added, required List<String> removed}) {
+    var requestData =
+        _getRequestData(Method.workspace_didChangeWorkspaceFolders.toString());
+    requestData.addValue('added', added.length);
+    requestData.addValue('removed', removed.length);
+  }
 
   /// Record that the [contexts] have been created.
-  void createdAnalysisContexts(List<AnalysisContext> contexts);
+  void createdAnalysisContexts(List<AnalysisContext> contexts) {
+    for (var context in contexts) {
+      for (var rule in context.analysisOptions.lintRules) {
+        var name = rule.name;
+        _lintUsageCounts[name] = (_lintUsageCounts[name] ?? 0) + 1;
+      }
+      for (var processor in context.analysisOptions.errorProcessors) {
+        var severity = processor.severity?.name ?? 'ignore';
+        var severityCounts =
+            _severityAdjustments.putIfAbsent(processor.code, () => {});
+        severityCounts[severity] = (severityCounts[severity] ?? 0) + 1;
+      }
+    }
+  }
 
   /// Record that the given [notification] was received and has been handled.
   void handledNotificationMessage(
       {required NotificationMessage notification,
       required DateTime startTime,
-      required DateTime endTime}) {}
+      required DateTime endTime}) {
+    var method = notification.method.toString();
+    var requestTime = notification.clientRequestTime;
+    var start = startTime.millisecondsSinceEpoch;
+    var end = endTime.millisecondsSinceEpoch;
+    var data = _completedNotifications.putIfAbsent(
+        method, () => NotificationData(method));
+    if (requestTime != null) {
+      data.latencyTimes.addValue(start - requestTime);
+    }
+    data.handlingTimes.addValue(end - start);
+  }
 
   /// Record the parameters passed on initialize.
-  void initialize(InitializeParams params);
+  void initialize(InitializeParams params) {
+    var options = LspInitializationOptions(params.initializationOptions);
+    var paramNames = <String>[
+      if (options.closingLabels) 'closingLabels',
+      if (options.flutterOutline) 'flutterOutline',
+      if (options.onlyAnalyzeProjectsWithOpenFiles)
+        'onlyAnalyzeProjectsWithOpenFiles',
+      if (options.outline) 'outline',
+      if (options.suggestFromUnimportedLibraries)
+        'suggestFromUnimportedLibraries',
+    ];
+    _sessionData?.initializeParams = paramNames.join(',');
+  }
 
   /// Record the number of [openWorkspacePaths].
-  void initialized({required List<String> openWorkspacePaths});
+  void initialized({required List<String> openWorkspacePaths}) {
+    var requestData = _getRequestData(Method.initialized.toString());
+    requestData.addValue('openWorkspacePaths', openWorkspacePaths.length);
+  }
 
   /// Record that the given [response] was sent to the client.
-  void sentResponse({required Response response});
+  void sentResponse({required Response response}) {
+    var sendTime = DateTime.now();
+    _recordResponseData(response.id, sendTime);
+  }
 
   /// Record that the given [response] was sent to the client.
-  void sentResponseMessage({required ResponseMessage response});
+  void sentResponseMessage({required ResponseMessage response}) {
+    var sendTime = DateTime.now();
+    var id = response.id?.asString;
+    if (id == null) {
+      return;
+    }
+    _recordResponseData(id, sendTime);
+  }
 
   /// The server is shutting down. Report any accumulated analytics data.
-  void shutdown();
+  void shutdown() {
+    final sessionData = _sessionData;
+    if (sessionData == null) {
+      return;
+    }
+    _sendSessionData(sessionData);
+    _sendServerResponseTimes();
+    _sendPluginResponseTimes();
+    _sendNotificationHandlingTimes();
+    _sendLintUsageCounts();
+    _sendSeverityAdjustments();
+
+    analytics.waitForLastPing(timeout: Duration(milliseconds: 200)).then((_) {
+      analytics.close();
+    });
+  }
 
   /// Record data from the given [params].
-  void startedGetRefactoring(EditGetRefactoringParams params);
+  void startedGetRefactoring(EditGetRefactoringParams params) {
+    var requestData = _getRequestData(EDIT_REQUEST_GET_REFACTORING);
+    requestData.addEnumValue(
+        EDIT_REQUEST_GET_REFACTORING_KIND, params.kind.name);
+  }
 
   /// Record that the server started working on the give [request] at the given
   /// [startTime].
-  void startedRequest({required Request request, required DateTime startTime});
+  void startedRequest({required Request request, required DateTime startTime}) {
+    var method = request.method;
+    _activeRequests[request.id] =
+        ActiveRequestData(method, request.clientRequestTime, startTime);
+  }
 
   /// Record that the server started working on the give [request] at the given
   /// [startTime].
   void startedRequestMessage(
-      {required RequestMessage request, required DateTime startTime});
+      {required RequestMessage request, required DateTime startTime}) {
+    _activeRequests[request.id.asString] = ActiveRequestData(
+        request.method.toString(), request.clientRequestTime, startTime);
+  }
 
   /// Record data from the given [params].
-  void startedSetAnalysisRoots(AnalysisSetAnalysisRootsParams params);
+  void startedSetAnalysisRoots(AnalysisSetAnalysisRootsParams params) {
+    var requestData = _getRequestData(ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS);
+    requestData.addValue(
+        ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_INCLUDED, params.included.length);
+    requestData.addValue(
+        ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_EXCLUDED, params.excluded.length);
+  }
 
   /// Record data from the given [params].
-  void startedSetPriorityFiles(AnalysisSetPriorityFilesParams params);
+  void startedSetPriorityFiles(AnalysisSetPriorityFilesParams params) {
+    var requestData = _getRequestData(ANALYSIS_REQUEST_SET_PRIORITY_FILES);
+    requestData.addValue(
+        ANALYSIS_REQUEST_SET_PRIORITY_FILES_FILES, params.files.length);
+  }
 
   /// Record that the server was started at the given [time], that it was passed
   /// the given command-line [arguments], that it was started by the client with
@@ -80,5 +209,224 @@
       required List<String> arguments,
       required String clientId,
       required String? clientVersion,
-      required String sdkVersion});
+      required String sdkVersion}) {
+    _sessionData = SessionData(
+        startTime: time,
+        commandLineArguments: arguments.join(','),
+        clientId: clientId,
+        clientVersion: clientVersion ?? '',
+        sdkVersion: sdkVersion);
+  }
+
+  /// Return an HTML representation of the data that has been recorded.
+  String? toHtml(StringBuffer buffer) {
+    var sessionData = _sessionData;
+    if (sessionData == null) {
+      return null;
+    }
+
+    void h3(String title) {
+      buffer.writeln('<h3>${escape(title)}</h3>');
+    }
+
+    void h4(String title) {
+      buffer.writeln('<h4>${escape(title)}</h4>');
+    }
+
+    void h5(String title) {
+      buffer.writeln('<h5>${escape(title)}</h5>');
+    }
+
+    void li(String item) {
+      buffer.writeln('<li>${escape(item)}</li>');
+    }
+
+    List<MapEntry<String, V>> sorted<V>(
+            Iterable<MapEntry<String, V>> entries) =>
+        entries.sortedBy((entry) => entry.key);
+
+    buffer.writeln('<hr>');
+
+    var endTime = DateTime.now().millisecondsSinceEpoch;
+    var duration = endTime - sessionData.startTime.millisecondsSinceEpoch;
+    h3('Session data');
+    buffer.writeln('<ul>');
+    li('clientId: ${sessionData.clientId}');
+    li('clientVersion: ${sessionData.clientVersion}');
+    li('duration: ${duration.toString()}');
+    li('flags: ${sessionData.commandLineArguments}');
+    li('parameters: ${sessionData.initializeParams}');
+    li('sdkVersion: ${sessionData.sdkVersion}');
+    li('plugins: ${_pluginData.usageCountData}');
+    buffer.writeln('</ul>');
+
+    if (_completedRequests.isNotEmpty) {
+      h3('Server response times');
+      var entries = sorted(_completedRequests.entries);
+      for (var entry in entries) {
+        var data = entry.value;
+        h4(data.method);
+        buffer.writeln('<ul>');
+        li('latency: ${data.latencyTimes.toAnalyticsString()}');
+        li('duration: ${data.responseTimes.toAnalyticsString()}');
+        for (var field in data.additionalPercentiles.entries) {
+          li('${field.key}: ${field.value.toAnalyticsString()}');
+        }
+        for (var field in data.additionalEnumCounts.entries) {
+          li('${field.key}: ${json.encode(field.value)}');
+        }
+        buffer.writeln('</ul>');
+      }
+    }
+
+    var responseTimes = PluginManager.pluginResponseTimes;
+    if (responseTimes.isNotEmpty) {
+      h3('Plugin response times');
+      for (var pluginEntry in responseTimes.entries) {
+        h4(pluginEntry.key.pluginId);
+        var entries = sorted(pluginEntry.value.entries);
+        for (var responseEntry in entries) {
+          h5(responseEntry.key);
+          buffer.writeln('<ul>');
+          li('duration: ${responseEntry.value.toAnalyticsString()}');
+          buffer.writeln('</ul>');
+        }
+      }
+    }
+
+    if (_completedNotifications.isNotEmpty) {
+      h3('Notification handling times');
+      buffer.writeln('<ul>');
+      var entries = sorted(_completedNotifications.entries);
+      for (var entry in entries) {
+        var data = entry.value;
+        li('latency: ${data.latencyTimes.toAnalyticsString()}');
+        li('method: ${data.method}');
+        li('duration: ${data.handlingTimes.toAnalyticsString()}');
+      }
+      buffer.writeln('</ul>');
+    }
+
+    if (_lintUsageCounts.isNotEmpty) {
+      h3('Lint usage counts');
+      buffer.writeln('<ul>');
+      li('usageCounts: ${json.encode(_lintUsageCounts)}');
+      buffer.writeln('</ul>');
+    }
+
+    if (_severityAdjustments.isNotEmpty) {
+      h3('Severity adjustments');
+      buffer.writeln('<ul>');
+      li('adjustmentCounts: ${json.encode(_severityAdjustments)}');
+      buffer.writeln('</ul>');
+    }
+
+    return buffer.toString();
+  }
+
+  /// Return the request data for requests that have the given [method].
+  RequestData _getRequestData(String method) {
+    return _completedRequests.putIfAbsent(method, () => RequestData(method));
+  }
+
+  /// Record that the request with the given [id] was responded to at the given
+  /// [sendTime].
+  void _recordResponseData(String id, DateTime sendTime) {
+    var data = _activeRequests.remove(id);
+    if (data == null) {
+      return;
+    }
+
+    var method = data.method;
+    var clientRequestTime = data.clientRequestTime;
+    var startTime = data.startTime.millisecondsSinceEpoch;
+
+    var requestData = _getRequestData(method);
+
+    if (clientRequestTime != null) {
+      var latencyTime = startTime - clientRequestTime;
+      requestData.latencyTimes.addValue(latencyTime);
+    }
+
+    var responseTime = sendTime.millisecondsSinceEpoch - startTime;
+    requestData.responseTimes.addValue(responseTime);
+  }
+
+  void _sendLintUsageCounts() {
+    if (_lintUsageCounts.isNotEmpty) {
+      analytics.sendEvent('language_server', 'lintUsageCounts', parameters: {
+        'usageCounts': json.encode(_lintUsageCounts),
+      });
+    }
+  }
+
+  /// Send information about the notifications handled by the server.
+  void _sendNotificationHandlingTimes() {
+    for (var data in _completedNotifications.values) {
+      analytics.sendEvent('language_server', 'notification', parameters: {
+        'latency': data.latencyTimes.toAnalyticsString(),
+        'method': data.method,
+        'duration': data.handlingTimes.toAnalyticsString(),
+      });
+    }
+  }
+
+  /// Send information about the response times of plugins.
+  void _sendPluginResponseTimes() {
+    var responseTimes = PluginManager.pluginResponseTimes;
+    for (var pluginEntry in responseTimes.entries) {
+      for (var responseEntry in pluginEntry.value.entries) {
+        analytics.sendEvent('language_server', 'pluginRequest', parameters: {
+          'pluginId': pluginEntry.key.pluginId,
+          'method': responseEntry.key,
+          'duration': responseEntry.value.toAnalyticsString(),
+        });
+      }
+    }
+  }
+
+  /// Send information about the response times of server.
+  void _sendServerResponseTimes() {
+    for (var data in _completedRequests.values) {
+      analytics.sendEvent('language_server', 'request', parameters: {
+        'latency': data.latencyTimes.toAnalyticsString(),
+        'method': data.method,
+        'duration': data.responseTimes.toAnalyticsString(),
+        for (var field in data.additionalPercentiles.entries)
+          field.key: field.value.toAnalyticsString(),
+        for (var field in data.additionalEnumCounts.entries)
+          field.key: json.encode(field.value),
+      });
+    }
+  }
+
+  /// Send information about the session.
+  void _sendSessionData(SessionData sessionData) {
+    var endTime = DateTime.now().millisecondsSinceEpoch;
+    var duration = endTime - sessionData.startTime.millisecondsSinceEpoch;
+    analytics.sendEvent('language_server', 'session', parameters: {
+      'flags': sessionData.commandLineArguments,
+      'parameters': sessionData.initializeParams,
+      'clientId': sessionData.clientId,
+      'clientVersion': sessionData.clientVersion,
+      'sdkVersion': sessionData.sdkVersion,
+      'duration': duration.toString(),
+      'plugins': _pluginData.usageCountData,
+    });
+  }
+
+  void _sendSeverityAdjustments() {
+    if (_severityAdjustments.isNotEmpty) {
+      analytics
+          .sendEvent('language_server', 'severityAdjustments', parameters: {
+        'adjustmentCounts': json.encode(_severityAdjustments),
+      });
+    }
+  }
+}
+
+extension on Either2<int, String> {
+  String get asString {
+    return map((value) => value.toString(), (value) => value);
+  }
 }
diff --git a/pkg/analysis_server/lib/src/analytics/google_analytics_manager.dart b/pkg/analysis_server/lib/src/analytics/google_analytics_manager.dart
deleted file mode 100644
index d3907ec..0000000
--- a/pkg/analysis_server/lib/src/analytics/google_analytics_manager.dart
+++ /dev/null
@@ -1,465 +0,0 @@
-// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:convert';
-
-import 'package:analysis_server/lsp_protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol_constants.dart';
-import 'package:analysis_server/src/analytics/analytics_manager.dart';
-import 'package:analysis_server/src/analytics/percentile_calculator.dart';
-import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
-import 'package:analysis_server/src/plugin/plugin_manager.dart';
-import 'package:analysis_server/src/protocol_server.dart';
-import 'package:analyzer/dart/analysis/analysis_context.dart';
-import 'package:telemetry/telemetry.dart';
-
-/// An implementation of [AnalyticsManager] that's appropriate to use when
-/// analytics have been enabled.
-class GoogleAnalyticsManager implements AnalyticsManager {
-  /// The object used to send analytics.
-  final Analytics analytics;
-
-  /// Data about the current session, or `null` if the [startUp] method has not
-  /// been invoked.
-  _SessionData? _sessionData;
-
-  final _PluginData _pluginData = _PluginData();
-
-  /// A map from the id of a request to data about the request.
-  final Map<String, _ActiveRequestData> _activeRequests = {};
-
-  /// A map from the name of a request to data about all such requests that have
-  /// been responded to.
-  final Map<String, _RequestData> _completedRequests = {};
-
-  /// A map from the name of a notification to data about all such notifications
-  /// that have been handled.
-  final Map<String, _NotificationData> _completedNotifications = {};
-
-  /// A map from the name of a lint to the number of contexts in which the lint
-  /// was enabled.
-  final Map<String, int> _lintUsageCounts = {};
-
-  /// A map from the name of a diagnostic to a map whose values are the number
-  /// of times that the severity of the diagnostic was changed to the severity
-  /// represented by the key.
-  final Map<String, Map<String, int>> _severityAdjustments = {};
-
-  /// Initialize a newly created analytics manager to report to the [analytics]
-  /// service.
-  GoogleAnalyticsManager(this.analytics);
-
-  @override
-  void changedPlugins(PluginManager pluginManager) {
-    _pluginData.recordPlugins(pluginManager);
-  }
-
-  @override
-  void changedWorkspaceFolders(
-      {required List<String> added, required List<String> removed}) {
-    var requestData =
-        _getRequestData(Method.workspace_didChangeWorkspaceFolders.toString());
-    requestData.addValue('added', added.length);
-    requestData.addValue('removed', removed.length);
-  }
-
-  @override
-  void createdAnalysisContexts(List<AnalysisContext> contexts) {
-    for (var context in contexts) {
-      for (var rule in context.analysisOptions.lintRules) {
-        var name = rule.name;
-        _lintUsageCounts[name] = (_lintUsageCounts[name] ?? 0) + 1;
-      }
-      for (var processor in context.analysisOptions.errorProcessors) {
-        var severity = processor.severity?.name ?? 'ignore';
-        var severityCounts =
-            _severityAdjustments.putIfAbsent(processor.code, () => {});
-        severityCounts[severity] = (severityCounts[severity] ?? 0) + 1;
-      }
-    }
-  }
-
-  @override
-  void handledNotificationMessage(
-      {required NotificationMessage notification,
-      required DateTime startTime,
-      required DateTime endTime}) {
-    var method = notification.method.toString();
-    var requestTime = notification.clientRequestTime;
-    var start = startTime.millisecondsSinceEpoch;
-    var end = endTime.millisecondsSinceEpoch;
-    var data = _completedNotifications.putIfAbsent(
-        method, () => _NotificationData(method));
-    if (requestTime != null) {
-      data.latencyTimes.addValue(start - requestTime);
-    }
-    data.handlingTimes.addValue(end - start);
-  }
-
-  @override
-  void initialize(InitializeParams params) {
-    var options = LspInitializationOptions(params.initializationOptions);
-    var paramNames = <String>[
-      if (options.closingLabels) 'closingLabels',
-      if (options.flutterOutline) 'flutterOutline',
-      if (options.onlyAnalyzeProjectsWithOpenFiles)
-        'onlyAnalyzeProjectsWithOpenFiles',
-      if (options.outline) 'outline',
-      if (options.suggestFromUnimportedLibraries)
-        'suggestFromUnimportedLibraries',
-    ];
-    _sessionData?.initializeParams = paramNames.join(',');
-  }
-
-  @override
-  void initialized({required List<String> openWorkspacePaths}) {
-    var requestData = _getRequestData(Method.initialized.toString());
-    requestData.addValue('openWorkspacePaths', openWorkspacePaths.length);
-  }
-
-  @override
-  void sentResponse({required Response response}) {
-    var sendTime = DateTime.now();
-    _recordResponseData(response.id, sendTime);
-  }
-
-  @override
-  void sentResponseMessage({required ResponseMessage response}) {
-    var sendTime = DateTime.now();
-    var id = response.id?.asString;
-    if (id == null) {
-      return;
-    }
-    _recordResponseData(id, sendTime);
-  }
-
-  @override
-  void shutdown() {
-    final sessionData = _sessionData;
-    if (sessionData == null) {
-      return;
-    }
-    _sendSessionData(sessionData);
-    _sendServerResponseTimes();
-    _sendPluginResponseTimes();
-    _sendNotificationHandlingTimes();
-    _sendLintUsageCounts();
-    _sendSeverityAdjustments();
-
-    analytics.waitForLastPing(timeout: Duration(milliseconds: 200)).then((_) {
-      analytics.close();
-    });
-  }
-
-  @override
-  void startedGetRefactoring(EditGetRefactoringParams params) {
-    var requestData = _getRequestData(EDIT_REQUEST_GET_REFACTORING);
-    requestData.addEnumValue(
-        EDIT_REQUEST_GET_REFACTORING_KIND, params.kind.name);
-  }
-
-  @override
-  void startedRequest({required Request request, required DateTime startTime}) {
-    var method = request.method;
-    _activeRequests[request.id] =
-        _ActiveRequestData(method, request.clientRequestTime, startTime);
-  }
-
-  @override
-  void startedRequestMessage(
-      {required RequestMessage request, required DateTime startTime}) {
-    _activeRequests[request.id.asString] = _ActiveRequestData(
-        request.method.toString(), request.clientRequestTime, startTime);
-  }
-
-  @override
-  void startedSetAnalysisRoots(AnalysisSetAnalysisRootsParams params) {
-    var requestData = _getRequestData(ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS);
-    requestData.addValue(
-        ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_INCLUDED, params.included.length);
-    requestData.addValue(
-        ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_EXCLUDED, params.excluded.length);
-  }
-
-  @override
-  void startedSetPriorityFiles(AnalysisSetPriorityFilesParams params) {
-    var requestData = _getRequestData(ANALYSIS_REQUEST_SET_PRIORITY_FILES);
-    requestData.addValue(
-        ANALYSIS_REQUEST_SET_PRIORITY_FILES_FILES, params.files.length);
-  }
-
-  @override
-  void startUp(
-      {required DateTime time,
-      required List<String> arguments,
-      required String clientId,
-      required String? clientVersion,
-      required String sdkVersion}) {
-    _sessionData = _SessionData(
-        startTime: time,
-        commandLineArguments: arguments.join(','),
-        clientId: clientId,
-        clientVersion: clientVersion ?? '',
-        sdkVersion: sdkVersion);
-  }
-
-  /// Return the request data for requests that have the given [method].
-  _RequestData _getRequestData(String method) {
-    return _completedRequests.putIfAbsent(method, () => _RequestData(method));
-  }
-
-  /// Record that the request with the given [id] was responded to at the given
-  /// [sendTime].
-  void _recordResponseData(String id, DateTime sendTime) {
-    var data = _activeRequests.remove(id);
-    if (data == null) {
-      return;
-    }
-
-    var method = data.method;
-    var clientRequestTime = data.clientRequestTime;
-    var startTime = data.startTime.millisecondsSinceEpoch;
-
-    var requestData = _getRequestData(method);
-
-    if (clientRequestTime != null) {
-      var latencyTime = startTime - clientRequestTime;
-      requestData.latencyTimes.addValue(latencyTime);
-    }
-
-    var responseTime = sendTime.millisecondsSinceEpoch - startTime;
-    requestData.responseTimes.addValue(responseTime);
-  }
-
-  void _sendLintUsageCounts() {
-    if (_lintUsageCounts.isNotEmpty) {
-      analytics.sendEvent('language_server', 'lintUsageCounts', parameters: {
-        'usageCounts': json.encode(_lintUsageCounts),
-      });
-    }
-  }
-
-  /// Send information about the notifications handled by the server.
-  void _sendNotificationHandlingTimes() {
-    for (var data in _completedNotifications.values) {
-      analytics.sendEvent('language_server', 'notification', parameters: {
-        'latency': data.latencyTimes.toAnalyticsString(),
-        'method': data.method,
-        'duration': data.handlingTimes.toAnalyticsString(),
-      });
-    }
-  }
-
-  /// Send information about the response times of plugins.
-  void _sendPluginResponseTimes() {
-    var responseTimes = PluginManager.pluginResponseTimes;
-    for (var pluginEntry in responseTimes.entries) {
-      for (var responseEntry in pluginEntry.value.entries) {
-        analytics.sendEvent('language_server', 'pluginRequest', parameters: {
-          'pluginId': pluginEntry.key.pluginId,
-          'method': responseEntry.key,
-          'duration': responseEntry.value.toAnalyticsString(),
-        });
-      }
-    }
-  }
-
-  /// Send information about the response times of server.
-  void _sendServerResponseTimes() {
-    for (var data in _completedRequests.values) {
-      analytics.sendEvent('language_server', 'request', parameters: {
-        'latency': data.latencyTimes.toAnalyticsString(),
-        'method': data.method,
-        'duration': data.responseTimes.toAnalyticsString(),
-        for (var field in data.additionalPercentiles.entries)
-          field.key: field.value.toAnalyticsString(),
-        for (var field in data.additionalEnumCounts.entries)
-          field.key: json.encode(field.value),
-      });
-    }
-  }
-
-  /// Send information about the session.
-  void _sendSessionData(_SessionData sessionData) {
-    var endTime = DateTime.now().millisecondsSinceEpoch;
-    var duration = endTime - sessionData.startTime.millisecondsSinceEpoch;
-    analytics.sendEvent('language_server', 'session', parameters: {
-      'flags': sessionData.commandLineArguments,
-      'parameters': sessionData.initializeParams,
-      'clientId': sessionData.clientId,
-      'clientVersion': sessionData.clientVersion,
-      'sdkVersion': sessionData.sdkVersion,
-      'duration': duration.toString(),
-      'plugins': _pluginData.usageCountData,
-    });
-  }
-
-  void _sendSeverityAdjustments() {
-    if (_severityAdjustments.isNotEmpty) {
-      analytics
-          .sendEvent('language_server', 'severityAdjustments', parameters: {
-        'adjustmentCounts': json.encode(_severityAdjustments),
-      });
-    }
-  }
-}
-
-/// Data about a request that was received and is being handled.
-class _ActiveRequestData {
-  /// The name of the request that was received.
-  final String method;
-
-  /// The time at which the client sent the request.
-  final int? clientRequestTime;
-
-  /// The time at which the request was received.
-  final DateTime startTime;
-
-  /// Initialize a newly created data holder.
-  _ActiveRequestData(this.method, this.clientRequestTime, this.startTime);
-}
-
-/// Data about the notifications that have been handled that have the same
-/// method.
-class _NotificationData {
-  /// The name of the notifications.
-  final String method;
-
-  /// The percentile calculator for latency times. The _latency time_ is the
-  /// time from when the client sent the request until the time the server
-  /// started processing the request.
-  final PercentileCalculator latencyTimes = PercentileCalculator();
-
-  /// The percentile calculator for handling times. The _handling time_ is the
-  /// time from when the server started processing the notification until the
-  /// handling was complete.
-  final PercentileCalculator handlingTimes = PercentileCalculator();
-
-  /// Initialize a newly create data holder for notifications with the given
-  /// [method].
-  _NotificationData(this.method);
-}
-
-/// Data about the plugins associated with the context roots.
-class _PluginData {
-  /// The number of times that plugin information has been recorded.
-  int recordCount = 0;
-
-  /// A table mapping the ids of running plugins to the number of context roots
-  /// associated with each of the plugins.
-  Map<String, PercentileCalculator> usageCounts = {};
-
-  /// Initialize a newly created holder of plugin data.
-  _PluginData();
-
-  String get usageCountData {
-    return json.encode({
-      'recordCount': recordCount,
-      'rootCounts': _encodeUsageCounts(),
-    });
-  }
-
-  /// Use the [pluginManager] to record data about the plugins that are
-  /// currently running.
-  void recordPlugins(PluginManager pluginManager) {
-    recordCount++;
-    var plugins = pluginManager.plugins;
-    for (var i = 0; i < plugins.length; i++) {
-      var info = plugins[i];
-      usageCounts
-          .putIfAbsent(info.pluginId, () => PercentileCalculator())
-          .addValue(info.contextRoots.length);
-    }
-  }
-
-  /// Return an encoding of the [usageCounts].
-  Map<String, Object> _encodeUsageCounts() {
-    var encoded = <String, Object>{};
-    for (var entry in usageCounts.entries) {
-      encoded[entry.key] = entry.value.toJson();
-    }
-    return encoded;
-  }
-}
-
-/// Data about the requests that have been responded to that have the same
-/// method.
-class _RequestData {
-  /// The name of the requests.
-  final String method;
-
-  /// The percentile calculator for latency times. The _latency time_ is the
-  /// time from when the client sent the request until the time the server
-  /// started processing the request.
-  final PercentileCalculator latencyTimes = PercentileCalculator();
-
-  /// The percentile calculator for response times. The _response time_ is the
-  /// time from when the server started processing the request until the time
-  /// the response was sent.
-  final PercentileCalculator responseTimes = PercentileCalculator();
-
-  /// A table mapping the names of fields in a request's parameters to the
-  /// percentile calculators related to the value of the parameter (such as the
-  /// length of a list).
-  final Map<String, PercentileCalculator> additionalPercentiles = {};
-
-  /// A table mapping the name of a field in a request's parameters and the name
-  /// of an enum constant to the number of times that the given constant was
-  /// used as the value of the field.
-  final Map<String, Map<String, int>> additionalEnumCounts = {};
-
-  /// Initialize a newly create data holder for requests with the given
-  /// [method].
-  _RequestData(this.method);
-
-  /// Record the occurrence of the enum constant with the given [enumName] for
-  /// the field with the given [name].
-  void addEnumValue<E>(String name, String enumName) {
-    var counts = additionalEnumCounts.putIfAbsent(name, () => {});
-    counts[enumName] = (counts[enumName] ?? 0) + 1;
-  }
-
-  /// Record a [value] for the field with the given [name].
-  void addValue(String name, int value) {
-    additionalPercentiles
-        .putIfAbsent(name, PercentileCalculator.new)
-        .addValue(value);
-  }
-}
-
-/// Data about the current session.
-class _SessionData {
-  /// The time at which the current session started.
-  final DateTime startTime;
-
-  /// The command-line arguments passed to the server on startup.
-  final String commandLineArguments;
-
-  /// The parameters passed on initialize.
-  String initializeParams = '';
-
-  /// The name of the client that started the server.
-  final String clientId;
-
-  /// The version of the client that started the server, or an empty string if
-  /// no version information was provided.
-  final String clientVersion;
-
-  /// The version of the SDK from which the server was started.
-  final String sdkVersion;
-
-  /// Initialize a newly created data holder.
-  _SessionData(
-      {required this.startTime,
-      required this.commandLineArguments,
-      required this.clientId,
-      required this.clientVersion,
-      required this.sdkVersion});
-}
-
-extension on Either2<int, String> {
-  String get asString {
-    return map((value) => value.toString(), (value) => value);
-  }
-}
diff --git a/pkg/analysis_server/lib/src/analytics/noop_analytics.dart b/pkg/analysis_server/lib/src/analytics/noop_analytics.dart
new file mode 100644
index 0000000..5f99226
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analytics/noop_analytics.dart
@@ -0,0 +1,81 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:telemetry/telemetry.dart';
+
+/// An implementation of [Analytics] that's appropriate to use when analytics
+/// have not been enabled.
+class NoopAnalytics extends Analytics {
+  @override
+  String? get applicationName => null;
+
+  @override
+  String? get applicationVersion => null;
+
+  @override
+  bool get enabled => false;
+
+  @override
+  set enabled(bool value) {
+    // Ignored
+  }
+
+  @override
+  Stream<Map<String, dynamic>> get onSend async* {
+    // Ignored
+  }
+
+  @override
+  void close() {
+    // Ignored
+  }
+
+  @override
+  getSessionValue(String param) {
+    // Ignored
+  }
+
+  @override
+  dynamic noSuchMethod(Invocation invocation) {
+    throw UnimplementedError();
+  }
+
+  @override
+  Future sendEvent(String category, String action,
+      {String? label, int? value, Map<String, String>? parameters}) async {
+    // Ignored
+  }
+
+  @override
+  Future sendException(String description, {bool? fatal}) async {
+    // Ignored
+  }
+
+  @override
+  Future sendScreenView(String viewName,
+      {Map<String, String>? parameters}) async {
+    // Ignored
+  }
+
+  @override
+  Future sendSocial(String network, String action, String target) async {
+    // Ignored
+  }
+
+  @override
+  Future sendTiming(String variableName, int time,
+      {String? category, String? label}) async {
+    // Ignored
+  }
+
+  @override
+  void setSessionValue(String param, value) {
+    // Ignored
+  }
+
+  @override
+  Future waitForLastPing({Duration? timeout}) async {
+    // Ignored
+  }
+}
diff --git a/pkg/analysis_server/lib/src/analytics/noop_analytics_manager.dart b/pkg/analysis_server/lib/src/analytics/noop_analytics_manager.dart
deleted file mode 100644
index 169bb79..0000000
--- a/pkg/analysis_server/lib/src/analytics/noop_analytics_manager.dart
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analysis_server/lsp_protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol_generated.dart';
-import 'package:analysis_server/src/analytics/analytics_manager.dart';
-import 'package:analysis_server/src/plugin/plugin_manager.dart';
-import 'package:analyzer/dart/analysis/analysis_context.dart';
-
-/// An implementation of [AnalyticsManager] that's appropriate to use when
-/// analytics have not been enabled.
-class NoopAnalyticsManager implements AnalyticsManager {
-  @override
-  void changedPlugins(PluginManager pluginManager) {}
-
-  @override
-  void changedWorkspaceFolders(
-      {required List<String> added, required List<String> removed}) {}
-
-  @override
-  void createdAnalysisContexts(List<AnalysisContext> contexts) {}
-
-  @override
-  void handledNotificationMessage(
-      {required NotificationMessage notification,
-      required DateTime startTime,
-      required DateTime endTime}) {}
-
-  @override
-  void initialize(InitializeParams params) {}
-
-  @override
-  void initialized({required List<String> openWorkspacePaths}) {}
-
-  @override
-  void sentResponse({required Response response}) {}
-
-  @override
-  void sentResponseMessage({required ResponseMessage response}) {}
-
-  @override
-  void shutdown() {}
-
-  @override
-  void startedGetRefactoring(EditGetRefactoringParams params) {}
-
-  @override
-  void startedRequest(
-      {required Request request, required DateTime startTime}) {}
-
-  @override
-  void startedRequestMessage(
-      {required RequestMessage request, required DateTime startTime}) {}
-
-  @override
-  void startedSetAnalysisRoots(AnalysisSetAnalysisRootsParams params) {}
-
-  @override
-  void startedSetPriorityFiles(AnalysisSetPriorityFilesParams params) {}
-
-  @override
-  void startUp(
-      {required DateTime time,
-      required List<String> arguments,
-      required String clientId,
-      required String? clientVersion,
-      required String sdkVersion}) {}
-}
diff --git a/pkg/analysis_server/lib/src/analytics/notification_data.dart b/pkg/analysis_server/lib/src/analytics/notification_data.dart
new file mode 100644
index 0000000..0fee591
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analytics/notification_data.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All 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/analytics/percentile_calculator.dart';
+
+/// Data about the notifications that have been handled that have the same
+/// method.
+class NotificationData {
+  /// The name of the notifications.
+  final String method;
+
+  /// The percentile calculator for latency times. The _latency time_ is the
+  /// time from when the client sent the request until the time the server
+  /// started processing the request.
+  final PercentileCalculator latencyTimes = PercentileCalculator();
+
+  /// The percentile calculator for handling times. The _handling time_ is the
+  /// time from when the server started processing the notification until the
+  /// handling was complete.
+  final PercentileCalculator handlingTimes = PercentileCalculator();
+
+  /// Initialize a newly create data holder for notifications with the given
+  /// [method].
+  NotificationData(this.method);
+}
diff --git a/pkg/analysis_server/lib/src/analytics/plugin_data.dart b/pkg/analysis_server/lib/src/analytics/plugin_data.dart
new file mode 100644
index 0000000..491c61c
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analytics/plugin_data.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:convert';
+
+import 'package:analysis_server/src/analytics/percentile_calculator.dart';
+import 'package:analysis_server/src/plugin/plugin_manager.dart';
+
+/// Data about the plugins associated with the context roots.
+class PluginData {
+  /// The number of times that plugin information has been recorded.
+  int recordCount = 0;
+
+  /// A table mapping the ids of running plugins to the number of context roots
+  /// associated with each of the plugins.
+  Map<String, PercentileCalculator> usageCounts = {};
+
+  /// Initialize a newly created holder of plugin data.
+  PluginData();
+
+  String get usageCountData {
+    return json.encode({
+      'recordCount': recordCount,
+      'rootCounts': _encodeUsageCounts(),
+    });
+  }
+
+  /// Use the [pluginManager] to record data about the plugins that are
+  /// currently running.
+  void recordPlugins(PluginManager pluginManager) {
+    recordCount++;
+    var plugins = pluginManager.plugins;
+    for (var i = 0; i < plugins.length; i++) {
+      var info = plugins[i];
+      usageCounts
+          .putIfAbsent(info.pluginId, () => PercentileCalculator())
+          .addValue(info.contextRoots.length);
+    }
+  }
+
+  /// Return an encoding of the [usageCounts].
+  Map<String, Object> _encodeUsageCounts() {
+    var encoded = <String, Object>{};
+    for (var entry in usageCounts.entries) {
+      encoded[entry.key] = entry.value.toJson();
+    }
+    return encoded;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/analytics/request_data.dart b/pkg/analysis_server/lib/src/analytics/request_data.dart
new file mode 100644
index 0000000..37b45e0
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analytics/request_data.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All 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/analytics/percentile_calculator.dart';
+
+/// Data about the requests that have been responded to that have the same
+/// method.
+class RequestData {
+  /// The name of the requests.
+  final String method;
+
+  /// The percentile calculator for latency times. The _latency time_ is the
+  /// time from when the client sent the request until the time the server
+  /// started processing the request.
+  final PercentileCalculator latencyTimes = PercentileCalculator();
+
+  /// The percentile calculator for response times. The _response time_ is the
+  /// time from when the server started processing the request until the time
+  /// the response was sent.
+  final PercentileCalculator responseTimes = PercentileCalculator();
+
+  /// A table mapping the names of fields in a request's parameters to the
+  /// percentile calculators related to the value of the parameter (such as the
+  /// length of a list).
+  final Map<String, PercentileCalculator> additionalPercentiles = {};
+
+  /// A table mapping the name of a field in a request's parameters and the name
+  /// of an enum constant to the number of times that the given constant was
+  /// used as the value of the field.
+  final Map<String, Map<String, int>> additionalEnumCounts = {};
+
+  /// Initialize a newly create data holder for requests with the given
+  /// [method].
+  RequestData(this.method);
+
+  /// Record the occurrence of the enum constant with the given [enumName] for
+  /// the field with the given [name].
+  void addEnumValue<E>(String name, String enumName) {
+    var counts = additionalEnumCounts.putIfAbsent(name, () => {});
+    counts[enumName] = (counts[enumName] ?? 0) + 1;
+  }
+
+  /// Record a [value] for the field with the given [name].
+  void addValue(String name, int value) {
+    additionalPercentiles
+        .putIfAbsent(name, PercentileCalculator.new)
+        .addValue(value);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/analytics/session_data.dart b/pkg/analysis_server/lib/src/analytics/session_data.dart
new file mode 100644
index 0000000..875a2b5
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analytics/session_data.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Data about the current session.
+class SessionData {
+  /// The time at which the current session started.
+  final DateTime startTime;
+
+  /// The command-line arguments passed to the server on startup.
+  final String commandLineArguments;
+
+  /// The parameters passed on initialize.
+  String initializeParams = '';
+
+  /// The name of the client that started the server.
+  final String clientId;
+
+  /// The version of the client that started the server, or an empty string if
+  /// no version information was provided.
+  final String clientVersion;
+
+  /// The version of the SDK from which the server was started.
+  final String sdkVersion;
+
+  /// Initialize a newly created data holder.
+  SessionData(
+      {required this.startTime,
+      required this.commandLineArguments,
+      required this.clientId,
+      required this.clientVersion,
+      required this.sdkVersion});
+}
diff --git a/pkg/analysis_server/lib/src/cider/assists.dart b/pkg/analysis_server/lib/src/cider/assists.dart
index 6b51f05..76a0d6b 100644
--- a/pkg/analysis_server/lib/src/cider/assists.dart
+++ b/pkg/analysis_server/lib/src/cider/assists.dart
@@ -37,7 +37,7 @@
         );
         final processor = AssistProcessor(context);
         final assists = await processor.compute();
-        assists.sort(Assist.SORT_BY_RELEVANCE);
+        assists.sort(Assist.compareAssists);
         result.addAll(assists);
       } on InconsistentAnalysisException {
         // If an InconsistentAnalysisException occurs, it's likely the user modified
diff --git a/pkg/analysis_server/lib/src/cider/fixes.dart b/pkg/analysis_server/lib/src/cider/fixes.dart
index fe44877..b14c6ff 100644
--- a/pkg/analysis_server/lib/src/cider/fixes.dart
+++ b/pkg/analysis_server/lib/src/cider/fixes.dart
@@ -58,7 +58,7 @@
           );
 
           var fixes = await DartFixContributor().computeFixes(context);
-          fixes.sort(Fix.SORT_BY_RELEVANCE);
+          fixes.sort(Fix.compareFixes);
 
           result.add(
             CiderErrorFixes(error: error, fixes: fixes, lineInfo: lineInfo),
diff --git a/pkg/analysis_server/lib/src/handler/legacy/edit_get_assists.dart b/pkg/analysis_server/lib/src/handler/legacy/edit_get_assists.dart
index b66b6c5..c235006 100644
--- a/pkg/analysis_server/lib/src/handler/legacy/edit_get_assists.dart
+++ b/pkg/analysis_server/lib/src/handler/legacy/edit_get_assists.dart
@@ -101,7 +101,7 @@
       try {
         var processor = AssistProcessor(context);
         var assists = await processor.compute();
-        assists.sort(Assist.SORT_BY_RELEVANCE);
+        assists.sort(Assist.compareAssists);
         for (var assist in assists) {
           changes.add(assist.change);
         }
diff --git a/pkg/analysis_server/lib/src/handler/legacy/edit_get_fixes.dart b/pkg/analysis_server/lib/src/handler/legacy/edit_get_fixes.dart
index b0bb054..09cfb62 100644
--- a/pkg/analysis_server/lib/src/handler/legacy/edit_get_fixes.dart
+++ b/pkg/analysis_server/lib/src/handler/legacy/edit_get_fixes.dart
@@ -127,7 +127,7 @@
           resourceProvider, error, content, options);
       var fixes = await generator.computeFixes();
       if (fixes.isNotEmpty) {
-        fixes.sort(Fix.SORT_BY_RELEVANCE);
+        fixes.sort(Fix.compareFixes);
         var lineInfo = LineInfo.fromContent(content);
         var result = engine.ErrorsResultImpl(
             session, file, Uri.file(file), lineInfo, false, errors);
@@ -179,7 +179,7 @@
           }
 
           if (fixes.isNotEmpty) {
-            fixes.sort(Fix.SORT_BY_RELEVANCE);
+            fixes.sort(Fix.compareFixes);
             var serverError = newAnalysisError_fromEngine(result, error);
             var errorFixes = AnalysisErrorFixes(serverError);
             errorFixesList.add(errorFixes);
@@ -227,7 +227,7 @@
           PubspecFixGenerator(resourceProvider, error, content, document);
       var fixes = await generator.computeFixes();
       if (fixes.isNotEmpty) {
-        fixes.sort(Fix.SORT_BY_RELEVANCE);
+        fixes.sort(Fix.compareFixes);
         var lineInfo = LineInfo.fromContent(content);
         var result = engine.ErrorsResultImpl(
             session, file, Uri.file(file), lineInfo, false, errors);
diff --git a/pkg/analysis_server/lib/src/handler/legacy/execution_map_uri.dart b/pkg/analysis_server/lib/src/handler/legacy/execution_map_uri.dart
index b4e3c1b7..f59585a 100644
--- a/pkg/analysis_server/lib/src/handler/legacy/execution_map_uri.dart
+++ b/pkg/analysis_server/lib/src/handler/legacy/execution_map_uri.dart
@@ -7,6 +7,7 @@
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/handler/legacy/legacy_handler.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
 
 /// The handler for the `execution.mapUri` request.
@@ -31,6 +32,7 @@
       sendResponse(Response.invalidExecutionContext(request, contextId));
       return;
     }
+
     var sourceFactory = driver.sourceFactory;
 
     var file = params.file;
@@ -51,13 +53,23 @@
         return;
       }
 
-      var source = driver.fsState.getFileForPath(file).source;
-      if (!source.uri.isScheme('file')) {
-        uri = source.uri.toString();
-      } else {
-        uri = sourceFactory.pathToUri(file).toString();
+      final fileResult = driver.getFileSync(file);
+      if (fileResult is! FileResult) {
+        sendResponse(
+          Response.invalidParameter(
+            request,
+            'file',
+            'Expected FileResult, actually ${fileResult.runtimeType}',
+          ),
+        );
+        return;
       }
-      sendResult(ExecutionMapUriResult(uri: uri));
+
+      sendResult(
+        ExecutionMapUriResult(
+          uri: '${fileResult.uri}',
+        ),
+      );
       return;
     } else if (uri != null) {
       var source = sourceFactory.forUri(uri);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
index d37962b..bd82a4a 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
@@ -35,22 +35,6 @@
   // CodeAction class).
   final codeActionPriorities = Expando<int>();
 
-  /// A comparator that can be used to sort [CodeActions]s using priorities
-  /// in [codeActionPriorities].
-  ///
-  /// The highest number priority will be sorted before lower number priorities.
-  /// Items with the same priority are sorted alphabetically by their title.
-  late final Comparator<CodeAction> _codeActionComparator =
-      (CodeAction a, CodeAction b) {
-    // We should never be sorting actions without priorities.
-    final aPriority = codeActionPriorities[a] ?? 0;
-    final bPriority = codeActionPriorities[b] ?? 0;
-    if (aPriority != bPriority) {
-      return bPriority - aPriority;
-    }
-    return a.title.compareTo(b.title);
-  };
-
   CodeActionHandler(super.server);
 
   @override
@@ -200,6 +184,21 @@
         : Either2<CodeAction, Command>.t2(command);
   }
 
+  /// A function that can be used to sort [CodeActions]s using priorities
+  /// in [codeActionPriorities].
+  ///
+  /// The highest number priority will be sorted before lower number priorities.
+  /// Items with the same priority are sorted alphabetically by their title.
+  int _compareCodeActions(CodeAction a, CodeAction b) {
+    // We should never be sorting actions without priorities.
+    final aPriority = codeActionPriorities[a] ?? 0;
+    final bPriority = codeActionPriorities[b] ?? 0;
+    if (aPriority != bPriority) {
+      return bPriority - aPriority;
+    }
+    return a.title.compareTo(b.title);
+  }
+
   /// Creates a CodeAction to apply this assist. Note: This code will fetch the
   /// version of each document being modified so it's important to call this
   /// immediately after computing edits to ensure the document is not modified
@@ -318,7 +317,7 @@
       }));
 
       final dedupedCodeActions = _dedupeActions(codeActions, range.start);
-      dedupedCodeActions.sort(_codeActionComparator);
+      dedupedCodeActions.sort(_compareCodeActions);
 
       return dedupedCodeActions
           .where((action) => shouldIncludeKind(action.kind))
@@ -450,7 +449,7 @@
       codeActions.addAll(pluginFixActions);
 
       final dedupedActions = _dedupeActions(codeActions, range.start);
-      dedupedActions.sort(_codeActionComparator);
+      dedupedActions.sort(_compareCodeActions);
 
       return dedupedActions
           .where((action) => shouldIncludeKind(action.kind))
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
index 9efd825..de5f0da 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
@@ -29,7 +29,7 @@
       params.initializationOptions,
     );
 
-    final unnormalisedWorkspacePaths = <String>[];
+    final workspacePaths = <String>[];
     final workspaceFolders = params.workspaceFolders;
     final rootUri = params.rootUri;
     final rootPath = params.rootPath;
@@ -43,27 +43,20 @@
           // Only file URIs are supported, but there's no way to signal this to
           // the LSP client (and certainly not before initialization).
           if (uri.isScheme('file')) {
-            unnormalisedWorkspacePaths.add(uri.toFilePath());
+            workspacePaths.add(uri.toFilePath());
           }
         }
       }
       if (rootUri != null) {
         final uri = Uri.parse(rootUri);
         if (uri.isScheme('file')) {
-          unnormalisedWorkspacePaths.add(uri.toFilePath());
+          workspacePaths.add(uri.toFilePath());
         }
       } else if (rootPath != null) {
-        unnormalisedWorkspacePaths.add(rootPath);
+        workspacePaths.add(rootPath);
       }
     }
 
-    final pathContext = server.resourceProvider.pathContext;
-    // Normalise all potential workspace folder paths as these may contain
-    // trailing slashes (the LSP spec does not specific if folders
-    // should/should not have them) and the analysis roots must be normalized.
-    final workspacePaths =
-        unnormalisedWorkspacePaths.map(pathContext.normalize).toList();
-
     server.messageHandler = InitializingStateMessageHandler(
       server,
       workspacePaths,
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
index 23f1958..044ae3f 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -742,9 +742,16 @@
       List<String> addedPaths, List<String> removedPaths) async {
     // TODO(dantup): This is currently case-sensitive!
 
+    // Normalise all potential workspace folder paths as these may contain
+    // trailing slashes (the LSP spec does not specify whether folders
+    // should/should not have them) and the analysis roots must be normalized.
+    final pathContext = resourceProvider.pathContext;
+    final addedNormalized = addedPaths.map(pathContext.normalize).toList();
+    final removedNormalized = removedPaths.map(pathContext.normalize).toList();
+
     _workspaceFolders
-      ..addAll(addedPaths)
-      ..removeAll(removedPaths);
+      ..addAll(addedNormalized)
+      ..removeAll(removedNormalized);
 
     await fetchClientConfigurationAndPerformDynamicRegistration();
 
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 20e9aaf..7234c5b 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -11,7 +11,7 @@
     show PROTOCOL_VERSION;
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/analytics/analytics_manager.dart';
-import 'package:analysis_server/src/analytics/noop_analytics_manager.dart';
+import 'package:analysis_server/src/analytics/noop_analytics.dart';
 import 'package:analysis_server/src/lsp/lsp_socket_server.dart';
 import 'package:analysis_server/src/server/crash_reporting.dart';
 import 'package:analysis_server/src/server/crash_reporting_attachments.dart';
@@ -204,7 +204,7 @@
     if (analysisServerOptions.clientVersion != null) {
       analytics.setSessionValue('cd1', analysisServerOptions.clientVersion);
     }
-    var analyticsManager = NoopAnalyticsManager();
+    var analyticsManager = AnalyticsManager(NoopAnalytics());
 
     bool shouldSendCallback() {
       // Check sdkConfig to optionally force reporting on.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart
index e9230f7..10fb60b 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/remove_unnecessary_parentheses.dart
@@ -27,8 +27,15 @@
     var outer = coveredNode;
     if (outer is ParenthesizedExpression &&
         outer.parent is! ParenthesizedExpression) {
+      var left = outer.leftParenthesis;
+
       await builder.addDartFileEdit(file, (builder) {
-        builder.addDeletion(range.token(outer.leftParenthesis));
+        builder.addReplacement(range.token(left), (builder) {
+          if ((left.previous?.isKeywordOrIdentifier ?? false) &&
+              left.previous?.end == left.offset) {
+            builder.write(' ');
+          }
+        });
         builder.addDeletion(range.token(outer.rightParenthesis));
       });
     }
diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
index 9c87e09..b1fe5b7 100644
--- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
+++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
@@ -1228,10 +1228,6 @@
   status: needsFix
   notes: |-
     The fix is to remove `Function` from where it's referenced.
-HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION:
-  status: noFix
-  notes: |-
-    The fix is to rename the class, which can't be done as a fix.
 HintCode.DEPRECATED_IMPLEMENTS_FUNCTION:
   status: needsFix
   notes: |-
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 9e1f5f29..7e1be03 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1433,7 +1433,7 @@
 
   Future<Fix?> computeFix() async {
     await _addFromProducers();
-    fixes.sort(Fix.SORT_BY_RELEVANCE);
+    fixes.sort(Fix.compareFixes);
     return fixes.isNotEmpty ? fixes.first : null;
   }
 
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index cb3dc90..9255b71 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -10,6 +10,7 @@
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/analysis_server_abstract.dart';
+import 'package:analysis_server/src/analytics/noop_analytics.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart'
     show LspAnalysisServer;
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
@@ -157,6 +158,40 @@
   return '$name: <code>$value</code><br> ';
 }
 
+class AnalyticsPage extends DiagnosticPageWithNav {
+  AnalyticsPage(DiagnosticsSite site)
+      : super(site, 'analytics', 'Analytics',
+            description: 'Analytics gathered by the analysis server.');
+
+  @override
+  String? get navDetail => null;
+
+  @override
+  Future generateContent(Map<String, String> params) async {
+    var manager = server.analyticsManager;
+    //
+    // Display the standard header.
+    //
+    if (manager.analytics is NoopAnalytics) {
+      p('Analytics reporting disabled. In order to enable it, run:');
+      p('&nbsp;&nbsp;<code>dart --enable-analytics</code>');
+      p('If analytics had been enabled, the information below would be '
+          'reported on shutdown.');
+    } else {
+      p('The Dart tool uses Google Analytics to report feature usage '
+          'statistics and to send basic crash reports. This data is used to '
+          'help improve the Dart platform and tools over time.');
+      p('To disable reporting of analytics, run:');
+      p('&nbsp;&nbsp;<code>dart --disable-analytics</code>');
+      p('The information below will be reported on shutdown.');
+    }
+    //
+    // Display the analytics data that has been gathered.
+    //
+    manager.toHtml(buf);
+  }
+}
+
 class AstPage extends DiagnosticPageWithNav {
   String? _description;
 
@@ -741,7 +776,8 @@
     pages.add(ContextsPage(this));
     pages.add(EnvironmentVariablesPage(this));
     pages.add(ExceptionsPage(this));
-    //pages.add(new InstrumentationPage(this));
+    // pages.add(new InstrumentationPage(this));
+    // pages.add(AnalyticsPage(this));
 
     // Add server-specific pages. Ordering doesn't matter as the items are
     // sorted later.
diff --git a/pkg/analysis_server/test/analysis_server_base.dart b/pkg/analysis_server/test/analysis_server_base.dart
index be54d67..6aec365 100644
--- a/pkg/analysis_server/test/analysis_server_base.dart
+++ b/pkg/analysis_server/test/analysis_server_base.dart
@@ -5,7 +5,8 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/analytics/noop_analytics_manager.dart';
+import 'package:analysis_server/src/analytics/analytics_manager.dart';
+import 'package:analysis_server/src/analytics/noop_analytics.dart';
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/server/crash_reporting_attachments.dart';
 import 'package:analysis_server/src/utilities/mocks.dart';
@@ -175,7 +176,7 @@
       resourceProvider,
       AnalysisServerOptions(),
       DartSdkManager(sdkRoot.path),
-      NoopAnalyticsManager(),
+      AnalyticsManager(NoopAnalytics()),
       CrashReportingAttachmentsBuilder.empty,
       InstrumentationService.NULL_SERVICE,
     );
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index d3abf86..aaea0c2 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -6,7 +6,8 @@
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/analytics/noop_analytics_manager.dart';
+import 'package:analysis_server/src/analytics/analytics_manager.dart';
+import 'package:analysis_server/src/analytics/noop_analytics.dart';
 import 'package:analysis_server/src/server/crash_reporting_attachments.dart';
 import 'package:analysis_server/src/utilities/mocks.dart';
 import 'package:analyzer/file_system/file_system.dart';
@@ -99,7 +100,7 @@
         resourceProvider,
         AnalysisServerOptions(),
         DartSdkManager(sdkRoot.path),
-        NoopAnalyticsManager(),
+        AnalyticsManager(NoopAnalytics()),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
   }
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index 14d35b7..cbc2ec6 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -483,7 +483,7 @@
   /// directory containing the file for a pubspec.yaml file. If none is found,
   /// then the parents of the directory will be searched until such a file is
   /// found or the root of the file system is reached. If such a file is found,
-  /// it will be used to resolve package: URI’s within the file.
+  /// it will be used to resolve package: URI's within the file.
   ///
   /// Parameters
   ///
diff --git a/pkg/analysis_server/test/lsp/change_workspace_folders_test.dart b/pkg/analysis_server/test/lsp/change_workspace_folders_test.dart
index 0691f6e..41675b7 100644
--- a/pkg/analysis_server/test/lsp/change_workspace_folders_test.dart
+++ b/pkg/analysis_server/test/lsp/change_workspace_folders_test.dart
@@ -68,6 +68,41 @@
     );
   }
 
+  Future<void> test_changeWorkspaceFolders_addAndRemove_trailingSlash() async {
+    await initialize(workspaceFolders: []);
+    // Test:
+    // - folder1: add with, remove with
+    // - folder2: add with, remove without
+    // - folder3: add without, remove with
+
+    // Add and ensure they're all listed without their trailing slashes.
+    await changeWorkspaceFolders(
+      add: [
+        withTrailingSlashUri(workspaceFolder1Uri),
+        withTrailingSlashUri(workspaceFolder2Uri),
+        workspaceFolder3Uri,
+      ],
+    );
+    expect(
+      server.contextManager.includedPaths,
+      unorderedEquals([
+        workspaceFolder1Path,
+        workspaceFolder2Path,
+        workspaceFolder3Path,
+      ]),
+    );
+
+    // Remove and ensure they were all removed.
+    await changeWorkspaceFolders(
+      remove: [
+        withTrailingSlashUri(workspaceFolder1Uri),
+        workspaceFolder2Uri,
+        withTrailingSlashUri(workspaceFolder3Uri),
+      ],
+    );
+    expect(server.contextManager.includedPaths, isEmpty);
+  }
+
   Future<void>
       test_changeWorkspaceFolders_addExplicitParentOfImplicit_closeFile() async {
     final nestedFolderPath =
diff --git a/pkg/analysis_server/test/lsp/initialization_test.dart b/pkg/analysis_server/test/lsp/initialization_test.dart
index d076789..4f6bf6e 100644
--- a/pkg/analysis_server/test/lsp/initialization_test.dart
+++ b/pkg/analysis_server/test/lsp/initialization_test.dart
@@ -965,17 +965,6 @@
     expect(response.error, isNotNull);
     expect(response.error!.code, ErrorCodes.ServerNotInitialized);
   }
-
-  String withTrailingSlash(String path) {
-    expect(path, isNot(endsWith('/')));
-    final pathSeparator = server.resourceProvider.pathContext.separator;
-    return '$path$pathSeparator';
-  }
-
-  Uri withTrailingSlashUri(Uri uri) {
-    expect(uri.path, isNot(endsWith('/')));
-    return uri.replace(path: '${uri.path}/');
-  }
 }
 
 /// Runs all initialization tests with a resource provider that slowly
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
index a28d399..f5a74ab 100644
--- a/pkg/analysis_server/test/lsp/server_abstract.dart
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -6,7 +6,8 @@
 
 import 'package:analysis_server/lsp_protocol/protocol.dart';
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/analytics/noop_analytics_manager.dart';
+import 'package:analysis_server/src/analytics/analytics_manager.dart';
+import 'package:analysis_server/src/analytics/noop_analytics.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
 import 'package:analysis_server/src/lsp/json_parsing.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
@@ -197,7 +198,7 @@
         resourceProvider,
         serverOptions,
         DartSdkManager(sdkRoot.path),
-        NoopAnalyticsManager(),
+        AnalyticsManager(NoopAnalytics()),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE,
         httpClient: httpClient,
@@ -224,6 +225,23 @@
     channel.close();
     await server.shutdown();
   }
+
+  /// Adds a trailing slash (direction based on path context) to [path].
+  ///
+  /// Throws if the path already has a trailing slash.
+  String withTrailingSlash(String path) {
+    final pathSeparator = server.resourceProvider.pathContext.separator;
+    expect(path, isNot(endsWith(pathSeparator)));
+    return '$path$pathSeparator';
+  }
+
+  /// Adds a trailing slash to [uri].
+  ///
+  /// Throws if the URI already has a trailing slash.
+  Uri withTrailingSlashUri(Uri uri) {
+    expect(uri.path, isNot(endsWith('/')));
+    return uri.replace(path: '${uri.path}/');
+  }
 }
 
 mixin ClientCapabilitiesHelperMixin {
diff --git a/pkg/analysis_server/test/socket_server_test.dart b/pkg/analysis_server/test/socket_server_test.dart
index cc4f39a..4c1961e 100644
--- a/pkg/analysis_server/test/socket_server_test.dart
+++ b/pkg/analysis_server/test/socket_server_test.dart
@@ -6,7 +6,8 @@
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/analytics/noop_analytics_manager.dart';
+import 'package:analysis_server/src/analytics/analytics_manager.dart';
+import 'package:analysis_server/src/analytics/noop_analytics.dart';
 import 'package:analysis_server/src/server/crash_reporting_attachments.dart';
 import 'package:analysis_server/src/server/error_notifier.dart';
 import 'package:analysis_server/src/socket_server.dart';
@@ -72,7 +73,7 @@
         errorNotifier,
         null,
         null,
-        NoopAnalyticsManager(),
+        AnalyticsManager(NoopAnalytics()),
         null);
 
     server.createAnalysisServer(channel);
diff --git a/pkg/analysis_server/test/src/analytics/google_analytics_manager_test.dart b/pkg/analysis_server/test/src/analytics/analytics_manager_test.dart
similarity index 98%
rename from pkg/analysis_server/test/src/analytics/google_analytics_manager_test.dart
rename to pkg/analysis_server/test/src/analytics/analytics_manager_test.dart
index 1f8dba5..9e2cd8a 100644
--- a/pkg/analysis_server/test/src/analytics/google_analytics_manager_test.dart
+++ b/pkg/analysis_server/test/src/analytics/analytics_manager_test.dart
@@ -6,7 +6,7 @@
 
 import 'package:analysis_server/lsp_protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
-import 'package:analysis_server/src/analytics/google_analytics_manager.dart';
+import 'package:analysis_server/src/analytics/analytics_manager.dart';
 import 'package:analysis_server/src/analytics/percentile_calculator.dart';
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
 import 'package:analysis_server/src/protocol_server.dart';
@@ -22,14 +22,14 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(GoogleAnalyticsManagerTest);
+    defineReflectiveTests(AnalyticsManagerTest);
   });
 }
 
 @reflectiveTest
-class GoogleAnalyticsManagerTest with ResourceProviderMixin {
+class AnalyticsManagerTest with ResourceProviderMixin {
   final analytics = _MockAnalytics();
-  late final manager = GoogleAnalyticsManager(analytics);
+  late final manager = AnalyticsManager(analytics);
 
   Folder get testPackageRoot => getFolder('/home/package');
 
diff --git a/pkg/analysis_server/test/src/analytics/test_all.dart b/pkg/analysis_server/test/src/analytics/test_all.dart
index d372a69..9153f30 100644
--- a/pkg/analysis_server/test/src/analytics/test_all.dart
+++ b/pkg/analysis_server/test/src/analytics/test_all.dart
@@ -4,12 +4,12 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'google_analytics_manager_test.dart' as google_analytics_manager;
+import 'analytics_manager_test.dart' as analytics_manager;
 import 'percentile_calculator_test.dart' as percentile_calculator;
 
 void main() {
   defineReflectiveSuite(() {
-    google_analytics_manager.main();
+    analytics_manager.main();
     percentile_calculator.main();
   });
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
index 487f677..84d6026 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_parentheses_test.dart
@@ -73,6 +73,19 @@
         allowFixAllFixes: true);
   }
 
+  Future<void> test_previous_notKeyword() async {
+    await resolveTestCode('''
+int f(int i) {
+  return f((2));
+}
+''');
+    await assertHasFix('''
+int f(int i) {
+  return f(2);
+}
+''');
+  }
+
   Future<void> test_single() async {
     await resolveTestCode('''
 void f() {
@@ -85,4 +98,30 @@
 }
 ''');
   }
+
+  Future<void> test_space_existing() async {
+    await resolveTestCode('''
+int f() {
+  return (2);
+}
+''');
+    await assertHasFix('''
+int f() {
+  return 2;
+}
+''');
+  }
+
+  Future<void> test_space_no() async {
+    await resolveTestCode('''
+int f() {
+  return(2);
+}
+''');
+    await assertHasFix('''
+int f() {
+  return 2;
+}
+''');
+  }
 }
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_notification_handler.dart b/pkg/analysis_server/tool/spec/codegen_dart_notification_handler.dart
index 1122cee..8c8a4f4 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_notification_handler.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_notification_handler.dart
@@ -24,7 +24,7 @@
     '${name.substring(0, 1).toUpperCase()}${name.substring(1)}';
 
 List<String> _generateDartDoc(Element html) => html.children
-    .where((Element elem) => elem.localName == 'p')
+    .where((Element elem) => elem.name == 'p')
     .map<String>((Element elem) => innerText(elem).trim())
     .toList();
 
diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
index 0b6d2ef..5dee0bf 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -109,24 +109,24 @@
       if (!requiredAttributes.contains(name) &&
           !optionalAttributes.contains(name)) {
         throw Exception(
-            '$context: Unexpected attribute in ${element.localName}: $name');
+            '$context: Unexpected attribute in ${element.name}: $name');
       }
       attributesFound.add(name);
     });
     for (var expectedAttribute in requiredAttributes) {
       if (!attributesFound.contains(expectedAttribute)) {
         throw Exception(
-            '$context: ${element.localName} must contain attribute $expectedAttribute');
+            '$context: ${element.name} must contain attribute $expectedAttribute');
       }
     }
   }
 
   /// Check that the given [element] has the given [expectedName].
   void checkName(dom.Element element, String expectedName, [String? context]) {
-    if (element.localName != expectedName) {
-      context ??= element.localName;
+    if (element.name != expectedName) {
+      context ??= element.name;
       throw Exception(
-          '$context: Expected $expectedName, found ${element.localName}');
+          '$context: Expected $expectedName, found ${element.name}');
     }
   }
 
@@ -165,13 +165,12 @@
   dom.Element getAncestor(dom.Element html, String name, String context) {
     var ancestor = html.parent;
     while (ancestor != null) {
-      if (ancestor.localName == name) {
+      if (ancestor.name == name) {
         return ancestor;
       }
       ancestor = ancestor.parent;
     }
-    throw Exception(
-        '$context: <${html.localName}> must be nested within <$name>');
+    throw Exception('$context: <${html.name}> must be nested within <$name>');
   }
 
   /// Create a [Notification] object from an HTML representation such as:
@@ -316,7 +315,7 @@
     var htmlContents = file.readAsStringSync();
     var document = dom.parse(htmlContents, file.uri);
     var htmlElement = document.children
-        .singleWhere((element) => element.localName!.toLowerCase() == 'html');
+        .singleWhere((element) => element.name.toLowerCase() == 'html');
     return apiFromHtml(htmlElement);
   }
 
@@ -329,11 +328,11 @@
     }
     for (var node in parent.nodes) {
       if (node is dom.Element) {
-        var processor = elementProcessors[node.localName];
+        var processor = elementProcessors[node.name];
         if (processor != null) {
           processor(node);
-        } else if (specialElements.contains(node.localName)) {
-          throw Exception('$context: Unexpected use of <${node.localName}>');
+        } else if (specialElements.contains(node.name)) {
+          throw Exception('$context: Unexpected use of <${node.name}>');
         } else {
           recurse(node, context, elementProcessors);
         }
diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
index d8f6a6c..63daf3e 100644
--- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
+++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
@@ -209,19 +209,19 @@
    * If an included path represents a file, then server will look in the directory containing the
    * file for a pubspec.yaml file. If none is found, then the parents of the directory will be
    * searched until such a file is found or the root of the file system is reached. If such a file is
-   * found, it will be used to resolve package: URI’s within the file.
+   * found, it will be used to resolve package: URI's within the file.
    *
    * @param included A list of the files and directories that should be analyzed.
    * @param excluded A list of the files and directories within the included directories that should
-   *         not be analyzed.
+   *        not be analyzed.
    * @param packageRoots A mapping from source directories to package roots that should override the
-   *         normal package: URI resolution mechanism. If a package root is a file, then the analyzer
-   *         will behave as though that file is a ".dart_tool/package_config.json" file in the source
-   *         directory. The effect is the same as specifying the file as a "--packages" parameter to
-   *         the Dart VM when executing any Dart file inside the source directory. Files in any
-   *         directories that are not overridden by this mapping have their package: URI's resolved
-   *         using the normal pubspec.yaml mechanism. If this field is absent, or the empty map is
-   *         specified, that indicates that the normal pubspec.yaml mechanism should always be used.
+   *        normal package: URI resolution mechanism. If a package root is a file, then the analyzer
+   *        will behave as though that file is a ".dart_tool/package_config.json" file in the source
+   *        directory. The effect is the same as specifying the file as a "--packages" parameter to
+   *        the Dart VM when executing any Dart file inside the source directory. Files in any
+   *        directories that are not overridden by this mapping have their package: URI's resolved
+   *        using the normal pubspec.yaml mechanism. If this field is absent, or the empty map is
+   *        specified, that indicates that the normal pubspec.yaml mechanism should always be used.
    */
   public void analysis_setAnalysisRoots(List<String> included, List<String> excluded, Map<String, String> packageRoots);
 
@@ -286,7 +286,7 @@
    * the existing subscriptions will remain unchanged.
    *
    * @param subscriptions A table mapping services to a list of the files being subscribed to the
-   *         service.
+   *        service.
    */
   public void analysis_setSubscriptions(Map<String, List<String>> subscriptions);
 
@@ -300,7 +300,7 @@
    * path to a directory on the filesystem.
    *
    * @param files A table mapping the files whose content has changed to a description of the content
-   *         change.
+   *        change.
    */
   public void analysis_updateContent(Map<String, Object> files, UpdateContentConsumer consumer);
 
@@ -396,7 +396,7 @@
    * @param file The path of the file into which this completion is being inserted.
    * @param id The identifier of the AvailableSuggestionSet containing the selected label.
    * @param label The label from the AvailableSuggestionSet with the `id` for which insertion
-   *         information is requested.
+   *        information is requested.
    * @param offset The offset in the file where the completion will be inserted.
    */
   public void completion_getSuggestionDetails(String file, int id, String label, int offset, GetSuggestionDetailsConsumer consumer);
@@ -413,10 +413,10 @@
    * @param file The path of the file into which this completion is being inserted.
    * @param offset The offset in the file where the completion will be inserted.
    * @param completion The completion from the selected CompletionSuggestion. It could be a name of a
-   *         class, or a name of a constructor in form "typeName.constructorName()", or an
-   *         enumeration constant in form "enumName.constantName", etc.
+   *        class, or a name of a constructor in form "typeName.constructorName()", or an enumeration
+   *        constant in form "enumName.constantName", etc.
    * @param libraryUri The URI of the library to import, so that the element referenced in the
-   *         completion becomes accessible.
+   *        completion becomes accessible.
    */
   public void completion_getSuggestionDetails2(String file, int offset, String completion, String libraryUri, GetSuggestionDetails2Consumer consumer);
 
@@ -439,17 +439,17 @@
    * @param file The file containing the point at which suggestions are to be made.
    * @param offset The offset within the file at which suggestions are to be made.
    * @param maxResults The maximum number of suggestions to return. If the number of suggestions
-   *         after filtering is greater than the maxResults, then isIncomplete is set to true.
+   *        after filtering is greater than the maxResults, then isIncomplete is set to true.
    * @param completionCaseMatchingMode The mode of code completion being invoked. If no value is
-   *         provided, MATCH_FIRST_CHAR will be assumed.
+   *        provided, MATCH_FIRST_CHAR will be assumed.
    * @param completionMode The mode of code completion being invoked. If no value is provided, BASIC
-   *         will be assumed. BASIC is also the only currently supported.
+   *        will be assumed. BASIC is also the only currently supported.
    * @param invocationCount The number of times that the user has invoked code completion at the same
-   *         code location, counting from 1. If no value is provided, 1 will be assumed.
+   *        code location, counting from 1. If no value is provided, 1 will be assumed.
    * @param timeout The approximate time in milliseconds that the server should spend. The server
-   *         will perform some steps anyway, even if it takes longer than the specified timeout. This
-   *         field is intended to be used for benchmarking, and usually should not be provided, so
-   *         that the default timeout is used.
+   *        will perform some steps anyway, even if it takes longer than the specified timeout. This
+   *        field is intended to be used for benchmarking, and usually should not be provided, so
+   *        that the default timeout is used.
    */
   public void completion_getSuggestions2(String file, int offset, int maxResults, String completionCaseMatchingMode, String completionMode, int invocationCount, int timeout, GetSuggestions2Consumer consumer);
 
@@ -463,9 +463,9 @@
    * paths are replaced by the given set of paths.
    *
    * @param paths A list of objects each containing a path and the additional libraries from which
-   *         the client is interested in receiving completion suggestions. If one configured path is
-   *         beneath another, the descendent will override the ancestors' configured libraries of
-   *         interest.
+   *        the client is interested in receiving completion suggestions. If one configured path is
+   *        beneath another, the descendent will override the ancestors' configured libraries of
+   *        interest.
    *
    * @deprecated
    */
@@ -508,15 +508,15 @@
    * specified sources if a change in a specified source requires it.
    *
    * @param included A list of the files and directories for which edits should be suggested. If a
-   *         request is made with a path that is invalid, e.g. is not absolute and normalized, an
-   *         error of type INVALID_FILE_PATH_FORMAT will be generated. If a request is made for a
-   *         file which does not exist, or which is not currently subject to analysis (e.g. because
-   *         it is not associated with any analysis root specified to analysis.setAnalysisRoots), an
-   *         error of type FILE_NOT_ANALYZED will be generated.
+   *        request is made with a path that is invalid, e.g. is not absolute and normalized, an
+   *        error of type INVALID_FILE_PATH_FORMAT will be generated. If a request is made for a file
+   *        which does not exist, or which is not currently subject to analysis (e.g. because it is
+   *        not associated with any analysis root specified to analysis.setAnalysisRoots), an error
+   *        of type FILE_NOT_ANALYZED will be generated.
    * @param inTestMode A flag indicating whether the bulk fixes are being run in test mode. The only
-   *         difference is that in test mode the fix processor will look for a configuration file
-   *         that can modify the content of the data file used to compute the fixes when data-driven
-   *         fixes are being considered. If this field is omitted the flag defaults to false.
+   *        difference is that in test mode the fix processor will look for a configuration file that
+   *        can modify the content of the data file used to compute the fixes when data-driven fixes
+   *        are being considered. If this field is omitted the flag defaults to false.
    */
   public void edit_bulkFixes(List<String> included, boolean inTestMode, BulkFixesConsumer consumer);
 
@@ -619,12 +619,12 @@
    * @param offset The offset of the region involved in the refactoring.
    * @param length The length of the region involved in the refactoring.
    * @param validateOnly True if the client is only requesting that the values of the options be
-   *         validated and no change be generated.
+   *        validated and no change be generated.
    * @param options Data used to provide values provided by the user. The structure of the data is
-   *         dependent on the kind of refactoring being performed. The data that is expected is
-   *         documented in the section titled Refactorings, labeled as "Options". This field can be
-   *         omitted if the refactoring does not require any options or if the values of those
-   *         options are not known.
+   *        dependent on the kind of refactoring being performed. The data that is expected is
+   *        documented in the section titled Refactorings, labeled as "Options". This field can be
+   *        omitted if the refactoring does not require any options or if the values of those options
+   *        are not known.
    */
   public void edit_getRefactoring(String kind, String file, int offset, int length, boolean validateOnly, RefactoringOptions options, GetRefactoringConsumer consumer);
 
@@ -655,9 +655,9 @@
    * @param file The file in which the specified elements are to be made accessible.
    * @param elements The elements to be made accessible in the specified file.
    * @param offset The offset at which the specified elements need to be made accessible. If
-   *         provided, this is used to guard against adding imports for text that would be inserted
-   *         into a comment, string literal, or other location where the imports would not be
-   *         necessary.
+   *        provided, this is used to guard against adding imports for text that would be inserted
+   *        into a comment, string literal, or other location where the imports would not be
+   *        necessary.
    */
   public void edit_importElements(String file, List<ImportedElements> elements, int offset, ImportElementsConsumer consumer);
 
@@ -719,7 +719,7 @@
    * responsible for managing the lifetime of execution contexts.
    *
    * @param contextRoot The path of the Dart or HTML file that will be launched, or the path of the
-   *         directory containing the file.
+   *        directory containing the file.
    */
   public void execution_createContext(String contextRoot, CreateContextConsumer consumer);
 
@@ -751,17 +751,17 @@
    * @param code The code to get suggestions in.
    * @param offset The offset within the code to get suggestions at.
    * @param contextFile The path of the context file, e.g. the file of the current debugger frame.
-   *         The combination of the context file and context offset can be used to ensure that all
-   *         variables of the context are available for completion (with their static types).
+   *        The combination of the context file and context offset can be used to ensure that all
+   *        variables of the context are available for completion (with their static types).
    * @param contextOffset The offset in the context file, e.g. the line offset in the current
-   *         debugger frame.
+   *        debugger frame.
    * @param variables The runtime context variables that are potentially referenced in the code.
    * @param expressions The list of sub-expressions in the code for which the client wants to provide
-   *         runtime types. It does not have to be the full list of expressions requested by the
-   *         server, for missing expressions their static types will be used. When this field is
-   *         omitted, the server will return completion suggestions only when there are no
-   *         interesting sub-expressions in the given code. The client may provide an empty list, in
-   *         this case the server will return completion suggestions.
+   *        runtime types. It does not have to be the full list of expressions requested by the
+   *        server, for missing expressions their static types will be used. When this field is
+   *        omitted, the server will return completion suggestions only when there are no interesting
+   *        sub-expressions in the given code. The client may provide an empty list, in this case the
+   *        server will return completion suggestions.
    */
   public void execution_getSuggestions(String code, int offset, String contextFile, int contextOffset, List<RuntimeCompletionVariable> variables, List<RuntimeCompletionExpression> expressions, GetSuggestionsConsumer consumer);
 
@@ -849,7 +849,7 @@
    * the existing subscriptions will remain unchanged.
    *
    * @param subscriptions A table mapping services to a list of the files being subscribed to the
-   *         service.
+   *        service.
    */
   public void flutter_setSubscriptions(Map<String, List<String>> subscriptions);
 
@@ -864,14 +864,14 @@
    * intermediate widgets instantiated.
    *
    * @param id The identifier of the property, previously returned as a part of a
-   *         FlutterWidgetProperty. An error of type FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_ID is
-   *         generated if the identifier is not valid.
+   *        FlutterWidgetProperty. An error of type FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_ID is
+   *        generated if the identifier is not valid.
    * @param value The new value to set for the property. If absent, indicates that the property
-   *         should be removed. If the property corresponds to an optional parameter, the
-   *         corresponding named argument is removed. If the property isRequired is true,
-   *         FLUTTER_SET_WIDGET_PROPERTY_VALUE_IS_REQUIRED error is generated. If the expression is
-   *         not a syntactically valid Dart code, then
-   *         FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_EXPRESSION is reported.
+   *        should be removed. If the property corresponds to an optional parameter, the
+   *        corresponding named argument is removed. If the property isRequired is true,
+   *        FLUTTER_SET_WIDGET_PROPERTY_VALUE_IS_REQUIRED error is generated. If the expression is
+   *        not a syntactically valid Dart code, then
+   *        FLUTTER_SET_WIDGET_PROPERTY_VALUE_INVALID_EXPRESSION is reported.
    */
   public void flutter_setWidgetPropertyValue(int id, FlutterWidgetPropertyValue value, SetWidgetPropertyValueConsumer consumer);
 
@@ -928,7 +928,7 @@
    * search.results notification as they become available.
    *
    * @param file The file containing the declaration of or reference to the element used to define
-   *         the search.
+   *        the search.
    * @param offset The offset within the file of the declaration of or reference to the element.
    * @param includePotential True if potential matches are to be included in the results.
    */
@@ -979,11 +979,11 @@
    * Return top-level and class member declarations.
    *
    * @param file If this field is provided, return only declarations in this file. If this field is
-   *         missing, return declarations in all files.
+   *        missing, return declarations in all files.
    * @param pattern The regular expression used to match the names of declarations. If this field is
-   *         missing, return all declarations.
+   *        missing, return all declarations.
    * @param maxResults The maximum number of declarations to return. If this field is missing, return
-   *         all matching declarations.
+   *        all matching declarations.
    */
   public void search_getElementDeclarations(String file, String pattern, int maxResults, GetElementDeclarationsConsumer consumer);
 
@@ -993,7 +993,7 @@
    * Return the type hierarchy of the class declared or referenced at the given location.
    *
    * @param file The file containing the declaration or reference to the type for which a hierarchy
-   *         is being requested.
+   *        is being requested.
    * @param offset The offset of the name of the type within the file.
    * @param superOnly True if the client is only requesting superclasses and interfaces hierarchy.
    */
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Element.java b/pkg/analysis_server/tool/spec/generated/java/types/Element.java
index 690f101..2cab385 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/Element.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/Element.java
@@ -66,8 +66,8 @@
    * A bit-map containing the following flags:
    *
    * - 0x01 - set if the element is explicitly or implicitly abstract
-   * - 0x02 - set if the element was declared to be ‘const’
-   * - 0x04 - set if the element was declared to be ‘final’
+   * - 0x02 - set if the element was declared to be 'const'
+   * - 0x04 - set if the element was declared to be 'final'
    * - 0x08 - set if the element is a static member of a class or is a top-level function or field
    * - 0x10 - set if the element is private
    * - 0x20 - set if the element is deprecated
@@ -167,8 +167,8 @@
    * A bit-map containing the following flags:
    *
    * - 0x01 - set if the element is explicitly or implicitly abstract
-   * - 0x02 - set if the element was declared to be ‘const’
-   * - 0x04 - set if the element was declared to be ‘final’
+   * - 0x02 - set if the element was declared to be 'const'
+   * - 0x04 - set if the element was declared to be 'final'
    * - 0x08 - set if the element is a static member of a class or is a top-level function or field
    * - 0x10 - set if the element is private
    * - 0x20 - set if the element is deprecated
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index a368876..0c14fe6 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -67,12 +67,12 @@
 </p>
 <p>
   Every request is required to have two fields and may have two
-  additional optional fields. The first required field is the ‘id’
+  additional optional fields. The first required field is the 'id'
   field, which is only used by the server to associate a response
   with the request that generated the response. The second
-  required field is the ‘method’ field, which is used to determine
+  required field is the 'method' field, which is used to determine
   what the server is being requested to do. One optional field is
-  the ‘params’ field, whose structure is dependent on the method
+  the 'params' field, whose structure is dependent on the method
   being requested. The structure of this field is described with
   each request for which it is required. The other optional field
   is the 'clientRequestTime' field, which is a number indicating
@@ -83,11 +83,11 @@
 </p>
 <p>
   Every response has up to three fields. The first field is the
-  ‘id’ field, which is always present and whose value is the
+  'id' field, which is always present and whose value is the
   identifier that was passed to the request that generated the
-  response. The second field is the ‘error’ field, which is only
+  response. The second field is the 'error' field, which is only
   present if an error was encountered while processing the
-  request. The third field is the ‘result’ field, whose structure
+  request. The third field is the 'result' field, whose structure
   is dependent on the method being responded to, and is described
   with each request that will produce it.
 </p>
@@ -106,9 +106,9 @@
   errors can be returned together at a later time.
 </p>
 <p>
-  Each notification has two fields. The first field is the ‘event’
+  Each notification has two fields. The first field is the 'event'
   field, which identifies the kind of notification. The second
-  field is the ‘params’ field, whose structure is dependent on the
+  field is the 'params' field, whose structure is dependent on the
   kind of notification being sent. The structure of this field is
   described with each notification.
 </p>
@@ -195,7 +195,7 @@
 <h3>Domains</h3>
 <p>
   For convenience, the API is divided into domains. Each domain is specified
-  in a separate section below. The specifications of the API’s refer to data
+  in a separate section below. The specifications of the API's refer to data
   structures beyond the standard JSON primitives. These data structures are
   documented in the section titled <a href="#types">Types</a>.
 </p>
@@ -272,7 +272,7 @@
 <domains></domains>
 <domain name="server">
   <p>
-    The server domain contains API’s related to the execution of
+    The server domain contains API's related to the execution of
     the server.
   </p>
   <request method="getVersion">
@@ -441,7 +441,7 @@
 </domain>
 <domain name="analysis">
   <p>
-    The analysis domain contains API’s related to the analysis of
+    The analysis domain contains API's related to the analysis of
     files.
   </p>
   <request method="getErrors">
@@ -843,7 +843,7 @@
       file. If none is found, then the parents of the directory
       will be searched until such a file is found or the root of
       the file system is reached. If such a file is found, it will
-      be used to resolve package: URI’s within the file.
+      be used to resolve package: URI's within the file.
     </p>
     <params>
       <field name="included">
@@ -3340,7 +3340,7 @@
 </domain>
 <domain name="flutter">
   <p>
-    The analysis domain contains API’s related to Flutter support.
+    The analysis domain contains API's related to Flutter support.
   </p>
   <request method="getWidgetDescription" experimental="true">
     <p>
@@ -3517,7 +3517,7 @@
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
     This section contains descriptions of the data types referenced
-    in the API’s of the various domains.
+    in the API's of the various domains.
   </p>
   <include path="../../../analyzer_plugin/tool/spec/common_types_spec.html"
            import="package:analyzer_plugin/protocol/protocol_common.dart"></include>
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index d5f865d..ee72244 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -419,7 +419,7 @@
     }
     for (var node in html.nodes) {
       if (node is dom.Element) {
-        var localName = node.localName!;
+        var localName = node.name;
         if (squashParagraphs && localName == 'p') {
           translateHtml(node, squashParagraphs: squashParagraphs);
           continue;
@@ -609,7 +609,7 @@
   void visitTypeEnumValue(TypeEnumValue typeEnumValue) {
     var isDocumented = false;
     for (var node in typeEnumValue.html.nodes) {
-      if ((node is dom.Element && node.localName != 'code') ||
+      if ((node is dom.Element && node.name != 'code') ||
           (node is dom.Text && node.text.trim().isNotEmpty)) {
         isDocumented = true;
         break;
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 e9534c1..7dc20b7 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_common.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_common.dart
@@ -1241,8 +1241,8 @@
   /// A bit-map containing the following flags:
   ///
   /// - 0x01 - set if the element is explicitly or implicitly abstract
-  /// - 0x02 - set if the element was declared to be ‘const’
-  /// - 0x04 - set if the element was declared to be ‘final’
+  /// - 0x02 - set if the element was declared to be 'const'
+  /// - 0x04 - set if the element was declared to be 'final'
   /// - 0x08 - set if the element is a static member of a class or is a
   ///   top-level function or field
   /// - 0x10 - set if the element is private
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index df3709c..445e43b 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -555,7 +555,6 @@
   HintCode.DEAD_CODE_ON_CATCH_SUBTYPE,
   HintCode.DEPRECATED_EXPORT_USE,
   HintCode.DEPRECATED_EXTENDS_FUNCTION,
-  HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION,
   HintCode.DEPRECATED_IMPLEMENTS_FUNCTION,
   HintCode.DEPRECATED_MEMBER_USE,
   HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE,
diff --git a/pkg/analyzer/lib/src/context/packages.dart b/pkg/analyzer/lib/src/context/packages.dart
index 6369690..776c554 100644
--- a/pkg/analyzer/lib/src/context/packages.dart
+++ b/pkg/analyzer/lib/src/context/packages.dart
@@ -5,76 +5,35 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/util/uri.dart';
 import 'package:package_config/package_config_types.dart';
-import 'package:package_config/src/packages_file.dart'
-    as package_config_packages_file;
 import 'package:pub_semver/pub_semver.dart';
 
 /// Find [Packages] starting from the given [start] resource.
 ///
-/// Looks for `.dart_tool/package_config.json` or `.packages` in the given
-/// and parent directories.
+/// Looks for `.dart_tool/package_config.json` in the given and parent
+/// directories.
 Packages findPackagesFrom(ResourceProvider provider, Resource start) {
   var startFolder = start is Folder ? start : start.parent;
   for (var current in startFolder.withAncestors) {
-    try {
-      var jsonFile = current
-          .getChildAssumingFolder('.dart_tool')
-          .getChildAssumingFile('package_config.json');
-      if (jsonFile.exists) {
-        return parsePackageConfigJsonFile(provider, jsonFile);
-      }
-    } catch (e) {
-      return Packages.empty;
-    }
-
-    try {
-      var dotFile = current.getChildAssumingFile('.packages');
-      if (dotFile.exists) {
-        return parseDotPackagesFile(provider, dotFile);
-      }
-    } catch (e) {
-      return Packages.empty;
+    var jsonFile = current
+        .getChildAssumingFolder('.dart_tool')
+        .getChildAssumingFile('package_config.json');
+    if (jsonFile.exists) {
+      return parsePackageConfigJsonFile(provider, jsonFile);
     }
   }
   return Packages.empty;
 }
 
-/// Parse the [file] as a `.packages` file.
-Packages parseDotPackagesFile(ResourceProvider provider, File file) {
-  var uri = file.toUri();
-  var content = file.readAsBytesSync();
-  // TODO(srawlins): Replacing these two imports with public imports currently
-  // requires a sweeping breaking change, from synchronous code to asynchronous,
-  // including in our public APIs. When synchronous public APIs become
-  // available, use those.
-  // See https://github.com/dart-lang/package_config/issues/95.
-  var packageConfig = package_config_packages_file.parse(
-      content, uri, (Object error) => throw error);
-
-  var map = <String, Package>{};
-  for (var package in packageConfig.packages) {
-    var libUri = package.packageUriRoot;
-    var libPath = fileUriToNormalizedPath(
-      provider.pathContext,
-      libUri,
-    );
-    var libFolder = provider.getFolder(libPath);
-    map[package.name] = Package(
-      name: package.name,
-      rootFolder: libFolder,
-      libFolder: libFolder,
-      languageVersion: null,
-    );
-  }
-
-  return Packages(map);
-}
-
 /// Parse the [file] as a `package_config.json` file.
 Packages parsePackageConfigJsonFile(ResourceProvider provider, File file) {
-  var uri = file.toUri();
-  var content = file.readAsStringSync();
-  var jsonConfig = PackageConfig.parseString(content, uri);
+  PackageConfig jsonConfig;
+  try {
+    var uri = file.toUri();
+    var content = file.readAsStringSync();
+    jsonConfig = PackageConfig.parseString(content, uri);
+  } catch (e) {
+    return Packages.empty;
+  }
 
   var map = <String, Package>{};
   for (var jsonPackage in jsonConfig.packages) {
@@ -111,30 +70,6 @@
   return Packages(map);
 }
 
-/// Check the content of the [file], and parse it as either `.packages` file,
-/// or as a `package_config.json` file, depending on its content (not its
-/// location).  OTOH, if the file has the `.packages` format, still look
-/// for a `.dart_tool/package_config.json` relative to the specified [file].
-Packages parsePackagesFile(ResourceProvider provider, File file) {
-  try {
-    var content = file.readAsStringSync();
-    var isJson = content.trimLeft().startsWith('{');
-    if (isJson) {
-      return parsePackageConfigJsonFile(provider, file);
-    } else {
-      var relativePackageConfigFile = file.parent
-          .getChildAssumingFolder('.dart_tool')
-          .getChildAssumingFile('package_config.json');
-      if (relativePackageConfigFile.exists) {
-        return parsePackageConfigJsonFile(provider, relativePackageConfigFile);
-      }
-      return parseDotPackagesFile(provider, file);
-    }
-  } catch (e) {
-    return Packages.empty;
-  }
-}
-
 class Package {
   final String name;
   final Folder rootFolder;
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index d796e2b..9dcf26e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -164,9 +164,9 @@
   Packages _createPackageMap({
     required ContextRoot contextRoot,
   }) {
-    var configFile = contextRoot.packagesFile;
-    if (configFile != null) {
-      return parsePackagesFile(resourceProvider, configFile);
+    var packagesFile = contextRoot.packagesFile;
+    if (packagesFile != null) {
+      return parsePackageConfigJsonFile(resourceProvider, packagesFile);
     } else {
       return Packages.empty;
     }
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
index af049b8..4aa5964c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
@@ -368,7 +368,7 @@
   Workspace _createWorkspace(Folder folder, File? packagesFile) {
     Packages packages;
     if (packagesFile != null) {
-      packages = parsePackagesFile(resourceProvider, packagesFile);
+      packages = parsePackageConfigJsonFile(resourceProvider, packagesFile);
     } else {
       packages = Packages.empty;
     }
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 31d2579..d0d0c33 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -85,7 +85,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 = 224;
+  static const int DATA_VERSION = 226;
 
   /// The number of exception contexts allowed to write. Once this field is
   /// zero, we stop writing any new exception contexts in this process.
@@ -1289,7 +1289,7 @@
     final library = kind.library ?? kind.asLibrary;
 
     // Prepare the signature and key.
-    String signature = _getResolvedUnitSignature(library.file, file);
+    String signature = _getResolvedUnitSignature(library, file);
     String key = _getResolvedUnitKey(signature);
 
     // Skip reading if the signature, so errors, are the same as the last time.
@@ -1343,7 +1343,7 @@
           var unitBytes =
               _serializeResolvedUnit(unitResult.unit, unitResult.errors);
           String unitSignature =
-              _getResolvedUnitSignature(library.file, unitResult.file);
+              _getResolvedUnitSignature(library, unitResult.file);
           String unitKey = _getResolvedUnitKey(unitSignature);
           _byteStore.putGet(unitKey, unitBytes);
           if (unitResult.file == file) {
@@ -1479,7 +1479,6 @@
       name,
       sourceFactory,
       analysisContext?.contextRoot.workspace,
-      analysisOptions,
       declaredVariables,
       _saltForUnlinked,
       _saltForElements,
@@ -1628,10 +1627,13 @@
 
   /// Return the signature that identifies fully resolved results for the [file]
   /// in the [library], e.g. element model, errors, index, etc.
-  String _getResolvedUnitSignature(FileState library, FileState file) {
+  String _getResolvedUnitSignature(
+      LibraryFileStateKind library, FileState file) {
     ApiSignature signature = ApiSignature();
     signature.addUint32List(_saltForResolution);
-    signature.addString(library.transitiveSignature);
+    signature.addString(library.file.uriStr);
+    signature.addString(library.libraryCycle.apiSignature);
+    signature.addString(file.uriStr);
     signature.addString(file.contentHash);
     return signature.toHex();
   }
@@ -1677,10 +1679,14 @@
     _fsState.collectAffected(path, affected);
 
     final removedKeys = <String>{};
-    _libraryContext?.remove(affected.toList(), removedKeys);
+    _libraryContext?.remove(affected, removedKeys);
 
-    for (var file in affected) {
-      file.invalidateLibraryCycle();
+    // TODO(scheglov) Eventually list of `LibraryOrAugmentationFileKind`.
+    for (final file in affected) {
+      final kind = file.kind;
+      if (kind is LibraryFileStateKind) {
+        kind.invalidateLibraryCycle();
+      }
       accumulatedAffected.add(file.path);
     }
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 4f09f27..c582c27 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -26,7 +26,6 @@
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/exception/exception.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
@@ -276,18 +275,14 @@
   FileStateKind? _kind;
 
   /// Files that reference this file.
-  final List<FileState> referencingFiles = [];
+  final Set<FileState> referencingFiles = {};
 
   List<FileState?> _augmentationFiles = [];
   List<FileState?>? _importedFiles;
   List<FileState?>? _exportedFiles;
-  List<FileState?> _partedFiles = [];
   List<FileState> _libraryFiles = [];
 
   Set<FileState>? _directReferencedFiles;
-  Set<FileState>? _directReferencedLibraries;
-
-  LibraryCycle? _libraryCycle;
 
   /// The flag that shows whether the file has an error or warning that
   /// might be fixed by a change to another file.
@@ -334,6 +329,7 @@
 
   /// Return the set of all directly referenced files - imported, exported or
   /// parted.
+  /// TODO(scheglov) Stop using [partedFiles].
   Set<FileState> get directReferencedFiles {
     return _directReferencedFiles ??= <FileState>{
       ...importedFiles.whereNotNull(),
@@ -342,15 +338,6 @@
     };
   }
 
-  /// Return the set of all directly referenced libraries - imported or
-  /// exported.
-  Set<FileState> get directReferencedLibraries {
-    return _directReferencedLibraries ??= <FileState>{
-      ...importedFiles.whereNotNull(),
-      ...exportedFiles.whereNotNull(),
-    };
-  }
-
   /// Return `true` if the file exists.
   bool get exists => _fileContent!.exists;
 
@@ -385,8 +372,6 @@
     }).toList();
   }
 
-  LibraryCycle? get internal_libraryCycle => _libraryCycle;
-
   /// Return `true` if the file does not have a `library` directive, and has a
   /// `part of` directive, so is probably a part.
   bool get isPart {
@@ -399,16 +384,6 @@
 
   FileStateKind get kind => _kind!;
 
-  /// 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 (_libraryCycle == null) {
-      computeLibraryCycle(_fsState._saltForElements, this);
-    }
-
-    return _libraryCycle!;
-  }
-
   /// The list of files files that this library consists of, i.e. this library
   /// file itself and its [partedFiles].
   List<FileState> get libraryFiles {
@@ -420,7 +395,18 @@
 
   /// The list of files this library file references as parts.
   List<FileState?> get partedFiles {
-    return _partedFiles;
+    final kind = _kind;
+    if (kind is LibraryFileStateKind) {
+      return kind.parts.map((part) {
+        if (part is PartDirectiveWithFile) {
+          return part.includedFile;
+        } else {
+          return null;
+        }
+      }).toList();
+    } else {
+      return [];
+    }
   }
 
   /// The external names referenced by the file.
@@ -450,16 +436,6 @@
     return transitiveFiles;
   }
 
-  /// Return the signature of the file, based on API signatures of the
-  /// transitive closure of imported / exported files.
-  /// TODO(scheglov) Remove it.
-  String get transitiveSignature {
-    var librarySignatureBuilder = ApiSignature()
-      ..addString(uriStr)
-      ..addString(libraryCycle.apiSignature);
-    return librarySignatureBuilder.toHex();
-  }
-
   /// The [UnlinkedUnit] of the file.
   UnlinkedUnit get unlinked2 => _unlinked2!;
 
@@ -486,25 +462,6 @@
     }
   }
 
-  /// Return the content of the file, the empty string if cannot be read.
-  ///
-  /// We read the file digest, end verify that it is the same as the digest
-  /// that was recorded during the file creation. If it is not, then the file
-  /// was changed, and we failed to call [FileSystemState.changeFile].
-  /// TODO(scheglov) replace with [content]
-  String getContent() {
-    return _fileContent!.content;
-  }
-
-  void internal_setLibraryCycle(LibraryCycle? cycle) {
-    _libraryCycle = cycle;
-  }
-
-  void invalidateLibraryCycle() {
-    _libraryCycle?.invalidate();
-    _libraryCycle = null;
-  }
-
   /// Return a new parsed unresolved [CompilationUnit].
   CompilationUnitImpl parse([AnalysisErrorListener? errorListener]) {
     errorListener ??= AnalysisErrorListener.NULL_LISTENER;
@@ -599,7 +556,11 @@
     //   Flush affected library cycles.
     //   Flush exported top-level declarations of all files.
     if (apiSignatureChanged) {
-      _libraryCycle?.invalidate();
+      // TODO(scheglov) Make it a method of FileStateKind?
+      final kind = _kind;
+      if (kind is LibraryFileStateKind) {
+        kind._libraryCycle?.invalidate();
+      }
       _invalidatesLibrariesOfThisPart();
     }
 
@@ -610,7 +571,6 @@
     _importedFiles = null;
     _exportedFiles = null;
     _directReferencedFiles = null;
-    _directReferencedLibraries = null;
 
     // Read parts eagerly to link parts to libraries.
     _updateKind();
@@ -703,12 +663,20 @@
   }
 
   /// If this is a part, invalidate the libraries that use it.
+  /// TODO(scheglov) Make it a method of `PartFileStateKind`?
   void _invalidatesLibrariesOfThisPart() {
     if (_kind is PartFileStateKind) {
-      for (final library in _fsState._pathToFile.values) {
-        if (library._kind is LibraryFileStateKind) {
-          if (library.partedFiles.contains(this)) {
-            library._libraryCycle?.invalidate();
+      final libraries = _fsState._pathToFile.values
+          .map((file) => file._kind)
+          .whereType<LibraryFileStateKind>()
+          .toList();
+
+      for (final library in libraries) {
+        for (final partDirective in library.parts) {
+          if (partDirective is PartDirectiveWithFile) {
+            if (partDirective.includedFile == this) {
+              library._libraryCycle?.invalidate();
+            }
           }
         }
       }
@@ -748,8 +716,8 @@
     for (final directive in unlinked2.exports) {
       addRelativeUri(directive.uri);
     }
-    for (final uri in unlinked2.parts) {
-      addRelativeUri(uri);
+    for (final directive in unlinked2.parts) {
+      addRelativeUri(directive.uri);
     }
 
     prefetchFiles(paths.toList());
@@ -782,7 +750,6 @@
     removeForOne(_augmentationFiles);
     removeForOne(_exportedFiles);
     removeForOne(_importedFiles);
-    removeForOne(_partedFiles);
   }
 
   void _updateAugmentationFiles() {
@@ -798,7 +765,7 @@
   }
 
   void _updateKind() {
-    _fsState._libraryNameToFiles.remove(_kind);
+    _kind?.dispose();
 
     final libraryAugmentationDirective = unlinked2.libraryAugmentationDirective;
     final libraryDirective = unlinked2.libraryDirective;
@@ -806,6 +773,7 @@
     final partOfUriDirective = unlinked2.partOfUriDirective;
     if (libraryAugmentationDirective != null) {
       final uri = libraryAugmentationDirective.uri;
+      // TODO(scheglov) This could be a useful method of `Either`.
       final uriFile = _fileForRelativeUri(uri).map(
         (file) => file,
         (_) => null,
@@ -861,17 +829,8 @@
     _invalidatesLibrariesOfThisPart();
   }
 
+  /// TODO(scheglov) Stop using [partedFiles].
   void _updatePartedFiles() {
-    _partedFiles = unlinked2.parts.map((uri) {
-      return _fileForRelativeUri(uri).map(
-        (part) {
-          part?.referencingFiles.add(this);
-          return part;
-        },
-        (_) => null,
-      );
-    }).toList();
-
     _libraryFiles = [
       this,
       ...partedFiles.whereNotNull(),
@@ -886,7 +845,7 @@
     var augmentations = <UnlinkedImportAugmentationDirective>[];
     var exports = <UnlinkedNamespaceDirective>[];
     var imports = <UnlinkedNamespaceDirective>[];
-    var parts = <String>[];
+    var parts = <UnlinkedPartDirective>[];
     var macroClasses = <MacroClass>[];
     var hasDartCoreImport = false;
     for (var directive in unit.directives) {
@@ -924,8 +883,11 @@
           name: directive.name.name,
         );
       } else if (directive is PartDirective) {
-        var uriStr = directive.uri.stringValue;
-        parts.add(uriStr ?? '');
+        parts.add(
+          UnlinkedPartDirective(
+            uri: directive.uri.stringValue ?? '',
+          ),
+        );
       } else if (directive is PartOfDirective) {
         final libraryName = directive.libraryName;
         final uri = directive.uri;
@@ -1072,6 +1034,8 @@
 
   /// Returns the library in which this file should be analyzed.
   LibraryFileStateKind? get library;
+
+  void dispose() {}
 }
 
 enum FileStateRefreshResult {
@@ -1153,8 +1117,6 @@
     this.contextName,
     this._sourceFactory,
     this._workspace,
-    @Deprecated('No longer used; will be removed')
-        AnalysisOptions analysisOptions,
     this._declaredVariables,
     this._saltForUnlinked,
     this._saltForElements,
@@ -1175,13 +1137,16 @@
   /// Update the state to reflect the fact that the file with the given [path]
   /// was changed. Specifically this means that we evict this file and every
   /// file that referenced it.
-  void changeFile(String path, List<FileState> removedFiles) {
+  void changeFile(String path, Set<FileState> removedFiles) {
     var file = _pathToFile.remove(path);
     if (file == null) {
       return;
     }
 
-    removedFiles.add(file);
+    if (!removedFiles.add(file)) {
+      return;
+    }
+
     _uriToFile.remove(file.uri);
 
     // The removed file does not reference other file anymore.
@@ -1193,6 +1158,8 @@
     for (var reference in file.referencingFiles.toList()) {
       changeFile(reference.path, removedFiles);
     }
+
+    file._kind?.dispose();
   }
 
   /// Collected files that transitively reference a file with the [path].
@@ -1346,7 +1313,7 @@
     _pathToFile.forEach((path, file) {
       // TODO(scheglov) tests for excluding generated
       if (!isGenerated(path)) {
-        if (file.getContent().contains(value)) {
+        if (file.content.contains(value)) {
           result.add(path);
         }
       }
@@ -1413,7 +1380,7 @@
   /// Computes the set of [FileState]'s used/not used to analyze the given
   /// [files]. Removes the [FileState]'s of the files not used for analysis from
   /// the cache. Returns the set of unused [FileState]'s.
-  List<FileState> removeUnusedFiles(List<String> files) {
+  Set<FileState> removeUnusedFiles(List<String> files) {
     var allReferenced = <String>{};
     for (var path in files) {
       allReferenced.add(path);
@@ -1423,11 +1390,9 @@
     var unusedPaths = _pathToFile.keys.toSet();
     unusedPaths.removeAll(allReferenced);
 
-    var removedFiles = <FileState>[];
+    var removedFiles = <FileState>{};
     for (var path in unusedPaths) {
-      var file = _pathToFile.remove(path)!;
-      _uriToFile.remove(file.uri);
-      removedFiles.add(file);
+      changeFile(path, removedFiles);
     }
 
     return removedFiles;
@@ -1467,12 +1432,6 @@
   final FileSystemState state;
 
   FileSystemStateTestView(this.state);
-
-  Set<FileState> get filesWithoutLibraryCycle {
-    return state._uriToFile.values
-        .where((f) => f._libraryCycle == null)
-        .toSet();
-  }
 }
 
 class FileSystemTestData {
@@ -1629,16 +1588,109 @@
   /// Or `null` if no `library` directive.
   final String? name;
 
+  List<PartDirectiveState>? _parts;
+
+  LibraryCycle? _libraryCycle;
+
   LibraryFileStateKind({
     required super.file,
     required this.name,
   });
 
+  LibraryCycle? get internal_libraryCycle => _libraryCycle;
+
   @override
   LibraryFileStateKind get library => this;
 
-  bool hasPart(PartFileStateKind part) {
-    return file.partedFiles.contains(part.file);
+  /// 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 (_libraryCycle == null) {
+      computeLibraryCycle(file._fsState._saltForElements, this);
+    }
+
+    return _libraryCycle!;
+  }
+
+  List<PartDirectiveState> get parts {
+    return _parts ??= file.unlinked2.parts.map((directive) {
+      return file._fileForRelativeUri(directive.uri).map(
+        (refFile) {
+          if (refFile != null) {
+            refFile.referencingFiles.add(file);
+            return PartDirectiveWithFile(
+              library: this,
+              directive: directive,
+              includedFile: refFile,
+            );
+          } else {
+            return PartDirectiveState(
+              library: this,
+              directive: directive,
+            );
+          }
+        },
+        (externalLibrary) {
+          return PartDirectiveState(
+            library: this,
+            directive: directive,
+          );
+        },
+      );
+    }).toList();
+  }
+
+  @override
+  void dispose() {
+    invalidateLibraryCycle();
+    file._fsState._libraryNameToFiles.remove(this);
+
+    final parts = _parts;
+    if (parts != null) {
+      for (final part in parts) {
+        if (part is PartDirectiveWithFile) {
+          part.includedFile.referencingFiles.remove(file);
+        }
+      }
+    }
+
+    final imports = _imports;
+    if (imports != null) {
+      for (final import in imports) {
+        if (import is ImportDirectiveWithFile) {
+          import.importedFile.referencingFiles.remove(file);
+        }
+      }
+    }
+
+    final exports = _exports;
+    if (exports != null) {
+      for (final export in exports) {
+        if (export is ExportDirectiveWithFile) {
+          export.exportedFile.referencingFiles.remove(file);
+        }
+      }
+    }
+  }
+
+  bool hasPart(PartFileStateKind partKind) {
+    for (final partDirective in parts) {
+      if (partDirective is PartDirectiveWithFile) {
+        if (partDirective.includedFile == partKind.file) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
+  void internal_setLibraryCycle(LibraryCycle? cycle) {
+    _libraryCycle = cycle;
+  }
+
+  void invalidateLibraryCycle() {
+    _libraryCycle?.invalidate();
+    _libraryCycle = null;
   }
 }
 
@@ -1709,11 +1761,54 @@
   }
 }
 
+/// Information about a single `part` directive.
+class PartDirectiveState {
+  final LibraryFileStateKind library;
+  final UnlinkedPartDirective directive;
+
+  PartDirectiveState({
+    required this.library,
+    required this.directive,
+  });
+
+  /// Returns a [Source] that is referenced by this directive.
+  ///
+  /// Returns `null` if the URI cannot be resolved into a [Source].
+  Source? get includedSource => null;
+}
+
+/// [PartDirectiveState] that has a valid URI that references a file.
+class PartDirectiveWithFile extends PartDirectiveState {
+  final FileState includedFile;
+
+  PartDirectiveWithFile({
+    required super.library,
+    required super.directive,
+    required this.includedFile,
+  });
+
+  /// If [includedFile] is a [PartFileStateKind], and it confirms that it
+  /// is a part of the [library], returns the [includedFile].
+  PartFileStateKind? get includedPart {
+    final kind = includedFile.kind;
+    if (kind is PartFileStateKind && kind.isPartOf(library)) {
+      return kind;
+    }
+    return null;
+  }
+
+  @override
+  Source? get includedSource => includedFile.source;
+}
+
 /// The file has `part of` directive.
 abstract class PartFileStateKind extends FileStateKind {
   PartFileStateKind({
     required super.file,
   });
+
+  /// Returns `true` if the `part of` directive confirms the [library].
+  bool isPartOf(LibraryFileStateKind library);
 }
 
 /// The file has `part of name` directive.
@@ -1735,7 +1830,7 @@
   /// first one as if sorted by path.
   @override
   LibraryFileStateKind? get library {
-    _discoverLibraries();
+    discoverLibraries();
 
     LibraryFileStateKind? result;
     for (final library in libraries) {
@@ -1750,7 +1845,8 @@
     return result;
   }
 
-  void _discoverLibraries() {
+  @visibleForTesting
+  void discoverLibraries() {
     if (libraries.isEmpty) {
       var resourceProvider = file._fsState._resourceProvider;
       var pathContext = resourceProvider.pathContext;
@@ -1770,6 +1866,11 @@
       }
     }
   }
+
+  @override
+  bool isPartOf(LibraryFileStateKind library) {
+    return directive.name == library.name;
+  }
 }
 
 /// The file has `part of URI` directive.
@@ -1802,6 +1903,11 @@
     }
     return null;
   }
+
+  @override
+  bool isPartOf(LibraryFileStateKind library) {
+    return uriFile == library.file;
+  }
 }
 
 /// The file has `part of URI` directive, and the URI cannot be resolved.
@@ -1813,6 +1919,9 @@
 
   @override
   LibraryFileStateKind? get library => null;
+
+  @override
+  bool isPartOf(LibraryFileStateKind library) => false;
 }
 
 class StoredFileContent implements FileContent {
@@ -1862,6 +1971,7 @@
   }
 
   /// If [kind] is a named library, register it.
+  /// TODO(scheglov) Use [LibraryFileStateKind]
   void add(FileStateKind? kind) {
     if (kind is LibraryFileStateKind) {
       final name = kind.name;
@@ -1877,6 +1987,7 @@
   }
 
   /// If [kind] is a named library, unregister it.
+  /// TODO(scheglov) Use [LibraryFileStateKind]
   void remove(FileStateKind? kind) {
     if (kind is LibraryFileStateKind) {
       final name = kind.name;
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index d3263b3..bbadd99 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -610,40 +610,40 @@
         libraryNameNode = directive.name;
         directivesToResolve.add(directive);
       } else if (directive is ImportDirectiveImpl) {
-        for (ImportElement importElement in _libraryElement.imports) {
+        // TODO(scheglov) Rewrite to iterating `ImportDirectiveState`.
+        for (var index = 0; index < _libraryElement.imports.length; index++) {
+          final importElement = _libraryElement.imports[index];
           if (matchNodeElement(directive, importElement)) {
             directive.element = importElement;
             directive.prefix?.staticElement = importElement.prefix;
-            var importedLibrary = importElement.importedLibrary;
-            if (importedLibrary is LibraryElementImpl) {
-              if (importedLibrary.hasPartOfDirective) {
-                // It is safe to assume that `directive.uri.stringValue` is
-                // non-`null`, because the only time it is `null` is if the URI
-                // contains a string interpolation, in which case the import
-                // would never have resolved in the first place.
+            final importDirectiveState = _library.imports[index];
+            // TODO(scheglov) rewrite
+            if (importDirectiveState.importedSource != null) {
+              if (importDirectiveState.importedLibrarySource == null) {
                 libraryErrorReporter.reportErrorForNode(
-                    CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY,
-                    directive.uri,
-                    [directive.uri.stringValue!]);
+                  CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY,
+                  directive.uri,
+                  [importDirectiveState.directive.uri],
+                );
               }
             }
           }
         }
       } else if (directive is ExportDirectiveImpl) {
-        for (ExportElement exportElement in _libraryElement.exports) {
+        // TODO(scheglov) Rewrite to iterating `ExportDirectiveState`.
+        for (var index = 0; index < _libraryElement.exports.length; index++) {
+          final exportElement = _libraryElement.exports[index];
           if (matchNodeElement(directive, exportElement)) {
             directive.element = exportElement;
-            var exportedLibrary = exportElement.exportedLibrary;
-            if (exportedLibrary is LibraryElementImpl) {
-              if (exportedLibrary.hasPartOfDirective) {
-                // It is safe to assume that `directive.uri.stringValue` is
-                // non-`null`, because the only time it is `null` is if the URI
-                // contains a string interpolation, in which case the export
-                // would never have resolved in the first place.
+            final exportDirectiveState = _library.exports[index];
+            // TODO(scheglov) rewrite
+            if (exportDirectiveState.exportedSource != null) {
+              if (exportDirectiveState.exportedLibrarySource == null) {
                 libraryErrorReporter.reportErrorForNode(
-                    CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
-                    directive.uri,
-                    [directive.uri.stringValue!]);
+                  CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
+                  directive.uri,
+                  [exportDirectiveState.directive.uri],
+                );
               }
             }
           }
@@ -651,11 +651,16 @@
       } else if (directive is PartDirectiveImpl) {
         StringLiteral partUri = directive.uri;
 
-        var partFile = _library.file.partedFiles[partDirectiveIndex++];
-        if (partFile == null) {
+        if (partElementIndex >= _libraryElement.parts.length) {
           continue;
         }
 
+        final partState = _library.parts[partDirectiveIndex++];
+        if (partState is! PartDirectiveWithFile) {
+          continue;
+        }
+        final partFile = partState.includedFile;
+
         var partUnit = units[partFile]!;
         var partElement = _libraryElement.parts[partElementIndex++];
         partUnit.element = partElement;
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index c67c6b5..ed95565 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -29,7 +29,6 @@
 import 'package:analyzer/src/summary2/macro.dart';
 import 'package:analyzer/src/summary2/reference.dart';
 import 'package:analyzer/src/util/performance/operation_performance.dart';
-import 'package:analyzer/src/utilities/extensions/collection.dart';
 import 'package:collection/collection.dart';
 import 'package:path/src/context.dart';
 
@@ -145,7 +144,7 @@
       var macroLibraries = <MacroLibrary>[];
       for (var library in cycle.libraries) {
         var macroClasses = <MacroClass>[];
-        for (var file in library.libraryFiles) {
+        for (var file in library.file.libraryFiles) {
           unitsInformativeBytes[file.uri] = file.unlinked2.informativeBytes;
           for (var macroClass in file.unlinked2.macroClasses) {
             macroClasses.add(
@@ -159,32 +158,31 @@
         if (macroClasses.isNotEmpty) {
           macroLibraries.add(
             MacroLibrary(
-              uri: library.uri,
-              path: library.path,
+              uri: library.file.uri,
+              path: library.file.path,
               classes: macroClasses,
             ),
           );
         }
       }
 
-      var resolutionKey = '${cycle.apiSignature}.linked_bundle';
-      var resolutionBytes = byteStore.get(resolutionKey);
+      var linkedBytes = byteStore.get(cycle.linkedKey);
 
-      if (resolutionBytes == null) {
+      if (linkedBytes == null) {
         librariesLinkedTimer.start();
 
         testData?.linkedCycles.add(
-          cycle.libraries.map((e) => e.path).toSet(),
+          cycle.libraries.map((e) => e.file.path).toSet(),
         );
 
         inputsTimer.start();
         var inputLibraries = <LinkInputLibrary>[];
-        for (var libraryFile in cycle.libraries) {
-          var librarySource = libraryFile.source;
+        for (var library in cycle.libraries) {
+          var librarySource = library.file.source;
 
           var inputUnits = <LinkInputUnit>[];
           var partIndex = -1;
-          for (var file in libraryFile.libraryFiles) {
+          for (var file in library.file.libraryFiles) {
             var isSynthetic = !file.exists;
             var unit = file.parse();
 
@@ -193,7 +191,7 @@
 
             String? partUriStr;
             if (partIndex >= 0) {
-              partUriStr = libraryFile.unlinked2.parts[partIndex];
+              partUriStr = library.file.unlinked2.parts[partIndex].uri;
             }
             partIndex++;
 
@@ -232,41 +230,38 @@
           _throwLibraryCycleLinkException(cycle, exception, stackTrace);
         }
 
-        resolutionBytes = linkResult.resolutionBytes;
-        byteStore.putGet(resolutionKey, resolutionBytes);
-        performance.getDataInt('bytesPut').add(resolutionBytes.length);
-        testData?.forCycle(cycle).putKeys.add(resolutionKey);
-        bytesPut += resolutionBytes.length;
+        linkedBytes = linkResult.resolutionBytes;
+        byteStore.putGet(cycle.linkedKey, linkedBytes);
+        performance.getDataInt('bytesPut').add(linkedBytes.length);
+        testData?.forCycle(cycle).putKeys.add(cycle.linkedKey);
+        bytesPut += linkedBytes.length;
 
         librariesLinkedTimer.stop();
       } else {
-        testData?.forCycle(cycle).getKeys.add(resolutionKey);
-        performance.getDataInt('bytesGet').add(resolutionBytes.length);
+        testData?.forCycle(cycle).getKeys.add(cycle.linkedKey);
+        performance.getDataInt('bytesGet').add(linkedBytes.length);
         performance.getDataInt('libraryLoadCount').add(cycle.libraries.length);
         // TODO(scheglov) Take / clear parsed units in files.
-        bytesGet += resolutionBytes.length;
+        bytesGet += linkedBytes.length;
         librariesLoaded += cycle.libraries.length;
         elementFactory.addBundle(
           BundleReader(
             elementFactory: elementFactory,
             unitsInformativeBytes: unitsInformativeBytes,
-            resolutionBytes: resolutionBytes,
+            resolutionBytes: linkedBytes,
           ),
         );
       }
-      // TODO(scheglov) We probably should set this key when create the cycle
-      cycle.resolutionKey = resolutionKey;
 
       final macroKernelBuilder = this.macroKernelBuilder;
       if (macroKernelBuilder != null && macroLibraries.isNotEmpty) {
-        var macroKernelKey = '${cycle.implSignature}.macro_kernel';
-        var macroKernelBytes = byteStore.get(macroKernelKey);
+        var macroKernelBytes = byteStore.get(cycle.macroKey);
         if (macroKernelBytes == null) {
           macroKernelBytes = await macroKernelBuilder.build(
             fileSystem: _MacroFileSystem(fileSystemState),
             libraries: macroLibraries,
           );
-          byteStore.putGet(macroKernelKey, macroKernelBytes);
+          byteStore.putGet(cycle.macroKey, macroKernelBytes);
           bytesPut += macroKernelBytes.length;
         } else {
           bytesGet += macroKernelBytes.length;
@@ -277,10 +272,10 @@
           var bundleMacroExecutor = BundleMacroExecutor(
             macroExecutor: macroExecutor,
             kernelBytes: macroKernelBytes,
-            libraries: cycle.libraries.map((e) => e.uri).toSet(),
+            libraries: cycle.libraries.map((e) => e.file.uri).toSet(),
           );
-          for (var libraryFile in cycle.libraries) {
-            var libraryUri = libraryFile.uri;
+          for (var library in cycle.libraries) {
+            var libraryUri = library.file.uri;
             var libraryElement = elementFactory.libraryOfUri2(libraryUri);
             libraryElement.bundleMacroExecutor = bundleMacroExecutor;
           }
@@ -289,7 +284,7 @@
     }
 
     await logger.runAsync('Prepare linked bundles', () async {
-      var libraryCycle = targetLibrary.file.libraryCycle;
+      var libraryCycle = targetLibrary.libraryCycle;
       await loadBundle(libraryCycle);
       logger.writeln(
         '[librariesTotal: $librariesTotal]'
@@ -309,16 +304,15 @@
 
   /// Remove libraries represented by the [removed] files.
   /// If we need these libraries later, we will relink and reattach them.
-  void remove(List<FileState> removed, Set<String> removedKeys) {
+  void remove(Set<FileState> removed, Set<String> removedKeys) {
     elementFactory.removeLibraries(
       removed.map((e) => e.uri).toSet(),
     );
 
-    final removedSet = removed.toSet();
-
     loadedBundles.removeWhere((cycle) {
-      if (cycle.libraries.any(removedSet.contains)) {
-        removedKeys.addIfNotNull(cycle.resolutionKey);
+      final cycleFiles = cycle.libraries.map((e) => e.file);
+      if (cycleFiles.any(removed.contains)) {
+        removedKeys.add(cycle.linkedKey);
         return true;
       }
       return false;
@@ -333,8 +327,8 @@
     final uriSet = <Uri>{};
 
     for (final cycle in loadedBundles) {
-      keySet.addIfNotNull(cycle.resolutionKey);
-      uriSet.addAll(cycle.libraries.map((e) => e.uri));
+      keySet.add(cycle.linkedKey);
+      uriSet.addAll(cycle.libraries.map((e) => e.file.uri));
     }
 
     elementFactory.removeLibraries(uriSet);
@@ -362,8 +356,8 @@
     StackTrace stackTrace,
   ) {
     var fileContentMap = <String, String>{};
-    for (var libraryFile in cycle.libraries) {
-      for (var file in libraryFile.libraryFiles) {
+    for (var library in cycle.libraries) {
+      for (var file in library.file.libraryFiles) {
         fileContentMap[file.path] = file.content;
       }
     }
@@ -389,8 +383,9 @@
   });
 
   LibraryCycleTestData forCycle(LibraryCycle cycle) {
-    final files = cycle.libraries.map((e) {
-      return fileSystemTestData.forFile(e.resource, e.uri);
+    final files = cycle.libraries.map((library) {
+      final file = library.file;
+      return fileSystemTestData.forFile(file.resource, file.uri);
     }).toList();
     files.sortBy((fileData) => fileData.file.path);
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
index 1fbd07c..405c981 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
@@ -12,7 +12,7 @@
 
 /// Ensure that the [FileState.libraryCycle] for the [file] and anything it
 /// depends on is computed.
-void computeLibraryCycle(Uint32List salt, FileState file) {
+void computeLibraryCycle(Uint32List salt, LibraryFileStateKind file) {
   var libraryWalker = _LibraryWalker(salt);
   libraryWalker.walk(libraryWalker.getNode(file));
 }
@@ -23,13 +23,13 @@
   final int id = _nextId++;
 
   /// The libraries that belong to this cycle.
-  final List<FileState> libraries;
+  final List<LibraryFileStateKind> libraries;
 
   /// The library cycles that this cycle references directly.
   final Set<LibraryCycle> directDependencies;
 
   /// The cycles that use this cycle, used to [invalidate] transitively.
-  final List<LibraryCycle> _directUsers = [];
+  final List<LibraryCycle> directUsers = [];
 
   /// The transitive API signature of this cycle.
   ///
@@ -55,13 +55,9 @@
   /// include [implSignature] of the macro defining library.
   String implSignature;
 
-  /// The key of the resolution cache entry.
-  /// TODO(scheglov) clean up
-  String? resolutionKey;
-
   late final bool hasMacroClass = () {
     for (final library in libraries) {
-      for (final file in library.libraryFiles) {
+      for (final file in library.file.libraryFiles) {
         if (file.unlinked2.macroClasses.isNotEmpty) {
           return true;
         }
@@ -82,10 +78,16 @@
     required this.implSignature,
   }) {
     for (var directDependency in directDependencies) {
-      directDependency._directUsers.add(this);
+      directDependency.directUsers.add(this);
     }
   }
 
+  /// The key of the linked libraries in the byte store.
+  String get linkedKey => '$apiSignature.linked';
+
+  /// The key of the macro kernel in the byte store.
+  String get macroKey => '$implSignature.macro_kernel';
+
   /// Invalidate this cycle and any cycles that directly or indirectly use it.
   ///
   /// Practically invalidation means that we clear the library cycle in all the
@@ -94,11 +96,11 @@
     for (var library in libraries) {
       library.internal_setLibraryCycle(null);
     }
-    for (var user in _directUsers.toList()) {
+    for (var user in directUsers.toList()) {
       user.invalidate();
     }
     for (var directDependency in directDependencies) {
-      directDependency._directUsers.remove(this);
+      directDependency.directUsers.remove(this);
     }
   }
 
@@ -108,7 +110,7 @@
       mightBeExecutedByMacroClass = true;
       // Mark each file of the cycle.
       for (final library in libraries) {
-        for (final file in library.libraryFiles) {
+        for (final file in library.file.libraryFiles) {
           file.mightBeExecutedByMacroClass = true;
         }
       }
@@ -128,16 +130,26 @@
 /// Node in [_LibraryWalker].
 class _LibraryNode extends graph.Node<_LibraryNode> {
   final _LibraryWalker walker;
-  final FileState file;
+  final LibraryFileStateKind kind;
 
-  _LibraryNode(this.walker, this.file);
+  _LibraryNode(this.walker, this.kind);
 
   @override
-  bool get isEvaluated => file.internal_libraryCycle != null;
+  bool get isEvaluated => kind.internal_libraryCycle != null;
 
   @override
   List<_LibraryNode> computeDependencies() {
-    return file.directReferencedLibraries.map(walker.getNode).toList();
+    final referencedLibraries = {
+      ...kind.imports
+          .whereType<ImportDirectiveWithFile>()
+          .map((import) => import.importedLibrary)
+          .whereNotNull(),
+      ...kind.exports
+          .whereType<ExportDirectiveWithFile>()
+          .map((export) => export.exportedLibrary)
+          .whereNotNull(),
+    };
+    return referencedLibraries.map(walker.getNode).toList();
   }
 }
 
@@ -145,7 +157,7 @@
 /// sorted [LibraryCycle]s.
 class _LibraryWalker extends graph.DependencyWalker<_LibraryNode> {
   final Uint32List _salt;
-  final Map<FileState, _LibraryNode> nodesOfFiles = {};
+  final Map<LibraryFileStateKind, _LibraryNode> nodesOfFiles = {};
 
   _LibraryWalker(this._salt);
 
@@ -163,42 +175,42 @@
 
     // Sort libraries to produce stable signatures.
     scc.sort((first, second) {
-      var firstPath = first.file.path;
-      var secondPath = second.file.path;
+      var firstPath = first.kind.file.path;
+      var secondPath = second.kind.file.path;
       return firstPath.compareTo(secondPath);
     });
 
     // Append direct referenced cycles.
     var directDependencies = <LibraryCycle>{};
     for (var node in scc) {
-      var file = node.file;
       _appendDirectlyReferenced(
         directDependencies,
         apiSignature,
         implSignature,
-        file.directReferencedLibraries.whereNotNull().toList(),
+        graph.Node.getDependencies(node),
       );
     }
 
     // Fill the cycle with libraries.
-    var libraries = <FileState>[];
+    var libraries = <LibraryFileStateKind>[];
     for (var node in scc) {
-      libraries.add(node.file);
+      final file = node.kind.file;
+      libraries.add(node.kind);
 
-      apiSignature.addLanguageVersion(node.file.packageLanguageVersion);
-      apiSignature.addString(node.file.uriStr);
+      apiSignature.addLanguageVersion(file.packageLanguageVersion);
+      apiSignature.addString(file.uriStr);
 
-      implSignature.addLanguageVersion(node.file.packageLanguageVersion);
-      implSignature.addString(node.file.uriStr);
+      implSignature.addLanguageVersion(file.packageLanguageVersion);
+      implSignature.addString(file.uriStr);
 
-      apiSignature.addInt(node.file.libraryFiles.length);
-      for (var file in node.file.libraryFiles) {
+      apiSignature.addInt(file.libraryFiles.length);
+      for (var file in file.libraryFiles) {
         apiSignature.addBool(file.exists);
         apiSignature.addBytes(file.apiSignature);
       }
 
-      implSignature.addInt(node.file.libraryFiles.length);
-      for (var file in node.file.libraryFiles) {
+      implSignature.addInt(file.libraryFiles.length);
+      for (var file in file.libraryFiles) {
         implSignature.addBool(file.exists);
         implSignature.addString(file.contentHash);
       }
@@ -218,11 +230,11 @@
 
     // Set the instance into the libraries.
     for (var node in scc) {
-      node.file.internal_setLibraryCycle(cycle);
+      node.kind.internal_setLibraryCycle(cycle);
     }
   }
 
-  _LibraryNode getNode(FileState file) {
+  _LibraryNode getNode(LibraryFileStateKind file) {
     return nodesOfFiles.putIfAbsent(file, () => _LibraryNode(this, file));
   }
 
@@ -230,12 +242,12 @@
     Set<LibraryCycle> directDependencies,
     ApiSignature apiSignature,
     ApiSignature implSignature,
-    List<FileState> directlyReferenced,
+    List<_LibraryNode> directlyReferenced,
   ) {
     apiSignature.addInt(directlyReferenced.length);
     implSignature.addInt(directlyReferenced.length);
     for (var referencedLibrary in directlyReferenced) {
-      var referencedCycle = referencedLibrary.internal_libraryCycle;
+      var referencedCycle = referencedLibrary.kind.internal_libraryCycle;
 
       // We get null when the library is a part of the cycle being build.
       if (referencedCycle == null) continue;
diff --git a/pkg/analyzer/lib/src/dart/analysis/unlinked_data.dart b/pkg/analyzer/lib/src/dart/analysis/unlinked_data.dart
index 18152a3..41dc29c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/unlinked_data.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/unlinked_data.dart
@@ -228,6 +228,26 @@
   }
 }
 
+class UnlinkedPartDirective {
+  final String uri;
+
+  UnlinkedPartDirective({
+    required this.uri,
+  });
+
+  factory UnlinkedPartDirective.read(
+    SummaryDataReader reader,
+  ) {
+    return UnlinkedPartDirective(
+      uri: reader.readStringUtf8(),
+    );
+  }
+
+  void write(BufferedSink sink) {
+    sink.writeStringUtf8(uri);
+  }
+}
+
 class UnlinkedPartOfNameDirective {
   final String name;
   final UnlinkedSourceRange nameRange;
@@ -313,10 +333,10 @@
   /// `import augmentation` directives.
   final List<UnlinkedImportAugmentationDirective> augmentations;
 
-  /// URIs of `export` directives.
+  /// `export` directives.
   final List<UnlinkedNamespaceDirective> exports;
 
-  /// URIs of `import` directives.
+  /// `import` directives.
   final List<UnlinkedNamespaceDirective> imports;
 
   /// Encoded informative data.
@@ -334,8 +354,8 @@
   /// The list of `macro` classes.
   final List<MacroClass> macroClasses;
 
-  /// URIs of `part` directives.
-  final List<String> parts;
+  /// `part` directives.
+  final List<UnlinkedPartDirective> parts;
 
   /// The `part of my.name';` directive.
   final UnlinkedPartOfNameDirective? partOfNameDirective;
@@ -385,7 +405,9 @@
       macroClasses: reader.readTypedList(
         () => MacroClass.read(reader),
       ),
-      parts: reader.readStringUtf8List(),
+      parts: reader.readTypedList(
+        () => UnlinkedPartDirective.read(reader),
+      ),
       partOfNameDirective: reader.readOptionalObject(
         UnlinkedPartOfNameDirective.read,
       ),
@@ -420,7 +442,9 @@
     sink.writeList<MacroClass>(macroClasses, (x) {
       x.write(sink);
     });
-    sink.writeStringUtf8Iterable(parts);
+    sink.writeList<UnlinkedPartDirective>(parts, (x) {
+      x.write(sink);
+    });
     sink.writeOptionalObject<UnlinkedPartOfNameDirective>(
       partOfNameDirective,
       (x) => x.write(sink),
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 2303065..305a074 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -140,6 +140,12 @@
     return name == '_Enum' && library.isDartCore;
   }
 
+  /// Return `true` if this class represents the class 'Function' defined in the
+  /// dart:core library.
+  bool get isDartCoreFunctionImpl {
+    return name == 'Function' && library.isDartCore;
+  }
+
   @override
   bool get isDartCoreObject => false;
 
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
index 5536f34..ac3e9d6 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
@@ -111,13 +111,6 @@
     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.",
-    correctionMessage: "Try renaming the class.",
-  );
-
   ///  No parameters.
   static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = HintCode(
     'DEPRECATED_SUBTYPE_OF_FUNCTION',
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index ab7d15f..9bac236 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -222,7 +222,7 @@
     cachedResults.clear();
 
     // Remove the specified files and files that transitively depend on it.
-    final removedFiles = <FileState>[];
+    final removedFiles = <FileState>{};
     for (final path in paths) {
       fsState!.changeFile(path, removedFiles);
     }
@@ -316,9 +316,11 @@
         performance: performance!,
       );
       var file = fileContext.file;
+      // TODO(scheglov) Casts are unsafe.
+      final kind = file.kind as LibraryFileStateKind;
 
       final errorsSignatureBuilder = ApiSignature();
-      errorsSignatureBuilder.addString(file.libraryCycle.apiSignature);
+      errorsSignatureBuilder.addString(kind.libraryCycle.apiSignature);
       errorsSignatureBuilder.addString(file.contentHash);
       final errorsKey = '${errorsSignatureBuilder.toHex()}.errors';
 
@@ -436,7 +438,9 @@
       performance: performance,
     );
 
-    return file.libraryCycle.apiSignature;
+    // TODO(scheglov) Casts are unsafe.
+    final kind = file.kind as LibraryFileStateKind;
+    return kind.libraryCycle.apiSignature;
   }
 
   /// Ensure that libraries necessary for resolving [path] are linked.
@@ -661,7 +665,7 @@
           file.path,
           file.uri,
           file.exists,
-          file.getContent(),
+          file.content,
           file.lineInfo,
           file.isPart,
           fileResult.unit,
@@ -718,7 +722,6 @@
         'contextName',
         sourceFactory,
         workspace,
-        AnalysisOptionsImpl(), // TODO(scheglov) remove it
         DeclaredVariables.fromMap({}),
         Uint32List(0), // _saltForUnlinked
         Uint32List(0), // _saltForElements
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 75532ee..a84eac9 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -7,6 +7,7 @@
         LocatedMessage,
         Message,
         MessageCode,
+        codeBuiltInIdentifierInDeclaration,
         messageAbstractClassMember,
         messageAbstractLateField,
         messageAbstractStaticField,
@@ -206,6 +207,9 @@
   }
 
   @override
+  Uri get importUri => uri;
+
+  @override
   void addProblem(Message message, int charOffset, int length,
       {bool wasHandled = false, List<LocatedMessage>? context}) {
     if (directives.isEmpty &&
@@ -3782,6 +3786,10 @@
     /// TODO(danrubel): Ignore this error until we deprecate `native` support.
     if (message == messageNativeClauseShouldBeAnnotation && allowNativeClause) {
       return;
+    } else if (message.code == codeBuiltInIdentifierInDeclaration) {
+      // Allow e.g. 'class Function' in sdk.
+      if (importUri.isScheme("dart")) return;
+      if (uri.isScheme("org-dartlang-sdk")) return;
     }
     debugEvent("Error: ${message.problemMessage}");
     if (message.code.analyzerCodes == null && startToken is ErrorToken) {
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 0018bf72..dce0c9a 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -426,8 +426,10 @@
 
       List<ClassMember> members = node.members;
       _duplicateDefinitionVerifier.checkClass(node);
-      _checkForBuiltInIdentifierAsName(
-          node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
+      if (!element.isDartCoreFunctionImpl) {
+        _checkForBuiltInIdentifierAsName(
+            node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
+      }
       _checkForConflictingClassTypeVariableErrorCodes();
       var superclass = node.extendsClause?.superclass;
       var implementsClause = node.implementsClause;
@@ -1660,11 +1662,6 @@
     var implementsClause = node.implementsClause;
     var withClause = node.withClause;
 
-    if (node.name.name == "Function") {
-      errorReporter.reportErrorForNode(
-          HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, node.name);
-    }
-
     if (extendsClause != null) {
       var superElement = extendsClause.superclass.name.staticElement;
       if (superElement != null && superElement.name == "Function") {
diff --git a/pkg/analyzer/lib/src/summary2/element_builder.dart b/pkg/analyzer/lib/src/summary2/element_builder.dart
index 941f4e6..63e3bb8 100644
--- a/pkg/analyzer/lib/src/summary2/element_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/element_builder.dart
@@ -383,7 +383,13 @@
   void visitExportDirective(covariant ExportDirectiveImpl node) {
     var element = ExportElementImpl(node.keyword.offset);
     element.combinators = _buildCombinators(node.combinators);
-    element.exportedLibrary = _selectLibrary(node);
+
+    try {
+      element.exportedLibrary = _selectLibrary(node);
+    } on ArgumentError {
+      // TODO(scheglov) Remove this when using `ExportDirectiveState`.
+    }
+
     element.metadata = _buildAnnotations(node.metadata);
     element.uri = node.uri.stringValue;
 
@@ -755,7 +761,13 @@
 
     var element = ImportElementImpl(node.keyword.offset);
     element.combinators = _buildCombinators(node.combinators);
-    element.importedLibrary = _selectLibrary(node);
+
+    try {
+      element.importedLibrary = _selectLibrary(node);
+    } on ArgumentError {
+      // TODO(scheglov) Remove this when using `ImportDirectiveState`.
+    }
+
     element.isDeferred = node.deferredKeyword != null;
     element.metadata = _buildAnnotations(node.metadata);
     element.uri = uriStr;
diff --git a/pkg/analyzer/lib/src/summary2/macro_application.dart b/pkg/analyzer/lib/src/summary2/macro_application.dart
index e3bba06b..3870b8e 100644
--- a/pkg/analyzer/lib/src/summary2/macro_application.dart
+++ b/pkg/analyzer/lib/src/summary2/macro_application.dart
@@ -23,22 +23,25 @@
 import 'package:analyzer/src/util/performance/operation_performance.dart';
 
 class LibraryMacroApplier {
-  final MultiMacroExecutor macroExecutor;
   final DeclarationBuilder declarationBuilder;
   final LibraryBuilder libraryBuilder;
+  final MultiMacroExecutor macroExecutor;
 
   final List<_MacroTarget> _targets = [];
 
   late final macro.IdentifierResolver _identifierResolver =
       _IdentifierResolver(_linker.elementFactory, declarationBuilder);
 
+  late final macro.TypeDeclarationResolver _typeDeclarationResolver =
+      _TypeDeclarationResolver();
+
+  late final macro.TypeIntrospector _typeIntrospector =
+      _TypeIntrospector(declarationBuilder);
+
   late final macro.TypeResolver _typeResolver = _TypeResolver(
     typeSystem: libraryBuilder.element.typeSystem,
   );
 
-  late final macro.ClassIntrospector _classIntrospector =
-      _ClassIntrospector(declarationBuilder);
-
   LibraryMacroApplier({
     required this.macroExecutor,
     required this.declarationBuilder,
@@ -456,64 +459,6 @@
   }
 }
 
-class _ClassIntrospector implements macro.ClassIntrospector {
-  final DeclarationBuilder declarationBuilder;
-
-  _ClassIntrospector(this.declarationBuilder);
-
-  @override
-  Future<List<macro.ConstructorDeclaration>> constructorsOf(
-      covariant macro.ClassDeclaration clazz) {
-    // TODO: implement constructorsOf
-    throw UnimplementedError();
-  }
-
-  @override
-  Future<List<macro.FieldDeclaration>> fieldsOf(
-    covariant ClassDeclarationImpl clazz,
-  ) async {
-    return clazz.element.fields
-        .where((e) => !e.isSynthetic)
-        .map(declarationBuilder.fromElement.fieldElement)
-        .toList();
-  }
-
-  @override
-  Future<List<macro.ClassDeclaration>> interfacesOf(
-      covariant macro.ClassDeclaration clazz) {
-    // TODO: implement interfacesOf
-    throw UnimplementedError();
-  }
-
-  @override
-  Future<List<macro.MethodDeclaration>> methodsOf(
-      covariant macro.ClassDeclaration clazz) {
-    // TODO: implement methodsOf
-    throw UnimplementedError();
-  }
-
-  @override
-  Future<List<macro.ClassDeclaration>> mixinsOf(
-      covariant macro.ClassDeclaration clazz) {
-    // TODO: implement mixinsOf
-    throw UnimplementedError();
-  }
-
-  @override
-  Future<macro.ClassDeclaration?> superclassOf(
-    covariant ClassDeclarationImpl clazz,
-  ) async {
-    final superType = clazz.element.supertype;
-    if (superType == null) {
-      return null;
-    }
-
-    return declarationBuilder.fromElement.classElement(
-      superType.element,
-    );
-  }
-}
-
 class _IdentifierResolver extends macro.IdentifierResolver {
   final LinkedElementFactory elementFactory;
   final DeclarationBuilder declarationBuilder;
@@ -548,8 +493,9 @@
       instanceIdentifier,
       target.declaration,
       applier._identifierResolver,
+      applier._typeDeclarationResolver,
       applier._typeResolver,
-      applier._classIntrospector,
+      applier._typeIntrospector,
     );
   }
 
@@ -623,6 +569,48 @@
   }
 }
 
+class _TypeDeclarationResolver implements macro.TypeDeclarationResolver {
+  @override
+  Future<macro.TypeDeclaration> declarationOf(
+      covariant macro.Identifier identifier) {
+    // TODO: implement declarationOf
+    throw UnimplementedError();
+  }
+}
+
+class _TypeIntrospector implements macro.TypeIntrospector {
+  final DeclarationBuilder declarationBuilder;
+
+  _TypeIntrospector(this.declarationBuilder);
+
+  @override
+  Future<List<macro.ConstructorDeclaration>> constructorsOf(
+      covariant macro.IntrospectableType type) {
+    // TODO: implement constructorsOf
+    throw UnimplementedError();
+  }
+
+  @override
+  Future<List<macro.FieldDeclaration>> fieldsOf(
+    covariant macro.IntrospectableType type,
+  ) async {
+    if (type is! IntrospectableClassDeclarationImpl) {
+      throw UnsupportedError('Only introspection on classes is supported');
+    }
+    return type.element.fields
+        .where((e) => !e.isSynthetic)
+        .map(declarationBuilder.fromElement.fieldElement)
+        .toList();
+  }
+
+  @override
+  Future<List<macro.MethodDeclaration>> methodsOf(
+      covariant macro.IntrospectableType clazz) {
+    // TODO: implement methodsOf
+    throw UnimplementedError();
+  }
+}
+
 class _TypeResolver implements macro.TypeResolver {
   final TypeSystemImpl typeSystem;
 
diff --git a/pkg/analyzer/lib/src/summary2/macro_declarations.dart b/pkg/analyzer/lib/src/summary2/macro_declarations.dart
index 2a097a8..96d2711 100644
--- a/pkg/analyzer/lib/src/summary2/macro_declarations.dart
+++ b/pkg/analyzer/lib/src/summary2/macro_declarations.dart
@@ -57,15 +57,16 @@
 class DeclarationBuilderFromElement {
   final Map<Element, IdentifierImpl> _identifierMap = Map.identity();
 
-  final Map<ClassElement, ClassDeclarationImpl> _classMap = Map.identity();
+  final Map<ClassElement, IntrospectableClassDeclarationImpl> _classMap =
+      Map.identity();
 
   final Map<FieldElement, FieldDeclarationImpl> _fieldMap = Map.identity();
 
   final Map<TypeParameterElement, macro.TypeParameterDeclarationImpl>
       _typeParameterMap = Map.identity();
 
-  macro.ClassDeclarationImpl classElement(ClassElement element) {
-    return _classMap[element] ??= _classElement(element);
+  macro.IntrospectableClassDeclarationImpl classElement(ClassElement element) {
+    return _classMap[element] ??= _introspectableClassElement(element);
   }
 
   macro.FieldDeclarationImpl fieldElement(FieldElement element) {
@@ -85,20 +86,6 @@
     return _typeParameterMap[element] ??= _typeParameter(element);
   }
 
-  ClassDeclarationImpl _classElement(ClassElement element) {
-    assert(!_classMap.containsKey(element));
-    return ClassDeclarationImpl._(
-      id: macro.RemoteInstance.uniqueId,
-      identifier: identifier(element),
-      typeParameters: element.typeParameters.map(_typeParameter).toList(),
-      interfaces: element.interfaces.map(_dartType).toList(),
-      isAbstract: element.isAbstract,
-      isExternal: false,
-      mixins: element.mixins.map(_dartType).toList(),
-      superclass: element.supertype.mapOrNull(_dartType),
-    )..element = element;
-  }
-
   macro.TypeAnnotationImpl _dartType(DartType type) {
     if (type is InterfaceType) {
       return macro.NamedTypeAnnotationImpl(
@@ -135,6 +122,28 @@
     );
   }
 
+  IntrospectableClassDeclarationImpl _introspectableClassElement(
+      ClassElement element) {
+    assert(!_classMap.containsKey(element));
+    return IntrospectableClassDeclarationImpl._(
+      id: macro.RemoteInstance.uniqueId,
+      identifier: identifier(element),
+      typeParameters: element.typeParameters.map(_typeParameter).toList(),
+      interfaces: element.interfaces
+          .map(_dartType)
+          .cast<macro.NamedTypeAnnotationImpl>()
+          .toList(),
+      isAbstract: element.isAbstract,
+      isExternal: false,
+      mixins: element.mixins
+          .map(_dartType)
+          .cast<macro.NamedTypeAnnotationImpl>()
+          .toList(),
+      superclass: element.supertype.mapOrNull(_dartType)
+          as macro.NamedTypeAnnotationImpl?,
+    )..element = element;
+  }
+
   macro.TypeParameterDeclarationImpl _typeParameter(
     TypeParameterElement element,
   ) {
@@ -150,31 +159,13 @@
   final Map<ast.SimpleIdentifier, IdentifierImpl> _identifierMap =
       Map.identity();
 
-  final Map<ast.ClassDeclaration, ClassDeclarationImpl> _classMap =
-      Map.identity();
+  final Map<ast.ClassDeclaration, IntrospectableClassDeclarationImpl>
+      _classMap = Map.identity();
 
   macro.ClassDeclarationImpl classDeclaration(
     ast.ClassDeclaration node,
   ) {
-    return _classMap[node] ??= _classDeclaration(node);
-  }
-
-  ClassDeclarationImpl _classDeclaration(
-    ast.ClassDeclaration node,
-  ) {
-    assert(!_classMap.containsKey(node));
-    return ClassDeclarationImpl._(
-      id: macro.RemoteInstance.uniqueId,
-      identifier: _identifier(node.name),
-      typeParameters: _typeParameters(node.typeParameters),
-      interfaces: _typeAnnotations(node.implementsClause?.interfaces),
-      isAbstract: node.abstractKeyword != null,
-      isExternal: false,
-      mixins: _typeAnnotations(node.withClause?.mixinTypes),
-      superclass: node.extendsClause?.superclass.mapOrNull(
-        _typeAnnotation,
-      ),
-    );
+    return _classMap[node] ??= _introspectableClassDeclaration(node);
   }
 
   macro.FunctionTypeParameterImpl _formalParameter(
@@ -213,11 +204,30 @@
     );
   }
 
-  macro.TypeAnnotationImpl _typeAnnotation(ast.TypeAnnotation? node) {
+  IntrospectableClassDeclarationImpl _introspectableClassDeclaration(
+    ast.ClassDeclaration node,
+  ) {
+    assert(!_classMap.containsKey(node));
+    return IntrospectableClassDeclarationImpl._(
+      id: macro.RemoteInstance.uniqueId,
+      identifier: _identifier(node.name),
+      typeParameters: _typeParameters(node.typeParameters),
+      interfaces: _typeAnnotations(node.implementsClause?.interfaces),
+      isAbstract: node.abstractKeyword != null,
+      isExternal: false,
+      mixins: _typeAnnotations(node.withClause?.mixinTypes),
+      superclass: node.extendsClause?.superclass.mapOrNull(
+        _typeAnnotation,
+      ),
+    );
+  }
+
+  T _typeAnnotation<T extends macro.TypeAnnotationImpl>(
+      ast.TypeAnnotation? node) {
     if (node == null) {
       return macro.OmittedTypeAnnotationImpl(
         id: macro.RemoteInstance.uniqueId,
-      );
+      ) as T;
     } else if (node is ast.GenericFunctionType) {
       return macro.FunctionTypeAnnotationImpl(
         id: macro.RemoteInstance.uniqueId,
@@ -232,24 +242,25 @@
             .toList(),
         returnType: _typeAnnotation(node.returnType),
         typeParameters: _typeParameters(node.typeParameters),
-      );
+      ) as T;
     } else if (node is ast.NamedType) {
       return macro.NamedTypeAnnotationImpl(
         id: macro.RemoteInstance.uniqueId,
         identifier: _identifier(node.name),
         isNullable: node.question != null,
         typeArguments: _typeAnnotations(node.typeArguments?.arguments),
-      );
+      ) as T;
     } else {
       throw UnimplementedError('(${node.runtimeType}) $node');
     }
   }
 
-  List<macro.TypeAnnotationImpl> _typeAnnotations(
+  List<T> _typeAnnotations<T extends macro.TypeAnnotationImpl>(
     List<ast.TypeAnnotation>? elements,
   ) {
     if (elements != null) {
-      return elements.map(_typeAnnotation).toList();
+      return List.generate(
+          elements.length, (i) => _typeAnnotation(elements[i]));
     } else {
       return const [];
     }
@@ -295,6 +306,22 @@
   IdentifierImpl({required super.id, required super.name});
 }
 
+class IntrospectableClassDeclarationImpl
+    extends macro.IntrospectableClassDeclarationImpl {
+  late final ClassElement element;
+
+  IntrospectableClassDeclarationImpl._({
+    required super.id,
+    required super.identifier,
+    required super.typeParameters,
+    required super.interfaces,
+    required super.isAbstract,
+    required super.isExternal,
+    required super.mixins,
+    required super.superclass,
+  });
+}
+
 extension<T> on T? {
   R? mapOrNull<R>(R Function(T) mapper) {
     final self = this;
diff --git a/pkg/analyzer/lib/src/workspace/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
index 1d068a9..cd4eacc 100644
--- a/pkg/analyzer/lib/src/workspace/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.dart
@@ -120,7 +120,7 @@
 
         var packageMap = <String, Package>{};
         for (var packagesFile in packagesFiles) {
-          var packages = parsePackagesFile(provider, packagesFile);
+          var packages = parsePackageConfigJsonFile(provider, packagesFile);
           for (var package in packages.packages) {
             packageMap[package.name] = package;
           }
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index de28c26..6f13f7d 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -5896,8 +5896,6 @@
       ```dart
       %uri="lib/part.dart"
       part of lib;
-
-      class C{}
       ```
 
       The following code produces this diagnostic because imported files can't
@@ -5907,8 +5905,6 @@
       library lib;
 
       import [!'part.dart'!];
-
-      C c = C();
       ```
 
       #### Common fixes
@@ -17673,10 +17669,6 @@
         }
       }
       ```
-  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_EXPORT_USE:
     problemMessage: "The ability to import '{0}' indirectly has been deprecated."
     correctionMessage: "Try importing '{0}' directly."
diff --git a/pkg/analyzer/test/generated/class_member_parser_test.dart b/pkg/analyzer/test/generated/class_member_parser_test.dart
index 1917bae..53ff979 100644
--- a/pkg/analyzer/test/generated/class_member_parser_test.dart
+++ b/pkg/analyzer/test/generated/class_member_parser_test.dart
@@ -21,6 +21,68 @@
 @reflectiveTest
 class ClassMemberParserTest extends FastaParserTestCase
     implements AbstractParserViaProxyTestCase {
+  void parseClassMember_constructor_initializers_49132_helper(
+    String content, {
+    bool xIsNullable = false,
+    bool yIsNullable = false,
+    bool isVariation = false,
+  }) {
+    createParser(content);
+    ClassMember member = parser.parseClassMember('Foo');
+    expect(member, isNotNull);
+    assertNoErrors();
+    expect(member, isConstructorDeclaration);
+    var constructor = member as ConstructorDeclaration;
+    expect(constructor.body, isNotNull);
+    expect(constructor.separator, isNotNull);
+    expect(constructor.externalKeyword, isNull);
+    expect(constructor.constKeyword, isNull);
+    expect(constructor.factoryKeyword, isNull);
+    expect(constructor.name, isNull);
+    expect(constructor.parameters, isNotNull);
+    expect(constructor.period, isNull);
+    expect(constructor.returnType, isNotNull);
+    expect(constructor.initializers, hasLength(2));
+
+    {
+      var x = constructor.initializers[0] as ConstructorFieldInitializer;
+      expect(x.fieldName.name, "x");
+      Expression expression;
+      NamedType namedType;
+      if (isVariation) {
+        var isExpression = x.expression as IsExpression;
+        expression = isExpression.expression;
+        namedType = isExpression.type as NamedType;
+      } else {
+        var asExpression = x.expression as AsExpression;
+        expression = asExpression.expression;
+        namedType = asExpression.type as NamedType;
+      }
+      expect(expression, isSimpleIdentifier);
+      expect(namedType.name.name, "int");
+      expect(namedType.question, xIsNullable ? isNotNull : isNull);
+    }
+
+    {
+      var y = constructor.initializers[1] as ConstructorFieldInitializer;
+      expect(y.fieldName.name, "y");
+      Expression expression;
+      NamedType namedType;
+      if (isVariation) {
+        var isExpression = y.expression as IsExpression;
+        expression = isExpression.expression;
+        namedType = isExpression.type as NamedType;
+      } else {
+        var asExpression = y.expression as AsExpression;
+        expression = asExpression.expression;
+        namedType = asExpression.type as NamedType;
+      }
+      expect(expression, isSimpleIdentifier);
+      expect(namedType.name.name, "int");
+      expect(namedType.question, yIsNullable ? isNotNull : isNull);
+    }
+  }
+
   void test_parse_member_called_late() {
     var unit = parseCompilationUnit(
       'class C { void late() { new C().late(); } }',
@@ -92,6 +154,92 @@
     expect(expression, isBinaryExpression);
   }
 
+  void test_parseClassMember_constructor_initializers_conditional() {
+    createParser("Foo(dynamic a) : x = a is int ? {} : [] { /*body */ }");
+    ClassMember member = parser.parseClassMember('Foo');
+    expect(member, isNotNull);
+    assertNoErrors();
+    expect(member, isConstructorDeclaration);
+    var constructor = member as ConstructorDeclaration;
+    expect(constructor.body, isNotNull);
+    expect(constructor.separator, isNotNull);
+    expect(constructor.externalKeyword, isNull);
+    expect(constructor.constKeyword, isNull);
+    expect(constructor.factoryKeyword, isNull);
+    expect(constructor.name, isNull);
+    expect(constructor.parameters, isNotNull);
+    expect(constructor.period, isNull);
+    expect(constructor.returnType, isNotNull);
+    expect(constructor.initializers, hasLength(1));
+
+    var x = constructor.initializers[0] as ConstructorFieldInitializer;
+    expect(x.fieldName.name, "x");
+    var conditionalExpression = x.expression as ConditionalExpression;
+    expect(conditionalExpression.condition, isIsExpression);
+    expect(conditionalExpression.thenExpression, isSetOrMapLiteral);
+    expect(conditionalExpression.elseExpression, isListLiteral);
+  }
+
+  void test_parseClassMember_constructor_initializers_is_nullable_v1_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a is int, y = b is int?;',
+      yIsNullable: true,
+      isVariation: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_is_nullable_v2_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a is int?, y = b is int;',
+      xIsNullable: true,
+      isVariation: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_is_nullable_v3_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a is int, y = b is int? {}',
+      yIsNullable: true,
+      isVariation: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_is_nullable_v4_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a is int?, y = b is int {}',
+      xIsNullable: true,
+      isVariation: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_nullable_cast_v1_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a as int, y = b as int?;',
+      yIsNullable: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_nullable_cast_v2_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a as int?, y = b as int;',
+      xIsNullable: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_nullable_cast_v3_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a as int, y = b as int? {}',
+      yIsNullable: true,
+    );
+  }
+
+  void test_parseClassMember_constructor_initializers_nullable_cast_v4_49132() {
+    parseClassMember_constructor_initializers_49132_helper(
+      'Foo(dynamic a, dynamic b) : x = a as int?, y = b as int {}',
+      xIsNullable: true,
+    );
+  }
+
   void test_parseClassMember_constructor_withDocComment() {
     createParser('/// Doc\nC();');
     var constructor = parser.parseClassMember('C') as ConstructorDeclaration;
diff --git a/pkg/analyzer/test/src/context/packages_test.dart b/pkg/analyzer/test/src/context/packages_test.dart
index 01c0cf3..331115e 100644
--- a/pkg/analyzer/test/src/context/packages_test.dart
+++ b/pkg/analyzer/test/src/context/packages_test.dart
@@ -115,8 +115,7 @@
   }
 
   test_parsePackagesFile_packageConfig() {
-    var path = convertPath('/test/.dart_tool/package_config.json');
-    newFile(path, '''
+    final file = newFile('/test/.dart_tool/package_config.json', '''
 {
   "configVersion": 2,
   "packages": [
@@ -130,7 +129,7 @@
 }
 ''');
 
-    var packages = parsePackagesFile(resourceProvider, getFile(path));
+    var packages = parsePackageConfigJsonFile(resourceProvider, file);
 
     _assertPackage(
       packages,
diff --git a/pkg/analyzer/test/src/dart/analysis/analyzer_state_printer.dart b/pkg/analyzer/test/src/dart/analysis/analyzer_state_printer.dart
index 8acb50c..c7eab9b 100644
--- a/pkg/analyzer/test/src/dart/analysis/analyzer_state_printer.dart
+++ b/pkg/analyzer/test/src/dart/analysis/analyzer_state_printer.dart
@@ -7,6 +7,7 @@
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/library_context.dart';
+import 'package:analyzer/src/dart/analysis/library_graph.dart';
 import 'package:analyzer/src/dart/micro/resolve_file.dart';
 import 'package:collection/collection.dart';
 import 'package:path/path.dart';
@@ -14,9 +15,7 @@
 
 class AnalyzerStatePrinter {
   final MemoryByteStore byteStore;
-  final FileStateKindIdProvider fileStateKindIdProvider;
-  final FileStateIdProvider fileStateIdProvider;
-  final KeyShorter keyShorter;
+  final IdProvider idProvider;
   final LibraryContext libraryContext;
   final bool omitSdkFiles;
   final ResourceProvider resourceProvider;
@@ -27,9 +26,7 @@
 
   AnalyzerStatePrinter({
     required this.byteStore,
-    required this.fileStateKindIdProvider,
-    required this.fileStateIdProvider,
-    required this.keyShorter,
+    required this.idProvider,
     required this.libraryContext,
     required this.omitSdkFiles,
     required this.resourceProvider,
@@ -64,6 +61,30 @@
     }
   }
 
+  String _stringOfLibraryCycle(LibraryCycle cycle) {
+    if (omitSdkFiles) {
+      final isSdkLibrary = cycle.libraries.any((library) {
+        return library.file.uri.isScheme('dart');
+      });
+      if (isSdkLibrary) {
+        if (cycle.libraries.any((e) => e.file.uriStr == 'dart:core')) {
+          return 'dart:core';
+        } else {
+          throw UnimplementedError('$cycle');
+        }
+      }
+    }
+    return idProvider.libraryCycle(cycle);
+  }
+
+  String _stringOfUriStr(String uriStr) {
+    if (uriStr.trim().isEmpty) {
+      return "'$uriStr'";
+    } else {
+      return uriStr;
+    }
+  }
+
   void _withIndent(void Function() f) {
     var indent = _indent;
     _indent = '$_indent  ';
@@ -75,7 +96,7 @@
   void _writeAugmentations(LibraryOrAugmentationFileKind kind) {
     final files = kind.file.augmentationFiles.whereNotNull();
     if (files.isNotEmpty) {
-      final keys = files.map((e) => fileStateIdProvider[e]).join(' ');
+      final keys = files.map(idProvider.fileState).join(' ');
       _writelnWithIndent('augmentations: $keys');
     }
   }
@@ -89,7 +110,7 @@
 
       for (final groupEntry in groups.entries) {
         final keys = groupEntry.value.map((e) => e.key).toList();
-        final shortKeys = keyShorter.shortKeys(keys)..sort();
+        final shortKeys = idProvider.shortKeys(keys)..sort();
         _writelnWithIndent('${groupEntry.key}: $shortKeys');
       }
     });
@@ -123,7 +144,7 @@
 
   void _writeFile(FileState file) {
     _withIndent(() {
-      _writelnWithIndent('id: ${fileStateIdProvider[file]}');
+      _writelnWithIndent('id: ${idProvider.fileState(file)}');
       _writeFileKind(file);
       _writeReferencingFiles(file);
       _writeFileUnlinkedKey(file);
@@ -139,9 +160,9 @@
         final exportedLibrary = export.exportedLibrary;
         if (exportedLibrary != null) {
           expect(exportedLibrary.file, file);
-          sink.write(fileStateKindIdProvider[exportedLibrary]);
+          sink.write(idProvider.fileStateKind(exportedLibrary));
         } else {
-          sink.write('notLibrary ${fileStateIdProvider[file]}');
+          sink.write('notLibrary ${idProvider.fileState(file)}');
         }
 
         if (omitSdkFiles && file.uri.isScheme('dart')) {
@@ -161,7 +182,7 @@
         sink.writeln();
       } else {
         sink.write(_indent);
-        sink.write('uri: ${export.directive.uri}');
+        sink.write('uri: ${_stringOfUriStr(export.directive.uri)}');
         sink.writeln();
       }
     });
@@ -176,9 +197,9 @@
         final importedLibrary = import.importedLibrary;
         if (importedLibrary != null) {
           expect(importedLibrary.file, file);
-          sink.write(fileStateKindIdProvider[importedLibrary]);
+          sink.write(idProvider.fileStateKind(importedLibrary));
         } else {
-          sink.write('notLibrary ${fileStateIdProvider[file]}');
+          sink.write('notLibrary ${idProvider.fileState(file)}');
         }
 
         if (omitSdkFiles && file.uri.isScheme('dart')) {
@@ -206,7 +227,7 @@
         sink.writeln();
       } else {
         sink.write(_indent);
-        sink.write('uri: ${import.directive.uri}');
+        sink.write('uri: ${_stringOfUriStr(import.directive.uri)}');
         if (import.isSyntheticDartCoreImport) {
           sink.write(' synthetic');
         }
@@ -219,21 +240,21 @@
     final kind = file.kind;
     expect(kind.file, same(file));
 
-    _writelnWithIndent('kind: ${fileStateKindIdProvider[kind]}');
+    _writelnWithIndent('kind: ${idProvider.fileStateKind(kind)}');
     if (kind is AugmentationKnownFileStateKind) {
       _withIndent(() {
         final augmented = kind.augmented;
         if (augmented != null) {
-          final id = fileStateKindIdProvider[augmented];
+          final id = idProvider.fileStateKind(augmented);
           _writelnWithIndent('augmented: $id');
         } else {
-          final id = fileStateIdProvider[kind.uriFile];
+          final id = idProvider.fileState(kind.uriFile);
           _writelnWithIndent('uriFile: $id');
         }
 
         final library = kind.library;
         if (library != null) {
-          final id = fileStateKindIdProvider[library];
+          final id = idProvider.fileStateKind(library);
           _writelnWithIndent('library: $id');
         }
 
@@ -258,13 +279,14 @@
         _writeFileExports(kind);
         _writeLibraryParts(kind);
         _writeAugmentations(kind);
+        _writeLibraryCycle(kind);
       });
     } else if (kind is PartOfNameFileStateKind) {
       _withIndent(() {
         final libraries = kind.libraries;
         if (libraries.isNotEmpty) {
           final keys = libraries
-              .map((library) => fileStateKindIdProvider[library])
+              .map(idProvider.fileStateKind)
               .sorted(compareNatural)
               .join(' ');
           _writelnWithIndent('libraries: $keys');
@@ -272,7 +294,7 @@
 
         final library = kind.library;
         if (library != null) {
-          final id = fileStateKindIdProvider[library];
+          final id = idProvider.fileStateKind(library);
           _writelnWithIndent('library: $id');
         } else {
           _writelnWithIndent('name: ${kind.directive.name}');
@@ -282,10 +304,10 @@
       _withIndent(() {
         final library = kind.library;
         if (library != null) {
-          final id = fileStateKindIdProvider[library];
+          final id = idProvider.fileStateKind(library);
           _writelnWithIndent('library: $id');
         } else {
-          final id = fileStateIdProvider[kind.uriFile];
+          final id = idProvider.fileState(kind.uriFile);
           _writelnWithIndent('uriFile: $id');
         }
       });
@@ -302,26 +324,79 @@
   void _writeFiles(FileSystemTestData testData) {
     fileSystemState.pullReferencedFiles();
 
-    final fileDataList = <FileTestData>[];
-    for (final fileData in testData.files.values) {
-      if (omitSdkFiles && fileData.uri.isScheme('dart')) {
-        continue;
+    // Discover libraries for parts.
+    // This is required for consistency checking.
+    for (final fileData in testData.files.values.toList()) {
+      final current = fileSystemState.getExisting(fileData.file);
+      if (current != null) {
+        final kind = current.kind;
+        if (kind is PartOfNameFileStateKind) {
+          kind.discoverLibraries();
+        }
       }
-      fileDataList.add(fileData);
     }
-    fileDataList.sortBy((fileData) => fileData.file.path);
+
+    // Ask referenced libraries.
+    // This is required for consistency checking.
+    // TODO(scheglov) Remove when we use these for cycles.
+    for (final fileData in testData.files.values.toList()) {
+      final current = fileSystemState.getExisting(fileData.file);
+      if (current != null) {
+        final kind = current.kind;
+        if (kind is LibraryOrAugmentationFileKind) {
+          kind.imports;
+          kind.exports;
+        }
+      }
+    }
+
+    // Sort, mostly by path.
+    // But sort SDK libraries to the end, with `dart:core` first.
+    final fileDataList = testData.files.values.toList();
+    fileDataList.sort((first, second) {
+      final firstPath = first.file.path;
+      final secondPath = second.file.path;
+      if (omitSdkFiles) {
+        final firstUri = first.uri;
+        final secondUri = second.uri;
+        final firstIsSdk = firstUri.isScheme('dart');
+        final secondIsSdk = secondUri.isScheme('dart');
+        if (firstIsSdk && !secondIsSdk) {
+          return 1;
+        } else if (!firstIsSdk && secondIsSdk) {
+          return -1;
+        } else if (firstIsSdk && secondIsSdk) {
+          if ('$firstUri' == 'dart:core') {
+            return -1;
+          } else if ('$secondUri' == 'dart:core') {
+            return 1;
+          }
+        }
+      }
+      return firstPath.compareTo(secondPath);
+    });
 
     // Ask ID for every file in the sorted order, so that IDs are nice.
+    // Register objects that can be referenced.
+    idProvider.resetRegisteredObject();
     for (final fileData in fileDataList) {
       final current = fileSystemState.getExisting(fileData.file);
       if (current != null) {
-        fileStateIdProvider[current];
+        idProvider.registerFileState(current);
+        final kind = current.kind;
+        idProvider.registerFileStateKind(kind);
+        if (kind is LibraryFileStateKind) {
+          idProvider.registerLibraryCycle(kind.libraryCycle);
+        }
       }
     }
 
     _writelnWithIndent('files');
     _withIndent(() {
       for (final fileData in fileDataList) {
+        if (omitSdkFiles && fileData.uri.isScheme('dart')) {
+          continue;
+        }
         final file = fileData.file;
         _writelnWithIndent(_posixPath(file));
         _withIndent(() {
@@ -334,8 +409,8 @@
           }
 
           if (withKeysGetPut) {
-            final shortGets = keyShorter.shortKeys(fileData.unlinkedKeyGet);
-            final shortPuts = keyShorter.shortKeys(fileData.unlinkedKeyPut);
+            final shortGets = idProvider.shortKeys(fileData.unlinkedKeyGet);
+            final shortPuts = idProvider.shortKeys(fileData.unlinkedKeyPut);
             _writelnWithIndent('unlinkedGet: $shortGets');
             _writelnWithIndent('unlinkedPut: $shortPuts');
           }
@@ -345,7 +420,7 @@
   }
 
   void _writeFileUnlinkedKey(FileState file) {
-    final unlinkedShort = keyShorter.shortKey(file.unlinkedKey);
+    final unlinkedShort = idProvider.shortKey(file.unlinkedKey);
     _writelnWithIndent('unlinkedKey: $unlinkedShort');
   }
 
@@ -368,11 +443,11 @@
 
       final loadedBundlesMap = Map.fromEntries(
         libraryContext.loadedBundles.map((cycle) {
-          final key = cycle.libraries
-              .map((fileState) => fileState.resource)
-              .map(_posixPath)
+          final pathListStr = cycle.libraries
+              .map((library) => _posixPath(library.file.resource))
+              .sorted()
               .join(' ');
-          return MapEntry(key, cycle);
+          return MapEntry(pathListStr, cycle);
         }),
       );
 
@@ -381,21 +456,18 @@
         _withIndent(() {
           final current = loadedBundlesMap[cycleToPrint.pathListStr];
           if (current != null) {
-            _writelnWithIndent('current');
+            final id = idProvider.libraryCycle(current);
+            _writelnWithIndent('current: $id');
             _withIndent(() {
-              final short = keyShorter.shortKey(current.resolutionKey!);
+              // TODO(scheglov) Print it with the cycle instead?
+              final short = idProvider.shortKey(current.linkedKey);
               _writelnWithIndent('key: $short');
-
-              final fileIdList = current.libraries
-                  .map((fileState) => fileStateIdProvider[fileState])
-                  .toList();
-              _writelnWithIndent('libraries: ${fileIdList.join(' ')}');
             });
           }
 
           final cycleData = cycleToPrint.data;
-          final shortGets = keyShorter.shortKeys(cycleData.getKeys);
-          final shortPuts = keyShorter.shortKeys(cycleData.putKeys);
+          final shortGets = idProvider.shortKeys(cycleData.getKeys);
+          final shortPuts = idProvider.shortKeys(cycleData.putKeys);
           _writelnWithIndent('get: $shortGets');
           _writelnWithIndent('put: $shortPuts');
         });
@@ -403,13 +475,59 @@
     });
   }
 
-  /// TODO(scheglov) Support unresolved URIs, not parts, etc.
+  void _writeLibraryCycle(LibraryFileStateKind library) {
+    final cycle = library.libraryCycle;
+    _writelnWithIndent(idProvider.libraryCycle(cycle));
+    _withIndent(() {
+      final dependencyIds = cycle.directDependencies
+          .map(_stringOfLibraryCycle)
+          .sorted(compareNatural)
+          .join(' ');
+      if (dependencyIds.isNotEmpty) {
+        _writelnWithIndent('dependencies: $dependencyIds');
+      } else {
+        _writelnWithIndent('dependencies: none');
+      }
+
+      final libraryIds = cycle.libraries
+          .map(idProvider.fileStateKind)
+          .sorted(compareNatural)
+          .join(' ');
+      _writelnWithIndent('libraries: $libraryIds');
+
+      _writelnWithIndent(idProvider.apiSignature(cycle.apiSignature));
+
+      final userIds = cycle.directUsers
+          .map(_stringOfLibraryCycle)
+          .sorted(compareNatural)
+          .join(' ');
+      if (userIds.isNotEmpty) {
+        _writelnWithIndent('users: $userIds');
+      }
+    });
+  }
+
   void _writeLibraryParts(LibraryFileStateKind library) {
-    final parts = library.file.partedFiles.whereNotNull();
-    if (parts.isNotEmpty) {
-      final partKeys = parts.map((e) => fileStateIdProvider[e]).join(' ');
-      _writelnWithIndent('parts: $partKeys');
-    }
+    _writeElements<PartDirectiveState>('parts', library.parts, (part) {
+      expect(part.library, same(library));
+      if (part is PartDirectiveWithFile) {
+        final file = part.includedFile;
+        sink.write(_indent);
+
+        final includedPart = part.includedPart;
+        if (includedPart != null) {
+          expect(includedPart.file, file);
+          sink.write(idProvider.fileStateKind(includedPart));
+        } else {
+          sink.write('notPart ${idProvider.fileState(file)}');
+        }
+        sink.writeln();
+      } else {
+        sink.write(_indent);
+        sink.write('uri: ${_stringOfUriStr(part.directive.uri)}');
+        sink.writeln();
+      }
+    });
   }
 
   void _writelnWithIndent(String line) {
@@ -421,8 +539,9 @@
     final referencingFiles = file.referencingFiles;
     if (referencingFiles.isNotEmpty) {
       final fileIds = referencingFiles
-          .map((e) => fileStateIdProvider[e])
-          .sorted(compareNatural);
+          .map(idProvider.fileState)
+          .sorted(compareNatural)
+          .join(' ');
       _writelnWithIndent('referencingFiles: $fileIds');
     }
   }
@@ -448,41 +567,90 @@
   }
 }
 
-class FileStateIdProvider {
-  final Map<FileState, String> _map = Map.identity();
-
-  String operator [](FileState file) {
-    return _map[file] ??= 'file_${_map.length}';
-  }
-}
-
-class FileStateKindIdProvider {
-  final Map<FileStateKind, String> _map = Map.identity();
-
-  String operator [](FileStateKind kind) {
-    if (kind is AugmentationKnownFileStateKind) {
-      return _map[kind] ??= 'augmentation_${_map.length}';
-    } else if (kind is AugmentationUnknownFileStateKind) {
-      return _map[kind] ??= 'augmentationUnknown_${_map.length}';
-    } else if (kind is LibraryFileStateKind) {
-      return _map[kind] ??= 'library_${_map.length}';
-    } else if (kind is PartOfNameFileStateKind) {
-      return _map[kind] ??= 'partOfName_${_map.length}';
-    } else if (kind is PartOfUriKnownFileStateKind) {
-      return _map[kind] ??= 'partOfUriKnown_${_map.length}';
-    } else if (kind is PartFileStateKind) {
-      return _map[kind] ??= 'partOfUriUnknown_${_map.length}';
-    } else {
-      throw UnimplementedError('${kind.runtimeType}');
-    }
-  }
-}
-
-/// Keys in the byte store are long hashes, which are hard to read.
-/// So, we generate short unique versions for them.
-class KeyShorter {
+/// Encoder of object identifies into short identifiers.
+class IdProvider {
+  final Map<FileState, String> _fileState = Map.identity();
+  final Map<LibraryCycle, String> _libraryCycle = Map.identity();
+  final Map<FileStateKind, String> _fileStateKind = Map.identity();
   final Map<String, String> _keyToShort = {};
   final Map<String, String> _shortToKey = {};
+  final Map<String, String> _apiSignature = {};
+
+  Set<FileState> _currentFiles = {};
+  Set<FileStateKind> _currentKinds = {};
+  Set<LibraryCycle> _currentCycles = {};
+
+  String apiSignature(String signature) {
+    final length = _apiSignature.length;
+    return _apiSignature[signature] ??= 'apiSignature_$length';
+  }
+
+  String fileState(FileState file) {
+    if (!_currentFiles.contains(file)) {
+      throw StateError('$file');
+    }
+    return _fileState[file] ??= 'file_${_fileState.length}';
+  }
+
+  String fileStateKind(FileStateKind kind) {
+    if (!_currentKinds.contains(kind)) {
+      throw StateError('$kind');
+    }
+    return _fileStateKind[kind] ??= () {
+      if (kind is AugmentationKnownFileStateKind) {
+        return 'augmentation_${_fileStateKind.length}';
+      } else if (kind is AugmentationUnknownFileStateKind) {
+        return 'augmentationUnknown_${_fileStateKind.length}';
+      } else if (kind is LibraryFileStateKind) {
+        return 'library_${_fileStateKind.length}';
+      } else if (kind is PartOfNameFileStateKind) {
+        return 'partOfName_${_fileStateKind.length}';
+      } else if (kind is PartOfUriKnownFileStateKind) {
+        return 'partOfUriKnown_${_fileStateKind.length}';
+      } else if (kind is PartFileStateKind) {
+        return 'partOfUriUnknown_${_fileStateKind.length}';
+      } else {
+        throw UnimplementedError('${kind.runtimeType}');
+      }
+    }();
+  }
+
+  String libraryCycle(LibraryCycle cycle) {
+    if (!_currentCycles.contains(cycle)) {
+      throw StateError('$cycle');
+    }
+    return _libraryCycle[cycle] ??= 'cycle_${_libraryCycle.length}';
+  }
+
+  /// Register that [file] is an object that can be referenced.
+  void registerFileState(FileState file) {
+    if (_currentFiles.contains(file)) {
+      throw StateError('Duplicate: $file');
+    }
+    _currentFiles.add(file);
+    fileState(file);
+  }
+
+  /// Register that [kind] is an object that can be referenced.
+  void registerFileStateKind(FileStateKind kind) {
+    if (_currentKinds.contains(kind)) {
+      throw StateError('Duplicate: $kind');
+    }
+    _currentKinds.add(kind);
+    fileStateKind(kind);
+  }
+
+  /// Register that [cycle] is an object that can be referenced.
+  void registerLibraryCycle(LibraryCycle cycle) {
+    _currentCycles.add(cycle);
+    libraryCycle(cycle);
+  }
+
+  void resetRegisteredObject() {
+    _currentFiles = {};
+    _currentKinds = {};
+    _currentCycles = {};
+  }
 
   String shortKey(String key) {
     var short = _keyToShort[key];
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 690116e..2d8b725 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -14,11 +14,8 @@
 import 'package:analyzer/src/dart/analysis/feature_set_provider.dart';
 import 'package:analyzer/src/dart/analysis/file_content_cache.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/library_graph.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisOptions, AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
@@ -141,6 +138,529 @@
     return driverFor(file.path).fsState;
   }
 
+  test_libraryCycle() {
+    final a = newFile('$testPackageLibPath/a.dart', '');
+    final b = newFile('$testPackageLibPath/b.dart', '');
+    final c = newFile('$testPackageLibPath/c.dart', '');
+    final d = newFile('$testPackageLibPath/d.dart', '');
+
+    fileStateFor(a);
+    fileStateFor(b);
+    fileStateFor(c);
+    fileStateFor(d);
+
+    // No imports, individual library cycles.
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          library_4 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_4 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+      unlinkedKey: k00
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_4 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+      unlinkedKey: k00
+  /home/test/lib/d.dart
+    uri: package:test/d.dart
+    current
+      id: file_3
+      kind: library_3
+        imports
+          library_4 dart:core synthetic
+        cycle_3
+          dependencies: dart:core
+          libraries: library_3
+          apiSignature_3
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+
+    // Import `b.dart` into `a.dart`, two files now.
+    newFile(a.path, r'''
+import 'b.dart';
+''');
+    fileStateFor(a).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_9
+        imports
+          library_1
+          library_4 dart:core synthetic
+        cycle_5
+          dependencies: cycle_1 dart:core
+          libraries: library_9
+          apiSignature_4
+      unlinkedKey: k01
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_4 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_5
+      referencingFiles: file_0
+      unlinkedKey: k00
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_4 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+      unlinkedKey: k00
+  /home/test/lib/d.dart
+    uri: package:test/d.dart
+    current
+      id: file_3
+      kind: library_3
+        imports
+          library_4 dart:core synthetic
+        cycle_3
+          dependencies: dart:core
+          libraries: library_3
+          apiSignature_3
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+
+    // Update `b.dart` so that it imports `c.dart` now.
+    newFile(b.path, r'''
+import 'c.dart';
+''');
+    fileStateFor(b).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_9
+        imports
+          library_10
+          library_4 dart:core synthetic
+        cycle_6
+          dependencies: cycle_7 dart:core
+          libraries: library_9
+          apiSignature_5
+      unlinkedKey: k01
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_10
+        imports
+          library_2
+          library_4 dart:core synthetic
+        cycle_7
+          dependencies: cycle_2 dart:core
+          libraries: library_10
+          apiSignature_6
+          users: cycle_6
+      referencingFiles: file_0
+      unlinkedKey: k02
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_4 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+          users: cycle_7
+      referencingFiles: file_1
+      unlinkedKey: k00
+  /home/test/lib/d.dart
+    uri: package:test/d.dart
+    current
+      id: file_3
+      kind: library_3
+        imports
+          library_4 dart:core synthetic
+        cycle_3
+          dependencies: dart:core
+          libraries: library_3
+          apiSignature_3
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+
+    // Update `b.dart` so that it exports `d.dart` instead.
+    newFile(b.path, r'''
+export 'd.dart';
+''');
+    fileStateFor(b).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_9
+        imports
+          library_11
+          library_4 dart:core synthetic
+        cycle_8
+          dependencies: cycle_9 dart:core
+          libraries: library_9
+          apiSignature_7
+      unlinkedKey: k01
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_11
+        imports
+          library_4 dart:core synthetic
+        exports
+          library_3
+        cycle_9
+          dependencies: cycle_3 dart:core
+          libraries: library_11
+          apiSignature_8
+          users: cycle_8
+      referencingFiles: file_0
+      unlinkedKey: k03
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_4 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+      unlinkedKey: k00
+  /home/test/lib/d.dart
+    uri: package:test/d.dart
+    current
+      id: file_3
+      kind: library_3
+        imports
+          library_4 dart:core synthetic
+        cycle_3
+          dependencies: dart:core
+          libraries: library_3
+          apiSignature_3
+          users: cycle_9
+      referencingFiles: file_1
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+
+    // Update `a.dart` so that it does not import `b.dart` anymore.
+    // Note that `a.dart` has its initial API signature.
+    // ...and `b.dart` has no users.
+    newFile(a.path, '');
+    fileStateFor(a).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_12
+        imports
+          library_4 dart:core synthetic
+        cycle_10
+          dependencies: dart:core
+          libraries: library_12
+          apiSignature_0
+      unlinkedKey: k00
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_11
+        imports
+          library_4 dart:core synthetic
+        exports
+          library_3
+        cycle_9
+          dependencies: cycle_3 dart:core
+          libraries: library_11
+          apiSignature_8
+      unlinkedKey: k03
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_4 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+      unlinkedKey: k00
+  /home/test/lib/d.dart
+    uri: package:test/d.dart
+    current
+      id: file_3
+      kind: library_3
+        imports
+          library_4 dart:core synthetic
+        cycle_3
+          dependencies: dart:core
+          libraries: library_3
+          apiSignature_3
+          users: cycle_9
+      referencingFiles: file_1
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_libraryCycle_cycle_export() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+export 'b.dart';
+''');
+
+    newFile('$testPackageLibPath/b.dart', r'''
+export 'a.dart';
+''');
+
+    fileStateFor(a);
+
+    // TODO(scheglov) Write details for a cycle only once.
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          library_2 dart:core synthetic
+        exports
+          library_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0 library_1
+          apiSignature_0
+      referencingFiles: file_1
+      unlinkedKey: k00
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_2 dart:core synthetic
+        exports
+          library_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0 library_1
+          apiSignature_0
+      referencingFiles: file_0
+      unlinkedKey: k01
+libraryCycles
+elementFactory
+''');
+
+    // Update `a.dart` so that it does not export `b.dart` anymore.
+    newFile(a.path, '');
+    fileStateFor(a).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_7
+        imports
+          library_2 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
+          users: cycle_3
+      referencingFiles: file_1
+      unlinkedKey: k02
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_2 dart:core synthetic
+        exports
+          library_7
+        cycle_3
+          dependencies: cycle_2 dart:core
+          libraries: library_1
+          apiSignature_2
+      unlinkedKey: k01
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_libraryCycle_cycle_import() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+import 'b.dart';
+''');
+
+    newFile('$testPackageLibPath/b.dart', r'''
+import 'a.dart';
+''');
+
+    fileStateFor(a);
+
+    // TODO(scheglov) Write details for a cycle only once.
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          library_1
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0 library_1
+          apiSignature_0
+      referencingFiles: file_1
+      unlinkedKey: k00
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_0
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0 library_1
+          apiSignature_0
+      referencingFiles: file_0
+      unlinkedKey: k01
+libraryCycles
+elementFactory
+''');
+
+    // Update a.dart so that it does not import b.dart anymore.
+    newFile(a.path, '');
+    fileStateFor(a).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_7
+        imports
+          library_2 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
+          users: cycle_3
+      referencingFiles: file_1
+      unlinkedKey: k02
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_7
+          library_2 dart:core synthetic
+        cycle_3
+          dependencies: cycle_2 dart:core
+          libraries: library_1
+          apiSignature_2
+      unlinkedKey: k01
+libraryCycles
+elementFactory
+''');
+  }
+
+  /// TODO(scheglov) Implement `asLibrary` testing.
+  test_libraryCycle_part() {
+//     var a_path = convertPath('/aaa/lib/a.dart');
+//     var b_path = convertPath('/aaa/lib/b.dart');
+//
+//     newFile(a_path, r'''
+// part 'b.dart';
+// ''');
+//     newFile(b_path, 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_newFile_augmentation_augmentationExists_hasImport() async {
     newFile('$testPackageLibPath/a.dart', r'''
 import augment 'b.dart';
@@ -165,31 +685,35 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_2
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: augmentation_3
-        augmented: augmentation_2
+      kind: augmentation_2
+        augmented: augmentation_1
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_1]
+          library_3 dart:core synthetic
+      referencingFiles: file_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -218,27 +742,31 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_2
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: augmentation_3
-        augmented: augmentation_2
+      kind: augmentation_2
+        augmented: augmentation_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_1]
+          library_3 dart:core synthetic
+      referencingFiles: file_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -270,28 +798,32 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_3 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: augmentation_3
+      kind: augmentation_2
         uriFile: file_1
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -320,25 +852,27 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
-        augmented: augmentation_2
+      kind: augmentation_1
+        augmented: augmentation_1
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
-      referencingFiles: [file_0, file_1]
+      referencingFiles: file_0 file_1
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
-
-    // The cycle does not prevent building of the library cycle. TODO
   }
 
   test_newFile_augmentation_cycle2() async {
@@ -366,38 +900,40 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_2
-      referencingFiles: [file_0, file_2]
+      referencingFiles: file_0 file_2
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: augmentation_3
-        augmented: augmentation_2
+      kind: augmentation_2
+        augmented: augmentation_1
         library: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         augmentations: file_1
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
 ''');
-
-    // The cycle does not prevent building of the library cycle. TODO
   }
 
   test_newFile_augmentation_invalid() async {
@@ -441,19 +977,23 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -480,16 +1020,20 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -503,18 +1047,22 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -537,16 +1085,20 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -577,19 +1129,23 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -605,28 +1161,36 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0, file_2]
+          library_2 dart:core synthetic
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -642,28 +1206,36 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0, file_2]
+          library_2 dart:core synthetic
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -679,28 +1251,36 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_4
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_2 dart:core synthetic
+      referencingFiles: file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -715,26 +1295,34 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_4
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_6
+      id: file_7
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_3
       unlinkedKey: k02
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -751,28 +1339,36 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_4
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_7
+      id: file_7
+      kind: library_11
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_6
+          dependencies: dart:core
+          libraries: library_11
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_2 dart:core synthetic
+      referencingFiles: file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -789,30 +1385,38 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_8
+      kind: library_12
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_7
+          dependencies: dart:core
+          libraries: library_12
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_7
+      id: file_7
+      kind: library_11
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_6
+          dependencies: dart:core
+          libraries: library_11
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: augmentation_2
-        augmented: library_8
-        library: library_8
+      kind: augmentation_1
+        augmented: library_12
+        library: library_12
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0, file_2]
+          library_2 dart:core synthetic
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -837,6 +1441,10 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -862,27 +1470,35 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+      referencingFiles: file_2
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         exports
           notLibrary file_1
+        cycle_1
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -907,8 +1523,12 @@
         imports
           library_1 dart:core synthetic
         exports
-          library_2 dart:async
-          library_3 dart:math
+          library_3 dart:async
+          library_5 dart:math
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -976,6 +1596,10 @@
           inSummary dart:async
           inSummary package:foo/foo.dart
           library_1
+        cycle_0
+          dependencies: cycle_1
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -984,7 +1608,12 @@
       kind: library_1
         imports
           inSummary dart:core synthetic
-      referencingFiles: [file_0]
+        cycle_1
+          dependencies: none
+          libraries: library_1
+          apiSignature_1
+          users: cycle_0
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1058,6 +1687,10 @@
         exports
           inSummary package:foo/foo2.dart notLibrary
           library_1
+        cycle_0
+          dependencies: cycle_1
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -1066,7 +1699,12 @@
       kind: library_1
         imports
           inSummary dart:core synthetic
-      referencingFiles: [file_0]
+        cycle_1
+          dependencies: none
+          libraries: library_1
+          apiSignature_1
+          users: cycle_0
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1093,6 +1731,38 @@
           library_1 dart:core synthetic
         exports
           uri: net:
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_newFile_library_exports_invalidRelativeUri_empty() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+export '';
+''');
+
+    fileStateFor(a);
+
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          library_1 dart:core synthetic
+        exports
+          uri: ''
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -1115,28 +1785,42 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
         exports
           library_0
-          library_2
+          library_1
+        cycle_2
+          dependencies: cycle_0 cycle_1 dart:core
+          libraries: library_2
+          apiSignature_2
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1162,7 +1846,7 @@
       id: file_0
       kind: partOfName_0
         name: my.lib
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -1173,6 +1857,10 @@
           library_2 dart:core synthetic
         exports
           notLibrary file_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1198,26 +1886,34 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         uriFile: file_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+      referencingFiles: file_2
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           notLibrary file_1
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -1241,6 +1937,37 @@
         imports
           uri: da:
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_newFile_library_imports_invalidRelativeUri_empty() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+import '';
+''');
+
+    fileStateFor(a);
+
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          uri: ''
+          library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -1263,9 +1990,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:async
-          library_2 dart:math
-          library_3 dart:core synthetic
+          library_3 dart:async
+          library_5 dart:math
+          library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -1289,7 +2020,11 @@
       kind: library_0
         imports
           library_1 dart:core
-          library_2 dart:math
+          library_5 dart:math
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -1356,6 +2091,10 @@
           inSummary package:foo/foo.dart
           library_1
           inSummary dart:core synthetic
+        cycle_0
+          dependencies: cycle_1
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -1364,7 +2103,12 @@
       kind: library_1
         imports
           inSummary dart:core synthetic
-      referencingFiles: [file_0]
+        cycle_1
+          dependencies: none
+          libraries: library_1
+          apiSignature_1
+          users: cycle_0
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1437,6 +2181,10 @@
           inSummary package:foo/foo2.dart notLibrary
           library_1
           inSummary dart:core synthetic
+        cycle_0
+          dependencies: cycle_1
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -1445,7 +2193,12 @@
       kind: library_1
         imports
           inSummary dart:core synthetic
-      referencingFiles: [file_0]
+        cycle_1
+          dependencies: none
+          libraries: library_1
+          apiSignature_1
+          users: cycle_0
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1473,27 +2226,86 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_2
-          library_1 dart:core synthetic
+          library_1
+          library_3 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 cycle_1 dart:core
+          libraries: library_2
+          apiSignature_2
+      unlinkedKey: k01
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_newFile_library_imports_library_package_twice() async {
+    newFile('$testPackageLibPath/a.dart', '');
+
+    final b = newFile('$testPackageLibPath/b.dart', r'''
+import 'a.dart';
+import 'a.dart';
+''');
+
+    fileStateFor(b);
+
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_1
+      referencingFiles: file_1
+      unlinkedKey: k00
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: library_1
+        imports
+          library_0
+          library_0
+          library_2 dart:core synthetic
+        cycle_1
+          dependencies: cycle_0 dart:core
+          libraries: library_1
+          apiSignature_1
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1519,7 +2331,7 @@
       id: file_0
       kind: partOfName_0
         name: my.lib
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -1529,6 +2341,10 @@
         imports
           notLibrary file_0
           library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1554,17 +2370,26 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1578,20 +2403,227 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
+        imports
+          library_2 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+      referencingFiles: file_0
+      unlinkedKey: k01
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_newFile_library_parts_invalidRelativeUri() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+part 'da:';
+''');
+
+    fileStateFor(a);
+
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
         imports
           library_1 dart:core synthetic
-      referencingFiles: [file_0]
+        parts
+          uri: da:
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_newFile_library_parts_invalidRelativeUri_empty() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+part '';
+''');
+
+    fileStateFor(a);
+
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        imports
+          library_1 dart:core synthetic
+        parts
+          uri: ''
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
+libraryCycles
+elementFactory
+''');
+  }
+
+  test_newFile_library_parts_ofUri_two() {
+    final a = newFile('$testPackageLibPath/a.dart', r'''
+part of 'c.dart';
+class A {}
+''');
+
+    final b = newFile('$testPackageLibPath/b.dart', r'''
+part of 'c.dart';
+class B {}
+''');
+
+    final c = newFile('$testPackageLibPath/c.dart', r'''
+part 'a.dart';
+part 'b.dart';
+''');
+
+    fileStateFor(c);
+
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: partOfUriKnown_0
+        library: library_2
+      referencingFiles: file_2
+      unlinkedKey: k00
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: partOfUriKnown_1
+        library: library_2
+      referencingFiles: file_2
       unlinkedKey: k01
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_3 dart:core synthetic
+        parts
+          partOfUriKnown_0
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_0
+      unlinkedKey: k02
+libraryCycles
+elementFactory
+''');
+
+    // Update `a.dart`, updates the library.
+    newFile(a.path, r'''
+part of 'c.dart';
+class A2 {}
+''');
+    fileStateFor(a).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: partOfUriKnown_8
+        library: library_2
+      referencingFiles: file_2
+      unlinkedKey: k03
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: partOfUriKnown_1
+        library: library_2
+      referencingFiles: file_2
+      unlinkedKey: k01
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_3 dart:core synthetic
+        parts
+          partOfUriKnown_8
+          partOfUriKnown_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_1
+      unlinkedKey: k02
+libraryCycles
+elementFactory
+''');
+
+    // Update `b.dart`, updates the library.
+    newFile(b.path, r'''
+part of 'c.dart';
+class B2 {}
+''');
+    fileStateFor(b).refresh();
+    assertDriverStateString(testFile, r'''
+files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: partOfUriKnown_8
+        library: library_2
+      referencingFiles: file_2
+      unlinkedKey: k03
+  /home/test/lib/b.dart
+    uri: package:test/b.dart
+    current
+      id: file_1
+      kind: partOfUriKnown_9
+        library: library_2
+      referencingFiles: file_2
+      unlinkedKey: k04
+  /home/test/lib/c.dart
+    uri: package:test/c.dart
+    current
+      id: file_2
+      kind: library_2
+        imports
+          library_3 dart:core synthetic
+        parts
+          partOfUriKnown_8
+          partOfUriKnown_9
+        cycle_3
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+      unlinkedKey: k02
 libraryCycles
 elementFactory
 ''');
@@ -1614,6 +2646,10 @@
         name: my
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -1634,6 +2670,10 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -1681,7 +2721,7 @@
       kind: partOfName_0
         libraries: library_1
         library: library_1
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k00
   /home/test/lib/nested/a.dart
     uri: package:test/nested/a.dart
@@ -1691,7 +2731,12 @@
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfName_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1713,14 +2758,29 @@
     // We don't know the library initially.
     assertDriverStateString(testFile, r'''
 files
+  /home/test/lib/a.dart
+    uri: package:test/a.dart
+    current
+      id: file_0
+      kind: library_0
+        name: my.lib
+        imports
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_0
-      kind: partOfName_0
+      id: file_1
+      kind: partOfName_1
         name: other.lib
-      referencingFiles: [file_1]
-      unlinkedKey: k00
+      referencingFiles: file_0
+      unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
@@ -1735,21 +2795,26 @@
   /home/test/lib/a.dart
     uri: package:test/a.dart
     current
-      id: file_1
-      kind: library_1
+      id: file_0
+      kind: library_0
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
-      unlinkedKey: k01
+        parts
+          notPart file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+      unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_0
-      kind: partOfName_0
+      id: file_1
+      kind: partOfName_1
         name: other.lib
-      referencingFiles: [file_1]
-      unlinkedKey: k00
+      referencingFiles: file_0
+      unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
@@ -1782,17 +2847,22 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
+      kind: partOfName_1
         libraries: library_0
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1810,27 +2880,37 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_0 library_3
+      kind: partOfName_1
+        libraries: library_0 library_7
         library: library_0
-      referencingFiles: [file_0, file_2]
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1847,27 +2927,37 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_0 library_4
+      kind: partOfName_1
+        libraries: library_0 library_8
         library: library_0
-      referencingFiles: [file_0, file_2]
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1881,30 +2971,40 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_4
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_4 library_5
-        library: library_5
-      referencingFiles: [file_0, file_2]
+      kind: partOfName_1
+        libraries: library_8 library_9
+        library: library_9
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1919,28 +3019,37 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_6
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_4
-        library: library_4
-      referencingFiles: [file_2]
+      kind: partOfName_1
+        libraries: library_8
+        library: library_8
+      referencingFiles: file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -1955,23 +3064,31 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_6
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_7
+      id: file_7
+      kind: library_11
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_6
+          dependencies: dart:core
+          libraries: library_11
+          apiSignature_3
       unlinkedKey: k02
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
+      kind: partOfName_1
         name: my.lib
       unlinkedKey: k01
 libraryCycles
@@ -1990,28 +3107,37 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_6
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_8
+      id: file_7
+      kind: library_12
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_7
+          dependencies: dart:core
+          libraries: library_12
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_8
-        library: library_8
-      referencingFiles: [file_2]
+      kind: partOfName_1
+        libraries: library_12
+        library: library_12
+      referencingFiles: file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2029,30 +3155,40 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_9
+      kind: library_13
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_8
+          dependencies: dart:core
+          libraries: library_13
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_8
+      id: file_7
+      kind: library_12
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_1
+        cycle_7
+          dependencies: dart:core
+          libraries: library_12
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_8 library_9
-        library: library_9
-      referencingFiles: [file_0, file_2]
+      kind: partOfName_1
+        libraries: library_12 library_13
+        library: library_13
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2079,13 +3215,17 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         uriFile: file_0
       unlinkedKey: k01
 libraryCycles
@@ -2109,18 +3249,23 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
-        library: library_3
-      referencingFiles: [file_0]
+      kind: partOfUriKnown_1
+        library: library_7
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2134,18 +3279,23 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_8
+        cycle_3
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_4
-        library: library_3
-      referencingFiles: [file_0]
+      kind: partOfUriKnown_8
+        library: library_7
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2173,16 +3323,21 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2198,16 +3353,21 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_7
+        cycle_2
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_3
+      kind: partOfUriKnown_7
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2235,13 +3395,17 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         uriFile: file_0
       unlinkedKey: k01
 libraryCycles
@@ -2285,7 +3449,12 @@
       kind: library_1
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          notPart file_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -2293,7 +3462,7 @@
       id: file_0
       kind: partOfUriUnknown_0
         uri: da:
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -2309,12 +3478,11 @@
 part 'c.dart';
 ''');
 
-    final c = newFile('$testPackageLibPath/c.dart', r'''
+    newFile('$testPackageLibPath/c.dart', r'''
 part of 'a.dart';
 ''');
 
     final aState = fileStateFor(a);
-    _assertPartedFiles(aState, [c]);
 
     // We set the library while reading `a.dart` file.
     assertDriverStateString(testFile, r'''
@@ -2325,16 +3493,21 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2350,25 +3523,35 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0, file_2]
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2384,25 +3567,35 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0, file_2]
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2416,27 +3609,37 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_4
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
-        library: library_5
-      referencingFiles: [file_0, file_2]
+      kind: partOfUriKnown_1
+        library: library_9
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2452,26 +3655,35 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_6
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_4
+      id: file_7
+      kind: library_8
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         uriFile: file_0
-      referencingFiles: [file_2]
+      referencingFiles: file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2486,23 +3698,31 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_6
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_7
+      id: file_7
+      kind: library_11
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_6
+          dependencies: dart:core
+          libraries: library_11
+          apiSignature_3
       unlinkedKey: k02
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         uriFile: file_0
       unlinkedKey: k01
 libraryCycles
@@ -2520,26 +3740,35 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_6
+      kind: library_10
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
+        cycle_5
+          dependencies: dart:core
+          libraries: library_10
+          apiSignature_2
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_8
+      id: file_7
+      kind: library_12
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_7
+          dependencies: dart:core
+          libraries: library_12
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         uriFile: file_0
-      referencingFiles: [file_2]
+      referencingFiles: file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2556,27 +3785,37 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_9
+      kind: library_13
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_8
+          dependencies: dart:core
+          libraries: library_13
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
-      id: file_2
-      kind: library_8
+      id: file_7
+      kind: library_12
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_7
+          dependencies: dart:core
+          libraries: library_12
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
-        library: library_9
-      referencingFiles: [file_0, file_2]
+      kind: partOfUriKnown_1
+        library: library_13
+      referencingFiles: file_0 file_7
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2601,19 +3840,23 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2633,17 +3876,25 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2657,19 +3908,27 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_4
+      kind: library_8
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2697,19 +3956,23 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2736,17 +3999,21 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfName_3
+      kind: partOfName_7
         libraries: library_0
         name: my.lib
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2760,20 +4027,24 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_4
+      kind: library_8
         name: my.lib
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfName_3
-        libraries: library_4
+      kind: partOfName_7
+        libraries: library_8
         name: my.lib
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2793,20 +4064,25 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_7
+        cycle_3
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_1
       unlinkedKey: k03
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfName_3
-        libraries: library_5
-        library: library_5
-      referencingFiles: [file_0]
+      kind: partOfName_7
+        libraries: library_9
+        library: library_9
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2831,19 +4107,23 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_2
+      kind: augmentation_1
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -2866,16 +4146,20 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_3
+      kind: partOfUriKnown_7
         uriFile: file_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2889,18 +4173,22 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_4
+      kind: library_8
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_3
+      kind: partOfUriKnown_7
         uriFile: file_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2919,18 +4207,23 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: library_5
+      kind: library_9
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_7
+        cycle_3
+          dependencies: dart:core
+          libraries: library_9
+          apiSignature_1
       unlinkedKey: k03
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_3
-        library: library_5
-      referencingFiles: [file_0]
+      kind: partOfUriKnown_7
+        library: library_9
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -2962,28 +4255,34 @@
     current
       id: file_0
       kind: partOfName_0
-        libraries: library_1
-        library: library_1
-      referencingFiles: [file_2]
+        libraries: library_2
+        library: library_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_1
-        library: library_1
-      referencingFiles: [file_2]
+      kind: partOfName_1
+        libraries: library_2
+        library: library_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_1
+      kind: library_2
         name: my
         imports
           library_3 dart:core synthetic
-        parts: file_0 file_1
+        parts
+          partOfName_0
+          partOfName_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -3003,27 +4302,32 @@
     current
       id: file_0
       kind: partOfName_0
-        libraries: library_4
+        libraries: library_8
         name: my
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfName_2
-        libraries: library_4
-        library: library_4
-      referencingFiles: [file_2]
+      kind: partOfName_1
+        libraries: library_8
+        library: library_8
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_4
+      kind: library_8
         name: my
         imports
           library_3 dart:core synthetic
-        parts: file_1
+        parts
+          partOfName_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -3054,25 +4358,31 @@
     current
       id: file_0
       kind: partOfUriKnown_0
-        library: library_1
-      referencingFiles: [file_2]
+        library: library_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
-        library: library_1
-      referencingFiles: [file_2]
+      kind: partOfUriKnown_1
+        library: library_2
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_1
+      kind: library_2
         imports
           library_3 dart:core synthetic
-        parts: file_0 file_1
+        parts
+          partOfUriKnown_0
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -3098,19 +4408,24 @@
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
-        library: library_4
-      referencingFiles: [file_2]
+      kind: partOfUriKnown_1
+        library: library_8
+      referencingFiles: file_2
       unlinkedKey: k00
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
       id: file_2
-      kind: library_4
+      kind: library_8
         name: my
         imports
           library_3 dart:core synthetic
-        parts: file_1
+        parts
+          partOfUriKnown_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_1
       unlinkedKey: k02
 libraryCycles
 elementFactory
@@ -3136,18 +4451,26 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         name: b
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
@@ -3159,6 +4482,7 @@
 
     // We will discover the target by URI.
     fileStateFor(b).refresh();
+    // TODO(scheglov) The API signature must be different.
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3167,29 +4491,27 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
+          library_2 dart:core synthetic
         augmentations: file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: augmentation_3
+      kind: augmentation_7
         augmented: library_0
         library: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
 ''');
-
-    // The file `b.dart` was something else, but now it is a known augmentation.
-    // This affects libraries that include it.
-    // TODO(scheglov) Restore.
-    // final aCycle_2 = aState.libraryCycle;
-    // expect(aCycle_2.apiSignature, isNot(aCycle_1.apiSignature));
   }
 
   test_refresh_library_to_partOfName() async {
@@ -3201,7 +4523,7 @@
     // No `part of`, so it is a library.
     final b = newFile('$testPackageLibPath/b.dart', '');
 
-    final aState = fileStateFor(a);
+    fileStateFor(a);
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3211,32 +4533,38 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    final aCycle_1 = aState.libraryCycle;
-
     // Make it a part.
     newFile(b.path, r'''
 part of my.lib;
 ''');
-
-    // We will discover the library by name.
     fileStateFor(b).refresh();
 
+    // The API signature of `a.dart` is different.
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3246,26 +4574,26 @@
       kind: library_0
         name: my.lib
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfName_7
+        cycle_3
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_2
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfName_3
+      kind: partOfName_7
         libraries: library_0
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
 ''');
-
-    // The file `b.dart` was something else, but now it is a known part.
-    // This affects libraries that include it.
-    final aCycle_2 = aState.libraryCycle;
-    expect(aCycle_2.apiSignature, isNot(aCycle_1.apiSignature));
   }
 
   test_refresh_library_to_partOfName_noLibrary() async {
@@ -3285,6 +4613,10 @@
         name: my
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
 libraryCycles
 elementFactory
@@ -3303,7 +4635,7 @@
     uri: package:test/a.dart
     current
       id: file_0
-      kind: partOfName_2
+      kind: partOfName_6
         name: my
       unlinkedKey: k01
 libraryCycles
@@ -3320,7 +4652,7 @@
 library b;
 ''');
 
-    final aState = fileStateFor(a);
+    fileStateFor(a);
 
     assertDriverStateString(testFile, r'''
 files
@@ -3330,31 +4662,39 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         name: b
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    final aCycle_1 = aState.libraryCycle;
-
+    // Make it a part.
     newFile(b.path, r'''
 part of 'a.dart';
 ''');
-
-    // We will discover the library using the URI.
     fileStateFor(b).refresh();
+
+    // The API signature is different now.
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3363,25 +4703,25 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_7
+        cycle_3
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_2
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_3
+      kind: partOfUriKnown_7
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
 ''');
-
-    // The file `b.dart` was something else, but now it is a known part.
-    // This affects libraries that include it.
-    final aCycle_2 = aState.libraryCycle;
-    expect(aCycle_2.apiSignature, isNot(aCycle_1.apiSignature));
   }
 
   test_refresh_partOfName_twoLibraries() async {
@@ -3400,7 +4740,7 @@
 part 'a.dart';
 ''');
 
-    final bState = fileStateFor(b);
+    fileStateFor(b);
 
     assertDriverStateString(testFile, r'''
 files
@@ -3411,7 +4751,7 @@
       kind: partOfName_0
         libraries: library_1
         library: library_1
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -3421,14 +4761,19 @@
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfName_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    // Get `c.dart`, not there are two libraries to chose from.
-    final cState = fileStateFor(c);
+    // Get `c.dart`, now there are two libraries to chose from.
+    fileStateFor(c);
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3436,9 +4781,9 @@
     current
       id: file_0
       kind: partOfName_0
-        libraries: library_1 library_3
+        libraries: library_1 library_7
         library: library_1
-      referencingFiles: [file_1, file_2]
+      referencingFiles: file_1 file_7
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -3448,25 +4793,32 @@
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfName_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfName_0
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    final bCycle_1 = bState.libraryCycle;
-    final cCycle_1 = cState.libraryCycle;
-
     // Update `a.dart` part.
     newFile(a.path, r'''
 part of my.lib;
@@ -3475,16 +4827,19 @@
     fileStateFor(a).refresh();
 
     // `a.dart` is still a part.
+    // ...but the unlinked signature of `a.dart` is different.
+    // API signatures of both `b.dart` and `c.dart` changed.
+    // Even though `a.dart` is not a valid part of `c.dart`.
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
     uri: package:test/a.dart
     current
       id: file_0
-      kind: partOfName_4
-        libraries: library_1 library_3
+      kind: partOfName_8
+        libraries: library_1 library_7
         library: library_1
-      referencingFiles: [file_1, file_2]
+      referencingFiles: file_1 file_7
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -3494,30 +4849,31 @@
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfName_8
+        cycle_3
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_2
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         name: my.lib
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfName_8
+        cycle_4
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_3
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
-
-    // ...but the unlinked signature of `a.dart` is different.
-    // We invalidate `b.dart` it references `a.dart`.
-    // We invalidate `c.dart` it references `a.dart`.
-    // Even though `a.dart` is not a valid part of `c.dart`.
-    final bCycle_2 = bState.libraryCycle;
-    final cCycle_2 = cState.libraryCycle;
-    expect(bCycle_2.apiSignature, isNot(bCycle_1.apiSignature));
-    expect(cCycle_2.apiSignature, isNot(cCycle_1.apiSignature));
   }
 
   test_refresh_partOfUri_to_library() async {
@@ -3529,7 +4885,7 @@
 part of 'a.dart';
 ''');
 
-    final aState = fileStateFor(a);
+    fileStateFor(a);
 
     // There is `part of` in `b.dart`, so it is a part.
     assertDriverStateString(testFile, r'''
@@ -3540,23 +4896,26 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    final aCycle_1 = aState.libraryCycle;
-
     newFile(b.path, r'''
 // no part of
 ''');
@@ -3564,6 +4923,7 @@
 
     // There are no directives in `b.dart`, so it is a library.
     // Library `a.dart` still considers `b.dart` its part.
+    // The API signature of the library cycle for `a.dart` is different now.
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3572,25 +4932,30 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          notPart file_1
+        cycle_2
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_1
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
     current
       id: file_1
-      kind: library_3
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_0]
+          library_2 dart:core synthetic
+        cycle_3
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_2
+      referencingFiles: file_0
       unlinkedKey: k02
 libraryCycles
 elementFactory
 ''');
-
-    // The library cycle for `a.dart` is different now.
-    final aCycle_2 = aState.libraryCycle;
-    expect(aCycle_2.apiSignature, isNot(aCycle_1.apiSignature));
   }
 
   test_refresh_partOfUri_twoLibraries() async {
@@ -3607,8 +4972,7 @@
 part 'a.dart';
 ''');
 
-    final bState = fileStateFor(b);
-
+    fileStateFor(b);
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3617,7 +4981,7 @@
       id: file_0
       kind: partOfUriKnown_0
         library: library_1
-      referencingFiles: [file_1]
+      referencingFiles: file_1
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -3626,13 +4990,18 @@
       kind: library_1
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfUriKnown_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    final cState = fileStateFor(c);
+    fileStateFor(c);
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
@@ -3641,7 +5010,7 @@
       id: file_0
       kind: partOfUriKnown_0
         library: library_1
-      referencingFiles: [file_1, file_2]
+      referencingFiles: file_1 file_7
       unlinkedKey: k00
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -3650,42 +5019,51 @@
       kind: library_1
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfUriKnown_0
+        cycle_0
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_0
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          notPart file_0
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_1
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
 
-    final bCycle_1 = bState.libraryCycle;
-    final cCycle_1 = cState.libraryCycle;
-
     // Update `a.dart` part.
     newFile(a.path, r'''
 part of 'b.dart';
 class A2 {}
 ''');
-
     fileStateFor(a).refresh();
 
     // `a.dart` is still a part.
+    // ...but the unlinked signature of `a.dart` is different.
+    // API signatures of both `b.dart` and `c.dart` changed.
+    // Even though `a.dart` is not a valid part of `c.dart`.
     assertDriverStateString(testFile, r'''
 files
   /home/test/lib/a.dart
     uri: package:test/a.dart
     current
       id: file_0
-      kind: partOfUriKnown_4
+      kind: partOfUriKnown_8
         library: library_1
-      referencingFiles: [file_1, file_2]
+      referencingFiles: file_1 file_7
       unlinkedKey: k02
   /home/test/lib/b.dart
     uri: package:test/b.dart
@@ -3694,39 +5072,30 @@
       kind: library_1
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          partOfUriKnown_8
+        cycle_3
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_2
       unlinkedKey: k01
   /home/test/lib/c.dart
     uri: package:test/c.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         imports
           library_2 dart:core synthetic
-        parts: file_0
+        parts
+          notPart file_0
+        cycle_4
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_3
       unlinkedKey: k01
 libraryCycles
 elementFactory
 ''');
-
-    // ...but the unlinked signature of `a.dart` is different.
-    // We invalidate `b.dart` it references `a.dart`.
-    // We invalidate `c.dart` it references `a.dart`.
-    // Even though `a.dart` is not a valid part of `c.dart`.
-    // TODO(scheglov) Change all signature checks to the dump.
-    final bCycle_2 = bState.libraryCycle;
-    final cCycle_2 = cState.libraryCycle;
-    expect(bCycle_2.apiSignature, isNot(bCycle_1.apiSignature));
-    expect(cCycle_2.apiSignature, isNot(cCycle_1.apiSignature));
-  }
-
-  void _assertPartedFiles(FileState fileState, List<File> expected) {
-    final actualFiles = fileState.partedFiles.map((part) {
-      if (part != null) {
-        return getFile(part.path);
-      }
-    }).toList();
-    expect(actualFiles, expected);
   }
 
   Future<File> _writeSdkSummary() async {
@@ -3796,7 +5165,6 @@
       ResourceUriResolver(resourceProvider)
     ]);
 
-    AnalysisOptions analysisOptions = AnalysisOptionsImpl();
     var featureSetProvider = FeatureSetProvider.build(
       sourceFactory: sourceFactory,
       resourceProvider: resourceProvider,
@@ -3812,7 +5180,6 @@
       'contextName',
       sourceFactory,
       workspace,
-      analysisOptions,
       DeclaredVariables(),
       Uint32List(0),
       Uint32List(0),
@@ -3896,20 +5263,6 @@
         unorderedEquals(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']));
   }
 
-  test_getFileForPath_emptyUri() {
-    String path = convertPath('/test.dart');
-    newFile(path, r'''
-import '';
-export '';
-part '';
-''');
-
-    FileState file = fileSystemState.getFileForPath(path);
-    _assertIsUnresolvedFile(file.importedFiles[0]);
-    _assertIsUnresolvedFile(file.exportedFiles[0]);
-    _assertIsUnresolvedFile(file.partedFiles[0]);
-  }
-
   test_getFileForPath_hasLibraryDirective_hasPartOfDirective() {
     String a = convertPath('/test/lib/a.dart');
     newFile(a, r'''
@@ -3920,68 +5273,6 @@
     expect(file.isPart, isFalse);
   }
 
-  test_getFileForPath_invalidUri() {
-    String a = convertPath('/aaa/lib/a.dart');
-    String a1 = convertPath('/aaa/lib/a1.dart');
-    String a2 = convertPath('/aaa/lib/a2.dart');
-    String a3 = convertPath('/aaa/lib/a3.dart');
-    String content_a1 = r'''
-import 'package:aaa/a1.dart';
-import ':[invalid uri]';
-
-export 'package:aaa/a2.dart';
-export ':[invalid uri]';
-
-part 'a3.dart';
-part ':[invalid uri]';
-''';
-    newFile(a, content_a1);
-
-    FileState file = fileSystemState.getFileForPath(a);
-
-    expect(_excludeSdk(file.importedFiles), hasLength(2));
-    expect(file.importedFiles[0]!.path, a1);
-    expect(file.importedFiles[0]!.uri, Uri.parse('package:aaa/a1.dart'));
-    expect(file.importedFiles[0]!.source, isNotNull);
-    _assertIsUnresolvedFile(file.importedFiles[1]);
-
-    expect(_excludeSdk(file.exportedFiles), hasLength(2));
-    expect(file.exportedFiles[0]!.path, a2);
-    expect(file.exportedFiles[0]!.uri, Uri.parse('package:aaa/a2.dart'));
-    expect(file.exportedFiles[0]!.source, isNotNull);
-    _assertIsUnresolvedFile(file.exportedFiles[1]);
-
-    expect(_excludeSdk(file.partedFiles), hasLength(2));
-    expect(file.partedFiles[0]!.path, a3);
-    expect(file.partedFiles[0]!.uri, Uri.parse('package:aaa/a3.dart'));
-    expect(file.partedFiles[0]!.source, isNotNull);
-    _assertIsUnresolvedFile(file.partedFiles[1]);
-  }
-
-  test_getFileForPath_onlyDartFiles() {
-    String not_dart = convertPath('/test/lib/not_dart.txt');
-    String a = convertPath('/test/lib/a.dart');
-    String b = convertPath('/test/lib/b.dart');
-    String c = convertPath('/test/lib/c.dart');
-    String d = convertPath('/test/lib/d.dart');
-    newFile(a, r'''
-library lib;
-import 'dart:math';
-import 'b.dart';
-import 'not_dart.txt';
-export 'c.dart';
-export 'not_dart.txt';
-part 'd.dart';
-part 'not_dart.txt';
-''');
-    FileState file = fileSystemState.getFileForPath(a);
-    expect(_excludeSdk(file.importedFiles).map((f) => f!.path), [b, not_dart]);
-    expect(file.exportedFiles.map((f) => f!.path), [c, not_dart]);
-    expect(file.partedFiles.map((f) => f!.path), [d, not_dart]);
-    expect(_excludeSdk(fileSystemState.knownFilePaths),
-        unorderedEquals([a, b, c, d, not_dart]));
-  }
-
   test_getFileForPath_samePath() {
     String path = convertPath('/aaa/lib/a.dart');
     FileState file1 = fileSystemState.getFileForPath(path);
@@ -4120,128 +5411,6 @@
     expect(fileSystemState.hasUri(generatedPath), isTrue);
   }
 
-  test_libraryCycle() {
-    String pa = convertPath('/aaa/lib/a.dart');
-    String pb = convertPath('/aaa/lib/b.dart');
-    String pc = convertPath('/aaa/lib/c.dart');
-    String pd = convertPath('/aaa/lib/d.dart');
-
-    FileState fa = fileSystemState.getFileForPath(pa);
-    FileState fb = fileSystemState.getFileForPath(pb);
-    FileState fc = fileSystemState.getFileForPath(pc);
-    FileState fd = fileSystemState.getFileForPath(pd);
-
-    // Compute library cycles for all files.
-    fa.libraryCycle;
-    fb.libraryCycle;
-    fc.libraryCycle;
-    fd.libraryCycle;
-    _assertFilesWithoutLibraryCycle([]);
-
-    // No imports, so just a single file.
-    newFile(pa, '');
-    _assertLibraryCycle(fa, [fa], []);
-
-    // Import b.dart into a.dart, two files now.
-    newFile(pa, "import 'b.dart';");
-    fa.refresh();
-    _assertFilesWithoutLibraryCycle([fa]);
-    _assertLibraryCycle(fa, [fa], [fb.libraryCycle]);
-
-    // Update b.dart so that it imports c.dart now.
-    newFile(pb, "import 'c.dart';");
-    fb.refresh();
-    _assertFilesWithoutLibraryCycle([fa, fb]);
-    _assertLibraryCycle(fa, [fa], [fb.libraryCycle]);
-    _assertLibraryCycle(fb, [fb], [fc.libraryCycle]);
-    _assertFilesWithoutLibraryCycle([]);
-
-    // Update b.dart so that it exports d.dart instead.
-    newFile(pb, "export 'd.dart';");
-    fb.refresh();
-    _assertFilesWithoutLibraryCycle([fa, fb]);
-    _assertLibraryCycle(fa, [fa], [fb.libraryCycle]);
-    _assertLibraryCycle(fb, [fb], [fd.libraryCycle]);
-    _assertFilesWithoutLibraryCycle([]);
-
-    // Update a.dart so that it does not import b.dart anymore.
-    newFile(pa, '');
-    fa.refresh();
-    _assertFilesWithoutLibraryCycle([fa]);
-    _assertLibraryCycle(fa, [fa], []);
-  }
-
-  test_libraryCycle_cycle() {
-    String pa = convertPath('/aaa/lib/a.dart');
-    String pb = convertPath('/aaa/lib/b.dart');
-
-    newFile(pa, "import 'b.dart';");
-    newFile(pb, "import 'a.dart';");
-
-    FileState fa = fileSystemState.getFileForPath(pa);
-    FileState fb = fileSystemState.getFileForPath(pb);
-
-    // Compute library cycles for all files.
-    fa.libraryCycle;
-    fb.libraryCycle;
-    _assertFilesWithoutLibraryCycle([]);
-
-    // 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, '');
-    fa.refresh();
-    _assertFilesWithoutLibraryCycle([fa, fb]);
-    _assertLibraryCycle(fa, [fa], []);
-    _assertLibraryCycle(fb, [fb], [fa.libraryCycle]);
-  }
-
-  test_libraryCycle_invalidPart_withPart() {
-    var pa = convertPath('/aaa/lib/a.dart');
-
-    newFile(pa, r'''
-part of lib;
-part 'a.dart';
-''');
-
-    var fa = fileSystemState.getFileForPath(pa);
-
-    _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, r'''
-part 'b.dart';
-''');
-    newFile(b_path, 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, r'''
@@ -4327,101 +5496,6 @@
     FileState file = fileSystemState.getFileForPath(path);
     expect(file.referencedNames, unorderedEquals(['A', 'B', 'C', 'D']));
   }
-
-  test_transitiveSignature() {
-    String pa = convertPath('/aaa/lib/a.dart');
-    String pb = convertPath('/aaa/lib/b.dart');
-    String pc = convertPath('/aaa/lib/c.dart');
-    String pd = convertPath('/aaa/lib/d.dart');
-
-    newFile(pa, "class A {}");
-    newFile(pb, "import 'a.dart';");
-    newFile(pc, "import 'b.dart';");
-    newFile(pd, "class D {}");
-
-    FileState fa = fileSystemState.getFileForPath(pa);
-    FileState fb = fileSystemState.getFileForPath(pb);
-    FileState fc = fileSystemState.getFileForPath(pc);
-    FileState fd = fileSystemState.getFileForPath(pd);
-
-    // Compute transitive closures for all files.
-    // This implicitly computes library cycles.
-    expect(fa.transitiveSignature, isNotNull);
-    expect(fb.transitiveSignature, isNotNull);
-    expect(fc.transitiveSignature, isNotNull);
-    expect(fd.transitiveSignature, isNotNull);
-    _assertFilesWithoutLibraryCycle([]);
-
-    // Make an update to a.dart that does not change its API signature.
-    // All library cycles are still valid.
-    newFile(pa, "class A {} // the same API signature");
-    fa.refresh();
-    _assertFilesWithoutLibraryCycle([]);
-
-    // Change a.dart API signature.
-    // This flushes signatures of b.dart and c.dart, but d.dart is still OK.
-    newFile(pa, "class A2 {}");
-    fa.refresh();
-    _assertFilesWithoutLibraryCycle([fa, fb, fc]);
-  }
-
-  test_transitiveSignature_part() {
-    var aPath = convertPath('/test/lib/a.dart');
-    var bPath = convertPath('/test/lib/b.dart');
-
-    newFile(aPath, r'''
-part 'b.dart';
-''');
-    newFile(bPath, '''
-part of 'a.dart';
-''');
-
-    var aFile = fileSystemState.getFileForPath(aPath);
-    var bFile = fileSystemState.getFileForPath(bPath);
-
-    var aSignature = aFile.transitiveSignature;
-    var bSignature = bFile.transitiveSignature;
-
-    // It is not valid to use a part as a library, and so ask its signature.
-    // But when this happens, we should compute the transitive signature anyway.
-    // And it should not be the signature of the containing library.
-    expect(bSignature, isNot(aSignature));
-  }
-
-  void _assertFilesWithoutLibraryCycle(List<FileState> expected) {
-    var actual = fileSystemState.test.filesWithoutLibraryCycle;
-    expect(_excludeSdk(actual), unorderedEquals(expected));
-  }
-
-  void _assertIsUnresolvedFile(FileState? file) {
-    expect(file, isNull);
-  }
-
-  void _assertLibraryCycle(
-    FileState file,
-    List<FileState> expectedLibraries,
-    List<LibraryCycle> expectedDirectDependencies,
-  ) {
-    expect(file.libraryCycle.libraries, unorderedEquals(expectedLibraries));
-    expect(
-      _excludeSdk(file.libraryCycle.directDependencies),
-      unorderedEquals(expectedDirectDependencies),
-    );
-  }
-
-  List<T> _excludeSdk<T>(Iterable<T> files) {
-    return files.where((file) {
-      if (file is LibraryCycle) {
-        return !file.libraries.any((file) => file.uri.isScheme('dart'));
-      } else if (file is FileState) {
-        return !file.uri.isScheme('dart');
-      } else if (file == null) {
-        return true;
-      } else {
-        return !(file as String).startsWith(convertPath('/sdk'));
-      }
-    }).toList();
-  }
 }
 
 class _GeneratedUriResolverMock extends UriResolver {
diff --git a/pkg/analyzer/test/src/dart/micro/file_resolution.dart b/pkg/analyzer/test/src/dart/micro/file_resolution.dart
index 8b7da75..a500588 100644
--- a/pkg/analyzer/test/src/dart/micro/file_resolution.dart
+++ b/pkg/analyzer/test/src/dart/micro/file_resolution.dart
@@ -39,11 +39,7 @@
 
   late FileResolver fileResolver;
 
-  final printer.FileStateKindIdProvider _fileStateKindIdProvider =
-      printer.FileStateKindIdProvider();
-  final printer.FileStateIdProvider _fileStateIdProvider =
-      printer.FileStateIdProvider();
-  final printer.KeyShorter _keyShorter = printer.KeyShorter();
+  final printer.IdProvider _idProvider = printer.IdProvider();
 
   FileSystemState get fsState => fileResolver.fsState!;
 
@@ -76,9 +72,7 @@
     final buffer = StringBuffer();
     printer.AnalyzerStatePrinter(
       byteStore: byteStore,
-      fileStateKindIdProvider: _fileStateKindIdProvider,
-      fileStateIdProvider: _fileStateIdProvider,
-      keyShorter: _keyShorter,
+      idProvider: _idProvider,
       libraryContext: libraryContext,
       omitSdkFiles: omitSdkFiles,
       resourceProvider: resourceProvider,
diff --git a/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart b/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
index 115aca1..89598f8 100644
--- a/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
+++ b/pkg/analyzer/test/src/dart/micro/simple_file_resolver_test.dart
@@ -45,8 +45,6 @@
     // First time we refresh everything.
     await resolveFile(c.path);
 
-    // TODO(scheglov) We have duplicates in `referencingFiles`.
-    // The reason is that we temporarily have two ways to access imports.
     assertStateString(r'''
 files
   /workspace/dart/test/lib/a.dart
@@ -55,8 +53,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -64,10 +67,15 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -75,31 +83,32 @@
     uri: package:dart.test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_2
-          library_1 dart:core synthetic
+          library_1
+          library_3 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 cycle_1 dart:core
+          libraries: library_2
+          apiSignature_2
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k03
-      libraries: file_0
     get: []
     put: [k03]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_1
     get: []
     put: [k04]
   /workspace/dart/test/lib/c.dart
-    current
+    current: cycle_2
       key: k05
-      libraries: file_2
     get: []
     put: [k05]
 elementFactory
@@ -121,8 +130,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -130,10 +144,15 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -141,31 +160,32 @@
     uri: package:dart.test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_2
-          library_1 dart:core synthetic
+          library_1
+          library_3 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 cycle_1 dart:core
+          libraries: library_2
+          apiSignature_2
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k03
-      libraries: file_0
     get: []
     put: [k03]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_1
     get: []
     put: [k04]
   /workspace/dart/test/lib/c.dart
-    current
+    current: cycle_2
       key: k05
-      libraries: file_2
     get: []
     put: [k05]
 elementFactory
@@ -187,8 +207,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -196,10 +221,15 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -207,31 +237,32 @@
     uri: package:dart.test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_2
-          library_1 dart:core synthetic
+          library_1
+          library_3 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 cycle_1 dart:core
+          libraries: library_2
+          apiSignature_2
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k03
-      libraries: file_0
     get: []
     put: [k03]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_1
     get: []
     put: [k04]
   /workspace/dart/test/lib/c.dart
-    current
+    current: cycle_2
       key: k05
-      libraries: file_2
     get: []
     put: [k05]
 elementFactory
@@ -255,10 +286,13 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -271,9 +305,8 @@
     get: []
     put: [k03]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_1
     get: []
     put: [k04]
   /workspace/dart/test/lib/c.dart
@@ -293,11 +326,16 @@
   /workspace/dart/test/lib/a.dart
     uri: package:dart.test/a.dart
     current
-      id: file_3
-      kind: library_4
+      id: file_8
+      kind: library_8
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_4, file_4]
+          library_3 dart:core synthetic
+        cycle_4
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_0
+          users: cycle_5
+      referencingFiles: file_9
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00, k00]
@@ -305,42 +343,48 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_2, file_4, file_4]
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_5
+      referencingFiles: file_9
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
   /workspace/dart/test/lib/c.dart
     uri: package:dart.test/c.dart
     current
-      id: file_4
-      kind: library_5
+      id: file_9
+      kind: library_9
         imports
-          library_4
-          library_2
-          library_1 dart:core synthetic
+          library_8
+          library_1
+          library_3 dart:core synthetic
+        cycle_5
+          dependencies: cycle_1 cycle_4 dart:core
+          libraries: library_9
+          apiSignature_2
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02, k02]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_4
       key: k03
-      libraries: file_3
     get: []
     put: [k03, k03]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_1
     get: []
     put: [k04]
   /workspace/dart/test/lib/c.dart
-    current
+    current: cycle_5
       key: k05
-      libraries: file_4
     get: []
     put: [k05, k05]
 elementFactory
@@ -477,8 +521,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -486,17 +535,16 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k02
-      libraries: file_0
     get: []
     put: [k02]
 elementFactory
@@ -534,29 +582,33 @@
   /workspace/dart/test/lib/a.dart
     uri: package:dart.test/a.dart
     current
-      id: file_2
-      kind: library_3
+      id: file_7
+      kind: library_7
         imports
-          library_1 dart:core synthetic
-        parts: file_3
+          library_2 dart:core synthetic
+        parts
+          partOfUriKnown_8
+        cycle_2
+          dependencies: dart:core
+          libraries: library_7
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00, k00]
   /workspace/dart/test/lib/b.dart
     uri: package:dart.test/b.dart
     current
-      id: file_3
-      kind: partOfUriKnown_4
-        library: library_3
-      referencingFiles: [file_2]
+      id: file_8
+      kind: partOfUriKnown_8
+        library: library_7
+      referencingFiles: file_7
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01, k01]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_2
       key: k02
-      libraries: file_2
     get: []
     put: [k02, k02]
 elementFactory
@@ -593,9 +645,15 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-        parts: file_1
-      referencingFiles: [file_2, file_2]
+          library_3 dart:core synthetic
+        parts
+          partOfUriKnown_1
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_1
+      referencingFiles: file_2
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -603,9 +661,9 @@
     uri: package:dart.test/b.dart
     current
       id: file_1
-      kind: partOfUriKnown_2
+      kind: partOfUriKnown_1
         library: library_0
-      referencingFiles: [file_0]
+      referencingFiles: file_0
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -613,24 +671,26 @@
     uri: package:dart.test/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: cycle_0 dart:core
+          libraries: library_2
+          apiSignature_1
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k03
-      libraries: file_0
     get: []
     put: [k03]
   /workspace/dart/test/lib/c.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_2
     get: []
     put: [k04]
 elementFactory
@@ -676,47 +736,55 @@
   /workspace/dart/test/lib/a.dart
     uri: package:dart.test/a.dart
     current
-      id: file_3
-      kind: library_4
+      id: file_8
+      kind: library_8
         imports
-          library_1 dart:core synthetic
-        parts: file_4
-      referencingFiles: [file_5, file_5]
+          library_3 dart:core synthetic
+        parts
+          partOfUriKnown_9
+        cycle_3
+          dependencies: dart:core
+          libraries: library_8
+          apiSignature_0
+          users: cycle_4
+      referencingFiles: file_10
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00, k00]
   /workspace/dart/test/lib/b.dart
     uri: package:dart.test/b.dart
     current
-      id: file_4
-      kind: partOfUriKnown_5
-        library: library_4
-      referencingFiles: [file_3]
+      id: file_9
+      kind: partOfUriKnown_9
+        library: library_8
+      referencingFiles: file_8
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01, k01]
   /workspace/dart/test/lib/c.dart
     uri: package:dart.test/c.dart
     current
-      id: file_5
-      kind: library_6
+      id: file_10
+      kind: library_10
         imports
-          library_4
-          library_1 dart:core synthetic
+          library_8
+          library_3 dart:core synthetic
+        cycle_4
+          dependencies: cycle_3 dart:core
+          libraries: library_10
+          apiSignature_1
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02, k02]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_3
       key: k03
-      libraries: file_3
     get: []
     put: [k03, k03]
   /workspace/dart/test/lib/c.dart
-    current
+    current: cycle_4
       key: k04
-      libraries: file_5
     get: []
     put: [k04, k04]
 elementFactory
@@ -855,14 +923,17 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: []
     put: [k01]
 elementFactory
@@ -1394,14 +1465,17 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: [k01]
     put: [k01]
 elementFactory
@@ -1423,14 +1497,17 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: [k01]
     put: [k01]
 elementFactory
@@ -1456,32 +1533,39 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
-      referencingFiles: [file_1, file_1]
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_6
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
   /workspace/dart/test/lib/b.dart
     uri: package:dart.test/b.dart
     current
-      id: file_1
-      kind: library_2
+      id: file_6
+      kind: library_6
         imports
           library_0
           library_1 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 dart:core
+          libraries: library_6
+          apiSignature_1
       unlinkedKey: k08
     unlinkedGet: []
     unlinkedPut: [k08]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: [k01, k01]
     put: [k01]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_2
       key: k09
-      libraries: file_1
     get: [k09]
     put: [k09]
 elementFactory
@@ -1513,32 +1597,39 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
-      referencingFiles: [file_1, file_1]
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_6
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
   /workspace/dart/test/lib/b.dart
     uri: package:dart.test/b.dart
     current
-      id: file_1
-      kind: library_2
+      id: file_6
+      kind: library_6
         imports
           library_0
           library_1 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 dart:core
+          libraries: library_6
+          apiSignature_1
       unlinkedKey: k08
     unlinkedGet: []
     unlinkedPut: [k08]
 libraryCycles
   /workspace/dart/test/lib/a.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: [k01, k01]
     put: [k01]
   /workspace/dart/test/lib/b.dart
-    current
+    current: cycle_2
       key: k09
-      libraries: file_1
     get: [k09]
     put: [k09]
 elementFactory
@@ -1574,14 +1665,17 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
 libraryCycles
   /workspace/dart/test/lib/test.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: [k01]
     put: [k01]
 elementFactory
@@ -1609,14 +1703,17 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
 libraryCycles
   /workspace/dart/test/lib/test.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: [k01]
     put: [k01]
 elementFactory
@@ -1748,8 +1845,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_1, file_1, file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_1 cycle_2
+      referencingFiles: file_1 file_2
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -1757,10 +1859,14 @@
     uri: package:dart.aaa/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
           library_0
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_1
+          dependencies: cycle_0 dart:core
+          libraries: library_1
+          apiSignature_1
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -1768,30 +1874,31 @@
     uri: package:dart.aaa/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 dart:core
+          libraries: library_2
+          apiSignature_2
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
 libraryCycles
   /workspace/dart/aaa/lib/a.dart
-    current
+    current: cycle_0
       key: k03
-      libraries: file_0
     get: []
     put: [k03]
   /workspace/dart/aaa/lib/b.dart
-    current
+    current: cycle_1
       key: k04
-      libraries: file_1
     get: []
     put: [k04]
   /workspace/dart/aaa/lib/c.dart
-    current
+    current: cycle_2
       key: k05
-      libraries: file_2
     get: []
     put: [k05]
 elementFactory
@@ -1814,8 +1921,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_1, file_1, file_2, file_2]
+          library_3 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_2
+      referencingFiles: file_2
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -1827,27 +1939,29 @@
     uri: package:dart.aaa/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
           library_0
-          library_1 dart:core synthetic
+          library_3 dart:core synthetic
+        cycle_2
+          dependencies: cycle_0 dart:core
+          libraries: library_2
+          apiSignature_2
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
 libraryCycles
   /workspace/dart/aaa/lib/a.dart
-    current
+    current: cycle_0
       key: k03
-      libraries: file_0
     get: []
     put: [k03]
   /workspace/dart/aaa/lib/b.dart
     get: []
     put: [k04]
   /workspace/dart/aaa/lib/c.dart
-    current
+    current: cycle_2
       key: k05
-      libraries: file_2
     get: []
     put: [k05]
 elementFactory
@@ -1896,8 +2010,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_3, file_3, file_4, file_4]
+          library_6 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_3 cycle_4
+      referencingFiles: file_3 file_4
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -1905,10 +2024,15 @@
     uri: package:dart.aaa/b.dart
     current
       id: file_1
-      kind: library_2
+      kind: library_1
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_4, file_4]
+          library_6 dart:core synthetic
+        cycle_1
+          dependencies: dart:core
+          libraries: library_1
+          apiSignature_1
+          users: cycle_4
+      referencingFiles: file_4
       unlinkedKey: k01
     unlinkedGet: []
     unlinkedPut: [k01]
@@ -1916,10 +2040,15 @@
     uri: package:dart.aaa/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_5, file_5]
+          library_6 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+          users: cycle_5
+      referencingFiles: file_5
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
@@ -1927,10 +2056,14 @@
     uri: package:dart.aaa/d.dart
     current
       id: file_3
-      kind: library_4
+      kind: library_3
         imports
           library_0
-          library_1 dart:core synthetic
+          library_6 dart:core synthetic
+        cycle_3
+          dependencies: cycle_0 dart:core
+          libraries: library_3
+          apiSignature_3
       unlinkedKey: k03
     unlinkedGet: []
     unlinkedPut: [k03]
@@ -1938,11 +2071,15 @@
     uri: package:dart.aaa/e.dart
     current
       id: file_4
-      kind: library_5
+      kind: library_4
         imports
           library_0
-          library_2
-          library_1 dart:core synthetic
+          library_1
+          library_6 dart:core synthetic
+        cycle_4
+          dependencies: cycle_0 cycle_1 dart:core
+          libraries: library_4
+          apiSignature_4
       unlinkedKey: k04
     unlinkedGet: []
     unlinkedPut: [k04]
@@ -1950,48 +2087,46 @@
     uri: package:dart.aaa/f.dart
     current
       id: file_5
-      kind: library_6
+      kind: library_5
         imports
-          library_3
-          library_1 dart:core synthetic
+          library_2
+          library_6 dart:core synthetic
+        cycle_5
+          dependencies: cycle_2 dart:core
+          libraries: library_5
+          apiSignature_5
       unlinkedKey: k05
     unlinkedGet: []
     unlinkedPut: [k05]
 libraryCycles
   /workspace/dart/aaa/lib/a.dart
-    current
+    current: cycle_0
       key: k06
-      libraries: file_0
     get: []
     put: [k06]
   /workspace/dart/aaa/lib/b.dart
-    current
+    current: cycle_1
       key: k07
-      libraries: file_1
     get: []
     put: [k07]
   /workspace/dart/aaa/lib/c.dart
-    current
+    current: cycle_2
       key: k08
-      libraries: file_2
     get: []
     put: [k08]
   /workspace/dart/aaa/lib/d.dart
-    current
+    current: cycle_3
       key: k09
-      libraries: file_3
     get: []
     put: [k09]
   /workspace/dart/aaa/lib/e.dart
-    current
+    current: cycle_4
       key: k10
-      libraries: file_4
     get: []
     put: [k10]
   /workspace/dart/aaa/lib/f.dart
-    current
+    current: cycle_5
       key: k11
-      libraries: file_5
     get: []
     put: [k11]
 elementFactory
@@ -2016,8 +2151,13 @@
       id: file_0
       kind: library_0
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_3, file_3, file_4, file_4]
+          library_6 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
+          users: cycle_3
+      referencingFiles: file_3
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
@@ -2029,10 +2169,15 @@
     uri: package:dart.aaa/c.dart
     current
       id: file_2
-      kind: library_3
+      kind: library_2
         imports
-          library_1 dart:core synthetic
-      referencingFiles: [file_5, file_5]
+          library_6 dart:core synthetic
+        cycle_2
+          dependencies: dart:core
+          libraries: library_2
+          apiSignature_2
+          users: cycle_5
+      referencingFiles: file_5
       unlinkedKey: k02
     unlinkedGet: []
     unlinkedPut: [k02]
@@ -2040,10 +2185,14 @@
     uri: package:dart.aaa/d.dart
     current
       id: file_3
-      kind: library_4
+      kind: library_3
         imports
           library_0
-          library_1 dart:core synthetic
+          library_6 dart:core synthetic
+        cycle_3
+          dependencies: cycle_0 dart:core
+          libraries: library_3
+          apiSignature_3
       unlinkedKey: k03
     unlinkedGet: []
     unlinkedPut: [k03]
@@ -2055,42 +2204,42 @@
     uri: package:dart.aaa/f.dart
     current
       id: file_5
-      kind: library_6
+      kind: library_5
         imports
-          library_3
-          library_1 dart:core synthetic
+          library_2
+          library_6 dart:core synthetic
+        cycle_5
+          dependencies: cycle_2 dart:core
+          libraries: library_5
+          apiSignature_5
       unlinkedKey: k05
     unlinkedGet: []
     unlinkedPut: [k05]
 libraryCycles
   /workspace/dart/aaa/lib/a.dart
-    current
+    current: cycle_0
       key: k06
-      libraries: file_0
     get: []
     put: [k06]
   /workspace/dart/aaa/lib/b.dart
     get: []
     put: [k07]
   /workspace/dart/aaa/lib/c.dart
-    current
+    current: cycle_2
       key: k08
-      libraries: file_2
     get: []
     put: [k08]
   /workspace/dart/aaa/lib/d.dart
-    current
+    current: cycle_3
       key: k09
-      libraries: file_3
     get: []
     put: [k09]
   /workspace/dart/aaa/lib/e.dart
     get: []
     put: [k10]
   /workspace/dart/aaa/lib/f.dart
-    current
+    current: cycle_5
       key: k11
-      libraries: file_5
     get: []
     put: [k11]
 elementFactory
@@ -2124,14 +2273,17 @@
       kind: library_0
         imports
           library_1 dart:core synthetic
+        cycle_0
+          dependencies: dart:core
+          libraries: library_0
+          apiSignature_0
       unlinkedKey: k00
     unlinkedGet: []
     unlinkedPut: [k00]
 libraryCycles
   /workspace/dart/aaa/lib/a.dart
-    current
+    current: cycle_0
       key: k01
-      libraries: file_0
     get: []
     put: [k01]
 elementFactory
diff --git a/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart b/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
index dbd3c0e..222e523 100644
--- a/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/context_collection_resolution.dart
@@ -139,10 +139,7 @@
   /// Optional summaries to provide for the collection.
   List<File>? librarySummaryFiles;
 
-  final FileStateKindIdProvider _fileStateKindIdProvider =
-      FileStateKindIdProvider();
-  final FileStateIdProvider _fileStateIdProvider = FileStateIdProvider();
-  final KeyShorter _keyShorter = KeyShorter();
+  final IdProvider _idProvider = IdProvider();
 
   List<MockSdkLibrary> get additionalMockSdkLibraries => [];
 
@@ -180,9 +177,7 @@
     final buffer = StringBuffer();
     AnalyzerStatePrinter(
       byteStore: _byteStore,
-      fileStateKindIdProvider: _fileStateKindIdProvider,
-      fileStateIdProvider: _fileStateIdProvider,
-      keyShorter: _keyShorter,
+      idProvider: _idProvider,
       libraryContext: analysisDriver.libraryContext,
       omitSdkFiles: omitSdkFiles,
       resourceProvider: resourceProvider,
diff --git a/pkg/analyzer/test/src/dart/resolution/node_text_expectations.dart b/pkg/analyzer/test/src/dart/resolution/node_text_expectations.dart
index 8891963..38fa50e 100644
--- a/pkg/analyzer/test/src/dart/resolution/node_text_expectations.dart
+++ b/pkg/analyzer/test/src/dart/resolution/node_text_expectations.dart
@@ -9,7 +9,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 class NodeTextExpectationsCollector {
-  static const updatingIsEnabled = false;
+  static const updatingIsEnabled = true;
 
   static const assertMethods = {
     'ContextResolutionTest.assertDriverStateString',
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart
index 34ff03b..a121a09 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_extension_name_test.dart
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class BuiltInIdentifierAsExtensionNameTest extends PubPackageResolutionTest {
-  test_error_builtInIdentifierAsExtensionName() async {
+  test_as() async {
     await assertErrorsInCode(
       r'''
 extension as on Object {}
@@ -26,4 +26,16 @@
       ],
     );
   }
+
+  test_Function() async {
+    await assertErrorsInCode(
+      r'''
+extension Function on Object {}
+''',
+      [
+        error(
+            CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME, 10, 8),
+      ],
+    );
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart
index a4f9e2e..7345f42 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_prefix_name_test.dart
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class BuiltInIdentifierAsPrefixNameTest extends PubPackageResolutionTest {
-  test_builtInIdentifierAsPrefixName() async {
+  test_abstract() async {
     await assertErrorsInCode('''
 import 'dart:async' as abstract;
 ''', [
@@ -23,4 +23,13 @@
       error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME, 23, 8),
     ]);
   }
+
+  test_Function() async {
+    await assertErrorsInCode('''
+import 'dart:async' as Function;
+''', [
+      error(HintCode.UNUSED_IMPORT, 7, 12),
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME, 23, 8),
+    ]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart
index 71eb8e1..56dd8de 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_name_test.dart
@@ -15,7 +15,7 @@
 
 @reflectiveTest
 class BuiltInIdentifierAsTypeNameTest extends PubPackageResolutionTest {
-  test_class() async {
+  test_class_as() async {
     await assertErrorsInCode('''
 class as {}
 ''', [
@@ -23,6 +23,14 @@
     ]);
   }
 
+  test_class_Function() async {
+    await assertErrorsInCode('''
+class Function {}
+''', [
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 6, 8),
+    ]);
+  }
+
   test_enum() async {
     await assertErrorsInCode('''
 enum as {
@@ -33,7 +41,7 @@
     ]);
   }
 
-  test_mixin() async {
+  test_mixin_as() async {
     await assertErrorsInCode('''
 mixin as {}
 ''', [
@@ -41,6 +49,14 @@
     ]);
   }
 
+  test_mixin_Function() async {
+    await assertErrorsInCode('''
+mixin Function {}
+''', [
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 6, 8),
+    ]);
+  }
+
   test_mixin_OK_on() async {
     await assertNoErrorsInCode(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart
index fc7fdd3..b4f68c5 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_type_parameter_name_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class BuiltInIdentifierAsTypeParameterNameTest
     extends PubPackageResolutionTest {
-  test_class() async {
+  test_class_as() async {
     await assertErrorsInCode('''
 class A<as> {}
 ''', [
@@ -25,7 +25,16 @@
     ]);
   }
 
-  test_extension() async {
+  test_class_Function() async {
+    await assertErrorsInCode('''
+class A<Function> {}
+''', [
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, 8,
+          8),
+    ]);
+  }
+
+  test_extension_as() async {
     await assertErrorsInCode('''
 extension <as> on List {}
 ''', [
@@ -34,7 +43,7 @@
     ]);
   }
 
-  test_function() async {
+  test_function_as() async {
     await assertErrorsInCode('''
 void f<as>() {}
 ''', [
diff --git a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart
index b18076c..71cd9ee 100644
--- a/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/built_in_identifier_as_typedef_name_test.dart
@@ -35,7 +35,16 @@
     ]);
   }
 
-  test_typedef_generic() async {
+  test_typedef_classic_as() async {
+    await assertErrorsInCode(r'''
+typedef void as();
+''', [
+      error(ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD, 13, 2),
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, 13, 2),
+    ]);
+  }
+
+  test_typedef_generic_as() async {
     await assertErrorsInCode(r'''
 typedef as = void Function();
 ''', [
@@ -44,7 +53,7 @@
     ]);
   }
 
-  test_typedef_interfaceType() async {
+  test_typedef_interfaceType_as() async {
     await assertErrorsInCode(r'''
 typedef as = List<int>;
 ''', [
@@ -52,4 +61,13 @@
       error(ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD, 8, 2)
     ]);
   }
+
+  test_typedef_interfaceType_Function() async {
+    await assertErrorsInCode(r'''
+typedef Function = List<int>;
+''', [
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, 8, 8),
+      error(ParserErrorCode.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD, 8, 8)
+    ]);
+  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart
index 2e97f25..653d89a 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_extends_function_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';
@@ -28,7 +28,7 @@
 class Function {}
 class A extends Function {}
 ''', [
-      error(HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, 6, 8),
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 6, 8),
       error(HintCode.DEPRECATED_EXTENDS_FUNCTION, 34, 8),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart
deleted file mode 100644
index 6221d24..0000000
--- a/pkg/analyzer/test/src/diagnostics/deprecated_function_class_declaration_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/error/hint_codes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../dart/resolution/context_collection_resolution.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(DeprecatedFunctionClassDeclarationTest);
-  });
-}
-
-@reflectiveTest
-class DeprecatedFunctionClassDeclarationTest extends PubPackageResolutionTest {
-  test_declaration() async {
-    await assertErrorsInCode('''
-class Function {}
-''', [
-      error(HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, 6, 8),
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart
index 651e886..f9fc0d8 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_implements_function_test.dart
@@ -37,7 +37,7 @@
 class Function {}
 class A implements Function {}
 ''', [
-      error(HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, 6, 8),
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 6, 8),
     ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart
index e6fd57e..15c5b75 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_mixin_function_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';
@@ -28,7 +28,7 @@
 class Function {}
 class A extends Object with Function {}
 ''', [
-      error(HintCode.DEPRECATED_FUNCTION_CLASS_DECLARATION, 6, 8),
+      error(CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, 6, 8),
       error(HintCode.DEPRECATED_MIXIN_FUNCTION, 46, 8),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart b/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart
index 4a21c67..3ddf254 100644
--- a/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/import_of_non_library_test.dart
@@ -18,12 +18,10 @@
   test_deferred() async {
     newFile('$testPackageLibPath/lib1.dart', '''
 part of lib;
-class A {}
 ''');
     await assertErrorsInCode('''
 library lib;
 import 'lib1.dart' deferred as p;
-var a = new p.A();
 ''', [
       error(CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, 20, 11,
           messageContains: ["library 'lib1.dart' "]),
@@ -33,12 +31,10 @@
   test_part() async {
     newFile('$testPackageLibPath/part.dart', r'''
 part of lib;
-class A{}
 ''');
     await assertErrorsInCode(r'''
 library lib;
 import 'part.dart';
-A a = A();
 ''', [
       error(CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, 20, 11,
           messageContains: ["library 'part.dart' "]),
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 3f25d0f..6df5d31 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -139,8 +139,6 @@
     as definitely_unassigned_late_local_variable;
 import 'deprecated_export_use_test.dart' as deprecated_export_use;
 import 'deprecated_extends_function_test.dart' as deprecated_extends_function;
-import 'deprecated_function_class_declaration_test.dart'
-    as deprecated_function_class_declaration;
 import 'deprecated_implements_function_test.dart'
     as deprecated_implements_function;
 import 'deprecated_member_use_test.dart' as deprecated_member_use;
@@ -891,7 +889,6 @@
     definitely_unassigned_late_local_variable.main();
     deprecated_export_use.main();
     deprecated_extends_function.main();
-    deprecated_function_class_declaration.main();
     deprecated_implements_function.main();
     deprecated_member_use.main();
     deprecated_mixin_function.main();
diff --git a/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart b/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart
index 686453c..8bf563c 100644
--- a/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/uri_does_not_exist_test.dart
@@ -34,6 +34,14 @@
     ]);
   }
 
+  test_export_dart() async {
+    await assertErrorsInCode('''
+export 'dart:foo/bar.dart';
+''', [
+      error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 7, 19),
+    ]);
+  }
+
   test_import() async {
     await assertErrorsInCode('''
 import 'unknown.dart';
@@ -64,6 +72,14 @@
     ]);
   }
 
+  test_import_dart() async {
+    await assertErrorsInCode('''
+import 'dart:foo/bar.dart';
+''', [
+      error(CompileTimeErrorCode.URI_DOES_NOT_EXIST, 7, 19),
+    ]);
+  }
+
   @failingTest
   test_import_disappears_when_fixed() async {
     await assertErrorsInCode('''
diff --git a/pkg/analyzer/test/src/summary/macro/introspect_declarations_phase.dart b/pkg/analyzer/test/src/summary/macro/introspect_declarations_phase.dart
index 2682d7c..40a5d33 100644
--- a/pkg/analyzer/test/src/summary/macro/introspect_declarations_phase.dart
+++ b/pkg/analyzer/test/src/summary/macro/introspect_declarations_phase.dart
@@ -24,13 +24,14 @@
 
   @override
   Future<void> buildDeclarationsForClass(
-    ClassDeclaration declaration,
+    IntrospectableClassDeclaration declaration,
     ClassMemberDeclarationBuilder builder,
   ) async {
     final printer = _DeclarationPrinter(
       withDetailsFor: withDetailsFor.cast(),
-      classIntrospector: builder,
+      typeIntrospector: builder,
       identifierResolver: builder,
+      typeDeclarationResolver: builder,
       typeResolver: builder,
     );
     await printer.writeClassDeclaration(declaration);
@@ -47,8 +48,9 @@
 
 class _DeclarationPrinter {
   final Set<String> withDetailsFor;
-  final ClassIntrospector classIntrospector;
+  final TypeIntrospector typeIntrospector;
   final IdentifierResolver identifierResolver;
+  final TypeDeclarationResolver typeDeclarationResolver;
   final TypeResolver typeResolver;
 
   final StringBuffer _sink = StringBuffer();
@@ -58,12 +60,13 @@
 
   _DeclarationPrinter({
     required this.withDetailsFor,
-    required this.classIntrospector,
+    required this.typeIntrospector,
     required this.identifierResolver,
+    required this.typeDeclarationResolver,
     required this.typeResolver,
   });
 
-  Future<void> writeClassDeclaration(ClassDeclaration e) async {
+  Future<void> writeClassDeclaration(IntrospectableClassDeclaration e) async {
     _sink.write(_indent);
     _writeIf(e.isAbstract, 'abstract ');
     _writeIf(e.isExternal, 'external ');
@@ -75,7 +78,10 @@
     }
 
     await _withIndent(() async {
-      final superclass = await classIntrospector.superclassOf(e);
+      final superclass = e.superclass == null
+          ? null
+          : await typeDeclarationResolver.declarationOf(
+              e.superclass!.identifier) as IntrospectableClassDeclaration;
       if (superclass != null) {
         _writelnWithIndent('superclass');
         await _withIndent(() => writeClassDeclaration(superclass));
@@ -88,7 +94,7 @@
       _enclosingDeclarationIdentifier = e.identifier;
       await _writeElements<FieldDeclaration>(
         'fields',
-        await classIntrospector.fieldsOf(e),
+        await typeIntrospector.fieldsOf(e),
         _writeField,
       );
     });
diff --git a/pkg/analyzer/test/src/summary/macro_test.dart b/pkg/analyzer/test/src/summary/macro_test.dart
index b6f1d61..b6deb4c 100644
--- a/pkg/analyzer/test/src/summary/macro_test.dart
+++ b/pkg/analyzer/test/src/summary/macro_test.dart
@@ -1210,6 +1210,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_imported_interfaces() async {
     newFile('$testPackageLibPath/a.dart', r'''
 class A {}
@@ -1234,6 +1235,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_imported_isAbstract() async {
     newFile('$testPackageLibPath/a.dart', r'''
 abstract class A {}
@@ -1253,6 +1255,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_imported_mixins() async {
     newFile('$testPackageLibPath/a.dart', r'''
 mixin M1 {}
@@ -1277,6 +1280,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_imported_superclass() async {
     newFile('$testPackageLibPath/a.dart', r'''
 class A {}
@@ -1299,6 +1303,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_imported_typeParameters() async {
     newFile('$testPackageLibPath/a.dart', r'''
 class A<T, U extends List<T>> {}
@@ -1322,6 +1327,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_superclassOf() async {
     await _assertIntrospectDeclarationsText(r'''
 class A {}
@@ -1337,6 +1343,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_superclassOf_implicit() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacro
@@ -1348,6 +1355,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_ClassDeclaration_superclassOf_unresolved() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacro
@@ -1359,6 +1367,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_FieldDeclaration_isExternal() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacroX
@@ -1378,6 +1387,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_FieldDeclaration_isFinal() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacroX
@@ -1397,6 +1407,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_FieldDeclaration_isLate() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacroX
@@ -1416,6 +1427,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_FieldDeclaration_isStatic() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacroX
@@ -1435,6 +1447,7 @@
 ''');
   }
 
+  @failingTest
   test_introspect_declarations_FieldDeclaration_type_explicit() async {
     await _assertIntrospectDeclarationsText(r'''
 @introspectMacroX
diff --git a/pkg/analyzer/test/util/ast_type_matchers.dart b/pkg/analyzer/test/util/ast_type_matchers.dart
index 84567e1..9c44c92 100644
--- a/pkg/analyzer/test/util/ast_type_matchers.dart
+++ b/pkg/analyzer/test/util/ast_type_matchers.dart
@@ -228,6 +228,8 @@
 
 const isScriptTag = TypeMatcher<ScriptTag>();
 
+const isSetOrMapLiteral = TypeMatcher<SetOrMapLiteral>();
+
 const isShowCombinator = TypeMatcher<ShowCombinator>();
 
 const isSimpleFormalParameter = TypeMatcher<SimpleFormalParameter>();
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
index efcbc27..e3eb829 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -7310,8 +7310,6 @@
 
 {% prettify dart tag=pre+code %}
 part of lib;
-
-class C{}
 {% endprettify %}
 
 The following code produces this diagnostic because imported files can't
@@ -7321,8 +7319,6 @@
 library lib;
 
 import [!'part.dart'!];
-
-C c = C();
 {% endprettify %}
 
 #### Common fixes
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index 01e413d..429cb67 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -161,6 +161,9 @@
   final compilationUnit = CompilationUnit();
 
   @override
+  Uri get importUri => throw UnimplementedError();
+
+  @override
   Uri get uri => throw UnimplementedError();
 
   @override
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html
index 3427f3f..dde345f 100644
--- a/pkg/analyzer_plugin/doc/api.html
+++ b/pkg/analyzer_plugin/doc/api.html
@@ -125,7 +125,7 @@
 </p>
 <h2 class="domain"><a name="domain_plugin">plugin domain</a></h2>
   <p>
-    The plugin domain contains API’s related to the execution of a plugin.
+    The plugin domain contains API's related to the execution of a plugin.
   </p>
   <p>
     TODO: Provide notifications by which plugins can report instrumentation
@@ -265,7 +265,7 @@
       </dd></dl></dd></dl>
 <h2 class="domain"><a name="domain_analysis">analysis domain</a></h2>
   <p>
-    The analysis domain contains API’s related to the analysis of files.
+    The analysis domain contains API's related to the analysis of files.
   </p>
   
   
@@ -829,7 +829,7 @@
 
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
-    This section contains descriptions of the data types referenced in the API’s
+    This section contains descriptions of the data types referenced in the API's
     of the various domains.
   </p>
   
@@ -1308,10 +1308,10 @@
             0x01 - set if the element is explicitly or implicitly abstract
           </li>
           <li>
-            0x02 - set if the element was declared to be ‘const’
+            0x02 - set if the element was declared to be 'const'
           </li>
           <li>
-            0x04 - set if the element was declared to be ‘final’
+            0x04 - set if the element was declared to be 'final'
           </li>
           <li>
             0x08 - set if the element is a static member of a class or is a
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index 80f2449..2db1c2a 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -1241,8 +1241,8 @@
   /// A bit-map containing the following flags:
   ///
   /// - 0x01 - set if the element is explicitly or implicitly abstract
-  /// - 0x02 - set if the element was declared to be ‘const’
-  /// - 0x04 - set if the element was declared to be ‘final’
+  /// - 0x02 - set if the element was declared to be 'const'
+  /// - 0x04 - set if the element was declared to be 'final'
   /// - 0x08 - set if the element is a static member of a class or is a
   ///   top-level function or field
   /// - 0x10 - set if the element is private
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index 96bdae9..4dca7a6 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -538,10 +538,10 @@
             0x01 - set if the element is explicitly or implicitly abstract
           </li>
           <li>
-            0x02 - set if the element was declared to be ‘const’
+            0x02 - set if the element was declared to be 'const'
           </li>
           <li>
-            0x04 - set if the element was declared to be ‘final’
+            0x04 - set if the element was declared to be 'final'
           </li>
           <li>
             0x08 - set if the element is a static member of a class or is a
diff --git a/pkg/analyzer_plugin/tool/spec/from_html.dart b/pkg/analyzer_plugin/tool/spec/from_html.dart
index d5351a2..11a80fe 100644
--- a/pkg/analyzer_plugin/tool/spec/from_html.dart
+++ b/pkg/analyzer_plugin/tool/spec/from_html.dart
@@ -111,24 +111,24 @@
       if (!requiredAttributes.contains(name) &&
           !optionalAttributes.contains(name)) {
         throw Exception(
-            '$context: Unexpected attribute in ${element.localName}: $name');
+            '$context: Unexpected attribute in ${element.name}: $name');
       }
       attributesFound.add(name);
     });
     for (var expectedAttribute in requiredAttributes) {
       if (!attributesFound.contains(expectedAttribute)) {
         throw Exception(
-            '$context: ${element.localName} must contain attribute $expectedAttribute');
+            '$context: ${element.name} must contain attribute $expectedAttribute');
       }
     }
   }
 
   /// Check that the given [element] has the given [expectedName].
   void checkName(dom.Element element, String expectedName, [String? context]) {
-    if (element.localName != expectedName) {
-      context ??= element.localName;
+    if (element.name != expectedName) {
+      context ??= element.name;
       throw Exception(
-          '$context: Expected $expectedName, found ${element.localName}');
+          '$context: Expected $expectedName, found ${element.name}');
     }
   }
 
@@ -164,13 +164,12 @@
   dom.Element getAncestor(dom.Element html, String name, String context) {
     var ancestor = html.parent;
     while (ancestor != null) {
-      if (ancestor.localName == name) {
+      if (ancestor.name == name) {
         return ancestor;
       }
       ancestor = ancestor.parent;
     }
-    throw Exception(
-        '$context: <${html.localName}> must be nested within <$name>');
+    throw Exception('$context: <${html.name}> must be nested within <$name>');
   }
 
   /// Create a [Notification] object from an HTML representation such as:
@@ -295,7 +294,7 @@
     var htmlContents = file.readAsStringSync();
     var document = dom.parse(htmlContents, file.uri);
     var htmlElement = document.children
-        .singleWhere((element) => element.localName?.toLowerCase() == 'html');
+        .singleWhere((element) => element.name.toLowerCase() == 'html');
     return apiFromHtml(htmlElement);
   }
 
@@ -308,10 +307,10 @@
     }
     for (var node in parent.nodes) {
       if (node is dom.Element) {
-        if (elementProcessors.containsKey(node.localName)) {
-          elementProcessors[node.localName]!(node);
-        } else if (specialElements.contains(node.localName)) {
-          throw Exception('$context: Unexpected use of <${node.localName}>');
+        if (elementProcessors.containsKey(node.name)) {
+          elementProcessors[node.name]!(node);
+        } else if (specialElements.contains(node.name)) {
+          throw Exception('$context: Unexpected use of <${node.name}>');
         } else {
           recurse(node, context, elementProcessors);
         }
diff --git a/pkg/analyzer_plugin/tool/spec/plugin_spec.html b/pkg/analyzer_plugin/tool/spec/plugin_spec.html
index d9b11a9..e0e5927 100644
--- a/pkg/analyzer_plugin/tool/spec/plugin_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/plugin_spec.html
@@ -22,7 +22,7 @@
 </p>
 <domain name="plugin">
   <p>
-    The plugin domain contains API’s related to the execution of a plugin.
+    The plugin domain contains API's related to the execution of a plugin.
   </p>
   <p>
     TODO: Provide notifications by which plugins can report instrumentation
@@ -147,7 +147,7 @@
 </domain>
 <domain name="analysis">
   <p>
-    The analysis domain contains API’s related to the analysis of files.
+    The analysis domain contains API's related to the analysis of files.
   </p>
   <request method="getNavigation">
     <p>
@@ -874,7 +874,7 @@
 <types>
   <h2 class="domain"><a name="types">Types</a></h2>
   <p>
-    This section contains descriptions of the data types referenced in the API’s
+    This section contains descriptions of the data types referenced in the API's
     of the various domains.
   </p>
   <include path="common_types_spec.html"
diff --git a/pkg/analyzer_plugin/tool/spec/to_html.dart b/pkg/analyzer_plugin/tool/spec/to_html.dart
index 84b59f8..eb16b95 100644
--- a/pkg/analyzer_plugin/tool/spec/to_html.dart
+++ b/pkg/analyzer_plugin/tool/spec/to_html.dart
@@ -422,11 +422,11 @@
     }
     for (var node in html.nodes) {
       if (node is dom.Element) {
-        if (squashParagraphs && node.localName == 'p') {
+        if (squashParagraphs && node.name == 'p') {
           translateHtml(node, squashParagraphs: squashParagraphs);
           continue;
         }
-        switch (node.localName) {
+        switch (node.name) {
           case 'domains':
             generateDomainsHeader();
             break;
@@ -463,8 +463,8 @@
             generateIndex();
             break;
           default:
-            if (!ApiReader.specialElements.contains(node.localName)) {
-              element(node.localName!, node.attributes, () {
+            if (!ApiReader.specialElements.contains(node.name)) {
+              element(node.name, node.attributes, () {
                 translateHtml(node, squashParagraphs: squashParagraphs);
               });
             }
@@ -608,7 +608,7 @@
   void visitTypeEnumValue(TypeEnumValue typeEnumValue) {
     var isDocumented = false;
     for (var node in typeEnumValue.html?.nodes ?? []) {
-      if ((node is dom.Element && node.localName != 'code') ||
+      if ((node is dom.Element && node.name != 'code') ||
           (node is dom.Text && node.text.trim().isNotEmpty)) {
         isDocumented = true;
         break;
diff --git a/pkg/analyzer_utilities/lib/html_dom.dart b/pkg/analyzer_utilities/lib/html_dom.dart
index 64fa9b6..f08d986 100644
--- a/pkg/analyzer_utilities/lib/html_dom.dart
+++ b/pkg/analyzer_utilities/lib/html_dom.dart
@@ -18,7 +18,7 @@
 }
 
 class Element extends Node {
-  String name;
+  final String name;
 
   Map<String, String> attributes = {};
 
@@ -26,9 +26,6 @@
 
   Element.tag(this.name);
 
-  // This is for compatibility with the package:html DOM API.
-  String? get localName => name;
-
   void append(Node child) {
     child.parent = this;
     nodes.add(child);
diff --git a/pkg/analyzer_utilities/lib/text_formatter.dart b/pkg/analyzer_utilities/lib/text_formatter.dart
index ce20d49..e2efe8e 100644
--- a/pkg/analyzer_utilities/lib/text_formatter.dart
+++ b/pkg/analyzer_utilities/lib/text_formatter.dart
@@ -64,7 +64,7 @@
         }
       }
     } else if (node is dom.Element) {
-      switch (node.localName) {
+      switch (node.name) {
         case 'br':
           lineBreak(false);
           break;
@@ -83,8 +83,7 @@
           lineBreak(false);
           if (node.classes.contains('hangingIndent')) {
             resolveVerticalSpace();
-            // TODO(devoncarew): Remove a space here.
-            indentSpecial('', '        ', () {
+            indentSpecial('', '       ', () {
               addAll(node.nodes);
               lineBreak(false);
             });
@@ -144,7 +143,7 @@
         case 'head':
           break;
         default:
-          throw Exception('Unexpected HTML element: ${node.localName}');
+          throw Exception('Unexpected HTML element: ${node.name}');
       }
     } else {
       throw Exception('Unexpected HTML: $node');
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 5afa5db..e3ba5f5 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -9,7 +9,15 @@
 import 'elements/entities.dart';
 import 'js_model/closure.dart';
 import 'js_model/element_map.dart';
-import 'serialization/serialization_interfaces.dart';
+import 'serialization/serialization.dart';
+
+export 'closure_migrated.dart'
+    show
+        BoxLocal,
+        JSEntity,
+        PrivatelyNamedJSEntity,
+        ThisLocal,
+        TypeVariableLocal;
 
 /// Class that provides information for how closures are rewritten/represented
 /// to preserve Dart semantics when compiled to JavaScript. Given a particular
@@ -317,82 +325,3 @@
   // just confusing.
   bool get isClosure => false;
 }
-
-/// A local variable that contains the box object holding the [BoxFieldElement]
-/// fields.
-class BoxLocal extends Local {
-  final ClassEntity container;
-
-  BoxLocal(this.container);
-
-  @override
-  String get name => container.name;
-
-  @override
-  bool operator ==(other) {
-    return other is BoxLocal && other.container == container;
-  }
-
-  @override
-  int get hashCode => container.hashCode;
-
-  @override
-  String toString() => 'BoxLocal($name)';
-}
-
-/// A local variable used encode the direct (uncaptured) references to [this].
-class ThisLocal extends Local {
-  final ClassEntity enclosingClass;
-
-  ThisLocal(this.enclosingClass);
-
-  @override
-  String get name => 'this';
-
-  @override
-  bool operator ==(other) {
-    return other is ThisLocal && other.enclosingClass == enclosingClass;
-  }
-
-  @override
-  int get hashCode => enclosingClass.hashCode;
-}
-
-/// A type variable as a local variable.
-class TypeVariableLocal implements Local {
-  final TypeVariableEntity typeVariable;
-
-  TypeVariableLocal(this.typeVariable);
-
-  @override
-  String get name => typeVariable.name;
-
-  @override
-  int get hashCode => typeVariable.hashCode;
-
-  @override
-  bool operator ==(other) {
-    if (other is! TypeVariableLocal) return false;
-    return typeVariable == other.typeVariable;
-  }
-
-  @override
-  String toString() {
-    StringBuffer sb = StringBuffer();
-    sb.write('type_variable_local(');
-    sb.write(typeVariable);
-    sb.write(')');
-    return sb.toString();
-  }
-}
-
-///
-/// Move the below classes to a JS model eventually.
-///
-abstract class JSEntity implements MemberEntity {
-  String get declaredName;
-}
-
-abstract class PrivatelyNamedJSEntity implements JSEntity {
-  Entity get rootOfScope;
-}
diff --git a/pkg/compiler/lib/src/closure_migrated.dart b/pkg/compiler/lib/src/closure_migrated.dart
new file mode 100644
index 0000000..bc53ca9
--- /dev/null
+++ b/pkg/compiler/lib/src/closure_migrated.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'elements/entities.dart';
+
+/// A type variable as a local variable.
+class TypeVariableLocal implements Local {
+  final TypeVariableEntity typeVariable;
+
+  TypeVariableLocal(this.typeVariable);
+
+  @override
+  String? get name => typeVariable.name;
+
+  @override
+  int get hashCode => typeVariable.hashCode;
+
+  @override
+  bool operator ==(other) {
+    if (other is! TypeVariableLocal) return false;
+    return typeVariable == other.typeVariable;
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = StringBuffer();
+    sb.write('type_variable_local(');
+    sb.write(typeVariable);
+    sb.write(')');
+    return sb.toString();
+  }
+}
+
+/// A local variable used encode the direct (uncaptured) references to [this].
+class ThisLocal extends Local {
+  final ClassEntity enclosingClass;
+
+  ThisLocal(this.enclosingClass);
+
+  @override
+  String get name => 'this';
+
+  @override
+  bool operator ==(other) {
+    return other is ThisLocal && other.enclosingClass == enclosingClass;
+  }
+
+  @override
+  int get hashCode => enclosingClass.hashCode;
+}
+
+/// A local variable that contains the box object holding the [BoxFieldElement]
+/// fields.
+class BoxLocal extends Local {
+  final ClassEntity container;
+
+  BoxLocal(this.container);
+
+  @override
+  String get name => container.name;
+
+  @override
+  bool operator ==(other) {
+    return other is BoxLocal && other.container == container;
+  }
+
+  @override
+  int get hashCode => container.hashCode;
+
+  @override
+  String toString() => 'BoxLocal($name)';
+}
+
+///
+/// Move the below classes to a JS model eventually.
+///
+abstract class JSEntity implements MemberEntity {
+  String get declaredName;
+}
+
+abstract class PrivatelyNamedJSEntity implements JSEntity {
+  Entity get rootOfScope;
+}
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index 67f0c30..1d64607 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -28,7 +28,7 @@
 import '../js_model/elements.dart' show JGeneratorBody;
 import '../js_model/type_recipe.dart' show TypeRecipe;
 import '../native/behavior.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../ssa/ssa.dart';
 import '../universe/feature.dart';
 import '../universe/selector.dart';
diff --git a/pkg/compiler/lib/src/common/elements.dart b/pkg/compiler/lib/src/common/elements.dart
index 4da2a43..f6f4c84 100644
--- a/pkg/compiler/lib/src/common/elements.dart
+++ b/pkg/compiler/lib/src/common/elements.dart
@@ -9,7 +9,7 @@
 import '../elements/types.dart';
 import '../inferrer/abstract_value_domain.dart';
 import '../js_backend/native_data_interfaces.dart' show NativeBasicData;
-import '../js_model/locals_interfaces.dart';
+import '../js_model/locals.dart';
 import '../universe/selector.dart' show Selector;
 
 import 'names.dart' show Identifiers, Uris;
@@ -1466,6 +1466,6 @@
       void f(DartType type, String name, ConstantValue defaultValue));
 
   /// Calls [f] for each parameter - given as a [Local] - of [function].
-  void forEachParameterAsLocal(covariant GlobalLocalsMap globalLocalsMap,
+  void forEachParameterAsLocal(GlobalLocalsMap globalLocalsMap,
       FunctionEntity function, void f(Local parameter));
 }
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 7b61cef0..5fdd14b 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -54,8 +54,8 @@
 import 'phase/load_kernel.dart' as load_kernel;
 import 'phase/modular_analysis.dart' as modular_analysis;
 import 'resolution/enqueuer.dart';
+import 'serialization/serialization.dart';
 import 'serialization/task.dart';
-import 'serialization/serialization.dart' show DataSourceIndices;
 import 'serialization/strategies.dart';
 import 'universe/selector.dart' show Selector;
 import 'universe/codegen_world_builder.dart';
diff --git a/pkg/compiler/lib/src/deferred_load/output_unit.dart b/pkg/compiler/lib/src/deferred_load/output_unit.dart
index 360c64e..a116e6f 100644
--- a/pkg/compiler/lib/src/deferred_load/output_unit.dart
+++ b/pkg/compiler/lib/src/deferred_load/output_unit.dart
@@ -8,7 +8,7 @@
 import '../constants/values.dart'
     show ConstantValue, DeferredGlobalConstantValue;
 import '../elements/entities.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../options.dart';
 
 /// A "hunk" of the program that will be loaded whenever one of its [imports]
diff --git a/pkg/compiler/lib/src/elements/entities.dart b/pkg/compiler/lib/src/elements/entities.dart
index e55bd41..93a6851 100644
--- a/pkg/compiler/lib/src/elements/entities.dart
+++ b/pkg/compiler/lib/src/elements/entities.dart
@@ -8,7 +8,7 @@
 
 // TODO(48820): Spannable was imported from `../common.dart`.
 import '../diagnostics/spannable.dart' show Spannable;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/call_structure.dart' show CallStructure;
 import '../util/util.dart';
 import 'names.dart';
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index 47e94c1..3b9b9c6 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -5,7 +5,7 @@
 import '../common/elements.dart' show CommonElements;
 import '../common/names.dart';
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart' show equalElements, equalSets, identicalElements;
 import 'entities.dart';
 
diff --git a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
index 9856cc6..ed10dc8 100644
--- a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
+++ b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
@@ -9,7 +9,7 @@
 import '../elements/names.dart';
 import '../elements/types.dart' show DartType;
 import '../ir/class_relation.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/selector.dart';
 
 /// Enum-like values used for reporting known and unknown truth values.
diff --git a/pkg/compiler/lib/src/inferrer/engine.dart b/pkg/compiler/lib/src/inferrer/engine.dart
index 58d80d5..9e9a8d9 100644
--- a/pkg/compiler/lib/src/inferrer/engine.dart
+++ b/pkg/compiler/lib/src/inferrer/engine.dart
@@ -24,7 +24,7 @@
 import '../js_model/locals.dart';
 import '../native/behavior.dart';
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/call_structure.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
diff --git a/pkg/compiler/lib/src/inferrer/powersets/powersets.dart b/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
index b2fea8e..998b848 100644
--- a/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
+++ b/pkg/compiler/lib/src/inferrer/powersets/powersets.dart
@@ -9,7 +9,7 @@
 import '../../elements/names.dart';
 import '../../elements/types.dart' show DartType;
 import '../../ir/class_relation.dart';
-import '../../serialization/serialization_interfaces.dart';
+import '../../serialization/serialization.dart';
 import '../../universe/selector.dart';
 import '../../universe/world_builder.dart';
 import '../../universe/use.dart';
diff --git a/pkg/compiler/lib/src/inferrer/trivial.dart b/pkg/compiler/lib/src/inferrer/trivial.dart
index 2d9590b..fd2d10b 100644
--- a/pkg/compiler/lib/src/inferrer/trivial.dart
+++ b/pkg/compiler/lib/src/inferrer/trivial.dart
@@ -9,7 +9,7 @@
 import '../elements/names.dart';
 import '../elements/types.dart' show DartType;
 import '../ir/class_relation.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/selector.dart';
 import '../universe/world_builder.dart';
 import '../universe/use.dart';
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
index da421b9..cdccaa4 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
@@ -15,7 +15,7 @@
 import '../../elements/names.dart';
 import '../../elements/types.dart';
 import '../../ir/class_relation.dart';
-import '../../serialization/serialization_interfaces.dart';
+import '../../serialization/serialization.dart';
 import '../../universe/class_hierarchy.dart';
 import '../../universe/selector.dart' show Selector;
 import '../../universe/use.dart' show DynamicUse;
diff --git a/pkg/compiler/lib/src/inferrer/types.dart b/pkg/compiler/lib/src/inferrer/types.dart
index c36483f..8705fb2 100644
--- a/pkg/compiler/lib/src/inferrer/types.dart
+++ b/pkg/compiler/lib/src/inferrer/types.dart
@@ -20,7 +20,7 @@
 import '../js_model/js_world.dart';
 import '../js_model/locals.dart';
 import '../serialization/deferrable.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show JClosedWorld;
 import 'abstract_value_domain.dart';
diff --git a/pkg/compiler/lib/src/inferrer/wrapped.dart b/pkg/compiler/lib/src/inferrer/wrapped.dart
index 21a7473..21717cb 100644
--- a/pkg/compiler/lib/src/inferrer/wrapped.dart
+++ b/pkg/compiler/lib/src/inferrer/wrapped.dart
@@ -9,7 +9,7 @@
 import '../elements/names.dart';
 import '../elements/types.dart' show DartType;
 import '../ir/class_relation.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/selector.dart';
 import '../universe/world_builder.dart';
 import '../universe/use.dart';
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 08b07ae..1270cab 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -11,7 +11,7 @@
 import '../js/js.dart' as js;
 import '../js/js_debug.dart';
 import '../js/js_source_mapping.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart';
 import 'code_output.dart' show BufferedCodeOutput;
 import 'source_information.dart';
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index bbf7969..740d829 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -8,7 +8,7 @@
 import '../common.dart';
 import '../elements/entities.dart';
 import '../js/js.dart' show JavaScriptNodeSourceInformation;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/call_structure.dart';
 import 'source_file.dart';
 import 'position_information.dart';
diff --git a/pkg/compiler/lib/src/ir/impact.dart b/pkg/compiler/lib/src/ir/impact.dart
index 08df41c..e1e7473 100644
--- a/pkg/compiler/lib/src/ir/impact.dart
+++ b/pkg/compiler/lib/src/ir/impact.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.10
-
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/type_environment.dart' as ir;
 
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import 'class_relation.dart';
 import 'constants.dart';
-import 'impact_data.dart';
+import 'impact_data.dart' show ImpactData;
 import 'runtime_type_analysis.dart';
 import 'static_type.dart';
 import 'static_type_cache.dart';
@@ -34,22 +32,22 @@
   void registerNullLiteral();
 
   void registerListLiteral(ir.DartType elementType,
-      {bool isConst, bool isEmpty});
+      {required bool isConst, required bool isEmpty});
 
   void registerSetLiteral(ir.DartType elementType,
-      {bool isConst, bool isEmpty});
+      {required bool isConst, required bool isEmpty});
 
   void registerMapLiteral(ir.DartType keyType, ir.DartType valueType,
-      {bool isConst, bool isEmpty});
+      {required bool isConst, required bool isEmpty});
 
   void registerStaticTearOff(
-      ir.Procedure procedure, ir.LibraryDependency import);
+      ir.Procedure procedure, ir.LibraryDependency? import);
 
-  void registerStaticGet(ir.Member member, ir.LibraryDependency import);
+  void registerStaticGet(ir.Member member, ir.LibraryDependency? import);
 
-  void registerStaticSet(ir.Member member, ir.LibraryDependency import);
+  void registerStaticSet(ir.Member member, ir.LibraryDependency? import);
 
-  void registerAssert({bool withMessage});
+  void registerAssert({required bool withMessage});
 
   void registerGenericInstantiation(
       ir.FunctionType expressionType, List<ir.DartType> typeArguments);
@@ -86,7 +84,7 @@
 
   void registerCatchType(ir.DartType type);
 
-  void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import);
+  void registerTypeLiteral(ir.DartType type, ir.LibraryDependency? import);
 
   void registerFieldInitialization(ir.Field node);
 
@@ -111,18 +109,18 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments,
-      ir.LibraryDependency import,
-      {bool isConst});
+      ir.LibraryDependency? import,
+      {required bool isConst});
 
   void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
-      ir.LibraryDependency import);
+      ir.LibraryDependency? import);
 
   void registerStaticInvocation(
       ir.Procedure target,
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments,
-      ir.LibraryDependency import);
+      ir.LibraryDependency? import);
 
   void registerLocalFunctionInvocation(
       ir.FunctionDeclaration localFunction,
@@ -179,7 +177,7 @@
       List<ir.DartType> typeArguments);
 
   void registerRuntimeTypeUse(RuntimeTypeUseKind kind, ir.DartType receiverType,
-      ir.DartType argumentType);
+      ir.DartType? argumentType);
 
   void registerConstructorNode(ir.Constructor node);
   void registerFieldNode(ir.Field node);
@@ -194,7 +192,7 @@
 
   final ir.Member node;
   final ImpactData impactData;
-  final Map<ir.Expression, TypeMap> typeMapsForTesting;
+  final Map<ir.Expression, TypeMap>? typeMapsForTesting;
   final StaticTypeCache cachedStaticTypes;
 
   ImpactBuilderData(this.node, this.impactData, this.typeMapsForTesting,
@@ -220,7 +218,7 @@
 
 class ConstantImpactVisitor extends ir.VisitOnceConstantVisitor {
   final ImpactRegistry registry;
-  final ir.LibraryDependency import;
+  final ir.LibraryDependency? import;
   final ir.ConstantExpression expression;
   final ir.StaticTypeContext staticTypeContext;
 
@@ -252,7 +250,8 @@
   @override
   void visitInstantiationConstant(ir.InstantiationConstant node) {
     registry.registerGenericInstantiation(
-        node.tearOffConstant.getType(staticTypeContext), node.types);
+        node.tearOffConstant.getType(staticTypeContext) as ir.FunctionType,
+        node.types);
     visitConstant(node.tearOffConstant);
   }
 
diff --git a/pkg/compiler/lib/src/ir/impact_data.dart b/pkg/compiler/lib/src/ir/impact_data.dart
index 8453739..9df399e 100644
--- a/pkg/compiler/lib/src/ir/impact_data.dart
+++ b/pkg/compiler/lib/src/ir/impact_data.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.
 
-// @dart = 2.10
-
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/class_hierarchy.dart' as ir;
 import 'package:kernel/type_environment.dart' as ir;
@@ -13,9 +11,10 @@
 import '../elements/entities.dart';
 import '../elements/types.dart';
 import '../ir/scope.dart';
-import '../kernel/element_map.dart' show KernelToElementMap;
+import '../kernel/element_map_interfaces.dart'
+    show KernelToElementMapForImpactData;
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/enumset.dart';
 import 'class_relation.dart';
 import 'constants.dart';
@@ -27,7 +26,7 @@
 /// Visitor that builds an [ImpactData] object for the world impact.
 class ImpactBuilder extends StaticTypeVisitor implements ImpactRegistry {
   final ImpactData _data = ImpactData();
-  final KernelToElementMap _elementMap;
+  final KernelToElementMapForImpactData _elementMap;
 
   @override
   final VariableScopeModel variableScopeModel;
@@ -134,8 +133,8 @@
 
   @override
   void handleStaticTearOff(
-      ir.Expression node, ir.Member target, ir.DartType resultType) {
-    assert(target is ir.Procedure && target.kind == ir.ProcedureKind.Method,
+      ir.Expression node, ir.Procedure target, ir.DartType resultType) {
+    assert(target.kind == ir.ProcedureKind.Method,
         "Static get registered as static tear off: $node");
     registerStaticTearOff(target, getDeferredImport(node));
   }
@@ -398,7 +397,7 @@
       // instantiated as int and String.
       registerNew(
           node.target,
-          ir.InterfaceType(node.target.enclosingClass,
+          ir.InterfaceType(node.target.enclosingClass!,
               node.target.enclosingLibrary.nonNullable, typeArguments),
           positionArguments,
           namedArguments,
@@ -521,7 +520,7 @@
   void handleSuperMethodInvocation(ir.SuperMethodInvocation node,
       ArgumentTypes argumentTypes, ir.DartType returnType) {
     registerSuperInvocation(
-        getEffectiveSuperTarget(node.interfaceTarget),
+        getEffectiveSuperTarget(node.interfaceTarget)!,
         node.arguments.positional.length,
         _getNamedArguments(node.arguments),
         node.arguments.types);
@@ -530,19 +529,19 @@
   @override
   void handleSuperPropertyGet(
       ir.SuperPropertyGet node, ir.DartType resultType) {
-    registerSuperGet(getEffectiveSuperTarget(node.interfaceTarget));
+    registerSuperGet(getEffectiveSuperTarget(node.interfaceTarget)!);
   }
 
   @override
   void handleSuperPropertySet(ir.SuperPropertySet node, ir.DartType valueType) {
-    registerSuperSet(getEffectiveSuperTarget(node.interfaceTarget));
+    registerSuperSet(getEffectiveSuperTarget(node.interfaceTarget)!);
   }
 
   @override
   void handleSuperInitializer(
       ir.SuperInitializer node, ArgumentTypes argumentTypes) {
     registerSuperInitializer(
-        node.parent,
+        node.parent as ir.Constructor,
         node.target,
         node.arguments.positional.length,
         _getNamedArguments(node.arguments),
@@ -557,7 +556,7 @@
 
   @override
   void handleRuntimeTypeUse(ir.Expression node, RuntimeTypeUseKind kind,
-      ir.DartType receiverType, ir.DartType argumentType) {
+      ir.DartType receiverType, ir.DartType? argumentType) {
     if (_options.omitImplicitChecks) {
       switch (kind) {
         case RuntimeTypeUseKind.string:
@@ -582,19 +581,17 @@
     if (node.constant is ir.UnevaluatedConstant) {
       _elementMap.constantEvaluator.evaluate(staticTypeContext, node);
     }
-    ir.LibraryDependency import = getDeferredImport(node);
+    ir.LibraryDependency? import = getDeferredImport(node);
     ConstantImpactVisitor(this, import, node, staticTypeContext)
         .visitConstant(node.constant);
   }
 
   void _registerFeature(_Feature feature) {
-    _data._features ??= EnumSet<_Feature>();
-    _data._features.add(feature);
+    (_data._features ??= EnumSet<_Feature>()).add(feature);
   }
 
   void _registerTypeUse(ir.DartType type, _TypeUseKind kind) {
-    _data._typeUses ??= [];
-    _data._typeUses.add(_TypeUse(type, kind));
+    (_data._typeUses ??= []).add(_TypeUse(type, kind));
   }
 
   @override
@@ -604,57 +601,55 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    _data._superInitializers ??= [];
-    _data._superInitializers.add(_SuperInitializer(source, target,
-        _CallStructure(positionalArguments, namedArguments, typeArguments)));
+    (_data._superInitializers ??= []).add(
+      _SuperInitializer(source, target,
+          _CallStructure(positionalArguments, namedArguments, typeArguments)),
+    );
   }
 
   @override
   void registerSuperSet(ir.Member target) {
-    _data._superSets ??= [];
-    _data._superSets.add(target);
+    (_data._superSets ??= []).add(target);
   }
 
   @override
   void registerSuperGet(ir.Member target) {
-    _data._superGets ??= [];
-    _data._superGets.add(target);
+    (_data._superGets ??= []).add(target);
   }
 
   @override
   void registerSuperInvocation(ir.Member target, int positionalArguments,
       List<String> namedArguments, List<ir.DartType> typeArguments) {
-    _data._superInvocations ??= [];
-    _data._superInvocations.add(_SuperInvocation(target,
+    (_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(_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(_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(_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(_DynamicAccess(receiverType, relation, name));
+    (_data._dynamicGets ??= [])
+        .add(_DynamicAccess(receiverType, relation, name));
   }
 
   @override
@@ -663,8 +658,7 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    _data._functionInvocations ??= [];
-    _data._functionInvocations.add(_FunctionInvocation(receiverType,
+    (_data._functionInvocations ??= []).add(_FunctionInvocation(receiverType,
         _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
@@ -676,8 +670,7 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    _data._instanceInvocations ??= [];
-    _data._instanceInvocations.add(_InstanceInvocation(
+    (_data._instanceInvocations ??= []).add(_InstanceInvocation(
         receiverType,
         relation,
         target,
@@ -692,8 +685,7 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    _data._dynamicInvocations ??= [];
-    _data._dynamicInvocations.add(_DynamicInvocation(
+    (_data._dynamicInvocations ??= []).add(_DynamicInvocation(
         receiverType,
         relation,
         name,
@@ -706,8 +698,8 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    _data._localFunctionInvocations ??= [];
-    _data._localFunctionInvocations.add(_LocalFunctionInvocation(localFunction,
+    (_data._localFunctionInvocations ??= []).add(_LocalFunctionInvocation(
+        localFunction,
         _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
@@ -717,9 +709,8 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments,
-      ir.LibraryDependency import) {
-    _data._staticInvocations ??= [];
-    _data._staticInvocations.add(_StaticInvocation(
+      ir.LibraryDependency? import) {
+    (_data._staticInvocations ??= []).add(_StaticInvocation(
         target,
         _CallStructure(positionalArguments, namedArguments, typeArguments),
         import));
@@ -732,10 +723,9 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments,
-      ir.LibraryDependency import,
-      {bool isConst}) {
-    _data._constructorInvocations ??= [];
-    _data._constructorInvocations.add(_ConstructorInvocation(
+      ir.LibraryDependency? import,
+      {required bool isConst}) {
+    (_data._constructorInvocations ??= []).add(_ConstructorInvocation(
         constructor,
         type,
         _CallStructure(positionalArguments, namedArguments, typeArguments),
@@ -745,9 +735,8 @@
 
   @override
   void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
-      ir.LibraryDependency import) {
-    _data._constInstantiations ??= [];
-    _data._constInstantiations
+      ir.LibraryDependency? import) {
+    (_data._constInstantiations ??= [])
         .add(_ConstInstantiation(cls, typeArguments, import));
   }
 
@@ -767,8 +756,8 @@
       int positionalArguments,
       List<String> namedArguments,
       List<ir.DartType> typeArguments) {
-    _data._redirectingInitializers ??= [];
-    _data._redirectingInitializers.add(_RedirectingInitializer(constructor,
+    (_data._redirectingInitializers ??= []).add(_RedirectingInitializer(
+        constructor,
         _CallStructure(positionalArguments, namedArguments, typeArguments)));
   }
 
@@ -779,21 +768,20 @@
 
   @override
   void registerFieldInitialization(ir.Field node) {
-    _data._fieldInitializers ??= [];
-    _data._fieldInitializers.add(node);
+    (_data._fieldInitializers ??= []).add(node);
   }
 
   @override
   void registerFieldConstantInitialization(
       ir.Field node, ConstantReference constant) {
-    _data._fieldConstantInitializers ??= {};
-    _data._fieldConstantInitializers.putIfAbsent(node, () => []).add(constant);
+    (_data._fieldConstantInitializers ??= {})
+        .putIfAbsent(node, () => [])
+        .add(constant);
   }
 
   @override
-  void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import) {
-    _data._typeLiterals ??= [];
-    _data._typeLiterals.add(_TypeLiteral(type, import));
+  void registerTypeLiteral(ir.DartType type, ir.LibraryDependency? import) {
+    (_data._typeLiterals ??= []).add(_TypeLiteral(type, import));
   }
 
   @override
@@ -814,8 +802,7 @@
   @override
   void registerAsyncForIn(ir.DartType iterableType, ir.DartType iteratorType,
       ClassRelation iteratorClassRelation) {
-    _data._forInData ??= [];
-    _data._forInData.add(_ForInData(
+    (_data._forInData ??= []).add(_ForInData(
         iterableType, iteratorType, iteratorClassRelation,
         isAsync: true));
   }
@@ -823,8 +810,7 @@
   @override
   void registerSyncForIn(ir.DartType iterableType, ir.DartType iteratorType,
       ClassRelation iteratorClassRelation) {
-    _data._forInData ??= [];
-    _data._forInData.add(_ForInData(
+    (_data._forInData ??= []).add(_ForInData(
         iterableType, iteratorType, iteratorClassRelation,
         isAsync: false));
   }
@@ -856,8 +842,7 @@
 
   @override
   void registerLocalFunction(ir.TreeNode node) {
-    _data._localFunctions ??= [];
-    _data._localFunctions.add(node);
+    (_data._localFunctions ??= []).add(node);
   }
 
   @override
@@ -883,58 +868,51 @@
   @override
   void registerGenericInstantiation(
       ir.FunctionType expressionType, List<ir.DartType> typeArguments) {
-    _data._genericInstantiations ??= [];
-    _data._genericInstantiations
+    (_data._genericInstantiations ??= [])
         .add(_GenericInstantiation(expressionType, typeArguments));
   }
 
   @override
-  void registerAssert({bool withMessage}) {
+  void registerAssert({required bool withMessage}) {
     _registerFeature(withMessage
         ? _Feature.assertWithMessage
         : _Feature.assertWithoutMessage);
   }
 
   @override
-  void registerStaticSet(ir.Member member, ir.LibraryDependency import) {
-    _data._staticSets ??= [];
-    _data._staticSets.add(_StaticAccess(member, import));
+  void registerStaticSet(ir.Member member, ir.LibraryDependency? import) {
+    (_data._staticSets ??= []).add(_StaticAccess(member, import));
   }
 
   @override
-  void registerStaticGet(ir.Member member, ir.LibraryDependency import) {
-    _data._staticGets ??= [];
-    _data._staticGets.add(_StaticAccess(member, import));
+  void registerStaticGet(ir.Member member, ir.LibraryDependency? import) {
+    (_data._staticGets ??= []).add(_StaticAccess(member, import));
   }
 
   @override
   void registerStaticTearOff(
-      ir.Procedure procedure, ir.LibraryDependency import) {
-    _data._staticTearOffs ??= [];
-    _data._staticTearOffs.add(_StaticAccess(procedure, import));
+      ir.Procedure procedure, ir.LibraryDependency? 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(
+      {required bool isConst, required bool isEmpty}) {
+    (_data._mapLiterals ??= []).add(
         _MapLiteral(keyType, valueType, isConst: isConst, isEmpty: isEmpty));
   }
 
   @override
   void registerListLiteral(ir.DartType elementType,
-      {bool isConst, bool isEmpty}) {
-    _data._listLiterals ??= [];
-    _data._listLiterals.add(
+      {required bool isConst, required bool isEmpty}) {
+    (_data._listLiterals ??= []).add(
         _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty));
   }
 
   @override
   void registerSetLiteral(ir.DartType elementType,
-      {bool isConst, bool isEmpty}) {
-    _data._setLiterals ??= [];
-    _data._setLiterals.add(
+      {required bool isConst, required bool isEmpty}) {
+    (_data._setLiterals ??= []).add(
         _ContainerLiteral(elementType, isConst: isConst, isEmpty: isEmpty));
   }
 
@@ -945,70 +923,59 @@
 
   @override
   void registerSymbolLiteral(String value) {
-    _data._symbolLiterals ??= {};
-    _data._symbolLiterals.add(value);
+    (_data._symbolLiterals ??= {}).add(value);
   }
 
   @override
   void registerStringLiteral(String value) {
-    _data._stringLiterals ??= {};
-    _data._stringLiterals.add(value);
+    (_data._stringLiterals ??= {}).add(value);
   }
 
   @override
   void registerBoolLiteral(bool value) {
-    _data._boolLiterals ??= {};
-    _data._boolLiterals.add(value);
+    (_data._boolLiterals ??= {}).add(value);
   }
 
   @override
   void registerDoubleLiteral(double value) {
-    _data._doubleLiterals ??= {};
-    _data._doubleLiterals.add(value);
+    (_data._doubleLiterals ??= {}).add(value);
   }
 
   @override
   void registerIntLiteral(int value) {
-    _data._intLiterals ??= {};
-    _data._intLiterals.add(value);
+    (_data._intLiterals ??= {}).add(value);
   }
 
   @override
   void registerRuntimeTypeUse(RuntimeTypeUseKind kind, ir.DartType receiverType,
-      ir.DartType argumentType) {
-    _data._runtimeTypeUses ??= [];
-    _data._runtimeTypeUses
+      ir.DartType? argumentType) {
+    (_data._runtimeTypeUses ??= [])
         .add(_RuntimeTypeUse(kind, receiverType, argumentType));
   }
 
   @override
   void registerConstructorNode(ir.Constructor node) {
-    _data._constructorNodes ??= [];
-    _data._constructorNodes.add(node);
+    (_data._constructorNodes ??= []).add(node);
   }
 
   @override
   void registerFieldNode(ir.Field node) {
-    _data._fieldNodes ??= [];
-    _data._fieldNodes.add(node);
+    (_data._fieldNodes ??= []).add(node);
   }
 
   @override
   void registerProcedureNode(ir.Procedure node) {
-    _data._procedureNodes ??= [];
-    _data._procedureNodes.add(node);
+    (_data._procedureNodes ??= []).add(node);
   }
 
   @override
   void registerStaticInvocationNode(ir.StaticInvocation node) {
-    _data._staticInvocationNodes ??= [];
-    _data._staticInvocationNodes.add(node);
+    (_data._staticInvocationNodes ??= []).add(node);
   }
 
   @override
   void registerSwitchStatementNode(ir.SwitchStatement node) {
-    _data._switchStatementNodes ??= [];
-    _data._switchStatementNodes.add(node);
+    (_data._switchStatementNodes ??= []).add(node);
   }
 
   @override
@@ -1024,49 +991,49 @@
 class ImpactData {
   static const String tag = 'ImpactData';
 
-  List<_SuperInitializer> _superInitializers;
-  List<ir.Member> _superSets;
-  List<ir.Member> _superGets;
-  List<_SuperInvocation> _superInvocations;
-  List<_InstanceAccess> _instanceSets;
-  List<_DynamicAccess> _dynamicSets;
-  List<_InstanceAccess> _instanceGets;
-  List<_DynamicAccess> _dynamicGets;
-  List<_FunctionInvocation> _functionInvocations;
-  List<_InstanceInvocation> _instanceInvocations;
-  List<_DynamicInvocation> _dynamicInvocations;
-  List<_LocalFunctionInvocation> _localFunctionInvocations;
-  List<_StaticInvocation> _staticInvocations;
-  List<_ConstructorInvocation> _constructorInvocations;
-  List<_ConstInstantiation> _constInstantiations;
-  EnumSet<_Feature> _features;
-  List<_TypeUse> _typeUses;
-  List<_RedirectingInitializer> _redirectingInitializers;
-  List<ir.Field> _fieldInitializers;
-  Map<ir.Field, List<ConstantReference>> _fieldConstantInitializers;
-  List<_TypeLiteral> _typeLiterals;
-  List<ir.TreeNode> _localFunctions;
-  List<_GenericInstantiation> _genericInstantiations;
-  List<_StaticAccess> _staticSets;
-  List<_StaticAccess> _staticGets;
-  List<_StaticAccess> _staticTearOffs;
-  List<_MapLiteral> _mapLiterals;
-  List<_ContainerLiteral> _listLiterals;
-  List<_ContainerLiteral> _setLiterals;
-  Set<String> _symbolLiterals;
-  Set<String> _stringLiterals;
-  Set<bool> _boolLiterals;
-  Set<double> _doubleLiterals;
-  Set<int> _intLiterals;
-  List<_RuntimeTypeUse> _runtimeTypeUses;
-  List<_ForInData> _forInData;
+  List<_SuperInitializer>? _superInitializers;
+  List<ir.Member>? _superSets;
+  List<ir.Member>? _superGets;
+  List<_SuperInvocation>? _superInvocations;
+  List<_InstanceAccess>? _instanceSets;
+  List<_DynamicAccess>? _dynamicSets;
+  List<_InstanceAccess>? _instanceGets;
+  List<_DynamicAccess>? _dynamicGets;
+  List<_FunctionInvocation>? _functionInvocations;
+  List<_InstanceInvocation>? _instanceInvocations;
+  List<_DynamicInvocation>? _dynamicInvocations;
+  List<_LocalFunctionInvocation>? _localFunctionInvocations;
+  List<_StaticInvocation>? _staticInvocations;
+  List<_ConstructorInvocation>? _constructorInvocations;
+  List<_ConstInstantiation>? _constInstantiations;
+  EnumSet<_Feature>? _features;
+  List<_TypeUse>? _typeUses;
+  List<_RedirectingInitializer>? _redirectingInitializers;
+  List<ir.Field>? _fieldInitializers;
+  Map<ir.Field, List<ConstantReference>>? _fieldConstantInitializers;
+  List<_TypeLiteral>? _typeLiterals;
+  List<ir.TreeNode>? _localFunctions;
+  List<_GenericInstantiation>? _genericInstantiations;
+  List<_StaticAccess>? _staticSets;
+  List<_StaticAccess>? _staticGets;
+  List<_StaticAccess>? _staticTearOffs;
+  List<_MapLiteral>? _mapLiterals;
+  List<_ContainerLiteral>? _listLiterals;
+  List<_ContainerLiteral>? _setLiterals;
+  Set<String>? _symbolLiterals;
+  Set<String>? _stringLiterals;
+  Set<bool>? _boolLiterals;
+  Set<double>? _doubleLiterals;
+  Set<int>? _intLiterals;
+  List<_RuntimeTypeUse>? _runtimeTypeUses;
+  List<_ForInData>? _forInData;
 
   // TODO(johnniwinther): Remove these when CFE provides constants.
-  List<ir.Constructor> _constructorNodes;
-  List<ir.Field> _fieldNodes;
-  List<ir.Procedure> _procedureNodes;
-  List<ir.SwitchStatement> _switchStatementNodes;
-  List<ir.StaticInvocation> _staticInvocationNodes;
+  List<ir.Constructor>? _constructorNodes;
+  List<ir.Field>? _fieldNodes;
+  List<ir.Procedure>? _procedureNodes;
+  List<ir.SwitchStatement>? _switchStatementNodes;
+  List<ir.StaticInvocation>? _staticInvocationNodes;
   bool _hasConstSymbolConstructorInvocation = false;
 
   ImpactData();
@@ -1231,7 +1198,7 @@
   /// Registers the impact data with [registry].
   void apply(ImpactRegistry registry) {
     if (_superInitializers != null) {
-      for (_SuperInitializer data in _superInitializers) {
+      for (_SuperInitializer data in _superInitializers!) {
         registry.registerSuperInitializer(
             data.source,
             data.target,
@@ -1241,17 +1208,17 @@
       }
     }
     if (_superSets != null) {
-      for (ir.Member data in _superSets) {
+      for (ir.Member data in _superSets!) {
         registry.registerSuperSet(data);
       }
     }
     if (_superGets != null) {
-      for (ir.Member data in _superGets) {
+      for (ir.Member data in _superGets!) {
         registry.registerSuperGet(data);
       }
     }
     if (_superInvocations != null) {
-      for (_SuperInvocation data in _superInvocations) {
+      for (_SuperInvocation data in _superInvocations!) {
         registry.registerSuperInvocation(
             data.target,
             data.callStructure.positionalArguments,
@@ -1260,31 +1227,31 @@
       }
     }
     if (_instanceSets != null) {
-      for (_InstanceAccess data in _instanceSets) {
+      for (_InstanceAccess data in _instanceSets!) {
         registry.registerInstanceSet(
             data.receiverType, data.classRelation, data.target);
       }
     }
     if (_dynamicSets != null) {
-      for (_DynamicAccess data in _dynamicSets) {
+      for (_DynamicAccess data in _dynamicSets!) {
         registry.registerDynamicSet(
             data.receiverType, data.classRelation, data.name);
       }
     }
     if (_instanceGets != null) {
-      for (_InstanceAccess data in _instanceGets) {
+      for (_InstanceAccess data in _instanceGets!) {
         registry.registerInstanceGet(
             data.receiverType, data.classRelation, data.target);
       }
     }
     if (_dynamicGets != null) {
-      for (_DynamicAccess data in _dynamicGets) {
+      for (_DynamicAccess data in _dynamicGets!) {
         registry.registerDynamicGet(
             data.receiverType, data.classRelation, data.name);
       }
     }
     if (_functionInvocations != null) {
-      for (_FunctionInvocation data in _functionInvocations) {
+      for (_FunctionInvocation data in _functionInvocations!) {
         registry.registerFunctionInvocation(
             data.receiverType,
             data.callStructure.positionalArguments,
@@ -1293,7 +1260,7 @@
       }
     }
     if (_instanceInvocations != null) {
-      for (_InstanceInvocation data in _instanceInvocations) {
+      for (_InstanceInvocation data in _instanceInvocations!) {
         registry.registerInstanceInvocation(
             data.receiverType,
             data.classRelation,
@@ -1304,7 +1271,7 @@
       }
     }
     if (_dynamicInvocations != null) {
-      for (_DynamicInvocation data in _dynamicInvocations) {
+      for (_DynamicInvocation data in _dynamicInvocations!) {
         registry.registerDynamicInvocation(
             data.receiverType,
             data.classRelation,
@@ -1315,7 +1282,7 @@
       }
     }
     if (_localFunctionInvocations != null) {
-      for (_LocalFunctionInvocation data in _localFunctionInvocations) {
+      for (_LocalFunctionInvocation data in _localFunctionInvocations!) {
         registry.registerLocalFunctionInvocation(
             data.localFunction,
             data.callStructure.positionalArguments,
@@ -1324,7 +1291,7 @@
       }
     }
     if (_staticInvocations != null) {
-      for (_StaticInvocation data in _staticInvocations) {
+      for (_StaticInvocation data in _staticInvocations!) {
         registry.registerStaticInvocation(
             data.target,
             data.callStructure.positionalArguments,
@@ -1335,7 +1302,7 @@
       }
     }
     if (_constructorInvocations != null) {
-      for (_ConstructorInvocation data in _constructorInvocations) {
+      for (_ConstructorInvocation data in _constructorInvocations!) {
         registry.registerNew(
             data.constructor,
             data.type,
@@ -1347,13 +1314,13 @@
       }
     }
     if (_constInstantiations != null) {
-      for (_ConstInstantiation data in _constInstantiations) {
+      for (_ConstInstantiation data in _constInstantiations!) {
         registry.registerConstInstantiation(
             data.cls, data.typeArguments, data.import);
       }
     }
     if (_features != null) {
-      for (_Feature data in _features.iterable(_Feature.values)) {
+      for (_Feature data in _features!.iterable(_Feature.values)) {
         switch (data) {
           case _Feature.lazyField:
             registry.registerLazyField();
@@ -1389,7 +1356,7 @@
       }
     }
     if (_typeUses != null) {
-      for (_TypeUse data in _typeUses) {
+      for (_TypeUse data in _typeUses!) {
         switch (data.kind) {
           case _TypeUseKind.parameterCheck:
             registry.registerParameterCheck(data.type);
@@ -1419,7 +1386,7 @@
       }
     }
     if (_redirectingInitializers != null) {
-      for (_RedirectingInitializer data in _redirectingInitializers) {
+      for (_RedirectingInitializer data in _redirectingInitializers!) {
         registry.registerRedirectingInitializer(
             data.constructor,
             data.callStructure.positionalArguments,
@@ -1428,12 +1395,12 @@
       }
     }
     if (_fieldInitializers != null) {
-      for (ir.Field data in _fieldInitializers) {
+      for (ir.Field data in _fieldInitializers!) {
         registry.registerFieldInitialization(data);
       }
     }
     if (_fieldConstantInitializers != null) {
-      _fieldConstantInitializers
+      _fieldConstantInitializers!
           .forEach((ir.Field field, List<ConstantReference> constants) {
         for (ConstantReference constant in constants) {
           registry.registerFieldConstantInitialization(field, constant);
@@ -1441,87 +1408,88 @@
       });
     }
     if (_typeLiterals != null) {
-      for (_TypeLiteral data in _typeLiterals) {
+      for (_TypeLiteral data in _typeLiterals!) {
         registry.registerTypeLiteral(data.type, data.import);
       }
     }
     if (_localFunctions != null) {
-      for (ir.TreeNode data in _localFunctions) {
+      for (ir.TreeNode data in _localFunctions!) {
         registry.registerLocalFunction(data);
       }
     }
     if (_genericInstantiations != null) {
-      for (_GenericInstantiation data in _genericInstantiations) {
+      for (_GenericInstantiation data in _genericInstantiations!) {
         registry.registerGenericInstantiation(
             data.expressionType, data.typeArguments);
       }
     }
     if (_staticSets != null) {
-      for (_StaticAccess data in _staticSets) {
+      for (_StaticAccess data in _staticSets!) {
         registry.registerStaticSet(data.target, data.import);
       }
     }
     if (_staticGets != null) {
-      for (_StaticAccess data in _staticGets) {
+      for (_StaticAccess data in _staticGets!) {
         registry.registerStaticGet(data.target, data.import);
       }
     }
     if (_staticTearOffs != null) {
-      for (_StaticAccess data in _staticTearOffs) {
-        registry.registerStaticTearOff(data.target, data.import);
+      for (_StaticAccess data in _staticTearOffs!) {
+        registry.registerStaticTearOff(
+            data.target as ir.Procedure, data.import);
       }
     }
     if (_mapLiterals != null) {
-      for (_MapLiteral data in _mapLiterals) {
+      for (_MapLiteral data in _mapLiterals!) {
         registry.registerMapLiteral(data.keyType, data.valueType,
             isConst: data.isConst, isEmpty: data.isEmpty);
       }
     }
     if (_listLiterals != null) {
-      for (_ContainerLiteral data in _listLiterals) {
+      for (_ContainerLiteral data in _listLiterals!) {
         registry.registerListLiteral(data.elementType,
             isConst: data.isConst, isEmpty: data.isEmpty);
       }
     }
     if (_setLiterals != null) {
-      for (_ContainerLiteral data in _setLiterals) {
+      for (_ContainerLiteral data in _setLiterals!) {
         registry.registerSetLiteral(data.elementType,
             isConst: data.isConst, isEmpty: data.isEmpty);
       }
     }
     if (_symbolLiterals != null) {
-      for (String data in _symbolLiterals) {
+      for (String data in _symbolLiterals!) {
         registry.registerSymbolLiteral(data);
       }
     }
     if (_stringLiterals != null) {
-      for (String data in _stringLiterals) {
+      for (String data in _stringLiterals!) {
         registry.registerStringLiteral(data);
       }
     }
     if (_boolLiterals != null) {
-      for (bool data in _boolLiterals) {
+      for (bool data in _boolLiterals!) {
         registry.registerBoolLiteral(data);
       }
     }
     if (_doubleLiterals != null) {
-      for (double data in _doubleLiterals) {
+      for (double data in _doubleLiterals!) {
         registry.registerDoubleLiteral(data);
       }
     }
     if (_intLiterals != null) {
-      for (int data in _intLiterals) {
+      for (int data in _intLiterals!) {
         registry.registerIntLiteral(data);
       }
     }
     if (_runtimeTypeUses != null) {
-      for (_RuntimeTypeUse data in _runtimeTypeUses) {
+      for (_RuntimeTypeUse data in _runtimeTypeUses!) {
         registry.registerRuntimeTypeUse(
             data.kind, data.receiverType, data.argumentType);
       }
     }
     if (_forInData != null) {
-      for (_ForInData data in _forInData) {
+      for (_ForInData data in _forInData!) {
         if (data.isAsync) {
           registry.registerAsyncForIn(
               data.iterableType, data.iteratorType, data.iteratorClassRelation);
@@ -1534,27 +1502,27 @@
 
     // TODO(johnniwinther): Remove these when CFE provides constants.
     if (_constructorNodes != null) {
-      for (ir.Constructor data in _constructorNodes) {
+      for (ir.Constructor data in _constructorNodes!) {
         registry.registerConstructorNode(data);
       }
     }
     if (_fieldNodes != null) {
-      for (ir.Field data in _fieldNodes) {
+      for (ir.Field data in _fieldNodes!) {
         registry.registerFieldNode(data);
       }
     }
     if (_procedureNodes != null) {
-      for (ir.Procedure data in _procedureNodes) {
+      for (ir.Procedure data in _procedureNodes!) {
         registry.registerProcedureNode(data);
       }
     }
     if (_switchStatementNodes != null) {
-      for (ir.SwitchStatement data in _switchStatementNodes) {
+      for (ir.SwitchStatement data in _switchStatementNodes!) {
         registry.registerSwitchStatementNode(data);
       }
     }
     if (_staticInvocationNodes != null) {
-      for (ir.StaticInvocation data in _staticInvocationNodes) {
+      for (ir.StaticInvocation data in _staticInvocationNodes!) {
         registry.registerStaticInvocationNode(data);
       }
     }
@@ -1584,7 +1552,7 @@
     source.begin(tag);
     List<ir.DartType> typeArguments = source.readDartTypeNodes();
     int positionalArguments = source.readInt();
-    List<String> namedArguments = source.readStrings();
+    List<String> namedArguments = source.readStrings() ?? const [];
     source.end(tag);
     return _CallStructure.internal(
         typeArguments, positionalArguments, namedArguments);
@@ -1610,8 +1578,10 @@
 
   factory _SuperInitializer.fromDataSource(DataSourceReader source) {
     source.begin(tag);
-    ir.Constructor sourceConstructor = source.readMemberNode();
-    ir.Constructor targetConstructor = source.readMemberNode();
+    ir.Constructor sourceConstructor =
+        source.readMemberNode() as ir.Constructor;
+    ir.Constructor targetConstructor =
+        source.readMemberNode() as ir.Constructor;
     _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
     return _SuperInitializer(
@@ -1802,7 +1772,8 @@
 
   factory _LocalFunctionInvocation.fromDataSource(DataSourceReader source) {
     source.begin(tag);
-    ir.FunctionDeclaration localFunction = source.readTreeNode();
+    ir.FunctionDeclaration localFunction =
+        source.readTreeNode() as ir.FunctionDeclaration;
     _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
     return _LocalFunctionInvocation(localFunction, callStructure);
@@ -1821,15 +1792,15 @@
 
   final ir.Procedure target;
   final _CallStructure callStructure;
-  final ir.LibraryDependency import;
+  final ir.LibraryDependency? import;
 
   _StaticInvocation(this.target, this.callStructure, this.import);
 
   factory _StaticInvocation.fromDataSource(DataSourceReader source) {
     source.begin(tag);
-    ir.Procedure target = source.readMemberNode();
+    ir.Procedure target = source.readMemberNode() as ir.Procedure;
     _CallStructure callStructure = _CallStructure.fromDataSource(source);
-    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
+    ir.LibraryDependency? import = source.readLibraryDependencyNodeOrNull();
     source.end(tag);
     return _StaticInvocation(target, callStructure, import);
   }
@@ -1849,19 +1820,19 @@
   final ir.Member constructor;
   final ir.InterfaceType type;
   final _CallStructure callStructure;
-  final ir.LibraryDependency import;
+  final ir.LibraryDependency? import;
   final bool isConst;
 
   _ConstructorInvocation(
       this.constructor, this.type, this.callStructure, this.import,
-      {this.isConst});
+      {required this.isConst});
 
   factory _ConstructorInvocation.fromDataSource(DataSourceReader source) {
     source.begin(tag);
     ir.Member constructor = source.readMemberNode();
-    ir.InterfaceType type = source.readDartTypeNode();
+    ir.InterfaceType type = source.readDartTypeNode() as ir.InterfaceType;
     _CallStructure callStructure = _CallStructure.fromDataSource(source);
-    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
+    ir.LibraryDependency? import = source.readLibraryDependencyNodeOrNull();
     bool isConst = source.readBool();
     source.end(tag);
     return _ConstructorInvocation(constructor, type, callStructure, import,
@@ -1882,7 +1853,7 @@
 class _ConstInstantiation {
   final ir.Class cls;
   final List<ir.DartType> typeArguments;
-  final ir.LibraryDependency import;
+  final ir.LibraryDependency? import;
 
   _ConstInstantiation(this.cls, this.typeArguments, this.import);
 }
@@ -1945,7 +1916,7 @@
 
   factory _RedirectingInitializer.fromDataSource(DataSourceReader source) {
     source.begin(tag);
-    ir.Constructor constructor = source.readMemberNode();
+    ir.Constructor constructor = source.readMemberNode() as ir.Constructor;
     _CallStructure callStructure = _CallStructure.fromDataSource(source);
     source.end(tag);
     return _RedirectingInitializer(constructor, callStructure);
@@ -1963,14 +1934,14 @@
   static const String tag = '_TypeLiteral';
 
   final ir.DartType type;
-  final ir.LibraryDependency import;
+  final ir.LibraryDependency? import;
 
   _TypeLiteral(this.type, this.import);
 
   factory _TypeLiteral.fromDataSource(DataSourceReader source) {
     source.begin(tag);
     ir.DartType type = source.readDartTypeNode();
-    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
+    ir.LibraryDependency? import = source.readLibraryDependencyNodeOrNull();
     source.end(tag);
     return _TypeLiteral(type, import);
   }
@@ -1993,7 +1964,8 @@
 
   factory _GenericInstantiation.fromDataSource(DataSourceReader source) {
     source.begin(tag);
-    ir.FunctionType expressionType = source.readDartTypeNode();
+    ir.FunctionType expressionType =
+        source.readDartTypeNode() as ir.FunctionType;
     List<ir.DartType> typeArguments = source.readDartTypeNodes();
     source.end(tag);
     return _GenericInstantiation(expressionType, typeArguments);
@@ -2011,14 +1983,14 @@
   static const String tag = '_StaticAccess';
 
   final ir.Member target;
-  final ir.LibraryDependency import;
+  final ir.LibraryDependency? import;
 
   _StaticAccess(this.target, this.import);
 
   factory _StaticAccess.fromDataSource(DataSourceReader source) {
     source.begin(tag);
     ir.Member target = source.readMemberNode();
-    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
+    ir.LibraryDependency? import = source.readLibraryDependencyNodeOrNull();
     source.end(tag);
     return _StaticAccess(target, import);
   }
@@ -2039,7 +2011,8 @@
   final bool isConst;
   final bool isEmpty;
 
-  _MapLiteral(this.keyType, this.valueType, {this.isConst, this.isEmpty});
+  _MapLiteral(this.keyType, this.valueType,
+      {required this.isConst, required this.isEmpty});
 
   factory _MapLiteral.fromDataSource(DataSourceReader source) {
     source.begin(tag);
@@ -2068,7 +2041,8 @@
   final bool isConst;
   final bool isEmpty;
 
-  _ContainerLiteral(this.elementType, {this.isConst, this.isEmpty});
+  _ContainerLiteral(this.elementType,
+      {required this.isConst, required this.isEmpty});
 
   factory _ContainerLiteral.fromDataSource(DataSourceReader source) {
     source.begin(tag);
@@ -2093,7 +2067,7 @@
 
   final RuntimeTypeUseKind kind;
   final ir.DartType receiverType;
-  final ir.DartType argumentType;
+  final ir.DartType? argumentType;
 
   _RuntimeTypeUse(this.kind, this.receiverType, this.argumentType);
 
@@ -2101,7 +2075,7 @@
     source.begin(tag);
     RuntimeTypeUseKind kind = source.readEnum(RuntimeTypeUseKind.values);
     ir.DartType receiverType = source.readDartTypeNode();
-    ir.DartType argumentType = source.readDartTypeNodeOrNull();
+    ir.DartType? argumentType = source.readDartTypeNodeOrNull();
     source.end(tag);
     return _RuntimeTypeUse(kind, receiverType, argumentType);
   }
@@ -2124,7 +2098,7 @@
   final bool isAsync;
 
   _ForInData(this.iterableType, this.iteratorType, this.iteratorClassRelation,
-      {this.isAsync});
+      {required this.isAsync});
 
   factory _ForInData.fromDataSource(DataSourceReader source) {
     source.begin(tag);
diff --git a/pkg/compiler/lib/src/ir/modular.dart b/pkg/compiler/lib/src/ir/modular.dart
index 956a0e0..4713bbe 100644
--- a/pkg/compiler/lib/src/ir/modular.dart
+++ b/pkg/compiler/lib/src/ir/modular.dart
@@ -17,7 +17,7 @@
 import '../ir/static_type.dart';
 import '../js_backend/annotations.dart';
 import '../kernel/element_map.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/enumset.dart';
 import 'annotations.dart';
 import 'impact.dart';
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index eb3c52a..0bc4507 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -266,7 +266,7 @@
   // TODO(johnniwinther): Change [node] to `InstanceGet` when the old method
   // invocation encoding is no longer used.
   void handleRuntimeTypeUse(ir.Expression node, RuntimeTypeUseKind kind,
-      ir.DartType? receiverType, ir.DartType? argumentType) {}
+      ir.DartType receiverType, ir.DartType? argumentType) {}
 
   void handleRuntimeTypeGet(ir.DartType receiverType, ir.Expression node) {
     RuntimeTypeUseData data =
@@ -290,7 +290,7 @@
         _pendingRuntimeTypeUseData.remove(data.rightRuntimeTypeExpression);
       }
       handleRuntimeTypeUse(
-          node, data.kind, data.receiverType, data.argumentType);
+          node, data.kind, data.receiverType!, data.argumentType);
     }
   }
 
@@ -1016,7 +1016,7 @@
       ir.Expression node, ir.Member target, ir.DartType resultType) {}
 
   void handleStaticTearOff(
-      ir.Expression node, ir.Member target, ir.DartType resultType) {}
+      ir.Expression node, ir.Procedure target, ir.DartType resultType) {}
 
   @override
   ir.DartType visitStaticGet(ir.StaticGet node) {
diff --git a/pkg/compiler/lib/src/ir/static_type_cache.dart b/pkg/compiler/lib/src/ir/static_type_cache.dart
index 92e0023..3a4da89 100644
--- a/pkg/compiler/lib/src/ir/static_type_cache.dart
+++ b/pkg/compiler/lib/src/ir/static_type_cache.dart
@@ -4,7 +4,7 @@
 
 import 'package:kernel/ast.dart' as ir;
 
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 
 class StaticTypeCache {
   static const String tag = 'static-type-cache';
diff --git a/pkg/compiler/lib/src/js_backend/annotations.dart b/pkg/compiler/lib/src/js_backend/annotations.dart
index 1736e2a..8460a64 100644
--- a/pkg/compiler/lib/src/js_backend/annotations.dart
+++ b/pkg/compiler/lib/src/js_backend/annotations.dart
@@ -12,7 +12,7 @@
 import '../ir/util.dart';
 import '../kernel/dart2js_target.dart';
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/enumset.dart';
 
 class PragmaAnnotation {
diff --git a/pkg/compiler/lib/src/js_backend/backend_usage.dart b/pkg/compiler/lib/src/js_backend/backend_usage.dart
index 37662b2..1b408f8 100644
--- a/pkg/compiler/lib/src/js_backend/backend_usage.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_usage.dart
@@ -9,7 +9,7 @@
 import '../ir/runtime_type_analysis.dart';
 import '../kernel/kernel_strategy_migrated.dart'
     show KernelFrontendStrategyForBackendUsage;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/feature.dart';
 import '../util/util.dart' show Setlet;
 import 'backend_impact.dart';
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 dc85fab..2e24fe1 100644
--- a/pkg/compiler/lib/src/js_backend/deferred_holder_expression.dart
+++ b/pkg/compiler/lib/src/js_backend/deferred_holder_expression.dart
@@ -10,7 +10,7 @@
 import '../common/elements.dart' show JCommonElements;
 import '../elements/entities.dart';
 import '../js/js.dart' as js;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart';
 import '../js_emitter/model.dart';
 import '../constants/values.dart' show ConstantValue;
diff --git a/pkg/compiler/lib/src/js_backend/field_analysis.dart b/pkg/compiler/lib/src/js_backend/field_analysis.dart
index 976fbf3..5cc3a4b 100644
--- a/pkg/compiler/lib/src/js_backend/field_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/field_analysis.dart
@@ -19,7 +19,7 @@
 import '../kernel/kelements.dart' show KClass, KField, KConstructor;
 import '../kernel/kernel_world.dart';
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/member_usage.dart';
 
 /// AllocatorAnalysis
diff --git a/pkg/compiler/lib/src/js_backend/inferred_data.dart b/pkg/compiler/lib/src/js_backend/inferred_data.dart
index 6e96121..84a067a 100644
--- a/pkg/compiler/lib/src/js_backend/inferred_data.dart
+++ b/pkg/compiler/lib/src/js_backend/inferred_data.dart
@@ -9,7 +9,7 @@
 import '../common.dart';
 import '../elements/entities.dart';
 import '../inferrer/abstract_value_domain.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
 import '../world.dart';
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index 32cadd1..299dd02 100644
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
@@ -13,7 +13,7 @@
 import '../elements/types.dart';
 import '../inferrer/abstract_value_domain.dart';
 import '../js/js.dart' as jsAst;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/class_set.dart';
 import '../universe/selector.dart';
 import '../world.dart' show JClosedWorld;
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index 6bfc3f0..56cabfd 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -15,7 +15,7 @@
 import '../js_model/js_to_frontend_map.dart' show identity, JsToFrontendMap;
 import '../kernel/element_map.dart';
 import '../native/behavior.dart' show NativeBehavior;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart';
 
 import 'native_data_interfaces.dart' as interfaces;
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 8069eda..88afdee 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
@@ -10,7 +10,7 @@
 import '../elements/entities.dart';
 import '../inferrer/types.dart' show GlobalTypeInferenceResults;
 import '../kernel/no_such_method_resolver.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 
 /// [NoSuchMethodRegistry] and [NoSuchMethodData] categorizes `noSuchMethod`
 /// implementations.
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 61c15b4..9791f4a 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
@@ -16,7 +16,7 @@
 import '../kernel/kelements.dart';
 import '../kernel/kernel_world.dart';
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/class_hierarchy.dart';
 import '../universe/class_set.dart';
 import '../universe/feature.dart';
diff --git a/pkg/compiler/lib/src/js_backend/string_reference.dart b/pkg/compiler/lib/src/js_backend/string_reference.dart
index a07a756..949aec8 100644
--- a/pkg/compiler/lib/src/js_backend/string_reference.dart
+++ b/pkg/compiler/lib/src/js_backend/string_reference.dart
@@ -62,7 +62,7 @@
 
 import '../constants/values.dart' show StringConstantValue;
 import '../js/js.dart' as js;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart' show Hashing;
 import 'frequency_assignment.dart';
 import 'name_sequence.dart';
diff --git a/pkg/compiler/lib/src/js_backend/type_reference.dart b/pkg/compiler/lib/src/js_backend/type_reference.dart
index 5bfc9ef..2f4bc25 100644
--- a/pkg/compiler/lib/src/js_backend/type_reference.dart
+++ b/pkg/compiler/lib/src/js_backend/type_reference.dart
@@ -76,7 +76,7 @@
         TypeExpressionRecipe,
         SingletonTypeEnvironmentRecipe,
         FullTypeEnvironmentRecipe;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart' show Hashing;
 import 'frequency_assignment.dart';
 import 'namer.dart';
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index cbde6f5..5cd2856 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -9,7 +9,6 @@
 import '../closure.dart';
 import '../common.dart';
 import '../elements/entities.dart';
-import '../elements/names.dart' show Name;
 import '../elements/types.dart';
 import '../ir/closure.dart';
 import '../ir/element_map.dart';
@@ -20,12 +19,15 @@
 import '../js_model/env.dart';
 import '../ordered_typeset.dart';
 import '../serialization/deferrable.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/selector.dart';
 import 'elements.dart';
-import 'jrecord_field_interface.dart';
+import 'closure_migrated.dart' as migrated;
 import 'js_world_builder.dart' show JsClosedWorldBuilder;
 
+export 'closure_migrated.dart'
+    show AnonymousClosureLocal, JClosureField, JRecordField;
+
 class ClosureDataImpl implements ClosureData {
   /// Tag used for identifying serialized [ClosureData] objects in a
   /// debugging data stream.
@@ -349,14 +351,14 @@
       ClosureRtiNeed rtiNeed,
       List<FunctionEntity> callMethods) {
     void processModel(MemberEntity member, ClosureScopeModel model) {
-      Map<ir.VariableDeclaration, JRecordField> allBoxedVariables =
+      Map<ir.VariableDeclaration, migrated.JRecordField> allBoxedVariables =
           _elementMap.makeRecordContainer(model.scopeInfo, member);
       _scopeMap[member] = JsScopeInfo.from(
           allBoxedVariables, model.scopeInfo, member.enclosingClass);
 
       model.capturedScopesMap
           .forEach((ir.Node node, KernelCapturedScope scope) {
-        Map<ir.VariableDeclaration, JRecordField> boxedVariables =
+        Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables =
             _elementMap.makeRecordContainer(scope, member);
         _updateScopeBasedOnRtiNeed(scope, rtiNeed, member);
 
@@ -433,7 +435,7 @@
       MemberEntity member,
       ir.FunctionNode node,
       KernelScopeInfo info,
-      Map<ir.VariableDeclaration, JRecordField> boxedVariables,
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
       ClosureRtiNeed rtiNeed,
       {bool createSignatureMethod}) {
     _updateScopeBasedOnRtiNeed(info, rtiNeed, member);
@@ -469,9 +471,9 @@
   @override
   final Local thisLocal;
 
-  final Map<ir.VariableDeclaration, JRecordField> _boxedVariables;
+  final Map<ir.VariableDeclaration, migrated.JRecordField> _boxedVariables;
 
-  Map<Local, JRecordField> _boxedVariablesCache;
+  Map<Local, migrated.JRecordField> _boxedVariablesCache;
 
   JsScopeInfo.internal(
       this._localsUsedInTryOrSync, this.thisLocal, this._boxedVariables);
@@ -487,8 +489,8 @@
         _boxedVariablesCache = const {};
       } else {
         _boxedVariablesCache = {};
-        _boxedVariables
-            .forEach((ir.VariableDeclaration node, JRecordField field) {
+        _boxedVariables.forEach(
+            (ir.VariableDeclaration node, migrated.JRecordField field) {
           _boxedVariablesCache[localsMap.getLocalVariable(node)] = field;
         });
       }
@@ -536,8 +538,8 @@
     Iterable<ir.VariableDeclaration> localsUsedInTryOrSync =
         source.readTreeNodes<ir.VariableDeclaration>();
     Local thisLocal = source.readLocalOrNull();
-    Map<ir.VariableDeclaration, JRecordField> boxedVariables =
-        source.readTreeNodeMap<ir.VariableDeclaration, JRecordField>(
+    Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables =
+        source.readTreeNodeMap<ir.VariableDeclaration, migrated.JRecordField>(
             () => source.readMember());
     source.end(tag);
     if (boxedVariables.isEmpty) boxedVariables = const {};
@@ -567,12 +569,14 @@
   JsCapturedScope.internal(
       Iterable<ir.VariableDeclaration> localsUsedInTryOrSync,
       Local thisLocal,
-      Map<ir.VariableDeclaration, JRecordField> boxedVariables,
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
       this.contextBox)
       : super.internal(localsUsedInTryOrSync, thisLocal, boxedVariables);
 
-  JsCapturedScope.from(Map<ir.VariableDeclaration, JRecordField> boxedVariables,
-      KernelCapturedScope capturedScope, ClassEntity enclosingClass)
+  JsCapturedScope.from(
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
+      KernelCapturedScope capturedScope,
+      ClassEntity enclosingClass)
       : this.contextBox =
             boxedVariables.isNotEmpty ? boxedVariables.values.first.box : null,
         super.from(boxedVariables, capturedScope, enclosingClass);
@@ -585,8 +589,8 @@
     Iterable<ir.VariableDeclaration> localsUsedInTryOrSync =
         source.readTreeNodes<ir.VariableDeclaration>();
     Local thisLocal = source.readLocalOrNull();
-    Map<ir.VariableDeclaration, JRecordField> boxedVariables =
-        source.readTreeNodeMap<ir.VariableDeclaration, JRecordField>(
+    Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables =
+        source.readTreeNodeMap<ir.VariableDeclaration, migrated.JRecordField>(
             () => source.readMember());
     Local context = source.readLocalOrNull();
     source.end(tag);
@@ -616,14 +620,14 @@
   JsCapturedLoopScope.internal(
       Iterable<ir.VariableDeclaration> localsUsedInTryOrSync,
       Local thisLocal,
-      Map<ir.VariableDeclaration, JRecordField> boxedVariables,
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
       Local context,
       this._boxedLoopVariables)
       : super.internal(
             localsUsedInTryOrSync, thisLocal, boxedVariables, context);
 
   JsCapturedLoopScope.from(
-      Map<ir.VariableDeclaration, JRecordField> boxedVariables,
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
       KernelCapturedLoopScope capturedScope,
       ClassEntity enclosingClass)
       : this._boxedLoopVariables = capturedScope.boxedLoopVariables,
@@ -637,8 +641,8 @@
     Iterable<ir.VariableDeclaration> localsUsedInTryOrSync =
         source.readTreeNodes<ir.VariableDeclaration>();
     Local thisLocal = source.readLocalOrNull();
-    Map<ir.VariableDeclaration, JRecordField> boxedVariables =
-        source.readTreeNodeMap<ir.VariableDeclaration, JRecordField>(
+    Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables =
+        source.readTreeNodeMap<ir.VariableDeclaration, migrated.JRecordField>(
             () => source.readMember());
     Local context = source.readLocalOrNull();
     List<ir.VariableDeclaration> boxedLoopVariables =
@@ -672,7 +676,7 @@
 
 // TODO(johnniwinther): Add unittest for the computed [ClosureClass].
 class JsClosureClassInfo extends JsScopeInfo
-    implements ClosureRepresentationInfo {
+    implements ClosureRepresentationInfo, migrated.JsClosureClassInfo {
   /// Tag used for identifying serialized [JsClosureClassInfo] objects in a
   /// debugging data stream.
   static const String tag = 'closure-representation-info';
@@ -704,7 +708,7 @@
   JsClosureClassInfo.internal(
       Iterable<ir.VariableDeclaration> localsUsedInTryOrSync,
       this.thisLocal,
-      Map<ir.VariableDeclaration, JRecordField> boxedVariables,
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
       this.callMethod,
       this.signatureMethod,
       this._closureEntity,
@@ -718,7 +722,7 @@
   JsClosureClassInfo.fromScopeInfo(
       this.closureClassEntity,
       ir.FunctionNode closureSourceNode,
-      Map<ir.VariableDeclaration, JRecordField> boxedVariables,
+      Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables,
       KernelScopeInfo info,
       ClassEntity enclosingClass,
       this._closureEntity,
@@ -734,8 +738,8 @@
     Iterable<ir.VariableDeclaration> localsUsedInTryOrSync =
         source.readTreeNodes<ir.VariableDeclaration>();
     Local thisLocal = source.readLocalOrNull();
-    Map<ir.VariableDeclaration, JRecordField> boxedVariables =
-        source.readTreeNodeMap<ir.VariableDeclaration, JRecordField>(
+    Map<ir.VariableDeclaration, migrated.JRecordField> boxedVariables =
+        source.readTreeNodeMap<ir.VariableDeclaration, migrated.JRecordField>(
             () => source.readMember());
     JFunction callMethod = source.readMember();
     JSignatureMethod signatureMethod = source.readMemberOrNull();
@@ -784,26 +788,32 @@
     sink.end(tag);
   }
 
+  @override
   bool hasFieldForLocal(Local local) => _localToFieldMap.containsKey(local);
 
+  @override
   void registerFieldForLocal(Local local, JField field) {
     assert(_fieldToLocalsMap == null);
     _localToFieldMap[local] = field;
   }
 
+  @override
   void registerFieldForVariable(ir.VariableDeclaration node, JField field) {
     assert(_fieldToLocalsMap == null);
     _variableToFieldMap[node] = field;
   }
 
+  @override
   bool hasFieldForTypeVariable(JTypeVariable typeVariable) =>
       _typeVariableToFieldMap.containsKey(typeVariable);
 
+  @override
   void registerFieldForTypeVariable(JTypeVariable typeVariable, JField field) {
     assert(_fieldToLocalsMap == null);
     _typeVariableToFieldMap[typeVariable] = field;
   }
 
+  @override
   void registerFieldForBoxedVariable(
       ir.VariableDeclaration node, JField field) {
     assert(_boxedVariablesCache == null);
@@ -871,114 +881,6 @@
   }
 }
 
-class JClosureClass extends JClass {
-  /// Tag used for identifying serialized [JClosureClass] objects in a
-  /// debugging data stream.
-  static const String tag = 'closure-class';
-
-  JClosureClass(JLibrary library, String name)
-      : super(library, name, isAbstract: false);
-
-  factory JClosureClass.readFromDataSource(DataSourceReader source) {
-    source.begin(tag);
-    JLibrary library = source.readLibrary();
-    String name = source.readString();
-    source.end(tag);
-    return JClosureClass(library, name);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(JClassKind.closure);
-    sink.begin(tag);
-    sink.writeLibrary(library);
-    sink.writeString(name);
-    sink.end(tag);
-  }
-
-  @override
-  bool get isClosure => true;
-
-  @override
-  String toString() => '${jsElementPrefix}closure_class($name)';
-}
-
-class AnonymousClosureLocal implements Local {
-  final JClosureClass closureClass;
-
-  AnonymousClosureLocal(this.closureClass);
-
-  @override
-  String get name => '';
-
-  @override
-  int get hashCode => closureClass.hashCode * 13;
-
-  @override
-  bool operator ==(other) {
-    if (identical(this, other)) return true;
-    if (other is! AnonymousClosureLocal) return false;
-    return closureClass == other.closureClass;
-  }
-
-  @override
-  String toString() =>
-      '${jsElementPrefix}anonymous_closure_local(${closureClass.name})';
-}
-
-class JClosureField extends JField implements PrivatelyNamedJSEntity {
-  /// Tag used for identifying serialized [JClosureClass] objects in a
-  /// debugging data stream.
-  static const String tag = 'closure-field';
-
-  @override
-  final String declaredName;
-
-  JClosureField(
-      String name, JsClosureClassInfo containingClass, String declaredName,
-      {bool isConst, bool isAssignable})
-      : this.internal(
-            containingClass.closureClassEntity.library,
-            containingClass.closureClassEntity,
-            Name(name, containingClass.closureClassEntity.library),
-            declaredName,
-            isAssignable: isAssignable,
-            isConst: isConst);
-
-  JClosureField.internal(JLibrary library, JClosureClass enclosingClass,
-      Name memberName, this.declaredName, {bool isConst, bool isAssignable})
-      : super(library, enclosingClass, memberName,
-            isAssignable: isAssignable, isConst: isConst, isStatic: false);
-
-  factory JClosureField.readFromDataSource(DataSourceReader source) {
-    source.begin(tag);
-    JClass cls = source.readClass();
-    String name = source.readString();
-    String declaredName = source.readString();
-    bool isConst = source.readBool();
-    bool isAssignable = source.readBool();
-    source.end(tag);
-    return JClosureField.internal(
-        cls.library, cls, Name(name, cls.library), declaredName,
-        isAssignable: isAssignable, isConst: isConst);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(JMemberKind.closureField);
-    sink.begin(tag);
-    sink.writeClass(enclosingClass);
-    sink.writeString(name);
-    sink.writeString(declaredName);
-    sink.writeBool(isConst);
-    sink.writeBool(isAssignable);
-    sink.end(tag);
-  }
-
-  @override
-  Entity get rootOfScope => enclosingClass;
-}
-
 class RecordClassData implements JClassData {
   /// Tag used for identifying serialized [RecordClassData] objects in a
   /// debugging data stream.
@@ -1048,88 +950,6 @@
   List<Variance> getVariances() => [];
 }
 
-/// A container for variables declared in a particular scope that are accessed
-/// elsewhere.
-// TODO(johnniwinther): Don't implement JClass. This isn't actually a
-// class.
-class JRecord extends JClass {
-  /// Tag used for identifying serialized [JRecord] objects in a
-  /// debugging data stream.
-  static const String tag = 'record';
-
-  JRecord(LibraryEntity library, String name)
-      : super(library, name, isAbstract: false);
-
-  factory JRecord.readFromDataSource(DataSourceReader source) {
-    source.begin(tag);
-    JLibrary library = source.readLibrary();
-    String name = source.readString();
-    source.end(tag);
-    return JRecord(library, name);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(JClassKind.record);
-    sink.begin(tag);
-    sink.writeLibrary(library);
-    sink.writeString(name);
-    sink.end(tag);
-  }
-
-  @override
-  bool get isClosure => false;
-
-  @override
-  String toString() => '${jsElementPrefix}record_container($name)';
-}
-
-/// A variable that has been "boxed" to prevent name shadowing with the
-/// original variable and ensure that this variable is updated/read with the
-/// most recent value.
-class JRecordField extends JField implements JRecordFieldInterface {
-  /// Tag used for identifying serialized [JRecordField] objects in a
-  /// debugging data stream.
-  static const String tag = 'record-field';
-
-  final BoxLocal box;
-
-  JRecordField(String name, this.box, {bool isConst})
-      : super(box.container.library, box.container,
-            Name(name, box.container.library),
-            isStatic: false, isAssignable: true, isConst: isConst);
-
-  factory JRecordField.readFromDataSource(DataSourceReader source) {
-    source.begin(tag);
-    String name = source.readString();
-    JClass enclosingClass = source.readClass();
-    bool isConst = source.readBool();
-    source.end(tag);
-    return JRecordField(name, BoxLocal(enclosingClass), isConst: isConst);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(JMemberKind.recordField);
-    sink.begin(tag);
-    sink.writeString(name);
-    sink.writeClass(enclosingClass);
-    sink.writeBool(isConst);
-    sink.end(tag);
-  }
-
-  // TODO(johnniwinther): Remove these anomalies. Maybe by separating the
-  // J-entities from the K-entities.
-  @override
-  bool get isInstanceMember => false;
-
-  @override
-  bool get isTopLevel => false;
-
-  @override
-  bool get isStatic => false;
-}
-
 class ClosureClassData extends RecordClassData {
   /// Tag used for identifying serialized [ClosureClassData] objects in a
   /// debugging data stream.
diff --git a/pkg/compiler/lib/src/js_model/closure_migrated.dart b/pkg/compiler/lib/src/js_model/closure_migrated.dart
new file mode 100644
index 0000000..ab35781
--- /dev/null
+++ b/pkg/compiler/lib/src/js_model/closure_migrated.dart
@@ -0,0 +1,221 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:compiler/src/serialization/serialization.dart';
+
+import 'package:kernel/ast.dart' as ir;
+
+import '../closure_migrated.dart';
+import '../elements/entities.dart';
+import '../elements/names.dart' show Name;
+import 'elements.dart';
+import 'jrecord_field_interface.dart';
+
+/// A container for variables declared in a particular scope that are accessed
+/// elsewhere.
+// TODO(johnniwinther): Don't implement JClass. This isn't actually a
+// class.
+class JRecord extends JClass {
+  /// Tag used for identifying serialized [JRecord] objects in a
+  /// debugging data stream.
+  static const String tag = 'record';
+
+  JRecord(LibraryEntity library, String name)
+      : super(library as JLibrary, name, isAbstract: false);
+
+  factory JRecord.readFromDataSource(DataSourceReader source) {
+    source.begin(tag);
+    JLibrary library = source.readLibrary() as JLibrary;
+    String name = source.readString();
+    source.end(tag);
+    return JRecord(library, name);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(JClassKind.record);
+    sink.begin(tag);
+    sink.writeLibrary(library);
+    sink.writeString(name);
+    sink.end(tag);
+  }
+
+  @override
+  bool get isClosure => false;
+
+  @override
+  String toString() => '${jsElementPrefix}record_container($name)';
+}
+
+/// A variable that has been "boxed" to prevent name shadowing with the
+/// original variable and ensure that this variable is updated/read with the
+/// most recent value.
+class JRecordField extends JField implements JRecordFieldInterface {
+  /// Tag used for identifying serialized [JRecordField] objects in a
+  /// debugging data stream.
+  static const String tag = 'record-field';
+
+  final BoxLocal box;
+
+  JRecordField(String name, this.box, {required bool isConst})
+      : super(box.container.library as JLibrary, box.container as JClass,
+            Name(name, box.container.library),
+            isStatic: false, isAssignable: true, isConst: isConst);
+
+  factory JRecordField.readFromDataSource(DataSourceReader source) {
+    source.begin(tag);
+    String name = source.readString();
+    final enclosingClass = source.readClass() as JClass;
+    bool isConst = source.readBool();
+    source.end(tag);
+    return JRecordField(name, BoxLocal(enclosingClass), isConst: isConst);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(JMemberKind.recordField);
+    sink.begin(tag);
+    sink.writeString(name);
+    sink.writeClass(enclosingClass!);
+    sink.writeBool(isConst);
+    sink.end(tag);
+  }
+
+  // TODO(johnniwinther): Remove these anomalies. Maybe by separating the
+  // J-entities from the K-entities.
+  @override
+  bool get isInstanceMember => false;
+
+  @override
+  bool get isTopLevel => false;
+
+  @override
+  bool get isStatic => false;
+}
+
+class JClosureClass extends JClass {
+  /// Tag used for identifying serialized [JClosureClass] objects in a
+  /// debugging data stream.
+  static const String tag = 'closure-class';
+
+  JClosureClass(JLibrary library, String name)
+      : super(library, name, isAbstract: false);
+
+  factory JClosureClass.readFromDataSource(DataSourceReader source) {
+    source.begin(tag);
+    JLibrary library = source.readLibrary() as JLibrary;
+    String name = source.readString();
+    source.end(tag);
+    return JClosureClass(library, name);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(JClassKind.closure);
+    sink.begin(tag);
+    sink.writeLibrary(library);
+    sink.writeString(name);
+    sink.end(tag);
+  }
+
+  @override
+  bool get isClosure => true;
+
+  @override
+  String toString() => '${jsElementPrefix}closure_class($name)';
+}
+
+class AnonymousClosureLocal implements Local {
+  final JClosureClass closureClass;
+
+  AnonymousClosureLocal(this.closureClass);
+
+  @override
+  String get name => '';
+
+  @override
+  int get hashCode => closureClass.hashCode * 13;
+
+  @override
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! AnonymousClosureLocal) return false;
+    return closureClass == other.closureClass;
+  }
+
+  @override
+  String toString() =>
+      '${jsElementPrefix}anonymous_closure_local(${closureClass.name})';
+}
+
+class JClosureField extends JField implements PrivatelyNamedJSEntity {
+  /// Tag used for identifying serialized [JClosureClass] objects in a
+  /// debugging data stream.
+  static const String tag = 'closure-field';
+
+  @override
+  final String declaredName;
+
+  JClosureField(
+      String name, JsClosureClassInfo containingClass, String declaredName,
+      {required bool isConst, required bool isAssignable})
+      : this.internal(
+            containingClass.closureClassEntity.library,
+            containingClass.closureClassEntity as JClosureClass,
+            Name(name, containingClass.closureClassEntity.library),
+            declaredName,
+            isAssignable: isAssignable,
+            isConst: isConst);
+
+  JClosureField.internal(JLibrary library, JClosureClass enclosingClass,
+      Name memberName, this.declaredName,
+      {required bool isConst, required bool isAssignable})
+      : super(library, enclosingClass, memberName,
+            isAssignable: isAssignable, isConst: isConst, isStatic: false);
+
+  factory JClosureField.readFromDataSource(DataSourceReader source) {
+    source.begin(tag);
+    final cls = source.readClass() as JClosureClass;
+    String name = source.readString();
+    String declaredName = source.readString();
+    bool isConst = source.readBool();
+    bool isAssignable = source.readBool();
+    source.end(tag);
+    return JClosureField.internal(
+        cls.library, cls, Name(name, cls.library), declaredName,
+        isAssignable: isAssignable, isConst: isConst);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(JMemberKind.closureField);
+    sink.begin(tag);
+    sink.writeClass(enclosingClass!);
+    sink.writeString(name);
+    sink.writeString(declaredName);
+    sink.writeBool(isConst);
+    sink.writeBool(isAssignable);
+    sink.end(tag);
+  }
+
+  @override
+  Entity get rootOfScope => enclosingClass!;
+}
+
+abstract class JsClosureClassInfo {
+  JClass get closureClassEntity;
+  Local get thisLocal;
+  JFunction get callMethod;
+  void set callMethod(JFunction value);
+  JSignatureMethod get signatureMethod;
+  void set signatureMethod(JSignatureMethod value);
+
+  bool hasFieldForLocal(Local local);
+
+  bool hasFieldForTypeVariable(JTypeVariable typeVariable);
+  void registerFieldForTypeVariable(JTypeVariable typeVariable, JField field);
+  void registerFieldForLocal(Local local, JField field);
+  void registerFieldForVariable(ir.VariableDeclaration node, JField field);
+  void registerFieldForBoxedVariable(ir.VariableDeclaration node, JField field);
+}
diff --git a/pkg/compiler/lib/src/js_model/element_map.dart b/pkg/compiler/lib/src/js_model/element_map.dart
index d939160..7350f29 100644
--- a/pkg/compiler/lib/src/js_model/element_map.dart
+++ b/pkg/compiler/lib/src/js_model/element_map.dart
@@ -10,7 +10,6 @@
 import '../common/elements.dart' show JCommonElements, JElementEnvironment;
 import '../constants/values.dart';
 import '../elements/entities.dart';
-import '../elements/jumps.dart';
 import '../elements/names.dart';
 import '../elements/types.dart';
 import '../inferrer/abstract_value_domain.dart';
@@ -20,16 +19,19 @@
 import '../js_model/class_type_variable_access.dart';
 import '../js_model/elements.dart' show JGeneratorBody;
 import '../native/behavior.dart';
-import '../serialization/deferrable.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/call_structure.dart';
 import '../universe/selector.dart';
 import '../world.dart';
 import 'closure.dart';
+import 'element_map_interfaces.dart' as interfaces;
+import 'element_map_migrated.dart';
+
+export 'element_map_migrated.dart';
 
 /// Interface that translates between Kernel IR nodes and entities used for
 /// global type inference and building the SSA graph for members.
-abstract class JsToElementMap {
+abstract class JsToElementMap implements interfaces.JsToElementMap {
   /// Access to the commonly used elements and types.
   JCommonElements get commonElements;
 
@@ -37,6 +39,7 @@
   DartTypes get types;
 
   /// Returns the [DartType] corresponding to [type].
+  @override
   DartType getDartType(ir.DartType type);
 
   /// Returns the [InterfaceType] corresponding to [type].
@@ -123,6 +126,7 @@
   List<DartType> getDartTypes(List<ir.DartType> types);
 
   /// Returns the definition information for [member].
+  @override
   MemberDefinition getMemberDefinition(MemberEntity member);
 
   /// Returns the [ir.Member] containing the definition of [member], if any.
@@ -217,64 +221,6 @@
       NativeBehavior nativeBehavior, JClosedWorld closedWorld);
 }
 
-/// Map from kernel IR nodes to local entities.
-abstract class KernelToLocalsMap {
-  /// The member currently being built.
-  MemberEntity get currentMember;
-
-  /// Returns the [Local] for [node].
-  Local getLocalVariable(ir.VariableDeclaration node);
-
-  /// Returns the [Local] for the [typeVariable].
-  Local getLocalTypeVariableEntity(TypeVariableEntity typeVariable);
-
-  /// Returns the [ir.FunctionNode] that declared [parameter].
-  ir.FunctionNode getFunctionNodeForParameter(Local parameter);
-
-  /// Returns the [DartType] of [local].
-  DartType getLocalType(JsToElementMap elementMap, Local local);
-
-  /// Returns the [JumpTarget] for the break statement [node].
-  JumpTarget getJumpTargetForBreak(ir.BreakStatement node);
-
-  /// Returns `true` if [node] should generate a `continue` to its [JumpTarget].
-  bool generateContinueForBreak(ir.BreakStatement node);
-
-  /// Returns the [JumpTarget] defined by the labelled statement [node] or
-  /// `null` if [node] is not a jump target.
-  JumpTarget getJumpTargetForLabel(ir.LabeledStatement node);
-
-  /// Returns the [JumpTarget] defined by the switch statement [node] or `null`
-  /// if [node] is not a jump target.
-  JumpTarget getJumpTargetForSwitch(ir.SwitchStatement node);
-
-  /// Returns the [JumpTarget] for the continue switch statement [node].
-  JumpTarget getJumpTargetForContinueSwitch(ir.ContinueSwitchStatement node);
-
-  /// Returns the [JumpTarget] defined by the switch case [node] or `null`
-  /// if [node] is not a jump target.
-  JumpTarget getJumpTargetForSwitchCase(ir.SwitchCase node);
-
-  /// Returns the [JumpTarget] defined the do statement [node] or `null`
-  /// if [node] is not a jump target.
-  JumpTarget getJumpTargetForDo(ir.DoStatement node);
-
-  /// Returns the [JumpTarget] defined by the for statement [node] or `null`
-  /// if [node] is not a jump target.
-  JumpTarget getJumpTargetForFor(ir.ForStatement node);
-
-  /// Returns the [JumpTarget] defined by the for-in statement [node] or `null`
-  /// if [node] is not a jump target.
-  JumpTarget getJumpTargetForForIn(ir.ForInStatement node);
-
-  /// Returns the [JumpTarget] defined by the while statement [node] or `null`
-  /// if [node] is not a jump target.
-  JumpTarget getJumpTargetForWhile(ir.WhileStatement node);
-
-  /// Serializes this [KernelToLocalsMap] to [sink].
-  void writeToDataSink(DataSinkWriter sink);
-}
-
 /// Returns the [ir.FunctionNode] that defines [member] or `null` if [member]
 /// is not a constructor, method or local function.
 ir.FunctionNode getFunctionNode(
@@ -296,72 +242,6 @@
   return null;
 }
 
-// TODO(johnniwinther,efortuna): Add more when needed.
-// TODO(johnniwinther): Should we split regular into method, field, etc.?
-enum MemberKind {
-  /// A regular member defined by an [ir.Node].
-  regular,
-
-  /// A constructor whose initializer is defined by an [ir.Constructor] node.
-  constructor,
-
-  /// A constructor whose body is defined by an [ir.Constructor] node.
-  constructorBody,
-
-  /// A closure class `call` method whose body is defined by an
-  /// [ir.LocalFunction].
-  closureCall,
-
-  /// A field corresponding to a captured variable in the closure. It does not
-  /// have a corresponding ir.Node.
-  closureField,
-
-  /// A method that describes the type of a function (in this case the type of
-  /// the closure class. It does not have a corresponding ir.Node or a method
-  /// body.
-  signature,
-
-  /// A separated body of a generator (sync*/async/async*) function.
-  generatorBody,
-}
-
-/// Definition information for a [MemberEntity].
-abstract class MemberDefinition {
-  /// The kind of the defined member. This determines the semantics of [node].
-  MemberKind get kind;
-
-  /// The defining [ir.Node] for this member, if supported by its [kind].
-  ///
-  /// For a regular class this is the [ir.Class] node. For closure classes this
-  /// might be an [ir.FunctionExpression] node if needed.
-  ir.Node get node;
-
-  /// The canonical location of [member]. This is used for sorting the members
-  /// in the emitted code.
-  SourceSpan get location;
-
-  /// Deserializes a [MemberDefinition] object from [source].
-  factory MemberDefinition.readFromDataSource(DataSourceReader source) {
-    MemberKind kind = source.readEnum(MemberKind.values);
-    switch (kind) {
-      case MemberKind.regular:
-        return RegularMemberDefinition.readFromDataSource(source);
-      case MemberKind.constructor:
-      case MemberKind.constructorBody:
-      case MemberKind.signature:
-      case MemberKind.generatorBody:
-        return SpecialMemberDefinition.readFromDataSource(source, kind);
-      case MemberKind.closureCall:
-      case MemberKind.closureField:
-        return ClosureMemberDefinition.readFromDataSource(source, kind);
-    }
-    throw UnsupportedError("Unexpected MemberKind $kind");
-  }
-
-  /// Serializes this [MemberDefinition] to [sink].
-  void writeToDataSink(DataSinkWriter sink);
-}
-
 enum ClassKind {
   regular,
   closure,
@@ -370,135 +250,6 @@
   record,
 }
 
-/// A member directly defined by its [ir.Member] node.
-class RegularMemberDefinition implements MemberDefinition {
-  /// Tag used for identifying serialized [RegularMemberDefinition] objects in a
-  /// debugging data stream.
-  static const String tag = 'regular-member-definition';
-
-  @override
-  final ir.Member node;
-
-  RegularMemberDefinition(this.node);
-
-  factory RegularMemberDefinition.readFromDataSource(DataSourceReader source) {
-    source.begin(tag);
-    ir.Member node = source.readMemberNode();
-    source.end(tag);
-    return RegularMemberDefinition(node);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(MemberKind.regular);
-    sink.begin(tag);
-    sink.writeMemberNode(node);
-    sink.end(tag);
-  }
-
-  @override
-  SourceSpan get location => computeSourceSpanFromTreeNode(node);
-
-  @override
-  MemberKind get kind => MemberKind.regular;
-
-  @override
-  String toString() => 'RegularMemberDefinition(kind:$kind,'
-      'node:$node,location:$location)';
-}
-
-/// The definition of a special kind of member
-class SpecialMemberDefinition implements MemberDefinition {
-  /// Tag used for identifying serialized [SpecialMemberDefinition] objects in a
-  /// debugging data stream.
-  static const String tag = 'special-member-definition';
-
-  @override
-  ir.TreeNode get node => _node.loaded();
-  final Deferrable<ir.TreeNode> _node;
-  @override
-  final MemberKind kind;
-
-  SpecialMemberDefinition(ir.TreeNode node, this.kind)
-      : _node = Deferrable.eager(node);
-
-  SpecialMemberDefinition.from(MemberDefinition baseMember, this.kind)
-      : _node = baseMember is ClosureMemberDefinition
-            ? baseMember._node
-            : Deferrable.eager(baseMember.node);
-
-  SpecialMemberDefinition._deserialized(this._node, this.kind);
-
-  factory SpecialMemberDefinition.readFromDataSource(
-      DataSourceReader source, MemberKind kind) {
-    source.begin(tag);
-    Deferrable<ir.TreeNode> node =
-        source.readDeferrable(() => source.readTreeNode());
-    source.end(tag);
-    return SpecialMemberDefinition._deserialized(node, kind);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(kind);
-    sink.begin(tag);
-    sink.writeDeferrable(() => sink.writeTreeNode(node));
-    sink.end(tag);
-  }
-
-  @override
-  SourceSpan get location => computeSourceSpanFromTreeNode(node);
-
-  @override
-  String toString() => 'SpecialMemberDefinition(kind:$kind,'
-      'node:$node,location:$location)';
-}
-
-class ClosureMemberDefinition implements MemberDefinition {
-  /// Tag used for identifying serialized [ClosureMemberDefinition] objects in a
-  /// debugging data stream.
-  static const String tag = 'closure-member-definition';
-
-  @override
-  final SourceSpan location;
-  @override
-  final MemberKind kind;
-  @override
-  ir.TreeNode get node => _node.loaded();
-  final Deferrable<ir.TreeNode> _node;
-
-  ClosureMemberDefinition(this.location, this.kind, ir.TreeNode node)
-      : _node = Deferrable.eager(node),
-        assert(
-            kind == MemberKind.closureCall || kind == MemberKind.closureField);
-
-  ClosureMemberDefinition._deserialized(this.location, this.kind, this._node)
-      : assert(
-            kind == MemberKind.closureCall || kind == MemberKind.closureField);
-
-  factory ClosureMemberDefinition.readFromDataSource(
-      DataSourceReader source, MemberKind kind) {
-    source.begin(tag);
-    SourceSpan location = source.readSourceSpan();
-    Deferrable<ir.TreeNode> node =
-        source.readDeferrable(() => source.readTreeNode());
-    source.end(tag);
-    return ClosureMemberDefinition._deserialized(location, kind, node);
-  }
-
-  @override
-  void writeToDataSink(DataSinkWriter sink) {
-    sink.writeEnum(kind);
-    sink.begin(tag);
-    sink.writeSourceSpan(location);
-    sink.writeDeferrable(() => sink.writeTreeNode(node));
-    sink.end(tag);
-  }
-
-  @override
-  String toString() => 'ClosureMemberDefinition(kind:$kind,location:$location)';
-}
-
 /// Definition information for a [ClassEntity].
 abstract class ClassDefinition {
   /// The kind of the defined class. This determines the semantics of [node].
@@ -580,76 +331,3 @@
   }
   return node.initializer;
 }
-
-void forEachOrderedParameterByFunctionNode(
-    ir.FunctionNode node,
-    ParameterStructure parameterStructure,
-    void f(ir.VariableDeclaration parameter, {bool isOptional, bool isElided}),
-    {bool useNativeOrdering = false}) {
-  for (int position = 0;
-      position < node.positionalParameters.length;
-      position++) {
-    ir.VariableDeclaration variable = node.positionalParameters[position];
-    f(variable,
-        isOptional: position >= parameterStructure.requiredPositionalParameters,
-        isElided: position >= parameterStructure.positionalParameters);
-  }
-
-  if (node.namedParameters.isEmpty) {
-    return;
-  }
-
-  List<ir.VariableDeclaration> namedParameters = node.namedParameters.toList();
-  if (useNativeOrdering) {
-    namedParameters.sort(nativeOrdering);
-  } else {
-    namedParameters.sort(namedOrdering);
-  }
-  for (ir.VariableDeclaration variable in namedParameters) {
-    f(variable,
-        isOptional: true,
-        isElided: !parameterStructure.namedParameters.contains(variable.name));
-  }
-}
-
-void forEachOrderedParameter(JsToElementMap elementMap, FunctionEntity function,
-    void f(ir.VariableDeclaration parameter, {bool isElided})) {
-  ParameterStructure parameterStructure = function.parameterStructure;
-
-  void handleParameter(ir.VariableDeclaration parameter,
-      {bool isOptional, bool isElided}) {
-    f(parameter, isElided: isElided);
-  }
-
-  MemberDefinition definition = elementMap.getMemberDefinition(function);
-  switch (definition.kind) {
-    case MemberKind.regular:
-      ir.Node node = definition.node;
-      if (node is ir.Procedure) {
-        forEachOrderedParameterByFunctionNode(
-            node.function, parameterStructure, handleParameter);
-        return;
-      }
-      break;
-    case MemberKind.constructor:
-    case MemberKind.constructorBody:
-      ir.Node node = definition.node;
-      if (node is ir.Procedure) {
-        forEachOrderedParameterByFunctionNode(
-            node.function, parameterStructure, handleParameter);
-        return;
-      } else if (node is ir.Constructor) {
-        forEachOrderedParameterByFunctionNode(
-            node.function, parameterStructure, handleParameter);
-        return;
-      }
-      break;
-    case MemberKind.closureCall:
-      ir.LocalFunction node = definition.node;
-      forEachOrderedParameterByFunctionNode(
-          node.function, parameterStructure, handleParameter);
-      return;
-    default:
-  }
-  failedAt(function, "Unexpected function definition $definition.");
-}
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 492f593..7836deb 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -46,12 +46,13 @@
 import '../native/behavior.dart';
 import '../options.dart';
 import '../ordered_typeset.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/call_structure.dart';
 import '../universe/member_usage.dart';
 import '../universe/selector.dart';
 
 import 'closure.dart';
+import 'closure_migrated.dart' as closureMigrated;
 import 'elements.dart';
 import 'element_map.dart';
 import 'env.dart';
@@ -362,7 +363,8 @@
       JClassData data = JClassData.readFromDataSource(source);
       classes.postRegisterData(cls, data);
       classMap[env.cls] = cls;
-      if (cls is! JRecord && cls is! JClosureClass) {
+      if (cls is! closureMigrated.JRecord &&
+          cls is! closureMigrated.JClosureClass) {
         // Synthesized classes are not part of the library environment.
         libraries.getEnv(cls.library).registerClass(cls.name, env);
       }
@@ -1780,7 +1782,8 @@
       NodeBox box = info.capturedVariablesAccessor;
 
       Map<String, IndexedMember> memberMap = {};
-      JRecord container = JRecord(member.library, box.name);
+      closureMigrated.JRecord container =
+          closureMigrated.JRecord(member.library, box.name);
       BoxLocal boxLocal = BoxLocal(container);
       InterfaceType thisType =
           types.interfaceType(container, const <DartType>[]);
@@ -1848,7 +1851,7 @@
     SourceSpan location = computeSourceSpanFromTreeNode(node);
     Map<String, IndexedMember> memberMap = {};
 
-    JClass classEntity = JClosureClass(enclosingLibrary, name);
+    JClass classEntity = closureMigrated.JClosureClass(enclosingLibrary, name);
     // Create a classData and set up the interfaces and subclass
     // relationships that _ensureSupertypes and _ensureThisAndRawType are doing
     InterfaceType thisType =
@@ -1866,7 +1869,7 @@
       ir.FunctionDeclaration parent = node.parent;
       closureEntityNode = parent.variable;
     } else if (node.parent is ir.FunctionExpression) {
-      closureEntity = AnonymousClosureLocal(classEntity);
+      closureEntity = closureMigrated.AnonymousClosureLocal(classEntity);
     }
 
     IndexedFunction callMethod = JClosureCallMethod(classEntity,
diff --git a/pkg/compiler/lib/src/js_model/element_map_interfaces.dart b/pkg/compiler/lib/src/js_model/element_map_interfaces.dart
new file mode 100644
index 0000000..8016e27
--- /dev/null
+++ b/pkg/compiler/lib/src/js_model/element_map_interfaces.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:compiler/src/js_model/element_map_migrated.dart';
+import 'package:kernel/ast.dart' as ir;
+
+import '../elements/entities.dart';
+import '../elements/types.dart';
+
+// TODO(48820): Remove this interface when nnbd migration is done.
+abstract class JsToElementMap {
+  DartType getDartType(ir.DartType type);
+
+  MemberDefinition getMemberDefinition(MemberEntity member);
+}
diff --git a/pkg/compiler/lib/src/js_model/element_map_migrated.dart b/pkg/compiler/lib/src/js_model/element_map_migrated.dart
new file mode 100644
index 0000000..fb5417f
--- /dev/null
+++ b/pkg/compiler/lib/src/js_model/element_map_migrated.dart
@@ -0,0 +1,342 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+
+import '../common.dart';
+import '../elements/entities.dart';
+import '../elements/jumps.dart';
+import '../elements/types.dart';
+import '../ir/util.dart';
+import '../serialization/deferrable.dart';
+import '../serialization/serialization.dart';
+import 'element_map_interfaces.dart';
+
+// TODO(48820): Merge back into element_map.dart when migration is done.
+
+/// Map from kernel IR nodes to local entities.
+abstract class KernelToLocalsMap {
+  /// The member currently being built.
+  MemberEntity get currentMember;
+
+  /// Returns the [Local] for [node].
+  Local getLocalVariable(ir.VariableDeclaration node);
+
+  /// Returns the [Local] for the [typeVariable].
+  Local getLocalTypeVariableEntity(TypeVariableEntity typeVariable);
+
+  /// Returns the [ir.FunctionNode] that declared [parameter].
+  ir.FunctionNode getFunctionNodeForParameter(Local parameter);
+
+  /// Returns the [DartType] of [local].
+  DartType getLocalType(JsToElementMap elementMap, Local local);
+
+  /// Returns the [JumpTarget] for the break statement [node].
+  JumpTarget getJumpTargetForBreak(ir.BreakStatement node);
+
+  /// Returns `true` if [node] should generate a `continue` to its [JumpTarget].
+  bool generateContinueForBreak(ir.BreakStatement node);
+
+  /// Returns the [JumpTarget] defined by the labelled statement [node] or
+  /// `null` if [node] is not a jump target.
+  JumpTarget? getJumpTargetForLabel(ir.LabeledStatement node);
+
+  /// Returns the [JumpTarget] defined by the switch statement [node] or `null`
+  /// if [node] is not a jump target.
+  JumpTarget? getJumpTargetForSwitch(ir.SwitchStatement node);
+
+  /// Returns the [JumpTarget] for the continue switch statement [node].
+  JumpTarget getJumpTargetForContinueSwitch(ir.ContinueSwitchStatement node);
+
+  /// Returns the [JumpTarget] defined by the switch case [node] or `null`
+  /// if [node] is not a jump target.
+  JumpTarget? getJumpTargetForSwitchCase(ir.SwitchCase node);
+
+  /// Returns the [JumpTarget] defined the do statement [node] or `null`
+  /// if [node] is not a jump target.
+  JumpTarget? getJumpTargetForDo(ir.DoStatement node);
+
+  /// Returns the [JumpTarget] defined by the for statement [node] or `null`
+  /// if [node] is not a jump target.
+  JumpTarget? getJumpTargetForFor(ir.ForStatement node);
+
+  /// Returns the [JumpTarget] defined by the for-in statement [node] or `null`
+  /// if [node] is not a jump target.
+  JumpTarget? getJumpTargetForForIn(ir.ForInStatement node);
+
+  /// Returns the [JumpTarget] defined by the while statement [node] or `null`
+  /// if [node] is not a jump target.
+  JumpTarget? getJumpTargetForWhile(ir.WhileStatement node);
+
+  /// Serializes this [KernelToLocalsMap] to [sink].
+  void writeToDataSink(DataSinkWriter sink);
+}
+
+// TODO(johnniwinther,efortuna): Add more when needed.
+// TODO(johnniwinther): Should we split regular into method, field, etc.?
+enum MemberKind {
+  /// A regular member defined by an [ir.Node].
+  regular,
+
+  /// A constructor whose initializer is defined by an [ir.Constructor] node.
+  constructor,
+
+  /// A constructor whose body is defined by an [ir.Constructor] node.
+  constructorBody,
+
+  /// A closure class `call` method whose body is defined by an
+  /// [ir.LocalFunction].
+  closureCall,
+
+  /// A field corresponding to a captured variable in the closure. It does not
+  /// have a corresponding ir.Node.
+  closureField,
+
+  /// A method that describes the type of a function (in this case the type of
+  /// the closure class. It does not have a corresponding ir.Node or a method
+  /// body.
+  signature,
+
+  /// A separated body of a generator (sync*/async/async*) function.
+  generatorBody,
+}
+
+/// Definition information for a [MemberEntity].
+abstract class MemberDefinition {
+  /// The kind of the defined member. This determines the semantics of [node].
+  MemberKind get kind;
+
+  /// The defining [ir.Node] for this member, if supported by its [kind].
+  ///
+  /// For a regular class this is the [ir.Class] node. For closure classes this
+  /// might be an [ir.FunctionExpression] node if needed.
+  ir.Node get node;
+
+  /// The canonical location of [member]. This is used for sorting the members
+  /// in the emitted code.
+  SourceSpan get location;
+
+  /// Deserializes a [MemberDefinition] object from [source].
+  factory MemberDefinition.readFromDataSource(DataSourceReader source) {
+    MemberKind kind = source.readEnum(MemberKind.values);
+    switch (kind) {
+      case MemberKind.regular:
+        return RegularMemberDefinition.readFromDataSource(source);
+      case MemberKind.constructor:
+      case MemberKind.constructorBody:
+      case MemberKind.signature:
+      case MemberKind.generatorBody:
+        return SpecialMemberDefinition.readFromDataSource(source, kind);
+      case MemberKind.closureCall:
+      case MemberKind.closureField:
+        return ClosureMemberDefinition.readFromDataSource(source, kind);
+    }
+  }
+
+  /// Serializes this [MemberDefinition] to [sink].
+  void writeToDataSink(DataSinkWriter sink);
+}
+
+/// A member directly defined by its [ir.Member] node.
+class RegularMemberDefinition implements MemberDefinition {
+  /// Tag used for identifying serialized [RegularMemberDefinition] objects in a
+  /// debugging data stream.
+  static const String tag = 'regular-member-definition';
+
+  @override
+  final ir.Member node;
+
+  RegularMemberDefinition(this.node);
+
+  factory RegularMemberDefinition.readFromDataSource(DataSourceReader source) {
+    source.begin(tag);
+    ir.Member node = source.readMemberNode();
+    source.end(tag);
+    return RegularMemberDefinition(node);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(MemberKind.regular);
+    sink.begin(tag);
+    sink.writeMemberNode(node);
+    sink.end(tag);
+  }
+
+  @override
+  SourceSpan get location => computeSourceSpanFromTreeNode(node);
+
+  @override
+  MemberKind get kind => MemberKind.regular;
+
+  @override
+  String toString() => 'RegularMemberDefinition(kind:$kind,'
+      'node:$node,location:$location)';
+}
+
+/// The definition of a special kind of member
+class SpecialMemberDefinition implements MemberDefinition {
+  /// Tag used for identifying serialized [SpecialMemberDefinition] objects in a
+  /// debugging data stream.
+  static const String tag = 'special-member-definition';
+
+  @override
+  ir.TreeNode get node => _node.loaded();
+  final Deferrable<ir.TreeNode> _node;
+  @override
+  final MemberKind kind;
+
+  SpecialMemberDefinition(ir.TreeNode node, this.kind)
+      : _node = Deferrable.eager(node);
+
+  SpecialMemberDefinition.from(MemberDefinition baseMember, this.kind)
+      : _node = baseMember is ClosureMemberDefinition
+            ? baseMember._node
+            : Deferrable.eager(baseMember.node as ir.TreeNode);
+
+  SpecialMemberDefinition._deserialized(this._node, this.kind);
+
+  factory SpecialMemberDefinition.readFromDataSource(
+      DataSourceReader source, MemberKind kind) {
+    source.begin(tag);
+    Deferrable<ir.TreeNode> node =
+        source.readDeferrable(() => source.readTreeNode());
+    source.end(tag);
+    return SpecialMemberDefinition._deserialized(node, kind);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(kind);
+    sink.begin(tag);
+    sink.writeDeferrable(() => sink.writeTreeNode(node));
+    sink.end(tag);
+  }
+
+  @override
+  SourceSpan get location => computeSourceSpanFromTreeNode(node);
+
+  @override
+  String toString() => 'SpecialMemberDefinition(kind:$kind,'
+      'node:$node,location:$location)';
+}
+
+class ClosureMemberDefinition implements MemberDefinition {
+  /// Tag used for identifying serialized [ClosureMemberDefinition] objects in a
+  /// debugging data stream.
+  static const String tag = 'closure-member-definition';
+
+  @override
+  final SourceSpan location;
+  @override
+  final MemberKind kind;
+  @override
+  ir.TreeNode get node => _node.loaded();
+  final Deferrable<ir.TreeNode> _node;
+
+  ClosureMemberDefinition(this.location, this.kind, ir.TreeNode node)
+      : _node = Deferrable.eager(node),
+        assert(
+            kind == MemberKind.closureCall || kind == MemberKind.closureField);
+
+  ClosureMemberDefinition._deserialized(this.location, this.kind, this._node)
+      : assert(
+            kind == MemberKind.closureCall || kind == MemberKind.closureField);
+
+  factory ClosureMemberDefinition.readFromDataSource(
+      DataSourceReader source, MemberKind kind) {
+    source.begin(tag);
+    SourceSpan location = source.readSourceSpan();
+    Deferrable<ir.TreeNode> node =
+        source.readDeferrable(() => source.readTreeNode());
+    source.end(tag);
+    return ClosureMemberDefinition._deserialized(location, kind, node);
+  }
+
+  @override
+  void writeToDataSink(DataSinkWriter sink) {
+    sink.writeEnum(kind);
+    sink.begin(tag);
+    sink.writeSourceSpan(location);
+    sink.writeDeferrable(() => sink.writeTreeNode(node));
+    sink.end(tag);
+  }
+
+  @override
+  String toString() => 'ClosureMemberDefinition(kind:$kind,location:$location)';
+}
+
+void forEachOrderedParameterByFunctionNode(
+    ir.FunctionNode node,
+    ParameterStructure parameterStructure,
+    void f(ir.VariableDeclaration parameter,
+        {required bool isOptional, required bool isElided}),
+    {bool useNativeOrdering = false}) {
+  for (int position = 0;
+      position < node.positionalParameters.length;
+      position++) {
+    ir.VariableDeclaration variable = node.positionalParameters[position];
+    f(variable,
+        isOptional: position >= parameterStructure.requiredPositionalParameters,
+        isElided: position >= parameterStructure.positionalParameters);
+  }
+
+  if (node.namedParameters.isEmpty) {
+    return;
+  }
+
+  List<ir.VariableDeclaration> namedParameters = node.namedParameters.toList();
+  if (useNativeOrdering) {
+    namedParameters.sort(nativeOrdering);
+  } else {
+    namedParameters.sort(namedOrdering);
+  }
+  for (ir.VariableDeclaration variable in namedParameters) {
+    f(variable,
+        isOptional: true,
+        isElided: !parameterStructure.namedParameters.contains(variable.name));
+  }
+}
+
+void forEachOrderedParameter(JsToElementMap elementMap, FunctionEntity function,
+    void f(ir.VariableDeclaration parameter, {required bool isElided})) {
+  ParameterStructure parameterStructure = function.parameterStructure;
+
+  void handleParameter(ir.VariableDeclaration parameter,
+      {required bool isOptional, required bool isElided}) {
+    f(parameter, isElided: isElided);
+  }
+
+  MemberDefinition definition = elementMap.getMemberDefinition(function);
+  switch (definition.kind) {
+    case MemberKind.regular:
+      ir.Node node = definition.node;
+      if (node is ir.Procedure) {
+        forEachOrderedParameterByFunctionNode(
+            node.function, parameterStructure, handleParameter);
+        return;
+      }
+      break;
+    case MemberKind.constructor:
+    case MemberKind.constructorBody:
+      ir.Node node = definition.node;
+      if (node is ir.Procedure) {
+        forEachOrderedParameterByFunctionNode(
+            node.function, parameterStructure, handleParameter);
+        return;
+      } else if (node is ir.Constructor) {
+        forEachOrderedParameterByFunctionNode(
+            node.function, parameterStructure, handleParameter);
+        return;
+      }
+      break;
+    case MemberKind.closureCall:
+      final node = definition.node as ir.LocalFunction;
+      forEachOrderedParameterByFunctionNode(
+          node.function, parameterStructure, handleParameter);
+      return;
+    default:
+  }
+  failedAt(function, "Unexpected function definition $definition.");
+}
diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
index b318237..e5f8780 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.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.
 
-// @dart = 2.10
-
 library dart2js.js_model.elements;
 
 import '../common/names.dart' show Names;
@@ -11,9 +9,9 @@
 import '../elements/indexed.dart';
 import '../elements/names.dart';
 import '../elements/types.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/class_set.dart' show ClassHierarchyNodesMapKey;
-import 'closure.dart';
+import 'closure_migrated.dart';
 
 const String jsElementPrefix = 'j:';
 
@@ -70,7 +68,7 @@
   @override
   final bool isAbstract;
 
-  JClass(this.library, this.name, {this.isAbstract});
+  JClass(this.library, this.name, {required this.isAbstract});
 
   /// Deserializes a [JClass] object from [source].
   factory JClass.readFromDataSource(DataSourceReader source) {
@@ -78,7 +76,7 @@
     switch (kind) {
       case JClassKind.node:
         source.begin(tag);
-        JLibrary library = source.readLibrary();
+        final library = source.readLibrary() as JLibrary;
         String name = source.readString();
         bool isAbstract = source.readBool();
         source.end(tag);
@@ -88,7 +86,6 @@
       case JClassKind.record:
         return JRecord.readFromDataSource(source);
     }
-    throw UnsupportedError("Unexpected ClassKind $kind");
   }
 
   /// Serializes this [JClass] to [sink].
@@ -128,7 +125,7 @@
   @override
   final JLibrary /*!*/ library;
   @override
-  final JClass enclosingClass;
+  final JClass? enclosingClass;
   final Name _name;
   final bool _isStatic;
 
@@ -165,7 +162,6 @@
       case JMemberKind.recordField:
         return JRecordField.readFromDataSource(source);
     }
-    throw UnsupportedError("Unexpected JMemberKind $kind");
   }
 
   /// Serializes this [JMember] to [sink].
@@ -214,7 +210,7 @@
 
   @override
   String toString() => '${jsElementPrefix}$_kind'
-      '(${enclosingClass != null ? '${enclosingClass.name}.' : ''}$name)';
+      '(${enclosingClass != null ? '${enclosingClass!.name}.' : ''}$name)';
 }
 
 abstract class JFunction extends JMember
@@ -226,7 +222,7 @@
   @override
   final AsyncMarker asyncMarker;
 
-  JFunction(JLibrary library, JClass enclosingClass, Name name,
+  JFunction(JLibrary library, JClass? enclosingClass, Name name,
       this.parameterStructure, this.asyncMarker,
       {bool isStatic = false, this.isExternal = false})
       : super(library, enclosingClass, name, isStatic: isStatic);
@@ -236,10 +232,12 @@
     implements ConstructorEntity, IndexedConstructor {
   @override
   final bool isConst;
+  @override
+  final JClass enclosingClass;
 
   JConstructor(
-      JClass enclosingClass, Name name, ParameterStructure parameterStructure,
-      {bool isExternal, this.isConst})
+      this.enclosingClass, Name name, ParameterStructure parameterStructure,
+      {required bool isExternal, required this.isConst})
       : super(enclosingClass.library, enclosingClass, name, parameterStructure,
             AsyncMarker.SYNC,
             isExternal: isExternal);
@@ -270,13 +268,13 @@
 
   JGenerativeConstructor(
       JClass enclosingClass, Name name, ParameterStructure parameterStructure,
-      {bool isExternal, bool isConst})
+      {required bool isExternal, required bool isConst})
       : super(enclosingClass, name, parameterStructure,
             isExternal: isExternal, isConst: isConst);
 
   factory JGenerativeConstructor.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
-    JClass enclosingClass = source.readClass();
+    final enclosingClass = source.readClass() as JClass;
     String name = source.readString();
     ParameterStructure parameterStructure =
         ParameterStructure.readFromDataSource(source);
@@ -317,15 +315,15 @@
 
   JFactoryConstructor(
       JClass enclosingClass, Name name, ParameterStructure parameterStructure,
-      {bool isExternal,
-      bool isConst,
-      /*required*/ this.isFromEnvironmentConstructor})
+      {required bool isExternal,
+      required bool isConst,
+      required this.isFromEnvironmentConstructor})
       : super(enclosingClass, name, parameterStructure,
             isExternal: isExternal, isConst: isConst);
 
   factory JFactoryConstructor.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
-    JClass enclosingClass = source.readClass();
+    final enclosingClass = source.readClass() as JClass;
     String name = source.readString();
     ParameterStructure parameterStructure =
         ParameterStructure.readFromDataSource(source);
@@ -375,7 +373,7 @@
 
   factory JConstructorBody.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
-    JConstructor constructor = source.readMember();
+    final constructor = source.readMember() as JConstructor;
     ParameterStructure parameterStructure =
         ParameterStructure.readFromDataSource(source);
     source.end(tag);
@@ -403,23 +401,25 @@
   @override
   final bool isAbstract;
 
-  JMethod(JLibrary library, JClass enclosingClass, Name name,
+  JMethod(JLibrary library, JClass? enclosingClass, Name name,
       ParameterStructure parameterStructure, AsyncMarker asyncMarker,
-      {bool isStatic, bool isExternal, this.isAbstract})
+      {required bool isStatic,
+      required bool isExternal,
+      required this.isAbstract})
       : super(library, enclosingClass, name, parameterStructure, asyncMarker,
             isStatic: isStatic, isExternal: isExternal);
 
   factory JMethod.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
     MemberContextKind kind = source.readEnum(MemberContextKind.values);
-    JLibrary library;
-    JClass enclosingClass;
+    late final JLibrary library;
+    JClass? enclosingClass;
     switch (kind) {
       case MemberContextKind.library:
-        library = source.readLibrary();
+        library = source.readLibrary() as JLibrary;
         break;
       case MemberContextKind.cls:
-        enclosingClass = source.readClass();
+        enclosingClass = source.readClass() as JClass;
         library = enclosingClass.library;
         break;
     }
@@ -442,7 +442,7 @@
     sink.begin(tag);
     if (enclosingClass != null) {
       sink.writeEnum(MemberContextKind.cls);
-      sink.writeClass(enclosingClass);
+      sink.writeClass(enclosingClass!);
     } else {
       sink.writeEnum(MemberContextKind.library);
       sink.writeLibrary(library);
@@ -481,7 +481,7 @@
 
   factory JGeneratorBody.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
-    JFunction function = source.readMember();
+    final function = source.readMember() as JFunction;
     DartType elementType = source.readDartType();
     source.end(tag);
     return JGeneratorBody(function, elementType);
@@ -508,9 +508,11 @@
   @override
   final bool isAbstract;
 
-  JGetter(JLibrary library, JClass enclosingClass, Name name,
+  JGetter(JLibrary library, JClass? enclosingClass, Name name,
       AsyncMarker asyncMarker,
-      {bool isStatic, bool isExternal, this.isAbstract})
+      {required bool isStatic,
+      required bool isExternal,
+      required this.isAbstract})
       : super(library, enclosingClass, name, ParameterStructure.getter,
             asyncMarker,
             isStatic: isStatic, isExternal: isExternal);
@@ -518,14 +520,14 @@
   factory JGetter.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
     MemberContextKind kind = source.readEnum(MemberContextKind.values);
-    JLibrary library;
-    JClass enclosingClass;
+    late final JLibrary library;
+    JClass? enclosingClass;
     switch (kind) {
       case MemberContextKind.library:
-        library = source.readLibrary();
+        library = source.readLibrary() as JLibrary;
         break;
       case MemberContextKind.cls:
-        enclosingClass = source.readClass();
+        enclosingClass = source.readClass() as JClass;
         library = enclosingClass.library;
         break;
     }
@@ -545,7 +547,7 @@
     sink.begin(tag);
     if (enclosingClass != null) {
       sink.writeEnum(MemberContextKind.cls);
-      sink.writeClass(enclosingClass);
+      sink.writeClass(enclosingClass!);
     } else {
       sink.writeEnum(MemberContextKind.library);
       sink.writeLibrary(library);
@@ -573,8 +575,10 @@
   @override
   final bool isAbstract;
 
-  JSetter(JLibrary library, JClass enclosingClass, Name name,
-      {bool isStatic, bool isExternal, this.isAbstract})
+  JSetter(JLibrary library, JClass? enclosingClass, Name name,
+      {required bool isStatic,
+      required bool isExternal,
+      required this.isAbstract})
       : super(library, enclosingClass, name, ParameterStructure.setter,
             AsyncMarker.SYNC,
             isStatic: isStatic, isExternal: isExternal);
@@ -582,14 +586,14 @@
   factory JSetter.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
     MemberContextKind kind = source.readEnum(MemberContextKind.values);
-    JLibrary library;
-    JClass enclosingClass;
+    late final JLibrary library;
+    JClass? enclosingClass;
     switch (kind) {
       case MemberContextKind.library:
-        library = source.readLibrary();
+        library = source.readLibrary() as JLibrary;
         break;
       case MemberContextKind.cls:
-        enclosingClass = source.readClass();
+        enclosingClass = source.readClass() as JClass;
         library = enclosingClass.library;
         break;
     }
@@ -608,7 +612,7 @@
     sink.begin(tag);
     if (enclosingClass != null) {
       sink.writeEnum(MemberContextKind.cls);
-      sink.writeClass(enclosingClass);
+      sink.writeClass(enclosingClass!);
     } else {
       sink.writeEnum(MemberContextKind.library);
       sink.writeLibrary(library);
@@ -640,21 +644,23 @@
   @override
   final bool isConst;
 
-  JField(JLibrary library, JClass enclosingClass, Name name,
-      {bool isStatic, this.isAssignable, this.isConst})
+  JField(JLibrary library, JClass? enclosingClass, Name name,
+      {required bool isStatic,
+      required this.isAssignable,
+      required this.isConst})
       : super(library, enclosingClass, name, isStatic: isStatic);
 
   factory JField.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
     MemberContextKind kind = source.readEnum(MemberContextKind.values);
-    JLibrary library;
-    JClass enclosingClass;
+    late final JLibrary library;
+    JClass? enclosingClass;
     switch (kind) {
       case MemberContextKind.library:
-        library = source.readLibrary();
+        library = source.readLibrary() as JLibrary;
         break;
       case MemberContextKind.cls:
-        enclosingClass = source.readClass();
+        enclosingClass = source.readClass() as JClass;
         library = enclosingClass.library;
         break;
     }
@@ -673,7 +679,7 @@
     sink.begin(tag);
     if (enclosingClass != null) {
       sink.writeEnum(MemberContextKind.cls);
-      sink.writeClass(enclosingClass);
+      sink.writeClass(enclosingClass!);
     } else {
       sink.writeEnum(MemberContextKind.library);
       sink.writeLibrary(library);
@@ -699,13 +705,13 @@
 
   JClosureCallMethod(ClassEntity enclosingClass,
       ParameterStructure parameterStructure, AsyncMarker asyncMarker)
-      : super(enclosingClass.library, enclosingClass, Names.call,
-            parameterStructure, asyncMarker,
+      : super(enclosingClass.library as JLibrary, enclosingClass as JClass,
+            Names.call, parameterStructure, asyncMarker,
             isStatic: false, isExternal: false, isAbstract: false);
 
   factory JClosureCallMethod.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
-    JClass enclosingClass = source.readClass();
+    final enclosingClass = source.readClass() as JClass;
     ParameterStructure parameterStructure =
         ParameterStructure.readFromDataSource(source);
     AsyncMarker asyncMarker = source.readEnum(AsyncMarker.values);
@@ -717,7 +723,7 @@
   void writeToDataSink(DataSinkWriter sink) {
     sink.writeEnum(JMemberKind.closureCallMethod);
     sink.begin(tag);
-    sink.writeClass(enclosingClass);
+    sink.writeClass(enclosingClass!);
     parameterStructure.writeToDataSink(sink);
     sink.writeEnum(asyncMarker);
     sink.end(tag);
@@ -735,13 +741,13 @@
   static const String tag = 'signature-method';
 
   JSignatureMethod(ClassEntity enclosingClass)
-      : super(enclosingClass.library, enclosingClass, Names.signature,
-            ParameterStructure.zeroArguments, AsyncMarker.SYNC,
+      : super(enclosingClass.library as JLibrary, enclosingClass as JClass,
+            Names.signature, ParameterStructure.zeroArguments, AsyncMarker.SYNC,
             isStatic: false, isExternal: false, isAbstract: false);
 
   factory JSignatureMethod.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
-    JClass cls = source.readClass();
+    final cls = source.readClass() as JClass;
     source.end(tag);
     return JSignatureMethod(cls);
   }
@@ -750,7 +756,7 @@
   void writeToDataSink(DataSinkWriter sink) {
     sink.writeEnum(JMemberKind.signatureMethod);
     sink.begin(tag);
-    sink.writeClass(enclosingClass);
+    sink.writeClass(enclosingClass!);
     sink.end(tag);
   }
 
@@ -767,7 +773,7 @@
   static const String tag = 'type-variable';
 
   @override
-  final Entity typeDeclaration;
+  final Entity? typeDeclaration;
   @override
   final String name;
   @override
@@ -779,7 +785,7 @@
   factory JTypeVariable.readFromDataSource(DataSourceReader source) {
     source.begin(tag);
     JTypeVariableKind kind = source.readEnum(JTypeVariableKind.values);
-    Entity typeDeclaration;
+    Entity? typeDeclaration;
     switch (kind) {
       case JTypeVariableKind.cls:
         typeDeclaration = source.readClass();
@@ -803,15 +809,14 @@
   /// Serializes this [JTypeVariable] to [sink].
   void writeToDataSink(DataSinkWriter sink) {
     sink.begin(tag);
-    if (typeDeclaration is IndexedClass) {
-      IndexedClass cls = typeDeclaration;
+    final declaration = typeDeclaration;
+    if (declaration is ClassEntity) {
       sink.writeEnum(JTypeVariableKind.cls);
-      sink.writeClass(cls);
-    } else if (typeDeclaration is IndexedMember) {
-      IndexedMember member = typeDeclaration;
+      sink.writeClass(declaration);
+    } else if (declaration is MemberEntity) {
       sink.writeEnum(JTypeVariableKind.member);
-      sink.writeMember(member);
-    } else if (typeDeclaration == null) {
+      sink.writeMember(declaration);
+    } else if (declaration == null) {
       sink.writeEnum(JTypeVariableKind.local);
     } else {
       throw UnsupportedError(
@@ -824,5 +829,5 @@
 
   @override
   String toString() =>
-      '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)';
+      '${jsElementPrefix}type_variable(${typeDeclaration?.name}.$name)';
 }
diff --git a/pkg/compiler/lib/src/js_model/env.dart b/pkg/compiler/lib/src/js_model/env.dart
index e1e7e2d..0bf7e80 100644
--- a/pkg/compiler/lib/src/js_model/env.dart
+++ b/pkg/compiler/lib/src/js_model/env.dart
@@ -18,7 +18,7 @@
 import '../js_model/class_type_variable_access.dart';
 import '../ordered_typeset.dart';
 import '../serialization/deferrable.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import 'closure.dart';
 import 'element_map.dart';
 import 'element_map_impl.dart';
diff --git a/pkg/compiler/lib/src/js_model/js_world.dart b/pkg/compiler/lib/src/js_model/js_world.dart
index 92361b3..afdce46 100644
--- a/pkg/compiler/lib/src/js_model/js_world.dart
+++ b/pkg/compiler/lib/src/js_model/js_world.dart
@@ -30,7 +30,7 @@
 import '../js_backend/runtime_types_resolution.dart';
 import '../ordered_typeset.dart';
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/class_hierarchy.dart';
 import '../universe/class_set.dart';
 import '../universe/function_set.dart' show FunctionSet;
diff --git a/pkg/compiler/lib/src/js_model/locals.dart b/pkg/compiler/lib/src/js_model/locals.dart
index 7412239..bfa00b1 100644
--- a/pkg/compiler/lib/src/js_model/locals.dart
+++ b/pkg/compiler/lib/src/js_model/locals.dart
@@ -2,26 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.10
-
 library dart2js.js_model.locals;
 
 import 'package:kernel/ast.dart' as ir;
 
-import '../closure.dart';
+import '../closure_migrated.dart';
 import '../common.dart';
 import '../elements/entities.dart';
 import '../elements/indexed.dart';
 import '../elements/jumps.dart';
 import '../elements/types.dart';
 import '../serialization/deferrable.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 
-import 'element_map.dart';
+import 'element_map_interfaces.dart';
+import 'element_map_migrated.dart';
 import 'elements.dart' show JGeneratorBody;
-import 'locals_interfaces.dart' as interfaces;
 
-class GlobalLocalsMap implements interfaces.GlobalLocalsMap {
+class GlobalLocalsMap {
   /// Tag used for identifying serialized [GlobalLocalsMap] objects in a
   /// debugging data stream.
   static const String tag = 'global-locals-map';
@@ -103,11 +101,11 @@
   /// debugging data stream.
   static const String tag = 'locals-map';
 
-  MemberEntity _currentMember;
+  late final MemberEntity _currentMember;
   final EntityDataMap<JLocal, LocalData> _locals = EntityDataMap();
-  Map<ir.VariableDeclaration, JLocal> _variableMap;
-  Map<ir.TreeNode, JJumpTarget> _jumpTargetMap;
-  Iterable<ir.BreakStatement> _breaksAsContinue;
+  Map<ir.VariableDeclaration, JLocal>? _variableMap;
+  Map<ir.TreeNode, JJumpTarget>? _jumpTargetMap;
+  Iterable<ir.BreakStatement>? _breaksAsContinue;
 
   KernelToLocalsMapImpl(this._currentMember);
 
@@ -117,32 +115,31 @@
     _currentMember = source.readMember();
     int localsCount = source.readInt();
     if (localsCount > 0) {
-      _variableMap = {};
+      final variableMap = _variableMap = {};
       for (int i = 0; i < localsCount; i++) {
         int index = source.readInt();
-        String name = source.readStringOrNull();
+        final name = source.readStringOrNull();
         bool isRegularParameter = source.readBool();
-        ir.VariableDeclaration node = source.readTreeNode();
+        final node = source.readTreeNode() as ir.VariableDeclaration;
         JLocal local =
             JLocal(name, currentMember, isRegularParameter: isRegularParameter);
         LocalData data = LocalData(node);
         _locals.registerByIndex(index, local, data);
-        _variableMap[node] = local;
+        variableMap[node] = local;
       }
     }
     int jumpCount = source.readInt();
     if (jumpCount > 0) {
-      _jumpTargetMap = {};
+      final jumpTargetMap = _jumpTargetMap = {};
       for (int i = 0; i < jumpCount; i++) {
         JJumpTarget target = JJumpTarget.readFromDataSource(source);
         List<ir.TreeNode> nodes = source.readTreeNodes();
         for (ir.TreeNode node in nodes) {
-          _jumpTargetMap[node] = target;
+          jumpTargetMap[node] = target;
         }
       }
     }
-    _breaksAsContinue = source.readTreeNodes();
-    if (_breaksAsContinue.isEmpty) _breaksAsContinue = const [];
+    _breaksAsContinue = source.readTreeNodesOrNull() ?? const [];
     source.end(tag);
   }
 
@@ -166,7 +163,7 @@
       // instance a label statement containing a for loop both constitutes the
       // same jump target and the SSA graph builder dependents on this property.
       Map<JJumpTarget, List<ir.TreeNode>> reversedMap = {};
-      _jumpTargetMap.forEach((ir.TreeNode node, JJumpTarget target) {
+      _jumpTargetMap!.forEach((ir.TreeNode node, JJumpTarget target) {
         reversedMap.putIfAbsent(target, () => []).add(node);
       });
       sink.writeInt(reversedMap.length);
@@ -188,7 +185,7 @@
 
       // Find the root node for the current member.
       while (node is! ir.Member) {
-        node = node.parent;
+        node = node.parent!;
       }
 
       node.accept(visitor);
@@ -201,70 +198,69 @@
   MemberEntity get currentMember => _currentMember;
 
   Local getLocalByIndex(int index) {
-    return _locals.getEntity(index);
+    return _locals.getEntity(index)!;
   }
 
   @override
   JumpTarget getJumpTargetForBreak(ir.BreakStatement node) {
     _ensureJumpMap(node.target);
-    JumpTarget target = _jumpTargetMap[node];
-    assert(target != null, failedAt(currentMember, 'No target for $node.'));
-    return target;
+    return _jumpTargetMap![node] ??
+        failedAt(
+            currentMember, 'Could not find target for break statement: $node');
   }
 
   @override
   bool generateContinueForBreak(ir.BreakStatement node) {
-    return _breaksAsContinue.contains(node);
+    return _breaksAsContinue!.contains(node);
   }
 
   @override
   JumpTarget getJumpTargetForContinueSwitch(ir.ContinueSwitchStatement node) {
     _ensureJumpMap(node.target);
-    JumpTarget target = _jumpTargetMap[node];
-    assert(target != null, failedAt(currentMember, 'No target for $node.'));
-    return target;
+    return _jumpTargetMap![node] ??
+        failedAt(currentMember, 'No target for $node.');
   }
 
   @override
-  JumpTarget getJumpTargetForSwitchCase(ir.SwitchCase node) {
+  JumpTarget? getJumpTargetForSwitchCase(ir.SwitchCase node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
-  JumpTarget getJumpTargetForDo(ir.DoStatement node) {
+  JumpTarget? getJumpTargetForDo(ir.DoStatement node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
-  JumpTarget getJumpTargetForLabel(ir.LabeledStatement node) {
+  JumpTarget? getJumpTargetForLabel(ir.LabeledStatement node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
-  JumpTarget getJumpTargetForSwitch(ir.SwitchStatement node) {
+  JumpTarget? getJumpTargetForSwitch(ir.SwitchStatement node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
-  JumpTarget getJumpTargetForFor(ir.ForStatement node) {
+  JumpTarget? getJumpTargetForFor(ir.ForStatement node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
-  JumpTarget getJumpTargetForForIn(ir.ForInStatement node) {
+  JumpTarget? getJumpTargetForForIn(ir.ForInStatement node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
-  JumpTarget getJumpTargetForWhile(ir.WhileStatement node) {
+  JumpTarget? getJumpTargetForWhile(ir.WhileStatement node) {
     _ensureJumpMap(node);
-    return _jumpTargetMap[node];
+    return _jumpTargetMap![node];
   }
 
   @override
@@ -344,7 +340,7 @@
   visitBreakStatement(ir.BreakStatement node) {
     JJumpTarget target;
     ir.TreeNode body = node.target.body;
-    ir.TreeNode parent = node.target.parent;
+    ir.TreeNode parent = node.target.parent!;
 
     // TODO(johnniwinther): Coordinate with CFE-team to avoid such arbitrary
     // reverse engineering mismatches:
@@ -366,7 +362,7 @@
       //     }
       //
       // for which we should still use the for loop as a continue target.
-      parent = parent.parent;
+      parent = parent.parent!;
     }
     if (canBeBreakTarget(body)) {
       // We have code like
@@ -385,7 +381,7 @@
           needsLabel = search != body;
           break;
         }
-        search = search.parent;
+        search = search.parent!;
       }
       if (needsLabel) {
         JLabelDefinition label = _getOrCreateLabel(target);
@@ -409,7 +405,7 @@
           needsLabel = search != body;
           break;
         }
-        search = search.parent;
+        search = search.parent!;
       }
       if (needsLabel) {
         JLabelDefinition label = _getOrCreateLabel(target);
@@ -463,7 +459,7 @@
   final MemberEntity memberContext;
   @override
   final int nestingLevel;
-  List<LabelDefinition> _labels;
+  List<JLabelDefinition>? _labels;
   @override
   final bool isSwitch;
   @override
@@ -514,10 +510,11 @@
     sink.writeBool(isSwitchCase);
     sink.writeBool(isBreakTarget);
     sink.writeBool(isContinueTarget);
-    if (_labels != null) {
-      sink.writeInt(_labels.length);
-      for (LabelDefinition definition in _labels) {
-        sink.writeString(definition.name);
+    final labels = _labels;
+    if (labels != null) {
+      sink.writeInt(labels.length);
+      for (LabelDefinition definition in labels) {
+        sink.writeString(definition.name!);
         sink.writeBool(definition.isBreakTarget);
         sink.writeBool(definition.isContinueTarget);
       }
@@ -528,18 +525,18 @@
   }
 
   @override
-  LabelDefinition addLabel(String labelName,
+  JLabelDefinition addLabel(String labelName,
       {bool isBreakTarget = false, bool isContinueTarget = false}) {
-    _labels ??= <LabelDefinition>[];
-    LabelDefinition labelDefinition = JLabelDefinition(this, labelName,
+    _labels ??= <JLabelDefinition>[];
+    final labelDefinition = JLabelDefinition(this, labelName,
         isBreakTarget: isBreakTarget, isContinueTarget: isContinueTarget);
-    _labels.add(labelDefinition);
+    _labels!.add(labelDefinition);
     return labelDefinition;
   }
 
   @override
-  List<LabelDefinition> get labels {
-    return _labels ?? const <LabelDefinition>[];
+  List<JLabelDefinition> get labels {
+    return _labels ?? const <JLabelDefinition>[];
   }
 
   @override
@@ -595,7 +592,7 @@
 
 class JLocal extends IndexedLocal {
   @override
-  final String name;
+  final String? name;
   final MemberEntity memberContext;
 
   /// True if this local represents a local parameter.
@@ -612,7 +609,7 @@
     StringBuffer sb = StringBuffer();
     sb.write('$_kind(');
     if (memberContext.enclosingClass != null) {
-      sb.write(memberContext.enclosingClass.name);
+      sb.write(memberContext.enclosingClass!.name);
       sb.write('.');
     }
     sb.write(memberContext.name);
@@ -626,7 +623,7 @@
 class LocalData {
   final ir.VariableDeclaration node;
 
-  DartType _type;
+  DartType? _type;
 
   LocalData(this.node);
 
@@ -634,7 +631,7 @@
     return _type ??= elementMap.getDartType(node.type);
   }
 
-  ir.FunctionNode get functionNode => node.parent;
+  ir.FunctionNode get functionNode => node.parent as ir.FunctionNode;
 }
 
 /// Calls [f] for each parameter in [function] in the canonical order:
@@ -643,10 +640,10 @@
     GlobalLocalsMap globalLocalsMap,
     JsToElementMap elementMap,
     FunctionEntity function,
-    void f(Local parameter, {bool isElided})) {
+    void f(Local parameter, {bool? isElided})) {
   KernelToLocalsMap localsMap = globalLocalsMap.getLocalsMap(function);
   forEachOrderedParameter(elementMap, function,
-      (ir.VariableDeclaration variable, {bool isElided}) {
+      (ir.VariableDeclaration variable, {required bool isElided}) {
     f(localsMap.getLocalVariable(variable), isElided: isElided);
   });
 }
diff --git a/pkg/compiler/lib/src/js_model/locals_interfaces.dart b/pkg/compiler/lib/src/js_model/locals_interfaces.dart
deleted file mode 100644
index 7c4267c..0000000
--- a/pkg/compiler/lib/src/js_model/locals_interfaces.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
-// for 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 facade interface for the members of GlobalLocalsMap that are
-/// required by other migrated classes.
-// TODO(48820): When GlobalLocalsMap is migrated, remove this facade.
-abstract class GlobalLocalsMap {}
diff --git a/pkg/compiler/lib/src/js_model/type_recipe.dart b/pkg/compiler/lib/src/js_model/type_recipe.dart
index ad26ddc..9214969 100644
--- a/pkg/compiler/lib/src/js_model/type_recipe.dart
+++ b/pkg/compiler/lib/src/js_model/type_recipe.dart
@@ -8,7 +8,7 @@
 import '../elements/types.dart';
 import '../diagnostics/invariant.dart';
 import '../diagnostics/spannable.dart' show CURRENT_ELEMENT_SPANNABLE;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart' show Hashing;
 
 abstract class TypeRecipeDomain {
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index df7624c..00f0fb4 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -138,10 +138,10 @@
   bool get errorOnUnexactWebIntLiterals => true;
 
   @override
-  void performOutlineTransformations(
-      ir.Component component, CoreTypes coreTypes) {
-    component
-        .accept(StaticInteropStubCreator(StaticInteropClassEraser(coreTypes)));
+  void performOutlineTransformations(ir.Component component,
+      CoreTypes coreTypes, ReferenceFromIndex? referenceFromIndex) {
+    component.accept(StaticInteropStubCreator(
+        StaticInteropClassEraser(coreTypes, referenceFromIndex)));
   }
 
   @override
@@ -157,7 +157,8 @@
       ChangedStructureNotifier? changedStructureNotifier}) {
     var nativeClasses = JsInteropChecks.getNativeClasses(component);
     var jsUtilOptimizer = JsUtilOptimizer(coreTypes, hierarchy);
-    var staticInteropClassEraser = StaticInteropClassEraser(coreTypes);
+    var staticInteropClassEraser =
+        StaticInteropClassEraser(coreTypes, referenceFromIndex);
     for (var library in libraries) {
       JsInteropChecks(
               coreTypes,
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 2a75105..3335436 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -56,7 +56,8 @@
 import '../universe/world_impact.dart';
 
 import 'element_map.dart';
-import 'element_map_interfaces.dart' show KernelToElementMapForClassHierarchy;
+import 'element_map_interfaces.dart'
+    show KernelToElementMapForClassHierarchy, KernelToElementMapForImpactData;
 import 'env.dart';
 import 'kelements.dart';
 import 'kernel_impact.dart';
@@ -64,7 +65,11 @@
 /// Implementation of [IrToElementMap] that only supports world
 /// impact computation.
 class KernelToElementMap
-    implements KernelToElementMapForClassHierarchy, IrToElementMap {
+    implements
+        IrToElementMap,
+        KernelToElementMapForClassHierarchy,
+        KernelToElementMapForImpactData {
+  @override
   final CompilerOptions options;
   @override
   final DiagnosticReporter reporter;
@@ -128,6 +133,7 @@
   }
 
   /// Access to the [DartTypes] object.
+  @override
   DartTypes get types => _types;
 
   KernelElementEnvironment get elementEnvironment => _elementEnvironment;
@@ -863,6 +869,7 @@
     return ir.StaticTypeContext(getMemberNode(member), typeEnvironment);
   }
 
+  @override
   Dart2jsConstantEvaluator get constantEvaluator {
     return _constantEvaluator ??=
         Dart2jsConstantEvaluator(env.mainComponent, typeEnvironment,
diff --git a/pkg/compiler/lib/src/kernel/element_map_interfaces.dart b/pkg/compiler/lib/src/kernel/element_map_interfaces.dart
index ef733f02..8795952 100644
--- a/pkg/compiler/lib/src/kernel/element_map_interfaces.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_interfaces.dart
@@ -2,9 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../elements/entities.dart' show ClassEntity;
+/// Facade interfaces for KernelToElementMap.
+// TODO(48820): Remove after migrating element_map.dart and
+// element_map_impl.dart.
+
+import 'package:kernel/ast.dart' as ir show DartType, Member;
+
+import '../common.dart' show DiagnosticReporter;
+import '../common/elements.dart' show CommonElements;
+import '../elements/entities.dart' show ClassEntity, ConstructorEntity;
 import '../elements/indexed.dart' show IndexedClass;
-import '../elements/types.dart' show InterfaceType;
+import '../elements/types.dart' show DartType, DartTypes, InterfaceType;
+import '../ir/constants.dart' show Dart2jsConstantEvaluator;
+import '../options.dart';
 
 abstract class KernelToElementMapForClassHierarchy {
   ClassEntity? getSuperClass(ClassEntity cls);
@@ -13,3 +23,14 @@
   ClassEntity? getAppliedMixin(IndexedClass cls);
   bool implementsFunction(IndexedClass cls);
 }
+
+abstract class KernelToElementMapForImpactData {
+  CommonElements get commonElements;
+  Dart2jsConstantEvaluator get constantEvaluator;
+  CompilerOptions get options;
+  DiagnosticReporter get reporter;
+  DartTypes get types;
+
+  ConstructorEntity getConstructor(ir.Member node);
+  DartType getDartType(ir.DartType type);
+}
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 563f4a5..4832afb 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -11,7 +11,7 @@
 import '../js_backend/native_data_interfaces.dart' show NativeBasicData;
 import '../js_model/js_to_frontend_map.dart' show JsToFrontendMap;
 import '../options.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../universe/side_effects.dart' show SideEffects;
 import 'js.dart';
 
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index d8e8b07..ac2f4a7 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -10,7 +10,7 @@
 import 'common.dart';
 import 'elements/entities.dart';
 import 'elements/types.dart';
-import 'serialization/serialization_interfaces.dart';
+import 'serialization/serialization.dart';
 
 /// An ordered set of the supertypes of a class. The supertypes of a class are
 /// ordered by decreasing hierarchy depth and by the order they are extended,
diff --git a/pkg/compiler/lib/src/serialization/binary_source.dart b/pkg/compiler/lib/src/serialization/binary_source.dart
index 3d8ba61..f27ee1b 100644
--- a/pkg/compiler/lib/src/serialization/binary_source.dart
+++ b/pkg/compiler/lib/src/serialization/binary_source.dart
@@ -5,7 +5,7 @@
 import 'dart:convert';
 import 'dart:typed_data';
 import 'data_source.dart';
-import 'serialization_interfaces.dart' show StringInterner;
+import 'serialization.dart' show StringInterner;
 
 /// [DataSource] that reads data from a sequence of bytes.
 ///
diff --git a/pkg/compiler/lib/src/serialization/deferrable.dart b/pkg/compiler/lib/src/serialization/deferrable.dart
index a2074aa..50f220d 100644
--- a/pkg/compiler/lib/src/serialization/deferrable.dart
+++ b/pkg/compiler/lib/src/serialization/deferrable.dart
@@ -4,7 +4,7 @@
 
 import 'dart:collection';
 
-import 'package:compiler/src/serialization/serialization_interfaces.dart';
+import 'package:compiler/src/serialization/serialization.dart';
 
 /// Interface for data that may be deserialized lazily.
 ///
diff --git a/pkg/compiler/lib/src/serialization/helpers.dart b/pkg/compiler/lib/src/serialization/helpers.dart
index 2e395b7..a2e2a26 100644
--- a/pkg/compiler/lib/src/serialization/helpers.dart
+++ b/pkg/compiler/lib/src/serialization/helpers.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.
 
-// @dart = 2.10
-
 part of 'serialization.dart';
 
 /// Enum used for identifying [ir.TreeNode] subclasses in serialization.
@@ -119,7 +117,7 @@
       ..addAll(node.typeParameters);
     _sink.writeInt(node.typeParameters.length);
     for (ir.TypeParameter parameter in node.typeParameters) {
-      _sink.writeString(parameter.name);
+      _sink.writeString(parameter.name!);
       _sink._writeDartTypeNode(parameter.bound, functionTypeVariables);
       _sink._writeDartTypeNode(parameter.defaultType, functionTypeVariables);
     }
diff --git a/pkg/compiler/lib/src/serialization/indexed_sink_source.dart b/pkg/compiler/lib/src/serialization/indexed_sink_source.dart
index 3ab1290..58d1849 100644
--- a/pkg/compiler/lib/src/serialization/indexed_sink_source.dart
+++ b/pkg/compiler/lib/src/serialization/indexed_sink_source.dart
@@ -4,14 +4,14 @@
 
 import 'data_sink.dart';
 import 'data_source.dart';
-import 'serialization_interfaces.dart';
+import 'serialization.dart';
 
 abstract class IndexedSource<E> {
   E? read(E readValue());
 
   /// Reshapes the cache to a [Map<E, int>] using [_getValue] if provided or
   /// leaving the cache entry as is otherwise.
-  Map<T, int> reshape<T>([T Function(E? value)? getValue]);
+  Map<T, int> reshapeCacheAsMap<T>([T Function(E? value)? getValue]);
 }
 
 abstract class IndexedSink<E> {
@@ -138,7 +138,7 @@
   }
 
   @override
-  Map<T, int> reshape<T>([T Function(E? value)? getValue]) {
+  Map<T, int> reshapeCacheAsMap<T>([T Function(E? value)? getValue]) {
     return _cache.map((key, value) => getValue == null
         ? MapEntry(value as T, key)
         : MapEntry(getValue(value), key));
@@ -153,7 +153,7 @@
 /// so that the indices are maintained. Since the read order is assumed to be
 /// consistent, the actual data is written at the first occurrence of the
 /// indexable element.
-class OrderedIndexedSink<E extends Object> implements IndexedSink<E> {
+class OrderedIndexedSink<E> implements IndexedSink<E> {
   final DataSink _sink;
   final Map<E?, int> cache;
 
@@ -194,7 +194,7 @@
 /// discovered we assume the data is written immediately after. Subsequent
 /// occurrences of that index then refer to the same value. Indices will appear
 /// in ascending order.
-class OrderedIndexedSource<E extends Object> implements IndexedSource<E> {
+class OrderedIndexedSource<E> implements IndexedSource<E> {
   final DataSource _source;
   final List<E?> cache;
 
@@ -229,7 +229,7 @@
   }
 
   @override
-  Map<T, int> reshape<T>([T Function(E? value)? getValue]) {
+  Map<T, int> reshapeCacheAsMap<T>([T Function(E? value)? getValue]) {
     var newCache = <T, int>{};
     for (int i = 0; i < cache.length; i++) {
       final newKey = getValue == null ? cache[i] as T : getValue(cache[i]);
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index f772db2..5e61e49 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -2,16 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.10
-
 import 'dart:collection';
 import 'dart:typed_data';
 import 'package:kernel/ast.dart' as ir;
-import '../closure.dart';
+import '../closure_migrated.dart';
+import '../common.dart';
 import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../deferred_load/output_unit.dart' show OutputUnit;
-import '../diagnostics/source_span.dart';
 import '../elements/entities.dart';
 import '../elements/indexed.dart';
 import '../elements/types.dart';
@@ -19,7 +17,7 @@
 import '../ir/constants.dart';
 import '../ir/static_type_base.dart';
 import '../js/js.dart' as js;
-import '../js_model/closure.dart';
+import '../js_model/closure_migrated.dart';
 import '../js_model/locals.dart';
 import '../js_model/type_recipe.dart' show TypeRecipe;
 
@@ -28,16 +26,6 @@
 import 'data_source.dart';
 import 'deferrable.dart';
 import 'member_data.dart';
-import 'serialization_interfaces.dart' as migrated
-    show
-        CodegenReader,
-        CodegenWriter,
-        DataSourceReader,
-        DataSinkWriter,
-        EntityLookup,
-        EntityReader,
-        EntityWriter,
-        LocalLookup;
 import 'indexed_sink_source.dart';
 import 'tags.dart';
 
@@ -47,22 +35,24 @@
 export 'object_sink.dart';
 export 'object_source.dart';
 export 'tags.dart';
-export 'serialization_interfaces.dart'
-    show CodegenReader, EntityLookup, EntityReader, EntityWriter;
 
 part 'sink.dart';
 part 'source.dart';
 part 'helpers.dart';
 
+abstract class StringInterner {
+  String internString(String string);
+}
+
 class ValueInterner {
   final Map<DartType, DartType> _dartTypeMap = HashMap();
-  final Map<ir.DartType, ir.DartType> _dartTypeNodeMap = HashMap();
+  final Map<ir.DartType?, ir.DartType?> _dartTypeNodeMap = HashMap();
 
   DartType internDartType(DartType dartType) {
     return _dartTypeMap[dartType] ??= dartType;
   }
 
-  ir.DartType internDartTypeNode(ir.DartType dartType) {
+  ir.DartType? internDartTypeNode(ir.DartType? dartType) {
     return _dartTypeNodeMap[dartType] ??= dartType;
   }
 }
@@ -70,18 +60,15 @@
 /// Data class representing cache information for a given [T] which can be
 /// passed from a [DataSourceReader] to other [DataSourceReader]s and [DataSinkWriter]s.
 class DataSourceTypeIndices<E, T> {
-  Map<E, int> get cache => _cache ??= source.reshape(_getValue);
+  Map<E, int> get cache => _cache ??= source.reshapeCacheAsMap(_getValue);
 
-  final E Function(T value) _getValue;
-  Map<E, int> _cache;
+  final E Function(T? value)? _getValue;
+  Map<E, int>? _cache;
   final IndexedSource<T> source;
 
-  /// Though [DataSourceTypeIndices] supports two types of caches. If the
-  /// exported indices are imported into a [DataSourceReader] then the [cacheAsMap]
-  /// will be used as is. If, however, the exported indices are imported into a
-  /// [DataSinkWriter] 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].
+  /// Uses the cache from the provided [source] and reshapes it if necessary
+  /// to create a lookup map of cached entities. If [_getValue] is provided,
+  /// the function will be used to map the cached entities into lookup keys.
   DataSourceTypeIndices(this.source, [this._getValue]) {
     assert(_getValue != null || T == E);
   }
@@ -91,7 +78,90 @@
 /// [DataSourceReader].
 class DataSourceIndices {
   final Map<Type, DataSourceTypeIndices> caches = {};
-  final DataSourceReader /*?*/ previousSourceReader;
+  final DataSourceReader? previousSourceReader;
 
   DataSourceIndices(this.previousSourceReader);
 }
+
+/// Interface used for looking up locals by index during deserialization.
+abstract class LocalLookup {
+  Local getLocalByIndex(MemberEntity memberContext, int index);
+}
+
+/// Interface used for reading codegen only data during deserialization.
+abstract class CodegenReader {
+  AbstractValue readAbstractValue(DataSourceReader source);
+  OutputUnit readOutputUnitReference(DataSourceReader source);
+  js.Node readJsNode(DataSourceReader source);
+  TypeRecipe readTypeRecipe(DataSourceReader source);
+}
+
+/// Interface used for writing codegen only data during serialization.
+abstract class CodegenWriter {
+  void writeAbstractValue(DataSinkWriter sink, AbstractValue value);
+  void writeOutputUnitReference(DataSinkWriter sink, OutputUnit value);
+  void writeJsNode(DataSinkWriter sink, js.Node node);
+  void writeTypeRecipe(DataSinkWriter sink, TypeRecipe recipe);
+}
+
+/// Interface used for looking up entities by index during deserialization.
+abstract class EntityLookup {
+  /// Returns the indexed library corresponding to [index].
+  IndexedLibrary getLibraryByIndex(int index);
+
+  /// Returns the indexed class corresponding to [index].
+  IndexedClass getClassByIndex(int index);
+
+  /// Returns the indexed member corresponding to [index].
+  IndexedMember getMemberByIndex(int index);
+
+  /// Returns the indexed type variable corresponding to [index].
+  IndexedTypeVariable getTypeVariableByIndex(int index);
+}
+
+/// Decoding strategy for entity references.
+class EntityReader {
+  const EntityReader();
+
+  IndexedLibrary readLibraryFromDataSource(
+      DataSourceReader source, EntityLookup entityLookup) {
+    return entityLookup.getLibraryByIndex(source.readInt());
+  }
+
+  IndexedClass readClassFromDataSource(
+      DataSourceReader source, EntityLookup entityLookup) {
+    return entityLookup.getClassByIndex(source.readInt());
+  }
+
+  IndexedMember readMemberFromDataSource(
+      DataSourceReader source, EntityLookup entityLookup) {
+    return entityLookup.getMemberByIndex(source.readInt());
+  }
+
+  IndexedTypeVariable readTypeVariableFromDataSource(
+      DataSourceReader source, EntityLookup entityLookup) {
+    return entityLookup.getTypeVariableByIndex(source.readInt());
+  }
+}
+
+/// Encoding strategy for entity references.
+class EntityWriter {
+  const EntityWriter();
+
+  void writeLibraryToDataSink(DataSinkWriter sink, IndexedLibrary value) {
+    sink.writeInt(value.libraryIndex);
+  }
+
+  void writeClassToDataSink(DataSinkWriter sink, IndexedClass value) {
+    sink.writeInt(value.classIndex);
+  }
+
+  void writeMemberToDataSink(DataSinkWriter sink, IndexedMember value) {
+    sink.writeInt(value.memberIndex);
+  }
+
+  void writeTypeVariableToDataSink(
+      DataSinkWriter sink, IndexedTypeVariable value) {
+    sink.writeInt(value.typeVariableIndex);
+  }
+}
diff --git a/pkg/compiler/lib/src/serialization/serialization_interfaces.dart b/pkg/compiler/lib/src/serialization/serialization_interfaces.dart
deleted file mode 100644
index 72b1c1aa..0000000
--- a/pkg/compiler/lib/src/serialization/serialization_interfaces.dart
+++ /dev/null
@@ -1,381 +0,0 @@
-// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:kernel/ast.dart' as ir
-    show
-        Class,
-        DartType,
-        Library,
-        LibraryDependency,
-        Member,
-        Name,
-        TreeNode,
-        TypeParameter;
-
-import '../common.dart';
-import '../constants/values.dart' show ConstantValue;
-import '../deferred_load/output_unit.dart';
-import '../elements/entities.dart';
-import '../elements/indexed.dart';
-import '../elements/types.dart' show DartType;
-import '../inferrer/abstract_value_domain.dart' show AbstractValue;
-import '../js/js.dart' as js;
-import '../js_model/type_recipe.dart';
-import 'deferrable.dart';
-import 'member_data.dart' show ComponentLookup;
-
-export 'member_data.dart' show ComponentLookup;
-export 'tags.dart';
-
-abstract class StringInterner {
-  String internString(String string);
-}
-
-/// NNBD-migrated interface for methods of DataSinkWriter.
-///
-/// This is a pure interface or facade for DataSinkWriter.
-///
-/// This interface has the same name as the implementation class. Using the same
-/// name allows some libraries that use DataSinkWriter to be migrated before the
-/// serialization library by changing
-///
-///     import '../serialization/serialization.dart';
-///
-/// to:
-///
-///     import '../serialization/serialization_interfaces.dart';
-///
-/// Documentation of the methods can be found in source.dart.
-// TODO(sra): Copy documentation for methods?
-abstract class DataSinkWriter {
-  int get length;
-
-  void begin(String tag);
-  void end(Object tag);
-
-  void writeBool(bool value);
-  void writeInt(int value);
-  void writeIntOrNull(int? value);
-  void writeString(String value);
-  void writeStringOrNull(String? value);
-  void writeStringMap<V>(Map<String, V>? map, void f(V value),
-      {bool allowNull = false});
-  void writeStrings(Iterable<String>? values, {bool allowNull = false});
-  void writeEnum(dynamic value);
-  void writeUri(Uri value);
-
-  void writeMemberNode(ir.Member nvalue);
-  void writeMemberNodes(Iterable<ir.Member>? values, {bool allowNull = false});
-  void writeMemberNodeMap<V>(Map<ir.Member, V>? map, void f(V value),
-      {bool allowNull = false});
-
-  void writeName(ir.Name value);
-  void writeLibraryDependencyNode(ir.LibraryDependency value);
-  void writeLibraryDependencyNodeOrNull(ir.LibraryDependency? value);
-
-  void writeTreeNode(ir.TreeNode value);
-  void writeTreeNodeOrNull(ir.TreeNode value);
-  void writeTreeNodes(Iterable<ir.TreeNode>? values, {bool allowNull = false});
-  void writeTreeNodeMap<V>(Map<ir.TreeNode, V> map, void f(V value));
-
-  void writeClassNode(ir.Class value);
-
-  // TODO(48820): 'covariant ClassEntity' is used below because the
-  // implementation takes IndexedClass. What this means is that in pre-NNBD
-  // code, the call site to the implementation DataSinkWriter has an implicit
-  // downcast from ClassEntity to IndexedClass. With NNND, these casts become
-  // explicit and quite tedious. It is cleaner to move the cast into the method,
-  // which is what 'covariant' achieves.
-  //
-  // If we want to retire this facade interface, we will have to make the
-  // DataSinkWriter implementation accept ClassEntity and manually check for
-  // IndexedClass. This is not necessarily a bad thing, since it opens the way
-  // for being able to serialize some non-indexed entities.
-
-  void writeClass(covariant ClassEntity value); // IndexedClass
-  void writeClassOrNull(covariant ClassEntity? value); // IndexedClass
-  void writeClasses(Iterable<ClassEntity>? values, {bool allowNull = false});
-  void writeClassMap<V>(Map<ClassEntity, V>? map, void f(V value),
-      {bool allowNull = false});
-
-  void writeTypeVariable(
-      covariant TypeVariableEntity value); // IndexedTypeVariable
-
-  void writeMember(covariant MemberEntity member); // IndexMember
-  void writeMemberOrNull(covariant MemberEntity? member); // IndexMember
-  void writeMembers(Iterable<MemberEntity>? values, {bool allowNull = false});
-
-  void writeMemberMap<V>(
-      Map<MemberEntity, V>? map, void f(MemberEntity member, V value),
-      {bool allowNull = false});
-
-  void writeLibrary(covariant LibraryEntity value); // IndexedLibrary
-  void writeLibraryOrNull(covariant LibraryEntity? value); // IndexedLibrary
-  void writeLibraryMap<V>(Map<LibraryEntity, V>? map, void f(V value),
-      {bool allowNull = false});
-
-  void writeLibraryNode(ir.Library value);
-
-  void writeTypeRecipe(TypeRecipe value);
-
-  void writeDartTypeNode(ir.DartType value);
-  void writeDartTypeNodeOrNull(ir.DartType? value);
-  void writeDartTypeNodes(Iterable<ir.DartType>? values,
-      {bool allowNull = false});
-
-  void writeDartType(DartType value);
-  void writeDartTypeOrNull(DartType? value);
-  void writeDartTypesOrNull(Iterable<DartType>? values);
-  void writeDartTypes(Iterable<DartType> values);
-
-  void writeTypeParameterNode(ir.TypeParameter value);
-  void writeTypeParameterNodes(Iterable<ir.TypeParameter> values);
-
-  void writeTypeVariableMap<V>(
-      Map<IndexedTypeVariable, V> map, void f(V value));
-
-  void inMemberContext(ir.Member context, void f());
-  void writeTreeNodeMapInContext<V>(Map<ir.TreeNode, V>? map, void f(V value),
-      {bool allowNull = false});
-
-  void writeCached<E extends Object>(E? value, void f(E value));
-
-  void writeList<E extends Object>(Iterable<E>? values, void f(E value),
-      {bool allowNull = false});
-
-  void writeConstant(ConstantValue value);
-  void writeConstantOrNull(ConstantValue? value);
-  void writeConstantMap<V>(Map<ConstantValue, V>? map, void f(V value),
-      {bool allowNull = false});
-
-  void writeValueOrNull<E>(E? value, void f(E value));
-
-  void writeDoubleValue(double value);
-  void writeIntegerValue(int value);
-
-  void writeLocalOrNull(Local? local);
-  void writeLocalMap<V>(Map<Local, V> map, void f(V value));
-
-  void writeImport(ImportEntity import);
-  void writeImportOrNull(ImportEntity? import);
-  void writeImports(Iterable<ImportEntity>? values, {bool allowNull = false});
-  void writeImportMap<V>(Map<ImportEntity, V>? map, void f(V value),
-      {bool allowNull = false});
-
-  void writeAbstractValue(AbstractValue value);
-
-  void writeJsNodeOrNull(js.Node? value);
-
-  void writeSourceSpan(SourceSpan value);
-
-  void writeDeferrable(void f());
-}
-
-/// Migrated interface for methods of DataSourceReader.
-abstract class DataSourceReader {
-  int get length;
-  int get startOffset;
-  int get endOffset;
-
-  void registerComponentLookup(ComponentLookup componentLookup);
-  void registerLocalLookup(LocalLookup localLookup);
-  void registerEntityLookup(EntityLookup entityLookup);
-  void registerEntityReader(EntityReader reader);
-
-  void begin(String tag);
-  void end(String tag);
-
-  bool readBool();
-  int readInt();
-  int? readIntOrNull();
-  String readString();
-  String? readStringOrNull();
-  List<String>? readStrings({bool emptyAsNull = false});
-  Map<String, V>? readStringMap<V>(V f(), {bool emptyAsNull = false});
-  E readEnum<E>(List<E> values);
-  Uri readUri();
-
-  ir.Member readMemberNode();
-  List<E> readMemberNodes<E extends ir.Member>();
-  List<E>? readMemberNodesOrNull<E extends ir.Member>();
-  Map<K, V> readMemberNodeMap<K extends ir.Member, V>(V f());
-  Map<K, V>? readMemberNodeMapOrNull<K extends ir.Member, V>(V f());
-
-  ir.Name readName();
-  ir.LibraryDependency readLibraryDependencyNode();
-  ir.LibraryDependency readLibraryDependencyNodeOrNull();
-
-  ir.TreeNode readTreeNode();
-  ir.TreeNode? readTreeNodeOrNull();
-  List<E> readTreeNodes<E extends ir.TreeNode>();
-  List<E>? readTreeNodesOrNull<E extends ir.TreeNode>();
-  Map<K, V> readTreeNodeMap<K extends ir.TreeNode, V>(V f());
-  Map<K, V> readTreeNodeMapOrNull<K extends ir.TreeNode, V>(V f());
-
-  ir.Class readClassNode();
-
-  ClassEntity readClass(); // IndexedClass
-  ClassEntity? readClassOrNull(); // IndexedClass
-  List<E> readClasses<E extends ClassEntity>();
-  List<E>? readClassesOrNull<E extends ClassEntity>();
-  Map<K, V> readClassMap<K extends ClassEntity, V>(V f());
-  Map<K, V>? readClassMapOrNull<K extends ClassEntity, V>(V f());
-
-  TypeVariableEntity readTypeVariable(); // IndexedTypeVariable
-
-  MemberEntity readMember();
-  MemberEntity? readMemberOrNull();
-  List<E> readMembers<E extends MemberEntity>();
-  List<E>? readMembersOrNull<E extends MemberEntity>();
-  Map<K, V> readMemberMap<K extends MemberEntity, V>(V f(MemberEntity member));
-  Map<K, V>? readMemberMapOrNull<K extends MemberEntity, V>(
-      V f(MemberEntity member));
-
-  LibraryEntity readLibrary(); // IndexedLibrary;
-  LibraryEntity? readLibraryOrNull(); // IndexedLibrary;
-  Map<K, V> readLibraryMap<K extends LibraryEntity, V>(V f());
-  Map<K, V>? readLibraryMapOrNull<K extends LibraryEntity, V>(V f());
-
-  ir.Library readLibraryNode();
-
-  TypeRecipe readTypeRecipe();
-
-  ir.DartType readDartTypeNode();
-  ir.DartType? readDartTypeNodeOrNull();
-  List<ir.DartType> readDartTypeNodes();
-  List<ir.DartType>? readDartTypeNodesOrNull();
-
-  DartType readDartType();
-  DartType? readDartTypeOrNull();
-  List<DartType> readDartTypes();
-  List<DartType>? readDartTypesOrNull();
-
-  Map<K, V> readTypeVariableMap<K extends IndexedTypeVariable, V>(V f());
-
-  ir.TypeParameter readTypeParameterNode();
-  List<ir.TypeParameter> readTypeParameterNodes();
-
-  T inMemberContext<T>(ir.Member context, T f());
-  Map<K, V> readTreeNodeMapInContext<K extends ir.TreeNode, V>(V f());
-  Map<K, V>? readTreeNodeMapInContextOrNull<K extends ir.TreeNode, V>(V f());
-
-  E readCached<E extends Object>(E f());
-  E? readCachedOrNull<E extends Object>(E f());
-
-  List<E> readList<E extends Object>(E f());
-  List<E>? readListOrNull<E extends Object>(E f());
-
-  ConstantValue readConstant();
-  ConstantValue? readConstantOrNull();
-  Map<K, V> readConstantMap<K extends ConstantValue, V>(V f());
-  Map<K, V>? readConstantMapOrNull<K extends ConstantValue, V>(V f());
-
-  E? readValueOrNull<E>(E f());
-
-  double readDoubleValue();
-  int readIntegerValue();
-
-  ImportEntity readImport();
-  ImportEntity? readImportOrNull();
-  List<ImportEntity> readImports();
-  List<ImportEntity>? readImportsOrNull();
-  Map<ImportEntity, V> readImportMap<V>(V f());
-  Map<ImportEntity, V>? readImportMapOrNull<V>(V f());
-
-  AbstractValue readAbstractValue();
-
-  js.Node? readJsNodeOrNull();
-
-  SourceSpan readSourceSpan();
-
-  Local? readLocalOrNull();
-  Map<K, V> readLocalMap<K extends Local, V>(V f());
-
-  E readWithSource<E>(DataSourceReader source, E f());
-  E readWithOffset<E>(int offset, E f());
-  Deferrable<E> readDeferrable<E>(E f(), {bool cacheData = true});
-}
-
-/// Interface used for looking up locals by index during deserialization.
-abstract class LocalLookup {
-  Local getLocalByIndex(MemberEntity memberContext, int index);
-}
-
-/// Interface used for reading codegen only data during deserialization.
-abstract class CodegenReader {
-  AbstractValue readAbstractValue(DataSourceReader source);
-  OutputUnit readOutputUnitReference(DataSourceReader source);
-  js.Node readJsNode(DataSourceReader source);
-  TypeRecipe readTypeRecipe(DataSourceReader source);
-}
-
-/// Interface used for writing codegen only data during serialization.
-abstract class CodegenWriter {
-  void writeAbstractValue(DataSinkWriter sink, AbstractValue value);
-  void writeOutputUnitReference(DataSinkWriter sink, OutputUnit value);
-  void writeJsNode(DataSinkWriter sink, js.Node node);
-  void writeTypeRecipe(DataSinkWriter sink, TypeRecipe recipe);
-}
-
-/// Interface used for looking up entities by index during deserialization.
-abstract class EntityLookup {
-  /// Returns the indexed library corresponding to [index].
-  IndexedLibrary getLibraryByIndex(int index);
-
-  /// Returns the indexed class corresponding to [index].
-  IndexedClass getClassByIndex(int index);
-
-  /// Returns the indexed member corresponding to [index].
-  IndexedMember getMemberByIndex(int index);
-
-  /// Returns the indexed type variable corresponding to [index].
-  IndexedTypeVariable getTypeVariableByIndex(int index);
-}
-
-/// Decoding strategy for entity references.
-class EntityReader {
-  const EntityReader();
-
-  IndexedLibrary readLibraryFromDataSource(
-      DataSourceReader source, EntityLookup entityLookup) {
-    return entityLookup.getLibraryByIndex(source.readInt());
-  }
-
-  IndexedClass readClassFromDataSource(
-      DataSourceReader source, EntityLookup entityLookup) {
-    return entityLookup.getClassByIndex(source.readInt());
-  }
-
-  IndexedMember readMemberFromDataSource(
-      DataSourceReader source, EntityLookup entityLookup) {
-    return entityLookup.getMemberByIndex(source.readInt());
-  }
-
-  IndexedTypeVariable readTypeVariableFromDataSource(
-      DataSourceReader source, EntityLookup entityLookup) {
-    return entityLookup.getTypeVariableByIndex(source.readInt());
-  }
-}
-
-/// Encoding strategy for entity references.
-class EntityWriter {
-  const EntityWriter();
-
-  void writeLibraryToDataSink(DataSinkWriter sink, IndexedLibrary value) {
-    sink.writeInt(value.libraryIndex);
-  }
-
-  void writeClassToDataSink(DataSinkWriter sink, IndexedClass value) {
-    sink.writeInt(value.classIndex);
-  }
-
-  void writeMemberToDataSink(DataSinkWriter sink, IndexedMember value) {
-    sink.writeInt(value.memberIndex);
-  }
-
-  void writeTypeVariableToDataSink(
-      DataSinkWriter sink, IndexedTypeVariable value) {
-    sink.writeInt(value.typeVariableIndex);
-  }
-}
diff --git a/pkg/compiler/lib/src/serialization/sink.dart b/pkg/compiler/lib/src/serialization/sink.dart
index 71397c6..5aad4b2 100644
--- a/pkg/compiler/lib/src/serialization/sink.dart
+++ b/pkg/compiler/lib/src/serialization/sink.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.10
-
 part of 'serialization.dart';
 
 /// Serialization writer
 ///
 /// To be used with [DataSourceReader] to read and write serialized data.
 /// Serialization format is deferred to provided [DataSink].
-class DataSinkWriter implements migrated.DataSinkWriter {
+class DataSinkWriter {
   final DataSink _sinkWriter;
 
   final bool enableDeferredStrategy;
@@ -22,52 +20,53 @@
   /// and deserialization.
   final bool useDataKinds;
 
-  DataSourceIndices importedIndices;
+  DataSourceIndices? importedIndices;
 
   /// Visitor used for serializing [ir.DartType]s.
-  DartTypeNodeWriter _dartTypeNodeWriter;
+  late final DartTypeNodeWriter _dartTypeNodeWriter;
 
   /// Stack of tags used when [useDataKinds] is `true` to help debugging section
   /// inconsistencies between serialization and deserialization.
-  List<String> _tags;
+  List<String>? _tags;
 
   /// Map of [MemberData] object for serialized kernel member nodes.
   final Map<ir.Member, MemberData> _memberData = {};
 
-  IndexedSink<String> _stringIndex;
-  IndexedSink<Uri> _uriIndex;
-  IndexedSink<ir.Member> _memberNodeIndex;
-  IndexedSink<ImportEntity> _importIndex;
-  IndexedSink<ConstantValue> _constantIndex;
+  late final IndexedSink<String> _stringIndex;
+  late final IndexedSink<Uri> _uriIndex;
+  late final IndexedSink<ir.Member> _memberNodeIndex;
+  late final IndexedSink<ImportEntity> _importIndex;
+  late final IndexedSink<ConstantValue> _constantIndex;
 
   final Map<Type, IndexedSink> _generalCaches = {};
 
-  migrated.EntityWriter _entityWriter = const migrated.EntityWriter();
-  migrated.CodegenWriter _codegenWriter;
+  EntityWriter _entityWriter = const EntityWriter();
+  late final CodegenWriter _codegenWriter;
 
-  final Map<String, int> tagFrequencyMap;
+  final Map<String, int>? tagFrequencyMap;
 
-  ir.Member _currentMemberContext;
-  MemberData _currentMemberData;
+  ir.Member? _currentMemberContext;
+  MemberData? _currentMemberData;
 
   IndexedSink<T> _createUnorderedSink<T>() {
-    if (importedIndices == null) return UnorderedIndexedSink<T>(this);
-    final sourceInfo = importedIndices.caches[T];
+    final indices = importedIndices;
+    if (indices == null) return UnorderedIndexedSink<T>(this);
+    final sourceInfo = indices.caches[T];
     if (sourceInfo == null) {
       return UnorderedIndexedSink<T>(this,
-          startOffset: importedIndices.previousSourceReader.endOffset);
+          startOffset: indices.previousSourceReader?.endOffset);
     }
     Map<T, int> cacheCopy = Map.from(sourceInfo.cache);
     return UnorderedIndexedSink<T>(this,
-        cache: cacheCopy,
-        startOffset: importedIndices.previousSourceReader.endOffset);
+        cache: cacheCopy, startOffset: indices.previousSourceReader?.endOffset);
   }
 
   IndexedSink<T> _createSink<T>() {
-    if (importedIndices == null || !importedIndices.caches.containsKey(T)) {
+    final indices = importedIndices;
+    if (indices == null || !indices.caches.containsKey(T)) {
       return OrderedIndexedSink<T>(_sinkWriter);
     } else {
-      Map<T, int> cacheCopy = Map.from(importedIndices.caches[T].cache);
+      Map<T, int> cacheCopy = Map.from(indices.caches[T]!.cache);
       return OrderedIndexedSink<T>(_sinkWriter, cache: cacheCopy);
     }
   }
@@ -75,7 +74,7 @@
   DataSinkWriter(this._sinkWriter, CompilerOptions options,
       {this.useDataKinds = false, this.tagFrequencyMap, this.importedIndices})
       : enableDeferredStrategy =
-            (options?.features?.deferredSerialization?.isEnabled ?? false) {
+            options.features.deferredSerialization.isEnabled {
     _dartTypeNodeWriter = DartTypeNodeWriter(this);
     if (!enableDeferredStrategy) {
       _stringIndex = _createSink<String>();
@@ -95,7 +94,7 @@
   /// The amount of data written to this data sink.
   ///
   /// The units is based on the underlying data structure for this data sink.
-  @override
+
   int get length => _sinkWriter.length;
 
   /// Flushes any pending data and closes this data sink.
@@ -109,15 +108,10 @@
   ///
   /// This is used for debugging to verify that sections are correctly aligned
   /// between serialization and deserialization.
-  @override
   void begin(String tag) {
-    if (tagFrequencyMap != null) {
-      tagFrequencyMap[tag] ??= 0;
-      tagFrequencyMap[tag]++;
-    }
+    tagFrequencyMap?.update(tag, (count) => count + 1, ifAbsent: () => 1);
     if (useDataKinds) {
-      _tags ??= <String>[];
-      _tags.add(tag);
+      (_tags ??= <String>[]).add(tag);
       _sinkWriter.beginTag(tag);
     }
   }
@@ -126,18 +120,16 @@
   ///
   /// This is used for debugging to verify that sections are correctly aligned
   /// between serialization and deserialization.
-  @override
-  void end(Object tag) {
+  void end(String tag) {
     if (useDataKinds) {
       _sinkWriter.endTag(tag);
 
-      String existingTag = _tags.removeLast();
+      String existingTag = _tags!.removeLast();
       assert(existingTag == tag,
           "Unexpected tag end. Expected $existingTag, found $tag.");
     }
   }
 
-  @override
   void writeDeferrable(void f()) {
     if (enableDeferredStrategy) {
       _sinkWriter.writeDeferred(f);
@@ -148,8 +140,7 @@
 
   /// Writes a reference to [value] to this data sink. If [value] has not yet
   /// been serialized, [f] is called to serialize the value itself.
-  @override
-  void writeCached<E>(E /*?*/ value, void f(E value)) {
+  void writeCached<E>(E? value, void f(E value)) {
     IndexedSink sink = _generalCaches[E] ??=
         (enableDeferredStrategy ? _createUnorderedSink<E>() : _createSink<E>());
     sink.write(value, (v) => f(v));
@@ -160,8 +151,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readValueOrNull].
-  @override
-  void writeValueOrNull<E>(E value, void f(E value)) {
+  void writeValueOrNull<E>(E? value, void f(E value)) {
     writeBool(value != null);
     if (value != null) {
       f(value);
@@ -173,8 +163,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readList].
-  @override
-  void writeList<E>(Iterable<E> values, void f(E value),
+  void writeList<E>(Iterable<E>? values, void f(E value),
       {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
@@ -186,9 +175,8 @@
   }
 
   /// Writes the boolean [value] to this data sink.
-  @override
   void writeBool(bool value) {
-    assert(value != null);
+    assert((value as dynamic) != null); // TODO(48820): Remove when sound.
     _writeDataKind(DataKind.bool);
     _writeBool(value);
   }
@@ -198,9 +186,8 @@
   }
 
   /// Writes the non-negative 30 bit integer [value] to this data sink.
-  @override
   void writeInt(int value) {
-    assert(value != null);
+    assert((value as dynamic) != null); // TODO(48820): Remove when sound.
     assert(value >= 0 && value >> 30 == 0);
     _writeDataKind(DataKind.uint30);
     _sinkWriter.writeInt(value);
@@ -210,8 +197,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readIntOrNull].
-  @override
-  void writeIntOrNull(int value) {
+  void writeIntOrNull(int? value) {
     writeBool(value != null);
     if (value != null) {
       writeInt(value);
@@ -219,9 +205,8 @@
   }
 
   /// Writes the string [value] to this data sink.
-  @override
   void writeString(String value) {
-    assert(value != null);
+    assert((value as dynamic) != null); // TODO(48820): Remove when sound.
     _writeDataKind(DataKind.string);
     _writeString(value);
   }
@@ -234,8 +219,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readStringOrNull].
-  @override
-  void writeStringOrNull(String value) {
+  void writeStringOrNull(String? value) {
     writeBool(value != null);
     if (value != null) {
       writeString(value);
@@ -248,8 +232,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readStringMap].
-  @override
-  void writeStringMap<V>(Map<String, V> map, void f(V value),
+  void writeStringMap<V>(Map<String, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -268,8 +251,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readStrings].
-  @override
-  void writeStrings(Iterable<String> values, {bool allowNull = false}) {
+  void writeStrings(Iterable<String>? values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -285,16 +267,15 @@
   // TODO(johnniwinther): Change the signature to
   // `void writeEnum<E extends Enum<E>>(E value);` when an interface for enums
   // is added to the language.
-  @override
+
   void writeEnum(dynamic value) {
     _writeDataKind(DataKind.enumValue);
     _sinkWriter.writeEnum(value);
   }
 
   /// Writes the URI [value] to this data sink.
-  @override
   void writeUri(Uri value) {
-    assert(value != null);
+    assert((value as dynamic) != null); // TODO(48820): Remove when sound.
     _writeDataKind(DataKind.uri);
     _writeUri(value);
   }
@@ -308,7 +289,6 @@
   }
 
   /// Writes a reference to the kernel library node [value] to this data sink.
-  @override
   void writeLibraryNode(ir.Library value) {
     _writeDataKind(DataKind.libraryNode);
     _writeLibraryNode(value);
@@ -319,7 +299,6 @@
   }
 
   /// Writes a reference to the kernel class node [value] to this data sink.
-  @override
   void writeClassNode(ir.Class value) {
     _writeDataKind(DataKind.classNode);
     _writeClassNode(value);
@@ -342,7 +321,6 @@
   }
 
   /// Writes a reference to the kernel member node [value] to this data sink.
-  @override
   void writeMemberNode(ir.Member value) {
     _writeDataKind(DataKind.memberNode);
     _writeMemberNode(value);
@@ -353,7 +331,7 @@
   }
 
   void _writeMemberNodeInternal(ir.Member value) {
-    ir.Class cls = value.enclosingClass;
+    ir.Class? cls = value.enclosingClass;
     if (cls != null) {
       _sinkWriter.writeEnum(MemberContextKind.cls);
       _writeClassNode(cls);
@@ -370,8 +348,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readMemberNodes].
-  @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);
@@ -389,8 +366,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readMemberNodeMap].
-  @override
-  void writeMemberNodeMap<V>(Map<ir.Member, V> map, void f(V value),
+  void writeMemberNodeMap<V>(Map<ir.Member, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -405,35 +381,31 @@
   }
 
   /// Writes a kernel name node to this data sink.
-  @override
   void writeName(ir.Name value) {
     writeString(value.text);
     writeValueOrNull(value.library, writeLibraryNode);
   }
 
   /// Writes a kernel library dependency node [value] to this data sink.
-  @override
   void writeLibraryDependencyNode(ir.LibraryDependency value) {
-    ir.Library library = value.parent;
+    final library = value.parent as ir.Library;
     writeLibraryNode(library);
     writeInt(library.dependencies.indexOf(value));
   }
 
   /// Writes a potentially `null` kernel library dependency node [value] to
   /// this data sink.
-  @override
-  void writeLibraryDependencyNodeOrNull(ir.LibraryDependency value) {
+  void writeLibraryDependencyNodeOrNull(ir.LibraryDependency? value) {
     writeValueOrNull(value, writeLibraryDependencyNode);
   }
 
   /// Writes a reference to the kernel tree node [value] to this data sink.
-  @override
   void writeTreeNode(ir.TreeNode value) {
     _writeDataKind(DataKind.treeNode);
     _writeTreeNode(value, null);
   }
 
-  void _writeTreeNode(ir.TreeNode value, MemberData memberData) {
+  void _writeTreeNode(ir.TreeNode value, MemberData? memberData) {
     if (value is ir.Class) {
       _sinkWriter.writeEnum(_TreeNodeKind.cls);
       _writeClassNode(value);
@@ -443,7 +415,7 @@
     } else if (value is ir.VariableDeclaration &&
         value.parent is ir.FunctionDeclaration) {
       _sinkWriter.writeEnum(_TreeNodeKind.functionDeclarationVariable);
-      _writeTreeNode(value.parent, memberData);
+      _writeTreeNode(value.parent!, memberData);
     } else if (value is ir.FunctionNode) {
       _sinkWriter.writeEnum(_TreeNodeKind.functionNode);
       _writeFunctionNode(value, memberData);
@@ -461,10 +433,6 @@
       _sinkWriter.writeEnum(_TreeNodeKind.node);
       memberData ??= _getMemberData(value);
       int index = memberData.getIndexByTreeNode(value);
-      assert(
-          index != null,
-          "No TreeNode index found for ${value.runtimeType} "
-          "found in ${memberData}.");
       _sinkWriter.writeInt(index);
     }
   }
@@ -474,8 +442,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTreeNodeOrNull].
-  @override
-  void writeTreeNodeOrNull(ir.TreeNode value) {
+  void writeTreeNodeOrNull(ir.TreeNode? value) {
     writeBool(value != null);
     if (value != null) {
       writeTreeNode(value);
@@ -487,8 +454,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTreeNodes].
-  @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);
@@ -506,7 +472,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTreeNodeMap].
-  @override
   void writeTreeNodeMap<V>(Map<ir.TreeNode, V> map, void f(V value)) {
     writeInt(map.length);
     map.forEach((ir.TreeNode key, V value) {
@@ -532,7 +497,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTreeNodeOrNullInContext].
-  void writeTreeNodeOrNullInContext(ir.TreeNode value) {
+  void writeTreeNodeOrNullInContext(ir.TreeNode? value) {
     writeBool(value != null);
     if (value != null) {
       writeTreeNodeInContextInternal(value, currentMemberData);
@@ -545,7 +510,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTreeNodesInContext].
-  void writeTreeNodesInContext(Iterable<ir.TreeNode> values,
+  void writeTreeNodesInContext(Iterable<ir.TreeNode>? values,
       {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
@@ -564,9 +529,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTreeNodeMapInContext].
-  @override
-  void writeTreeNodeMapInContext<V>(
-      Map<ir.TreeNode, V> /*?*/ map, void f(V value),
+  void writeTreeNodeMapInContext<V>(Map<ir.TreeNode, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -582,14 +545,13 @@
 
   /// Writes a reference to the kernel type parameter node [value] to this data
   /// sink.
-  @override
   void writeTypeParameterNode(ir.TypeParameter value) {
     _writeDataKind(DataKind.typeParameterNode);
     _writeTypeParameter(value, null);
   }
 
-  void _writeTypeParameter(ir.TypeParameter value, MemberData memberData) {
-    ir.TreeNode parent = value.parent;
+  void _writeTypeParameter(ir.TypeParameter value, MemberData? memberData) {
+    ir.TreeNode parent = value.parent!;
     if (parent is ir.Class) {
       _sinkWriter.writeEnum(_TypeParameterKind.cls);
       _writeClassNode(parent);
@@ -610,7 +572,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTypeParameterNodes].
-  @override
   void writeTypeParameterNodes(Iterable<ir.TypeParameter> values) {
     writeInt(values.length);
     for (ir.TypeParameter value in values) {
@@ -619,15 +580,13 @@
   }
 
   /// Writes the type [value] to this data sink.
-  @override
   void writeDartType(DartType value) {
     _writeDataKind(DataKind.dartType);
     value.writeToDataSink(this, []);
   }
 
   /// Writes the optional type [value] to this data sink.
-  @override
-  void writeDartTypeOrNull(DartType /*?*/ value) {
+  void writeDartTypeOrNull(DartType? value) {
     _writeDataKind(DataKind.dartType);
     if (value == null) {
       writeEnum(DartTypeKind.none);
@@ -641,8 +600,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readDartTypesOrNull].
-  @override
-  void writeDartTypesOrNull(Iterable<DartType> /*?*/ values) {
+  void writeDartTypesOrNull(Iterable<DartType>? values) {
     if (values == null) {
       writeInt(0);
     } else {
@@ -654,7 +612,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readDartTypes].
-  @override
   void writeDartTypes(Iterable<DartType> values) {
     writeInt(values.length);
     for (DartType value in values) {
@@ -663,21 +620,19 @@
   }
 
   /// Writes the kernel type node [value] to this data sink.
-  @override
   void writeDartTypeNode(ir.DartType /*!*/ value) {
     _writeDataKind(DataKind.dartTypeNode);
     _writeDartTypeNode(value, [], allowNull: false);
   }
 
   /// Writes the kernel type node [value] to this data sink, `null` permitted.
-  @override
-  void writeDartTypeNodeOrNull(ir.DartType /*?*/ value) {
+  void writeDartTypeNodeOrNull(ir.DartType? value) {
     _writeDataKind(DataKind.dartTypeNode);
     _writeDartTypeNode(value, [], allowNull: true);
   }
 
   void _writeDartTypeNode(
-      ir.DartType value, List<ir.TypeParameter> functionTypeVariables,
+      ir.DartType? value, List<ir.TypeParameter> functionTypeVariables,
       {bool allowNull = false}) {
     if (value == null) {
       if (!allowNull) {
@@ -694,8 +649,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readDartTypeNodes].
-  @override
-  void writeDartTypeNodes(Iterable<ir.DartType> values,
+  void writeDartTypeNodes(Iterable<ir.DartType>? values,
       {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
@@ -709,7 +663,6 @@
   }
 
   /// Writes the source span [value] to this data sink.
-  @override
   void writeSourceSpan(SourceSpan value) {
     _writeDataKind(DataKind.sourceSpan);
     _writeUri(value.uri);
@@ -717,33 +670,34 @@
     _sinkWriter.writeInt(value.end);
   }
 
-  /// Writes a reference to the indexed library [value] to this data sink.
-  @override
-  void writeLibrary(IndexedLibrary value) {
-    _entityWriter.writeLibraryToDataSink(this, value);
+  /// Writes a reference to the library entity [value] to this data sink.
+  void writeLibrary(LibraryEntity value) {
+    if (value is IndexedLibrary) {
+      _entityWriter.writeLibraryToDataSink(this, value);
+    } else {
+      failedAt(value, 'Unexpected library entity type ${value.runtimeType}');
+    }
   }
 
-  /// Writes a reference to the potentially `null` indexed library [value]
+  /// Writes a reference to the potentially `null` library entities [value]
   /// to this data sink.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readLibraryOrNull].
-  @override
-  void writeLibraryOrNull(IndexedLibrary value) {
+  void writeLibraryOrNull(LibraryEntity? value) {
     writeBool(value != null);
     if (value != null) {
       writeLibrary(value);
     }
   }
 
-  /// Writes the [map] from references to indexed libraries to [V] values to
+  /// Writes the [map] from references to library entities to [V] values to
   /// this data sink, calling [f] to write each value to the data sink. If
   /// [allowNull] is `true`, [map] is allowed to be `null`.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readLibraryMap].
-  @override
-  void writeLibraryMap<V>(Map<LibraryEntity, V> map, void f(V value),
+  void writeLibraryMap<V>(Map<LibraryEntity, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -757,51 +711,51 @@
     }
   }
 
-  /// Writes a reference to the indexed class [value] to this data sink.
-  @override
-  void writeClass(IndexedClass value) {
-    _entityWriter.writeClassToDataSink(this, value);
+  /// Writes a reference to the class entity [value] to this data sink.
+  void writeClass(ClassEntity value) {
+    if (value is IndexedClass) {
+      _entityWriter.writeClassToDataSink(this, value);
+    } else {
+      failedAt(value, 'Unexpected class entity type ${value.runtimeType}');
+    }
   }
 
-  /// Writes a reference to the potentially `null` indexed class [value]
+  /// Writes a reference to the potentially `null` class entity [value]
   /// to this data sink.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readClassOrNull].
-  @override
-  void writeClassOrNull(IndexedClass value) {
+  void writeClassOrNull(ClassEntity? value) {
     writeBool(value != null);
     if (value != null) {
       writeClass(value);
     }
   }
 
-  /// Writes references to the indexed class [values] to this data sink. If
+  /// Writes references to the class entity [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
   /// [DataSourceReader.readClasses].
-  @override
-  void writeClasses(Iterable<ClassEntity> values, {bool allowNull = false}) {
+  void writeClasses(Iterable<ClassEntity>? values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
     } else {
       writeInt(values.length);
-      for (IndexedClass value in values) {
+      for (ClassEntity value in values) {
         writeClass(value);
       }
     }
   }
 
-  /// Writes the [map] from references to indexed classes to [V] values to this
+  /// Writes the [map] from references to class entities to [V] values to this
   /// data sink, calling [f] to write each value to the data sink. If
   /// [allowNull] is `true`, [map] is allowed to be `null`.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readClassMap].
-  @override
-  void writeClassMap<V>(Map<ClassEntity, V> map, void f(V value),
+  void writeClassMap<V>(Map<ClassEntity, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -815,52 +769,52 @@
     }
   }
 
-  /// Writes a reference to the indexed member [value] to this data sink.
-  @override
-  void writeMember(IndexedMember value) {
-    _entityWriter.writeMemberToDataSink(this, value);
+  /// Writes a reference to the member entity [value] to this data sink.
+  void writeMember(MemberEntity value) {
+    if (value is IndexedMember) {
+      _entityWriter.writeMemberToDataSink(this, value);
+    } else {
+      failedAt(value, 'Unexpected member entity type ${value.runtimeType}');
+    }
   }
 
-  /// Writes a reference to the potentially `null` indexed member [value]
+  /// Writes a reference to the potentially `null` member entities [value]
   /// to this data sink.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readMemberOrNull].
-  @override
-  void writeMemberOrNull(IndexedMember value) {
+  void writeMemberOrNull(MemberEntity? value) {
     writeBool(value != null);
     if (value != null) {
       writeMember(value);
     }
   }
 
-  /// Writes references to the indexed member [values] to this data sink. If
+  /// Writes references to the member entities [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
   /// [DataSourceReader.readMembers].
-  @override
-  void writeMembers(Iterable<MemberEntity> values, {bool allowNull = false}) {
+  void writeMembers(Iterable<MemberEntity>? values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
     } else {
       writeInt(values.length);
-      for (IndexedMember value in values) {
+      for (MemberEntity value in values) {
         writeMember(value);
       }
     }
   }
 
-  /// Writes the [map] from references to indexed members to [V] values to this
+  /// Writes the [map] from references to member entities to [V] values to this
   /// data sink, calling [f] to write each value to the data sink. If
   /// [allowNull] is `true`, [map] is allowed to be `null`.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readMemberMap].
-  @override
   void writeMemberMap<V>(
-      Map<MemberEntity, V> map, void f(MemberEntity member, V value),
+      Map<MemberEntity, V>? map, void f(MemberEntity member, V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -874,23 +828,26 @@
     }
   }
 
-  /// Writes a reference to the indexed type variable [value] to this data sink.
-  @override
-  void writeTypeVariable(IndexedTypeVariable value) {
-    _entityWriter.writeTypeVariableToDataSink(this, value);
+  /// Writes a reference to the type variable entity [value] to this data sink.
+  void writeTypeVariable(TypeVariableEntity value) {
+    if (value is IndexedTypeVariable) {
+      _entityWriter.writeTypeVariableToDataSink(this, value);
+    } else {
+      failedAt(
+          value, 'Unexpected type variable entity type ${value.runtimeType}');
+    }
   }
 
-  /// Writes the [map] from references to indexed type variables to [V] values
+  /// Writes the [map] from references to type variable entites to [V] values
   /// to this data sink, calling [f] to write each value to the data sink. If
   /// [allowNull] is `true`, [map] is allowed to be `null`.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readTypeVariableMap].
-  @override
   void writeTypeVariableMap<V>(
-      Map<IndexedTypeVariable, V> map, void f(V value)) {
+      Map<TypeVariableEntity, V> map, void f(V value)) {
     writeInt(map.length);
-    map.forEach((IndexedTypeVariable key, V value) {
+    map.forEach((TypeVariableEntity key, V value) {
       writeTypeVariable(key);
       f(value);
     });
@@ -924,38 +881,19 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readLocalOrNull].
-  @override
-  void writeLocalOrNull(Local value) {
+  void writeLocalOrNull(Local? value) {
     writeBool(value != null);
     if (value != null) {
       writeLocal(value);
     }
   }
 
-  /// Writes references to the local [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
-  /// [DataSourceReader.readLocals].
-  void writeLocals(Iterable<Local> values, {bool allowNull = false}) {
-    if (values == null) {
-      assert(allowNull);
-      writeInt(0);
-    } else {
-      writeInt(values.length);
-      for (Local value in values) {
-        writeLocal(value);
-      }
-    }
-  }
-
   /// 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
   /// `true`, [map] is allowed to be `null`.
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readLocalMap].
-  @override
   void writeLocalMap<V>(Map<Local, V> map, void f(V value)) {
     writeInt(map.length);
     map.forEach((Local key, V value) {
@@ -965,7 +903,6 @@
   }
 
   /// Writes the constant [value] to this data sink.
-  @override
   void writeConstant(ConstantValue value) {
     _writeDataKind(DataKind.constant);
     _writeConstant(value);
@@ -979,70 +916,69 @@
     _sinkWriter.writeEnum(value.kind);
     switch (value.kind) {
       case ConstantValueKind.BOOL:
-        BoolConstantValue constant = value;
+        final constant = value as BoolConstantValue;
         writeBool(constant.boolValue);
         break;
       case ConstantValueKind.INT:
-        IntConstantValue constant = value;
+        final constant = value as IntConstantValue;
         _writeBigInt(constant.intValue);
         break;
       case ConstantValueKind.DOUBLE:
-        DoubleConstantValue constant = value;
+        final constant = value as DoubleConstantValue;
         _writeDoubleValue(constant.doubleValue);
         break;
       case ConstantValueKind.STRING:
-        StringConstantValue constant = value;
+        final constant = value as StringConstantValue;
         writeString(constant.stringValue);
         break;
       case ConstantValueKind.NULL:
         break;
       case ConstantValueKind.FUNCTION:
-        FunctionConstantValue constant = value;
-        IndexedFunction function = constant.element;
-        writeMember(function);
+        final constant = value as FunctionConstantValue;
+        writeMember(constant.element);
         writeDartType(constant.type);
         break;
       case ConstantValueKind.LIST:
-        ListConstantValue constant = value;
+        final constant = value as ListConstantValue;
         writeDartType(constant.type);
         writeConstants(constant.entries);
         break;
       case ConstantValueKind.SET:
-        constant_system.JavaScriptSetConstant constant = value;
+        final constant = value as constant_system.JavaScriptSetConstant;
         writeDartType(constant.type);
         writeConstant(constant.entries);
         break;
       case ConstantValueKind.MAP:
-        constant_system.JavaScriptMapConstant constant = value;
+        final constant = value as constant_system.JavaScriptMapConstant;
         writeDartType(constant.type);
         writeConstant(constant.keyList);
         writeConstants(constant.values);
         writeBool(constant.onlyStringKeys);
         break;
       case ConstantValueKind.CONSTRUCTED:
-        ConstructedConstantValue constant = value;
+        final constant = value as ConstructedConstantValue;
         writeDartType(constant.type);
         writeMemberMap(constant.fields,
             (MemberEntity member, ConstantValue value) => writeConstant(value));
         break;
       case ConstantValueKind.TYPE:
-        TypeConstantValue constant = value;
+        final constant = value as TypeConstantValue;
         writeDartType(constant.representedType);
         writeDartType(constant.type);
         break;
       case ConstantValueKind.INSTANTIATION:
-        InstantiationConstantValue constant = value;
+        final constant = value as InstantiationConstantValue;
         writeDartTypes(constant.typeArguments);
         writeConstant(constant.function);
         break;
       case ConstantValueKind.NON_CONSTANT:
         break;
       case ConstantValueKind.INTERCEPTOR:
-        InterceptorConstantValue constant = value;
+        final constant = value as InterceptorConstantValue;
         writeClass(constant.cls);
         break;
       case ConstantValueKind.DEFERRED_GLOBAL:
-        DeferredGlobalConstantValue constant = value;
+        final constant = value as DeferredGlobalConstantValue;
         writeConstant(constant.referenced);
         writeOutputUnitReference(constant.unit);
         break;
@@ -1053,15 +989,14 @@
       case ConstantValueKind.UNREACHABLE:
         break;
       case ConstantValueKind.JS_NAME:
-        JsNameConstantValue constant = value;
+        final constant = value as JsNameConstantValue;
         writeJsNode(constant.name);
         break;
     }
   }
 
   /// Writes the potentially `null` constant [value] to this data sink.
-  @override
-  void writeConstantOrNull(ConstantValue value) {
+  void writeConstantOrNull(ConstantValue? value) {
     writeBool(value != null);
     if (value != null) {
       writeConstant(value);
@@ -1073,7 +1008,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readConstants].
-  void writeConstants(Iterable<ConstantValue> values,
+  void writeConstants(Iterable<ConstantValue>? values,
       {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
@@ -1092,8 +1027,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readConstantMap].
-  @override
-  void writeConstantMap<V>(Map<ConstantValue, V> map, void f(V value),
+  void writeConstantMap<V>(Map<ConstantValue, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -1108,7 +1042,6 @@
   }
 
   /// Writes a double value to this data sink.
-  @override
   void writeDoubleValue(double value) {
     _writeDataKind(DataKind.double);
     _writeDoubleValue(value);
@@ -1127,7 +1060,6 @@
   ///
   /// This is should only when the value is not known to be a non-negative
   /// 30 bit integer. Otherwise [writeInt] should be used.
-  @override
   void writeIntegerValue(int value) {
     _writeDataKind(DataKind.int);
     _writeBigInt(BigInt.from(value));
@@ -1138,7 +1070,6 @@
   }
 
   /// Writes the import [value] to this data sink.
-  @override
   void writeImport(ImportEntity value) {
     _writeDataKind(DataKind.import);
     _writeImport(value);
@@ -1157,8 +1088,7 @@
   }
 
   /// Writes the potentially `null` import [value] to this data sink.
-  @override
-  void writeImportOrNull(ImportEntity value) {
+  void writeImportOrNull(ImportEntity? value) {
     writeBool(value != null);
     if (value != null) {
       writeImport(value);
@@ -1170,8 +1100,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readImports].
-  @override
-  void writeImports(Iterable<ImportEntity> values, {bool allowNull = false}) {
+  void writeImports(Iterable<ImportEntity>? values, {bool allowNull = false}) {
     if (values == null) {
       assert(allowNull);
       writeInt(0);
@@ -1189,8 +1118,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSourceReader.readImportMap].
-  @override
-  void writeImportMap<V>(Map<ImportEntity, V> /*?*/ map, void f(V value),
+  void writeImportMap<V>(Map<ImportEntity, V>? map, void f(V value),
       {bool allowNull = false}) {
     if (map == null) {
       assert(allowNull);
@@ -1207,10 +1135,7 @@
   /// Writes an abstract [value] to this data sink.
   ///
   /// This feature is only available a [CodegenWriter] has been registered.
-  @override
   void writeAbstractValue(AbstractValue value) {
-    assert(_codegenWriter != null,
-        "Can not serialize an AbstractValue without a registered codegen writer.");
     _codegenWriter.writeAbstractValue(this, value);
   }
 
@@ -1218,10 +1143,6 @@
   ///
   /// This feature is only available a [CodegenWriter] has been registered.
   void writeOutputUnitReference(OutputUnit value) {
-    assert(
-        _codegenWriter != null,
-        "Can not serialize an OutputUnit reference "
-        "without a registered codegen writer.");
     _codegenWriter.writeOutputUnitReference(this, value);
   }
 
@@ -1229,16 +1150,13 @@
   ///
   /// This feature is only available a [CodegenWriter] has been registered.
   void writeJsNode(js.Node value) {
-    assert(_codegenWriter != null,
-        "Can not serialize a JS node without a registered codegen writer.");
     _codegenWriter.writeJsNode(this, value);
   }
 
   /// Writes a potentially `null` js node [value] to this data sink.
   ///
   /// This feature is only available a [CodegenWriter] has been registered.
-  @override
-  void writeJsNodeOrNull(js.Node value) {
+  void writeJsNodeOrNull(js.Node? value) {
     writeBool(value != null);
     if (value != null) {
       writeJsNode(value);
@@ -1248,35 +1166,30 @@
   /// Writes TypeRecipe [value] to this data sink.
   ///
   /// This feature is only available a [CodegenWriter] has been registered.
-  @override
   void writeTypeRecipe(TypeRecipe value) {
-    assert(_codegenWriter != null,
-        "Can not serialize a TypeRecipe without a registered codegen writer.");
     _codegenWriter.writeTypeRecipe(this, value);
   }
 
   /// Register an [EntityWriter] with this data sink for non-default encoding
   /// of entity references.
-  void registerEntityWriter(migrated.EntityWriter writer) {
-    assert(writer != null);
+  void registerEntityWriter(EntityWriter writer) {
+    assert((writer as dynamic) != null); // TODO(48820): Remove when sound.
     _entityWriter = writer;
   }
 
   /// Register a [CodegenWriter] with this data sink to support serialization
   /// of codegen only data.
-  void registerCodegenWriter(migrated.CodegenWriter writer) {
-    assert(writer != null);
-    assert(_codegenWriter == null);
+  void registerCodegenWriter(CodegenWriter writer) {
+    assert((writer as dynamic) != null); // TODO(48820): Remove when sound.
     _codegenWriter = writer;
   }
 
   /// Invoke [f] in the context of [member]. This sets up support for
   /// serialization of `ir.TreeNode`s using the `writeTreeNode*InContext`
   /// methods.
-  @override
   void inMemberContext(ir.Member context, void f()) {
-    ir.Member oldMemberContext = _currentMemberContext;
-    MemberData oldMemberData = _currentMemberData;
+    ir.Member? oldMemberContext = _currentMemberContext;
+    MemberData? oldMemberData = _currentMemberData;
     _currentMemberContext = context;
     _currentMemberData = null;
     f();
@@ -1285,14 +1198,13 @@
   }
 
   MemberData get currentMemberData {
-    assert(_currentMemberContext != null,
-        "DataSink has no current member context.");
-    return _currentMemberData ??= _memberData[_currentMemberContext] ??=
-        MemberData(_currentMemberContext);
+    final currentMemberContext = _currentMemberContext!;
+    return _currentMemberData ??=
+        _memberData[currentMemberContext] ??= MemberData(currentMemberContext);
   }
 
   MemberData _getMemberData(ir.TreeNode node) {
-    ir.TreeNode member = node;
+    ir.TreeNode? member = node;
     while (member is! ir.Member) {
       if (member == null) {
         throw UnsupportedError("No enclosing member of TreeNode "
@@ -1304,8 +1216,8 @@
     return _memberData[member] ??= MemberData(member);
   }
 
-  void _writeFunctionNode(ir.FunctionNode value, MemberData memberData) {
-    ir.TreeNode parent = value.parent;
+  void _writeFunctionNode(ir.FunctionNode value, MemberData? memberData) {
+    ir.TreeNode parent = value.parent!;
     if (parent is ir.Procedure) {
       _sinkWriter.writeEnum(_FunctionNodeKind.procedure);
       _writeMemberNode(parent);
diff --git a/pkg/compiler/lib/src/serialization/source.dart b/pkg/compiler/lib/src/serialization/source.dart
index 14e4885..7fab209 100644
--- a/pkg/compiler/lib/src/serialization/source.dart
+++ b/pkg/compiler/lib/src/serialization/source.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.10
-
 part of 'serialization.dart';
 
 /// Deserialization reader
 ///
 /// To be used with [DataSinkWriter] to read and write serialized data.
 /// Deserialization format is deferred to provided [DataSource].
-class DataSourceReader implements migrated.DataSourceReader {
+class DataSourceReader {
   // The active [DataSource] to read data from. This can be the base DataSource
   // for this reader or can be set to access data in a different serialized
   // input in the case of deferred indexed data.
@@ -22,26 +20,25 @@
   final bool enableDeferredStrategy;
   final bool useDeferredStrategy;
   final bool useDataKinds;
-  final ValueInterner /*?*/ interner;
-  DataSourceIndices importedIndices;
-  migrated.EntityReader _entityReader = const migrated.EntityReader();
-  ComponentLookup _componentLookup;
-  migrated.EntityLookup _entityLookup;
-  migrated.LocalLookup _localLookup;
-  migrated.CodegenReader _codegenReader;
+  final ValueInterner? interner;
+  DataSourceIndices? importedIndices;
+  EntityReader _entityReader = const EntityReader();
+  ComponentLookup? _componentLookup;
+  EntityLookup? _entityLookup;
+  LocalLookup? _localLookup;
+  CodegenReader? _codegenReader;
 
-  IndexedSource<String> _stringIndex;
-  IndexedSource<Uri> _uriIndex;
-  IndexedSource<MemberData> _memberNodeIndex;
-  IndexedSource<ImportEntity> _importIndex;
-  IndexedSource<ConstantValue> _constantIndex;
+  late final IndexedSource<String> _stringIndex;
+  late final IndexedSource<Uri> _uriIndex;
+  late final IndexedSource<MemberData> _memberNodeIndex;
+  late final IndexedSource<ImportEntity> _importIndex;
+  late final IndexedSource<ConstantValue> _constantIndex;
 
   final Map<Type, IndexedSource> _generalCaches = {};
 
-  ir.Member _currentMemberContext;
-  MemberData _currentMemberData;
+  ir.Member? _currentMemberContext;
+  MemberData? _currentMemberData;
 
-  @override
   int get length => _sourceReader.length;
 
   /// Defines the beginning of this block in the address space created by all
@@ -51,8 +48,7 @@
   /// shifted. That is the length of all the sources read before this one.
   ///
   /// See [UnorderedIndexedSource] for more info.
-  @override
-  int get startOffset => importedIndices.previousSourceReader.endOffset;
+  int get startOffset => importedIndices?.previousSourceReader?.endOffset ?? 0;
 
   /// Defines the end of this block in the address space created by all
   /// instances of [DataSourceReader].
@@ -61,20 +57,20 @@
   /// value.
   ///
   /// See [UnorderedIndexedSource] for more info.
-  @override
   final int endOffset;
 
   IndexedSource<T> _createSource<T>() {
-    if (importedIndices == null || !importedIndices.caches.containsKey(T)) {
+    final indices = importedIndices;
+    if (indices == null || !indices.caches.containsKey(T)) {
       return OrderedIndexedSource<T>(this._sourceReader);
     } else {
-      final source = importedIndices.caches[T].source as OrderedIndexedSource;
-      List<T> cacheCopy = source.cache.toList();
+      final source = indices.caches[T]!.source as OrderedIndexedSource<T>;
+      List<T?> cacheCopy = source.cache.toList();
       return OrderedIndexedSource<T>(this._sourceReader, cache: cacheCopy);
     }
   }
 
-  UnorderedIndexedSource<T> /*?*/ _getPreviousUncreatedSource<T>() {
+  UnorderedIndexedSource<T>? _getPreviousUncreatedSource<T>() {
     final previousSourceReader = importedIndices?.previousSourceReader;
     if (previousSourceReader == null) return null;
     return UnorderedIndexedSource<T>(previousSourceReader,
@@ -82,10 +78,12 @@
   }
 
   IndexedSource<T> _createUnorderedSource<T>() {
-    if (importedIndices != null) {
-      if (importedIndices.caches.containsKey(T)) {
-        final index = importedIndices.caches.remove(T);
-        return UnorderedIndexedSource<T>(this, previousSource: index.source);
+    final indices = importedIndices;
+    if (indices != null) {
+      if (indices.caches.containsKey(T)) {
+        final index = indices.caches.remove(T);
+        return UnorderedIndexedSource<T>(this,
+            previousSource: index!.source as UnorderedIndexedSource<T>);
       }
       final newPreviousSource = _getPreviousUncreatedSource<T>();
       if (newPreviousSource != null) {
@@ -102,7 +100,7 @@
       this.interner,
       this.useDeferredStrategy = false})
       : enableDeferredStrategy =
-            (options?.features?.deferredSerialization?.isEnabled ?? false),
+            (options.features.deferredSerialization.isEnabled),
         endOffset = (importedIndices?.previousSourceReader?.endOffset ?? 0) +
             _sourceReader.length {
     if (!enableDeferredStrategy) {
@@ -130,8 +128,8 @@
     // _memberNodeIndex needs two entries depending on if the indices will be
     // consumed by a [DataSource] or [DataSink].
     indices.caches[MemberData] = DataSourceTypeIndices(_memberNodeIndex);
-    indices.caches[ir.Member] = DataSourceTypeIndices<ir.Member, MemberData>(
-        _memberNodeIndex, (MemberData data) => data?.node);
+    indices.caches[ir.Member] = DataSourceTypeIndices<ir.Member?, MemberData>(
+        _memberNodeIndex, (MemberData? data) => data?.node);
     indices.caches[ConstantValue] = DataSourceTypeIndices(_constantIndex);
     _generalCaches.forEach((type, indexedSource) {
       indices.caches[type] = DataSourceTypeIndices(indexedSource);
@@ -143,7 +141,6 @@
   ///
   /// This is used for debugging to verify that sections are correctly aligned
   /// between serialization and deserialization.
-  @override
   void begin(String tag) {
     if (useDataKinds) _sourceReader.begin(tag);
   }
@@ -152,68 +149,61 @@
   ///
   /// This is used for debugging to verify that sections are correctly aligned
   /// between serialization and deserialization.
-  @override
   void end(String tag) {
     if (useDataKinds) _sourceReader.end(tag);
   }
 
   /// Registers a [ComponentLookup] object with this data source to support
   /// deserialization of references to kernel nodes.
-  @override
   void registerComponentLookup(ComponentLookup componentLookup) {
     assert(_componentLookup == null);
     _componentLookup = componentLookup;
   }
 
   ComponentLookup get componentLookup {
-    assert(_componentLookup != null);
-    return _componentLookup /*!*/;
+    return _componentLookup!;
   }
 
   /// Registers an [EntityLookup] object with this data source to support
-  /// deserialization of references to indexed entities.
-  @override
-  void registerEntityLookup(migrated.EntityLookup entityLookup) {
+  /// deserialization of references to entities.
+  void registerEntityLookup(EntityLookup entityLookup) {
     assert(_entityLookup == null);
     _entityLookup = entityLookup;
   }
 
-  migrated.EntityLookup get entityLookup {
-    assert(_entityLookup != null);
-    return _entityLookup /*!*/;
+  EntityLookup get entityLookup {
+    return _entityLookup!;
   }
 
   /// Registers an [EntityReader] with this data source for non-default encoding
   /// of entity references.
-  @override
-  void registerEntityReader(migrated.EntityReader reader) {
-    assert(reader != null);
+  void registerEntityReader(EntityReader reader) {
+    assert((reader as dynamic) != null); // TODO(48820): Remove when sound.
     _entityReader = reader;
   }
 
   /// Registers a [LocalLookup] object with this data source to support
-  @override
-  void registerLocalLookup(migrated.LocalLookup localLookup) {
-    assert(_localLookup == null);
+
+  void registerLocalLookup(LocalLookup localLookup) {
+    assert((localLookup as dynamic) != null); // TODO(48820): Remove when sound.
     _localLookup = localLookup;
   }
 
-  migrated.LocalLookup get localLookup {
-    assert(_localLookup != null);
-    return _localLookup /*!*/;
+  LocalLookup get localLookup {
+    return _localLookup!;
   }
 
-  /// Registers a [migrated.CodegenReader] with this data source to support
+  /// Registers a [CodegenReader] with this data source to support
   /// deserialization of codegen only data.
-  void registerCodegenReader(migrated.CodegenReader reader) {
-    assert(reader != null);
+  void registerCodegenReader(CodegenReader reader) {
+    assert((reader as dynamic) != null); // TODO(48820): Remove when sound.
     assert(_codegenReader == null);
     _codegenReader = reader;
   }
 
-  /// Unregisters the [migrated.CodegenReader] from this data source to remove support
+  /// Unregisters the [CodegenReader] from this data source to remove support
   /// for deserialization of codegen only data.
-  void deregisterCodegenReader(migrated.CodegenReader reader) {
+  void deregisterCodegenReader(CodegenReader reader) {
     assert(_codegenReader == reader);
     _codegenReader = null;
   }
@@ -221,9 +211,7 @@
   /// Evaluates [f] with [DataSource] for the provided [source] as the
   /// temporary [DataSource] for this object. Allows deferred data to be read
   /// from a file other than the one currently being read from.
-  // TODO(48820): Remove covariant when sound.
-  @override
-  E readWithSource<E>(covariant DataSourceReader source, E f()) {
+  E readWithSource<E>(DataSourceReader source, E f()) {
     final lastSource = _sourceReader;
     _sourceReader = source._sourceReader;
     final value = f();
@@ -231,12 +219,10 @@
     return value;
   }
 
-  @override
   E readWithOffset<E>(int offset, E f()) {
     return _sourceReader.readAtOffset(offset, f);
   }
 
-  @override
   Deferrable<E> readDeferrable<E>(E f(), {bool cacheData = true}) {
     return enableDeferredStrategy
         ? (useDeferredStrategy
@@ -249,10 +235,9 @@
   /// Invoke [f] in the context of [member]. This sets up support for
   /// deserialization of `ir.TreeNode`s using the `readTreeNode*InContext`
   /// methods.
-  @override
   T inMemberContext<T>(ir.Member context, T f()) {
-    ir.Member oldMemberContext = _currentMemberContext;
-    MemberData oldMemberData = _currentMemberData;
+    ir.Member? oldMemberContext = _currentMemberContext;
+    MemberData? oldMemberData = _currentMemberData;
     _currentMemberContext = context;
     _currentMemberData = null;
     T result = f();
@@ -264,25 +249,23 @@
   MemberData get currentMemberData {
     assert(_currentMemberContext != null,
         "DataSink has no current member context.");
-    return _currentMemberData ??= _getMemberData(_currentMemberContext);
+    return _currentMemberData ??= _getMemberData(_currentMemberContext!);
   }
 
   /// Reads a reference to an [E] value from this data source. If the value has
   /// not yet been deserialized, [f] is called to deserialize the value itself.
-  @override
   E readCached<E>(E f()) {
-    E /*?*/ value = readCachedOrNull(f);
+    E? value = readCachedOrNull(f);
     if (value == null) throw StateError("Unexpected 'null' for $E");
     return value;
   }
 
   /// Reads a reference to an [E] value from this data source. If the value has
   /// not yet been deserialized, [f] is called to deserialize the value itself.
-  @override
-  E /*?*/ readCachedOrNull<E>(E f()) {
-    IndexedSource<E> source = _generalCaches[E] ??= (enableDeferredStrategy
+  E? readCachedOrNull<E>(E f()) {
+    IndexedSource<E> source = (_generalCaches[E] ??= (enableDeferredStrategy
         ? _createUnorderedSource<E>()
-        : _createSource<E>());
+        : _createSource<E>())) as IndexedSource<E>;
     return source.read(f);
   }
 
@@ -291,8 +274,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeValueOrNull].
-  @override
-  E readValueOrNull<E>(E f()) {
+  E? readValueOrNull<E>(E f()) {
     bool hasValue = readBool();
     if (hasValue) {
       return f();
@@ -304,7 +286,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeList].
-  @override
   List<E> readList<E>(E f()) {
     return readListOrNull<E>(f) ?? List<E>.empty();
   }
@@ -314,8 +295,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeList].
-  @override
-  List<E> /*?*/ readListOrNull<E>(E f()) {
+  List<E>? readListOrNull<E>(E f()) {
     int count = readInt();
     if (count == 0) return null;
     final first = f();
@@ -326,7 +306,6 @@
     return list;
   }
 
-  @override
   bool readBool() {
     _checkDataKind(DataKind.bool);
     return _readBool();
@@ -340,7 +319,6 @@
   }
 
   /// Reads a non-negative 30 bit integer value from this data source.
-  @override
   int readInt() {
     _checkDataKind(DataKind.uint30);
     return _sourceReader.readInt();
@@ -351,8 +329,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeIntOrNull].
-  @override
-  int readIntOrNull() {
+  int? readIntOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readInt();
@@ -361,22 +338,20 @@
   }
 
   /// Reads a string value from this data source.
-  @override
   String readString() {
     _checkDataKind(DataKind.string);
     return _readString();
   }
 
-  String /*!*/ _readString() {
-    return _stringIndex.read(() => _sourceReader.readString());
+  String _readString() {
+    return _stringIndex.read(() => _sourceReader.readString())!;
   }
 
   /// Reads a potentially `null` string value from this data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeStringOrNull].
-  @override
-  String readStringOrNull() {
+  String? readStringOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readString();
@@ -389,8 +364,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeStrings].
-  @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 = List<String>.filled(count, '');
@@ -406,8 +380,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeStringMap].
-  @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 = {};
@@ -428,21 +401,19 @@
   ///    ...
   ///    Foo foo = source.readEnum(Foo.values);
   ///
-  @override
   E readEnum<E>(List<E> values) {
     _checkDataKind(DataKind.enumValue);
     return _sourceReader.readEnum(values);
   }
 
   /// Reads a URI value from this data source.
-  @override
   Uri readUri() {
     _checkDataKind(DataKind.uri);
     return _readUri();
   }
 
   Uri _readUri() {
-    return _uriIndex.read(_doReadUri);
+    return _uriIndex.read(_doReadUri)!;
   }
 
   Uri _doReadUri() {
@@ -450,7 +421,6 @@
   }
 
   /// Reads a reference to a kernel library node from this data source.
-  @override
   ir.Library readLibraryNode() {
     _checkDataKind(DataKind.libraryNode);
     return _readLibraryData().node;
@@ -462,7 +432,6 @@
   }
 
   /// Reads a reference to a kernel class node from this data source.
-  @override
   ir.Class readClassNode() {
     _checkDataKind(DataKind.classNode);
     return _readClassData().node;
@@ -471,7 +440,7 @@
   ClassData _readClassData() {
     LibraryData library = _readLibraryData();
     String name = _readString();
-    return library.lookupClassByName(name);
+    return library.lookupClassByName(name)!;
   }
 
   /// Reads a reference to a kernel class node from this data source.
@@ -483,18 +452,17 @@
   ir.Typedef _readTypedefNode() {
     LibraryData library = _readLibraryData();
     String name = _readString();
-    return library.lookupTypedef(name);
+    return library.lookupTypedef(name)!;
   }
 
   /// Reads a reference to a kernel member node from this data source.
-  @override
   ir.Member readMemberNode() {
     _checkDataKind(DataKind.memberNode);
     return _readMemberData().node;
   }
 
   MemberData _readMemberData() {
-    return _memberNodeIndex.read(_readMemberDataInternal);
+    return _memberNodeIndex.read(_readMemberDataInternal)!;
   }
 
   MemberData _readMemberDataInternal() {
@@ -503,20 +471,18 @@
       case MemberContextKind.cls:
         ClassData cls = _readClassData();
         String name = _readString();
-        return cls.lookupMemberDataByName(name);
+        return cls.lookupMemberDataByName(name)!;
       case MemberContextKind.library:
         LibraryData library = _readLibraryData();
         String name = _readString();
-        return library.lookupMemberDataByName(name);
+        return library.lookupMemberDataByName(name)!;
     }
-    throw UnsupportedError("Unsupported _MemberKind $kind");
   }
 
   /// Reads a list of references to kernel member nodes from this data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMemberNodes].
-  @override
   List<E> readMemberNodes<E extends ir.Member>() {
     return readMemberNodesOrNull<E>() ?? List.empty();
   }
@@ -526,8 +492,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMemberNodes].
-  @override
-  List<E> readMemberNodesOrNull<E extends ir.Member>() {
+  List<E>? readMemberNodesOrNull<E extends ir.Member>() {
     int count = readInt();
     if (count == 0) return null;
     return List<E>.generate(count, (_) => readMemberNode() as E,
@@ -539,7 +504,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMemberNodeMap].
-  @override
   Map<K, V> readMemberNodeMap<K extends ir.Member, V>(V f()) {
     return readMemberNodeMapOrNull<K, V>(f) ?? {};
   }
@@ -550,13 +514,12 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMemberNodeMap].
-  @override
-  Map<K, V> /*?*/ readMemberNodeMapOrNull<K extends ir.Member, V>(V f()) {
+  Map<K, V>? readMemberNodeMapOrNull<K extends ir.Member, V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      ir.Member node = readMemberNode();
+      final node = readMemberNode() as K;
       V value = f();
       map[node] = value;
     }
@@ -564,15 +527,13 @@
   }
 
   /// Reads a kernel name node from this data source.
-  @override
   ir.Name readName() {
     String text = readString();
-    ir.Library library = readValueOrNull(readLibraryNode);
+    ir.Library? library = readValueOrNull(readLibraryNode);
     return ir.Name(text, library);
   }
 
   /// Reads a kernel library dependency node from this data source.
-  @override
   ir.LibraryDependency readLibraryDependencyNode() {
     ir.Library library = readLibraryNode();
     int index = readInt();
@@ -581,19 +542,17 @@
 
   /// Reads a potentially `null` kernel library dependency node from this data
   /// source.
-  @override
-  ir.LibraryDependency readLibraryDependencyNodeOrNull() {
+  ir.LibraryDependency? readLibraryDependencyNodeOrNull() {
     return readValueOrNull(readLibraryDependencyNode);
   }
 
   /// Reads a reference to a kernel tree node from this data source.
-  @override
   ir.TreeNode readTreeNode() {
     _checkDataKind(DataKind.treeNode);
     return _readTreeNode(null);
   }
 
-  ir.TreeNode _readTreeNode(MemberData memberData) {
+  ir.TreeNode _readTreeNode(MemberData? memberData) {
     _TreeNodeKind kind = _sourceReader.readEnum(_TreeNodeKind.values);
     switch (kind) {
       case _TreeNodeKind.cls:
@@ -601,7 +560,8 @@
       case _TreeNodeKind.member:
         return _readMemberData().node;
       case _TreeNodeKind.functionDeclarationVariable:
-        ir.FunctionDeclaration functionDeclaration = _readTreeNode(memberData);
+        final functionDeclaration =
+            _readTreeNode(memberData) as ir.FunctionDeclaration;
         return functionDeclaration.variable;
       case _TreeNodeKind.functionNode:
         return _readFunctionNode(memberData);
@@ -609,7 +569,7 @@
         return _readTypeParameter(memberData);
       case _TreeNodeKind.constant:
         memberData ??= _readMemberData();
-        ir.ConstantExpression expression = _readTreeNode(memberData);
+        final expression = _readTreeNode(memberData) as ir.ConstantExpression;
         ir.Constant constant =
             memberData.getConstantByIndex(expression, _sourceReader.readInt());
         return ConstantReference(expression, constant);
@@ -617,19 +577,13 @@
         memberData ??= _readMemberData();
         int index = _sourceReader.readInt();
         ir.TreeNode treeNode = memberData.getTreeNodeByIndex(index);
-        assert(
-            treeNode != null,
-            "No TreeNode found for index $index in "
-            "${memberData.node}.${_sourceReader.errorContext}");
         return treeNode;
     }
-    throw UnsupportedError("Unexpected _TreeNodeKind $kind");
   }
 
   /// Reads a reference to a potentially `null` kernel tree node from this data
   /// source.
-  @override
-  ir.TreeNode readTreeNodeOrNull() {
+  ir.TreeNode? readTreeNodeOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readTreeNode();
@@ -641,7 +595,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTreeNodes].
-  @override
   List<E> readTreeNodes<E extends ir.TreeNode>() {
     return readTreeNodesOrNull<E>() ?? List.empty();
   }
@@ -651,8 +604,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTreeNodes].
-  @override
-  List<E> readTreeNodesOrNull<E extends ir.TreeNode>() {
+  List<E>? readTreeNodesOrNull<E extends ir.TreeNode>() {
     int count = readInt();
     if (count == 0) return null;
     return List<E>.generate(count, (i) => readTreeNode() as E, growable: false);
@@ -664,18 +616,16 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTreeNodeMap].
-  @override
   Map<K, V> readTreeNodeMap<K extends ir.TreeNode, V>(V f()) {
     return readTreeNodeMapOrNull(f) ?? <K, V>{};
   }
 
-  @override
-  Map<K, V> readTreeNodeMapOrNull<K extends ir.TreeNode, V>(V f()) {
+  Map<K, V>? readTreeNodeMapOrNull<K extends ir.TreeNode, V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      ir.TreeNode node = readTreeNode();
+      final node = readTreeNode() as K;
       V value = f();
       map[node] = value;
     }
@@ -695,7 +645,7 @@
 
   /// Reads a reference to a potentially `null` kernel tree node in the known
   /// [context] from this data source.
-  ir.TreeNode readTreeNodeOrNullInContext() {
+  ir.TreeNode? readTreeNodeOrNullInContext() {
     bool hasValue = readBool();
     if (hasValue) {
       return readTreeNodeInContextInternal(currentMemberData);
@@ -709,16 +659,13 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTreeNodesInContext].
-  List<E> readTreeNodesInContext<E extends ir.TreeNode>(
+  List<E>? readTreeNodesInContext<E extends ir.TreeNode>(
       {bool emptyAsNull = false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
-    List<E> list = List<E>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      ir.TreeNode node = readTreeNodeInContextInternal(currentMemberData);
-      list[i] = node;
-    }
-    return list;
+    return List<E>.generate(
+        count, (index) => readTreeNodeInContextInternal(currentMemberData) as E,
+        growable: false);
   }
 
   /// Reads a map from kernel tree nodes to [V] values in the known [context]
@@ -727,7 +674,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTreeNodeMapInContext].
-  @override
   Map<K, V> readTreeNodeMapInContext<K extends ir.TreeNode, V>(V f()) {
     return readTreeNodeMapInContextOrNull<K, V>(f) ?? {};
   }
@@ -738,14 +684,12 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTreeNodeMapInContext].
-  @override
-  Map<K, V> /*?*/ readTreeNodeMapInContextOrNull<K extends ir.TreeNode, V>(
-      V f()) {
+  Map<K, V>? readTreeNodeMapInContextOrNull<K extends ir.TreeNode, V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      ir.TreeNode node = readTreeNodeInContextInternal(currentMemberData);
+      final node = readTreeNodeInContextInternal(currentMemberData) as K;
       V value = f();
       map[node] = value;
     }
@@ -753,13 +697,12 @@
   }
 
   /// Reads a reference to a kernel type parameter node from this data source.
-  @override
   ir.TypeParameter readTypeParameterNode() {
     _checkDataKind(DataKind.typeParameterNode);
     return _readTypeParameter(null);
   }
 
-  ir.TypeParameter _readTypeParameter(MemberData memberData) {
+  ir.TypeParameter _readTypeParameter(MemberData? memberData) {
     _TypeParameterKind kind = _sourceReader.readEnum(_TypeParameterKind.values);
     switch (kind) {
       case _TypeParameterKind.cls:
@@ -769,7 +712,6 @@
         ir.FunctionNode functionNode = _readFunctionNode(memberData);
         return functionNode.typeParameters[_sourceReader.readInt()];
     }
-    throw UnsupportedError("Unexpected _TypeParameterKind kind $kind");
   }
 
   /// Reads a list of references to kernel type parameter nodes from this data
@@ -778,27 +720,22 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTypeParameterNodes].
-  @override
   List<ir.TypeParameter> readTypeParameterNodes() {
     int count = readInt();
-    List<ir.TypeParameter> list = List<ir.TypeParameter>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      list[i] = readTypeParameterNode();
-    }
-    return list;
+    return List<ir.TypeParameter>.generate(
+        count, (index) => readTypeParameterNode(),
+        growable: false);
   }
 
   /// Reads a type from this data source.
-  @override
-  DartType /*!*/ readDartType() {
+  DartType readDartType() {
     _checkDataKind(DataKind.dartType);
     final type = DartType.readFromDataSource(this, []);
     return interner?.internDartType(type) ?? type;
   }
 
   /// Reads a nullable type from this data source.
-  @override
-  DartType /*?*/ readDartTypeOrNull() {
+  DartType? readDartTypeOrNull() {
     _checkDataKind(DataKind.dartType);
     return DartType.readFromDataSourceOrNull(this, []);
   }
@@ -807,7 +744,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeDartTypes].
-  @override
   List<DartType> readDartTypes() {
     // Share the list when empty.
     return readDartTypesOrNull() ?? const [];
@@ -818,8 +754,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeDartTypes].
-  @override
-  List<DartType> /*?*/ readDartTypesOrNull() {
+  List<DartType>? readDartTypesOrNull() {
     int count = readInt();
     if (count == 0) return null;
     return List.generate(count, (_) => readDartType(), growable: false);
@@ -827,24 +762,22 @@
 
   /// Reads a kernel type node from this data source. If [allowNull], the
   /// returned type is allowed to be `null`.
-  @override
-  ir.DartType /*!*/ readDartTypeNode() {
+  ir.DartType readDartTypeNode() {
     _checkDataKind(DataKind.dartTypeNode);
-    ir.DartType type = readDartTypeNodeOrNull();
+    ir.DartType? type = readDartTypeNodeOrNull();
     if (type == null) throw UnsupportedError('Unexpected `null` DartTypeNode');
     return type;
   }
 
   /// Reads a kernel type node from this data source. The returned type is
   /// allowed to be `null`.
-  @override
-  ir.DartType /*?*/ readDartTypeNodeOrNull() {
+  ir.DartType? readDartTypeNodeOrNull() {
     _checkDataKind(DataKind.dartTypeNode);
     final type = _readDartTypeNode([]);
     return interner?.internDartTypeNode(type) ?? type;
   }
 
-  ir.DartType _readDartTypeNode(List<ir.TypeParameter> functionTypeVariables) {
+  ir.DartType? _readDartTypeNode(List<ir.TypeParameter> functionTypeVariables) {
     DartTypeNodeKind kind = readEnum(DartTypeNodeKind.values);
     switch (kind) {
       case DartTypeNodeKind.none:
@@ -862,7 +795,7 @@
         ir.TypeParameter typeParameter = readTypeParameterNode();
         ir.Nullability typeParameterTypeNullability =
             readEnum(ir.Nullability.values);
-        ir.DartType promotedBound = _readDartTypeNode(functionTypeVariables);
+        ir.DartType? promotedBound = _readDartTypeNode(functionTypeVariables);
         return ir.TypeParameterType(
             typeParameter, typeParameterTypeNullability, promotedBound);
       case DartTypeNodeKind.functionTypeVariable:
@@ -870,39 +803,38 @@
         assert(0 <= index && index < functionTypeVariables.length);
         ir.Nullability typeParameterTypeNullability =
             readEnum(ir.Nullability.values);
-        ir.DartType promotedBound = _readDartTypeNode(functionTypeVariables);
+        ir.DartType? promotedBound = _readDartTypeNode(functionTypeVariables);
         return ir.TypeParameterType(functionTypeVariables[index],
             typeParameterTypeNullability, promotedBound);
       case DartTypeNodeKind.functionType:
         begin(functionTypeNodeTag);
         int typeParameterCount = readInt();
         List<ir.TypeParameter> typeParameters = List<ir.TypeParameter>.generate(
-            typeParameterCount, (int index) => ir.TypeParameter());
+            typeParameterCount, (int index) => ir.TypeParameter(),
+            growable: false);
         functionTypeVariables =
             List<ir.TypeParameter>.from(functionTypeVariables)
               ..addAll(typeParameters);
         for (int index = 0; index < typeParameterCount; index++) {
           typeParameters[index].name = readString();
           typeParameters[index].bound =
-              _readDartTypeNode(functionTypeVariables);
+              _readDartTypeNode(functionTypeVariables)!;
           typeParameters[index].defaultType =
-              _readDartTypeNode(functionTypeVariables);
+              _readDartTypeNode(functionTypeVariables)!;
         }
-        ir.DartType returnType = _readDartTypeNode(functionTypeVariables);
+        ir.DartType returnType = _readDartTypeNode(functionTypeVariables)!;
         ir.Nullability nullability = readEnum(ir.Nullability.values);
         int requiredParameterCount = readInt();
         List<ir.DartType> positionalParameters =
             _readDartTypeNodes(functionTypeVariables);
         int namedParameterCount = readInt();
-        List<ir.NamedType> namedParameters =
-            List<ir.NamedType>.filled(namedParameterCount, null);
-        for (int index = 0; index < namedParameterCount; index++) {
+        final namedParameters =
+            List<ir.NamedType>.generate(namedParameterCount, (index) {
           String name = readString();
           bool isRequired = readBool();
-          ir.DartType type = _readDartTypeNode(functionTypeVariables);
-          namedParameters[index] =
-              ir.NamedType(name, type, isRequired: isRequired);
-        }
+          ir.DartType type = _readDartTypeNode(functionTypeVariables)!;
+          return ir.NamedType(name, type, isRequired: isRequired);
+        }, growable: false);
         end(functionTypeNodeTag);
         return ir.FunctionType(positionalParameters, returnType, nullability,
             namedParameters: namedParameters,
@@ -937,19 +869,17 @@
         return const ir.DynamicType();
       case DartTypeNodeKind.futureOrType:
         ir.Nullability nullability = readEnum(ir.Nullability.values);
-        ir.DartType typeArgument = _readDartTypeNode(functionTypeVariables);
+        ir.DartType typeArgument = _readDartTypeNode(functionTypeVariables)!;
         return ir.FutureOrType(typeArgument, nullability);
       case DartTypeNodeKind.nullType:
         return const ir.NullType();
     }
-    throw UnsupportedError("Unexpected DartTypeKind $kind");
   }
 
   /// Reads a list of kernel type nodes from this data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeDartTypeNodes].
-  @override
   List<ir.DartType> readDartTypeNodes() {
     return readDartTypeNodesOrNull() ?? const [];
   }
@@ -959,31 +889,23 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeDartTypeNodes].
-  @override
-  List<ir.DartType> readDartTypeNodesOrNull() {
+  List<ir.DartType>? readDartTypeNodesOrNull() {
     int count = readInt();
     if (count == 0) return null;
-    List<ir.DartType> list = List<ir.DartType>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      list[i] = readDartTypeNode();
-    }
-    return list;
+    return List<ir.DartType>.generate(count, (index) => readDartTypeNode(),
+        growable: false);
   }
 
   List<ir.DartType> _readDartTypeNodes(
       List<ir.TypeParameter> functionTypeVariables) {
     int count = readInt();
     if (count == 0) return emptyListOfDartTypes;
-    List<ir.DartType> types =
-        List<ir.DartType>.filled(count, const ir.InvalidType());
-    for (int index = 0; index < count; index++) {
-      types[index] = _readDartTypeNode(functionTypeVariables);
-    }
-    return types;
+    return List<ir.DartType>.generate(
+        count, (index) => _readDartTypeNode(functionTypeVariables)!,
+        growable: false);
   }
 
   /// Reads a source span from this data source.
-  @override
   SourceSpan readSourceSpan() {
     _checkDataKind(DataKind.sourceSpan);
     Uri uri = _readUri();
@@ -992,16 +914,14 @@
     return SourceSpan(uri, begin, end);
   }
 
-  /// Reads a reference to an indexed library from this data source.
-  @override
-  IndexedLibrary readLibrary() {
+  /// Reads a reference to a library entity from this data source.
+  LibraryEntity readLibrary() {
     return _entityReader.readLibraryFromDataSource(this, entityLookup);
   }
 
-  /// Reads a reference to a potentially `null` indexed library from this data
+  /// Reads a reference to a potentially `null` library entity from this data
   /// source.
-  @override
-  IndexedLibrary readLibraryOrNull() {
+  LibraryEntity? readLibraryOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readLibrary();
@@ -1014,7 +934,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeLibraryMap].
-  @override
   Map<K, V> readLibraryMap<K extends LibraryEntity, V>(V f()) {
     return readLibraryMapOrNull<K, V>(f) ?? {};
   }
@@ -1025,29 +944,26 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeLibraryMap].
-  @override
-  Map<K, V> /*?*/ readLibraryMapOrNull<K extends LibraryEntity, V>(V f()) {
+  Map<K, V>? readLibraryMapOrNull<K extends LibraryEntity, V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      LibraryEntity library = readLibrary();
+      final library = readLibrary() as K;
       V value = f();
       map[library] = value;
     }
     return map;
   }
 
-  /// Reads a reference to an indexed class from this data source.
-  @override
-  IndexedClass readClass() {
+  /// Reads a reference to an class entity from this data source.
+  ClassEntity readClass() {
     return _entityReader.readClassFromDataSource(this, entityLookup);
   }
 
-  /// Reads a reference to a potentially `null` indexed class from this data
+  /// Reads a reference to a potentially `null` class entity from this data
   /// source.
-  @override
-  IndexedClass readClassOrNull() {
+  ClassEntity? readClassOrNull() {
     bool hasClass = readBool();
     if (hasClass) {
       return readClass();
@@ -1055,71 +971,61 @@
     return null;
   }
 
-  /// Reads a list of references to indexed classes from this data source.
+  /// Reads a list of references to class entities from this data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeClasses].
-  @override
   List<E> readClasses<E extends ClassEntity>() {
     return readClassesOrNull<E>() ?? List.empty();
   }
 
-  /// Reads a list of references to indexed classes from this data source.
+  /// Reads a list of references to class entities from this data source.
   /// `null` is returned instead of an empty list.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeClasses].
-  @override
-  List<E> readClassesOrNull<E extends ClassEntity>() {
+  List<E>? readClassesOrNull<E extends ClassEntity>() {
     int count = readInt();
     if (count == 0) return null;
-    List<E> list = List<E>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      ClassEntity cls = readClass();
-      list[i] = cls;
-    }
-    return list;
+    return List<E>.generate(count, (index) => readClass() as E,
+        growable: false);
   }
 
-  /// Reads a map from indexed classes to [V] values from this data source,
+  /// Reads a map from class entities to [V] values from this data source,
   /// calling [f] to read each value from the data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeClassMap].
-  @override
   Map<K, V> readClassMap<K extends ClassEntity, V>(V f()) {
     return readClassMapOrNull<K, V>(f) ?? {};
   }
 
-  /// Reads a map from indexed classes to [V] values from this data source,
+  /// Reads a map from class entities to [V] values from this data source,
   /// calling [f] to read each value from the data source. `null` is returned if
   /// the map is empty.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeClassMap].
-  @override
-  Map<K, V> /*?*/ readClassMapOrNull<K extends ClassEntity, V>(V f()) {
+  Map<K, V>? readClassMapOrNull<K extends ClassEntity, V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      ClassEntity cls = readClass();
+      final cls = readClass() as K;
       V value = f();
       map[cls] = value;
     }
     return map;
   }
 
-  /// Reads a reference to an indexed member from this data source.
-  @override
-  IndexedMember /*!*/ readMember() {
+  /// Reads a reference to an member entity from this data source.
+  MemberEntity readMember() {
     return _entityReader.readMemberFromDataSource(this, entityLookup);
   }
 
-  /// Reads a reference to a potentially `null` indexed member from this data
+  /// Reads a reference to a potentially `null` member entity from this data
   /// source.
-  @override
-  IndexedMember readMemberOrNull() {
+  MemberEntity? readMemberOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readMember();
@@ -1127,81 +1033,70 @@
     return null;
   }
 
-  /// Reads a list of references to indexed members from this data source.
+  /// Reads a list of references to member entities from this data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMembers].
-  @override
-  List<E /*!*/ > readMembers<E extends MemberEntity /*!*/ >() {
+  List<E> readMembers<E extends MemberEntity>() {
     return readMembersOrNull() ?? List.empty();
   }
 
-  /// Reads a list of references to indexed members from this data source.
+  /// Reads a list of references to member entities from this data source.
   /// `null` is returned instead of an empty list.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMembers].
-  @override
-  List<E /*!*/ > readMembersOrNull<E extends MemberEntity /*!*/ >() {
+  List<E>? readMembersOrNull<E extends MemberEntity>() {
     int count = readInt();
     if (count == 0) return null;
-    MemberEntity firstMember = readMember();
-    List<E> list = List<E>.filled(count, firstMember);
-    for (int i = 1; i < count; i++) {
-      MemberEntity member = readMember();
-      list[i] = member;
-    }
-    return list;
+    return List<E>.generate(count, (index) => readMember() as E,
+        growable: false);
   }
 
-  /// Reads a map from indexed members to [V] values from this data source,
+  /// Reads a map from member entities to [V] values from this data source,
   /// calling [f] to read each value from the data source.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMemberMap].
-  @override
   Map<K, V> readMemberMap<K extends MemberEntity, V>(V f(MemberEntity member)) {
     return readMemberMapOrNull<K, V>(f) ?? {};
   }
 
-  /// Reads a map from indexed members to [V] values from this data source,
+  /// Reads a map from member entities to [V] values from this data source,
   /// calling [f] to read each value from the data source.
   /// `null` is returned instead of an empty map.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeMemberMap].
-  @override
-  Map<K, V> readMemberMapOrNull<K extends MemberEntity, V>(
+  Map<K, V>? readMemberMapOrNull<K extends MemberEntity, V>(
       V f(MemberEntity member)) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      MemberEntity member = readMember();
+      final member = readMember() as K;
       V value = f(member);
       map[member] = value;
     }
     return map;
   }
 
-  /// Reads a reference to an indexed type variable from this data source.
-  @override
-  IndexedTypeVariable readTypeVariable() {
+  /// Reads a reference to an type variable entity from this data source.
+  TypeVariableEntity readTypeVariable() {
     return _entityReader.readTypeVariableFromDataSource(this, entityLookup);
   }
 
-  /// Reads a map from indexed type variable to [V] values from this data
+  /// Reads a map from type variable entities to [V] values from this data
   /// source, calling [f] to read each value from the data source. If
   /// [emptyAsNull] is `true`, `null` is returned instead of an empty map.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeTypeVariableMap].
-  @override
-  Map<K, V> readTypeVariableMap<K extends IndexedTypeVariable, V>(V f()) {
+  Map<K, V> readTypeVariableMap<K extends TypeVariableEntity, V>(V f()) {
     int count = readInt();
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      IndexedTypeVariable node = readTypeVariable();
+      final node = readTypeVariable() as K;
       V value = f();
       map[node] = value;
     }
@@ -1223,18 +1118,16 @@
         ClassEntity cls = readClass();
         return BoxLocal(cls);
       case LocalKind.anonymousClosureLocal:
-        ClassEntity cls = readClass();
+        final cls = readClass() as JClosureClass;
         return AnonymousClosureLocal(cls);
       case LocalKind.typeVariableLocal:
         TypeVariableEntity typeVariable = readTypeVariable();
         return TypeVariableLocal(typeVariable);
     }
-    throw UnsupportedError("Unexpected local kind $kind");
   }
 
   /// Reads a reference to a potentially `null` local from this data source.
-  @override
-  Local readLocalOrNull() {
+  Local? readLocalOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readLocal();
@@ -1242,34 +1135,17 @@
     return null;
   }
 
-  /// Reads a list of references to locals 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
-  /// [DataSinkWriter.writeLocals].
-  List<E> readLocals<E extends Local>({bool emptyAsNull = false}) {
-    int count = readInt();
-    if (count == 0 && emptyAsNull) return null;
-    List<E> list = List<E>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      Local local = readLocal();
-      list[i] = local;
-    }
-    return list;
-  }
-
   /// 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`,
   /// `null` is returned instead of an empty map.
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeLocalMap].
-  @override
   Map<K, V> readLocalMap<K extends Local, V>(V f()) {
     int count = readInt();
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      Local local = readLocal();
+      final local = readLocal() as K;
       V value = f();
       map[local] = value;
     }
@@ -1277,14 +1153,13 @@
   }
 
   /// Reads a constant value from this data source.
-  @override
   ConstantValue readConstant() {
     _checkDataKind(DataKind.constant);
     return _readConstant();
   }
 
   ConstantValue _readConstant() {
-    return _constantIndex.read(_readConstantInternal);
+    return _constantIndex.read(_readConstantInternal)!;
   }
 
   ConstantValue _readConstantInternal() {
@@ -1305,37 +1180,37 @@
       case ConstantValueKind.NULL:
         return const NullConstantValue();
       case ConstantValueKind.FUNCTION:
-        IndexedFunction function = readMember();
-        DartType type = readDartType();
+        final function = readMember() as FunctionEntity;
+        final type = readDartType() as FunctionType;
         return FunctionConstantValue(function, type);
       case ConstantValueKind.LIST:
-        DartType type = readDartType();
-        List<ConstantValue> entries = readConstants();
+        final type = readDartType() as InterfaceType;
+        final entries = readConstants();
         return ListConstantValue(type, entries);
       case ConstantValueKind.SET:
-        DartType type = readDartType();
-        MapConstantValue entries = readConstant();
+        final type = readDartType() as InterfaceType;
+        final entries = readConstant() as MapConstantValue;
         return constant_system.JavaScriptSetConstant(type, entries);
       case ConstantValueKind.MAP:
-        DartType type = readDartType();
-        ListConstantValue keyList = readConstant();
+        final type = readDartType() as InterfaceType;
+        final keyList = readConstant() as ListConstantValue;
         List<ConstantValue> values = readConstants();
         bool onlyStringKeys = readBool();
         return constant_system.JavaScriptMapConstant(
             type, keyList, values, onlyStringKeys);
       case ConstantValueKind.CONSTRUCTED:
-        InterfaceType type = readDartType();
+        final type = readDartType() as InterfaceType;
         Map<FieldEntity, ConstantValue> fields =
             readMemberMap<FieldEntity, ConstantValue>(
                 (MemberEntity member) => readConstant());
         return ConstructedConstantValue(type, fields);
       case ConstantValueKind.TYPE:
-        DartType representedType = readDartType();
-        DartType type = readDartType();
+        final representedType = readDartType();
+        final type = readDartType() as InterfaceType;
         return TypeConstantValue(representedType, type);
       case ConstantValueKind.INSTANTIATION:
         List<DartType> typeArguments = readDartTypes();
-        ConstantValue function = readConstant();
+        final function = readConstant() as FunctionConstantValue;
         return InstantiationConstantValue(typeArguments, function);
       case ConstantValueKind.NON_CONSTANT:
         return NonConstantValue();
@@ -1353,15 +1228,13 @@
       case ConstantValueKind.UNREACHABLE:
         return UnreachableConstantValue();
       case ConstantValueKind.JS_NAME:
-        js.LiteralString name = readJsNode();
+        final name = readJsNode() as js.LiteralString;
         return JsNameConstantValue(name);
     }
-    throw UnsupportedError("Unexpected constant value kind ${kind}.");
   }
 
   /// Reads a potentially `null` constant value from this data source.
-  @override
-  ConstantValue readConstantOrNull() {
+  ConstantValue? readConstantOrNull() {
     bool hasClass = readBool();
     if (hasClass) {
       return readConstant();
@@ -1374,15 +1247,10 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeConstants].
-  List<E> readConstants<E extends ConstantValue>({bool emptyAsNull = false}) {
+  List<E> readConstants<E extends ConstantValue>() {
     int count = readInt();
-    if (count == 0 && emptyAsNull) return null;
-    List<E> list = List<E>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      ConstantValue value = readConstant();
-      list[i] = value;
-    }
-    return list;
+    return List<E>.generate(count, (index) => readConstant() as E,
+        growable: false);
   }
 
   /// Reads a map from constant values to [V] values from this data source,
@@ -1390,7 +1258,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeConstantMap].
-  @override
   Map<K, V> readConstantMap<K extends ConstantValue, V>(V f()) {
     return readConstantMapOrNull<K, V>(f) ?? {};
   }
@@ -1401,13 +1268,12 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeConstantMap].
-  @override
-  Map<K, V> /*?*/ readConstantMapOrNull<K extends ConstantValue, V>(V f()) {
+  Map<K, V>? readConstantMapOrNull<K extends ConstantValue, V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<K, V> map = {};
     for (int i = 0; i < count; i++) {
-      ConstantValue key = readConstant();
+      final key = readConstant() as K;
       V value = f();
       map[key] = value;
     }
@@ -1415,7 +1281,6 @@
   }
 
   /// Reads a double value from this data source.
-  @override
   double readDoubleValue() {
     _checkDataKind(DataKind.double);
     return _readDoubleValue();
@@ -1434,7 +1299,6 @@
   ///
   /// This is should only when the value is not known to be a non-negative
   /// 30 bit integer. Otherwise [readInt] should be used.
-  @override
   int readIntegerValue() {
     _checkDataKind(DataKind.int);
     return _readBigInt().toInt();
@@ -1444,7 +1308,6 @@
     return BigInt.parse(readString());
   }
 
-  @override
   ImportEntity readImport() {
     _checkDataKind(DataKind.import);
     return _readImport();
@@ -1452,11 +1315,11 @@
 
   /// Reads a import from this data source.
   ImportEntity _readImport() {
-    return _importIndex.read(_readImportInternal);
+    return _importIndex.read(_readImportInternal)!;
   }
 
   ImportEntity _readImportInternal() {
-    String name = readStringOrNull();
+    String? name = readStringOrNull();
     Uri uri = _readUri();
     Uri enclosingLibraryUri = _readUri();
     bool isDeferred = _readBool();
@@ -1464,8 +1327,7 @@
   }
 
   /// Reads a potentially `null` import from this data source.
-  @override
-  ImportEntity readImportOrNull() {
+  ImportEntity? readImportOrNull() {
     bool hasClass = readBool();
     if (hasClass) {
       return readImport();
@@ -1477,7 +1339,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeImports].
-  @override
   List<ImportEntity> readImports() {
     return readImportsOrNull() ?? const [];
   }
@@ -1487,15 +1348,11 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeImports].
-  @override
-  List<ImportEntity> /*?*/ readImportsOrNull() {
+  List<ImportEntity>? readImportsOrNull() {
     int count = readInt();
     if (count == 0) return null;
-    List<ImportEntity> list = List<ImportEntity>.filled(count, null);
-    for (int i = 0; i < count; i++) {
-      list[i] = readImport();
-    }
-    return list;
+    return List<ImportEntity>.generate(count, (index) => readImport(),
+        growable: false);
   }
 
   /// Reads a map from imports to [V] values from this data source,
@@ -1503,7 +1360,6 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeImportMap].
-  @override
   Map<ImportEntity, V> readImportMap<V>(V f()) {
     return readImportMapOrNull<V>(f) ?? {};
   }
@@ -1514,8 +1370,7 @@
   ///
   /// This is a convenience method to be used together with
   /// [DataSinkWriter.writeImportMap].
-  @override
-  Map<ImportEntity, V> /*?*/ readImportMapOrNull<V>(V f()) {
+  Map<ImportEntity, V>? readImportMapOrNull<V>(V f()) {
     int count = readInt();
     if (count == 0) return null;
     Map<ImportEntity, V> map = {};
@@ -1530,13 +1385,12 @@
   /// Reads an [AbstractValue] from this data source.
   ///
   /// This feature is only available a [CodegenReader] has been registered.
-  @override
   AbstractValue readAbstractValue() {
     assert(
         _codegenReader != null,
         "Can not deserialize an AbstractValue "
         "without a registered codegen reader.");
-    return _codegenReader.readAbstractValue(this);
+    return _codegenReader!.readAbstractValue(this);
   }
 
   /// Reads a reference to an [OutputUnit] from this data source.
@@ -1547,7 +1401,7 @@
         _codegenReader != null,
         "Can not deserialize an OutputUnit reference "
         "without a registered codegen reader.");
-    return _codegenReader.readOutputUnitReference(this);
+    return _codegenReader!.readOutputUnitReference(this);
   }
 
   /// Reads a [js.Node] value from this data source.
@@ -1556,14 +1410,13 @@
   js.Node readJsNode() {
     assert(_codegenReader != null,
         "Can not deserialize a JS node without a registered codegen reader.");
-    return _codegenReader.readJsNode(this);
+    return _codegenReader!.readJsNode(this);
   }
 
   /// Reads a potentially `null` [js.Node] value from this data source.
   ///
   /// This feature is only available a [CodegenReader] has been registered.
-  @override
-  js.Node readJsNodeOrNull() {
+  js.Node? readJsNodeOrNull() {
     bool hasValue = readBool();
     if (hasValue) {
       return readJsNode();
@@ -1574,41 +1427,41 @@
   /// Reads a [TypeRecipe] value from this data source.
   ///
   /// This feature is only available a [CodegenReader] has been registered.
-  @override
   TypeRecipe readTypeRecipe() {
     assert(_codegenReader != null,
         "Can not deserialize a TypeRecipe without a registered codegen reader.");
-    return _codegenReader.readTypeRecipe(this);
+    return _codegenReader!.readTypeRecipe(this);
   }
 
   MemberData _getMemberData(ir.Member node) {
     LibraryData libraryData =
         componentLookup.getLibraryDataByUri(node.enclosingLibrary.importUri);
     if (node.enclosingClass != null) {
-      ClassData classData = libraryData.lookupClassByNode(node.enclosingClass);
-      return classData.lookupMemberDataByNode(node);
+      final classData = libraryData.lookupClassByNode(node.enclosingClass!)!;
+      return classData.lookupMemberDataByNode(node)!;
     } else {
-      return libraryData.lookupMemberDataByNode(node);
+      return libraryData.lookupMemberDataByNode(node)!;
     }
   }
 
-  ir.FunctionNode _readFunctionNode(MemberData memberData) {
+  ir.FunctionNode _readFunctionNode(MemberData? memberData) {
     _FunctionNodeKind kind = _sourceReader.readEnum(_FunctionNodeKind.values);
     switch (kind) {
       case _FunctionNodeKind.procedure:
-        ir.Procedure procedure = _readMemberData().node;
+        final procedure = _readMemberData().node as ir.Procedure;
         return procedure.function;
       case _FunctionNodeKind.constructor:
-        ir.Constructor constructor = _readMemberData().node;
+        final constructor = _readMemberData().node as ir.Constructor;
         return constructor.function;
       case _FunctionNodeKind.functionExpression:
-        ir.FunctionExpression functionExpression = _readTreeNode(memberData);
+        final functionExpression =
+            _readTreeNode(memberData) as ir.FunctionExpression;
         return functionExpression.function;
       case _FunctionNodeKind.functionDeclaration:
-        ir.FunctionDeclaration functionDeclaration = _readTreeNode(memberData);
+        final functionDeclaration =
+            _readTreeNode(memberData) as ir.FunctionDeclaration;
         return functionDeclaration.function;
     }
-    throw UnsupportedError("Unexpected _FunctionNodeKind $kind");
   }
 
   void _checkDataKind(DataKind expectedKind) {
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index 265359b..e225449 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -29,7 +29,6 @@
 import '../util/sink_adapter.dart';
 import '../world.dart';
 import 'serialization.dart';
-import 'serialization_interfaces.dart' show StringInterner;
 
 /// A data class holding some data [T] and the associated [DataSourceIndices].
 class DataAndIndices<T> {
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 2f79457..69e979b 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -844,7 +844,8 @@
         ConstructorBodyEntity constructorBody =
             _elementMap.getConstructorBody(body);
 
-        void handleParameter(ir.VariableDeclaration node, {bool isElided}) {
+        void handleParameter(ir.VariableDeclaration node,
+            {/*required*/ bool isElided}) {
           if (isElided) return;
 
           Local parameter = _localsMap.getLocalVariable(node);
@@ -2356,7 +2357,7 @@
         // to the body.
         SubGraph bodyGraph = SubGraph(bodyEntryBlock, bodyExitBlock);
         JumpTarget target = _localsMap.getJumpTargetForDo(node);
-        LabelDefinition label = target.addLabel('loop', isBreakTarget: true);
+        final label = target.addLabel('loop', isBreakTarget: true);
         HLabeledBlockInformation info = HLabeledBlockInformation(
             HSubGraphBlockInformation(bodyGraph), <LabelDefinition>[label]);
         loopEntryBlock.setBlockFlow(info, current);
@@ -6246,7 +6247,7 @@
     ir.Member memberContextNode = _elementMap.getMemberContextNode(function);
     KernelToLocalsMap localsMap = _globalLocalsMap.getLocalsMap(function);
     forEachOrderedParameter(_elementMap, function,
-        (ir.VariableDeclaration variable, {bool isElided}) {
+        (ir.VariableDeclaration variable, {/*required*/ bool isElided}) {
       Local local = localsMap.getLocalVariable(variable);
       if (isElided) {
         localsHandler.updateLocal(
@@ -6411,7 +6412,7 @@
 
     KernelToLocalsMap localsMap = _globalLocalsMap.getLocalsMap(function);
     forEachOrderedParameter(_elementMap, function,
-        (ir.VariableDeclaration variable, {bool isElided}) {
+        (ir.VariableDeclaration variable, {/*required*/ bool isElided}) {
       Local parameter = localsMap.getLocalVariable(variable);
       HInstruction argument = localsHandler.readLocal(parameter);
       DartType type = localsMap.getLocalType(_elementMap, parameter);
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index 448ad06..427b165 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -6,7 +6,7 @@
 
 import '../common/names.dart' show Names;
 import '../elements/entities.dart' show ParameterStructure;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart';
 import 'selector.dart' show Selector;
 
diff --git a/pkg/compiler/lib/src/universe/class_hierarchy.dart b/pkg/compiler/lib/src/universe/class_hierarchy.dart
index 8634d09..d70a7bc 100644
--- a/pkg/compiler/lib/src/universe/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/universe/class_hierarchy.dart
@@ -9,7 +9,7 @@
 import '../elements/types.dart' show InterfaceType;
 import '../kernel/element_map_interfaces.dart'
     show KernelToElementMapForClassHierarchy;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import 'class_set.dart';
 
 // TODO(johnniwinther): Move more methods from `JClosedWorld` to
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index e5ccc33..f10d690 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -8,7 +8,7 @@
 
 import '../elements/entities.dart' show ClassEntity;
 import '../elements/indexed.dart' show IndexedClass;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/enumset.dart' show EnumSet;
 
 /// Enum for the different kinds of instantiation of a class.
@@ -215,9 +215,9 @@
   factory ClassHierarchyNode.readFromDataSource(
       DataSourceReader source, Map<ClassEntity, ClassHierarchyNode> nodeMap) {
     source.begin(tag);
-    IndexedClass cls = source.readClass() as IndexedClass;
+    final cls = source.readClass();
     ClassHierarchyNode? parentNode;
-    final superclass = source.readClassOrNull() as IndexedClass?;
+    final superclass = source.readClassOrNull();
     if (superclass != null) {
       parentNode = nodeMap[superclass]!;
     }
@@ -225,7 +225,7 @@
     int hierarchyDepth = source.readInt();
     int instantiatedSubclassCount = source.readInt();
     source.end(tag);
-    return ClassHierarchyNode(parentNode, cls, hierarchyDepth)
+    return ClassHierarchyNode(parentNode, cls as IndexedClass, hierarchyDepth)
       .._instantiatedSubclassCount = instantiatedSubclassCount
       .._mask.value = maskValue;
   }
diff --git a/pkg/compiler/lib/src/universe/feature.dart b/pkg/compiler/lib/src/universe/feature.dart
index 8dac144..755014d 100644
--- a/pkg/compiler/lib/src/universe/feature.dart
+++ b/pkg/compiler/lib/src/universe/feature.dart
@@ -14,7 +14,7 @@
 
 import '../elements/types.dart';
 import '../ir/runtime_type_analysis.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart';
 
 /// A language feature that may be seen in the program.
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index 84df30c..558f8ac 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -8,7 +8,7 @@
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../js_model/jrecord_field_interface.dart' show JRecordFieldInterface;
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/enumset.dart';
 import 'call_structure.dart';
 
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index fa927f4..c32eff0 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -11,7 +11,7 @@
 import '../elements/names.dart';
 import '../elements/operators.dart';
 import '../kernel/invocation_mirror_constants.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../util/util.dart' show Hashing;
 import 'call_structure.dart' show CallStructure;
 
diff --git a/pkg/compiler/lib/src/universe/side_effects.dart b/pkg/compiler/lib/src/universe/side_effects.dart
index a269f63..091cc56 100644
--- a/pkg/compiler/lib/src/universe/side_effects.dart
+++ b/pkg/compiler/lib/src/universe/side_effects.dart
@@ -5,7 +5,7 @@
 library universe.side_effects;
 
 import '../elements/entities.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 
 class SideEffects {
   /// Tag used for identifying serialized [SideEffects] objects in a debugging
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index ed7a7c3..b4ebace 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -21,7 +21,7 @@
 import '../elements/types.dart';
 import '../elements/entities.dart';
 import '../inferrer/abstract_value_domain.dart';
-import '../serialization/serialization_interfaces.dart';
+import '../serialization/serialization.dart';
 import '../js_model/jrecord_field_interface.dart' show JRecordFieldInterface;
 import '../util/util.dart' show equalElements, Hashing;
 import 'call_structure.dart' show CallStructure;
diff --git a/pkg/dart2wasm/lib/target.dart b/pkg/dart2wasm/lib/target.dart
index 3be12c7..5dce90c 100644
--- a/pkg/dart2wasm/lib/target.dart
+++ b/pkg/dart2wasm/lib/target.dart
@@ -81,15 +81,20 @@
       ..parent = host;
   }
 
-  StaticInteropClassEraser _staticInteropClassEraser(CoreTypes coreTypes) =>
-      StaticInteropClassEraser(coreTypes,
+  StaticInteropClassEraser _staticInteropClassEraser(
+          CoreTypes coreTypes, ReferenceFromIndex? referenceFromIndex) =>
+      StaticInteropClassEraser(coreTypes, referenceFromIndex,
           libraryForJavaScriptObject: 'dart:_js_helper',
           classNameOfJavaScriptObject: 'JSValue');
 
-  void _performJSInteropTransformations(CoreTypes coreTypes,
-      ClassHierarchy hierarchy, List<Library> interopDependentLibraries) {
+  void _performJSInteropTransformations(
+      CoreTypes coreTypes,
+      ClassHierarchy hierarchy,
+      List<Library> interopDependentLibraries,
+      ReferenceFromIndex? referenceFromIndex) {
     final jsUtilOptimizer = JsUtilWasmOptimizer(coreTypes, hierarchy);
-    final staticInteropClassEraser = _staticInteropClassEraser(coreTypes);
+    final staticInteropClassEraser =
+        _staticInteropClassEraser(coreTypes, referenceFromIndex);
     for (Library library in interopDependentLibraries) {
       jsUtilOptimizer.visitLibrary(library);
       staticInteropClassEraser.visitLibrary(library);
@@ -108,9 +113,10 @@
   }
 
   @override
-  void performOutlineTransformations(Component component, CoreTypes coreTypes) {
-    component
-        .accept(StaticInteropStubCreator(_staticInteropClassEraser(coreTypes)));
+  void performOutlineTransformations(Component component, CoreTypes coreTypes,
+      ReferenceFromIndex? referenceFromIndex) {
+    component.accept(StaticInteropStubCreator(
+        _staticInteropClassEraser(coreTypes, referenceFromIndex)));
   }
 
   @override
@@ -130,8 +136,8 @@
     if (transitiveImportingJSInterop == null) {
       logger?.call("Skipped JS interop transformations");
     } else {
-      _performJSInteropTransformations(
-          coreTypes, hierarchy, transitiveImportingJSInterop);
+      _performJSInteropTransformations(coreTypes, hierarchy,
+          transitiveImportingJSInterop, referenceFromIndex);
       logger?.call("Transformed JS interop classes");
     }
     transformMixins.transformLibraries(
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index fa648bb..795d503 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -153,9 +153,10 @@
   bool get enableNoSuchMethodForwarders => true;
 
   @override
-  void performOutlineTransformations(Component component, CoreTypes coreTypes) {
-    component
-        .accept(StaticInteropStubCreator(StaticInteropClassEraser(coreTypes)));
+  void performOutlineTransformations(Component component, CoreTypes coreTypes,
+      ReferenceFromIndex? referenceFromIndex) {
+    component.accept(StaticInteropStubCreator(
+        StaticInteropClassEraser(coreTypes, referenceFromIndex)));
   }
 
   @override
@@ -171,7 +172,8 @@
       ChangedStructureNotifier? changedStructureNotifier}) {
     _nativeClasses ??= JsInteropChecks.getNativeClasses(component);
     var jsUtilOptimizer = JsUtilOptimizer(coreTypes, hierarchy);
-    var staticInteropClassEraser = StaticInteropClassEraser(coreTypes);
+    var staticInteropClassEraser =
+        StaticInteropClassEraser(coreTypes, referenceFromIndex);
     for (var library in libraries) {
       _CovarianceTransformer(library).transform();
       JsInteropChecks(
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 880d764..8f0f4f3 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
@@ -12,6 +12,8 @@
 import 'package:kernel/kernel.dart'
     show Component, Library, Procedure, DartType, TypeParameter;
 
+import 'package:kernel/reference_from_index.dart';
+
 import '../base/processed_options.dart' show ProcessedOptions;
 
 import '../fasta/compiler_context.dart' show CompilerContext;
@@ -152,7 +154,11 @@
   final ClassHierarchy? classHierarchy;
   final CoreTypes? coreTypes;
   final Set<Library>? neededDillLibraries;
+  final ReferenceFromIndex? referenceFromIndex;
 
   IncrementalCompilerResult(this.component,
-      {this.classHierarchy, this.coreTypes, this.neededDillLibraries});
+      {this.classHierarchy,
+      this.coreTypes,
+      this.neededDillLibraries,
+      this.referenceFromIndex});
 }
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 58d6b73..be3c4cf 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -529,7 +529,8 @@
       return new IncrementalCompilerResult(result,
           classHierarchy: currentKernelTarget.loader.hierarchy,
           coreTypes: currentKernelTarget.loader.coreTypes,
-          neededDillLibraries: neededDillLibraries);
+          neededDillLibraries: neededDillLibraries,
+          referenceFromIndex: currentKernelTarget.loader.referenceFromIndex);
     });
   }
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart b/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart
index 60c20a6..fea2808 100644
--- a/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/macro/macro.dart
@@ -37,7 +37,6 @@
 import '../../source/source_loader.dart';
 import '../../source/source_procedure_builder.dart';
 import '../hierarchy/hierarchy_builder.dart';
-import '../hierarchy/hierarchy_node.dart';
 import 'identifiers.dart';
 
 bool enableMacros = false;
@@ -482,8 +481,9 @@
                 macroApplication.instanceIdentifier,
                 declaration,
                 identifierResolver,
+                typeDeclarationResolver,
                 typeResolver,
-                classIntrospector);
+                typeIntrospector);
         if (result.isNotEmpty) {
           Map<macro.OmittedTypeAnnotation, String> omittedTypes = {};
           String source = _macroExecutor.buildAugmentationLibrary(
@@ -526,16 +526,18 @@
   }
 
   late Types types;
+  late macro.TypeDeclarationResolver typeDeclarationResolver;
   late macro.TypeResolver typeResolver;
-  late macro.ClassIntrospector classIntrospector;
+  late macro.TypeIntrospector typeIntrospector;
 
   Future<void> applyDeclarationsMacros(
       ClassHierarchyBuilder classHierarchy,
       List<SourceClassBuilder> sortedSourceClassBuilders,
       Future<void> Function(SourceLibraryBuilder) onAugmentationLibrary) async {
     types = new Types(classHierarchy);
+    typeDeclarationResolver = new _TypeDeclarationResolver(this);
     typeResolver = new _TypeResolver(this);
-    classIntrospector = new _ClassIntrospector(this, classHierarchy);
+    typeIntrospector = new _TypeIntrospector(this, classHierarchy);
 
     // Apply macros to classes first, in class hierarchy order.
     for (SourceClassBuilder classBuilder in sortedSourceClassBuilders) {
@@ -583,9 +585,9 @@
                 macroApplication.instanceIdentifier,
                 declaration,
                 identifierResolver,
-                typeResolver,
-                classIntrospector,
                 typeDeclarationResolver,
+                typeResolver,
+                typeIntrospector,
                 typeInferrer);
         if (result.isNotEmpty) {
           results.add(result);
@@ -599,11 +601,9 @@
     return results;
   }
 
-  late macro.TypeDeclarationResolver typeDeclarationResolver;
   late macro.TypeInferrer typeInferrer;
 
   Future<List<SourceLibraryBuilder>> applyDefinitionMacros() async {
-    typeDeclarationResolver = new _TypeDeclarationResolver(this);
     typeInferrer = new _TypeInferrer(this);
     List<SourceLibraryBuilder> augmentationLibraries = [];
     for (MapEntry<SourceLibraryBuilder, LibraryMacroApplicationData> entry
@@ -655,24 +655,60 @@
     }
   }
 
+  List<macro.NamedTypeAnnotationImpl> _typeBuildersToAnnotations(
+      LibraryBuilder libraryBuilder, List<TypeBuilder>? typeBuilders) {
+    return typeBuilders == null
+        ? []
+        : typeBuilders
+            .map((TypeBuilder typeBuilder) =>
+                computeTypeAnnotation(libraryBuilder, typeBuilder)
+                    as macro.NamedTypeAnnotationImpl)
+            .toList();
+  }
+
   macro.ClassDeclaration _createClassDeclaration(ClassBuilder builder) {
-    macro.ClassDeclaration declaration = new macro.ClassDeclarationImpl(
-        id: macro.RemoteInstance.uniqueId,
-        identifier: new TypeDeclarationBuilderIdentifier(
-            typeDeclarationBuilder: builder,
-            libraryBuilder: builder.libraryBuilder,
+    assert(
+        !builder.isAnonymousMixinApplication,
+        "Trying to create a ClassDeclaration for the mixin application "
+        "${builder}.");
+    TypeBuilder? supertypeBuilder = builder.supertypeBuilder;
+    List<TypeBuilder>? mixins;
+    while (supertypeBuilder != null) {
+      TypeDeclarationBuilder? declaration = supertypeBuilder.declaration;
+      if (declaration is ClassBuilder &&
+          declaration.isAnonymousMixinApplication) {
+        (mixins ??= []).add(declaration.mixedInTypeBuilder!);
+        supertypeBuilder = declaration.supertypeBuilder;
+      } else {
+        break;
+      }
+    }
+    if (mixins != null) {
+      mixins = mixins.reversed.toList();
+    }
+    macro.ClassDeclaration declaration =
+        // TODO: These shouldn't always be introspectable. In the declarations
+        // phase we need to limit the introspectable declarations to those that
+        // are part of the super chain of the directly macro annotated class.
+        new macro.IntrospectableClassDeclarationImpl(
             id: macro.RemoteInstance.uniqueId,
-            name: builder.name),
-        // TODO(johnniwinther): Support typeParameters
-        typeParameters: [],
-        // TODO(johnniwinther): Support interfaces
-        interfaces: [],
-        isAbstract: builder.isAbstract,
-        isExternal: builder.isExternal,
-        // TODO(johnniwinther): Support mixins
-        mixins: [],
-        // TODO(johnniwinther): Support superclass
-        superclass: null);
+            identifier: new TypeDeclarationBuilderIdentifier(
+                typeDeclarationBuilder: builder,
+                libraryBuilder: builder.libraryBuilder,
+                id: macro.RemoteInstance.uniqueId,
+                name: builder.name),
+            // TODO(johnniwinther): Support typeParameters
+            typeParameters: [],
+            interfaces: _typeBuildersToAnnotations(
+                builder.libraryBuilder, builder.interfaceBuilders),
+            isAbstract: builder.isAbstract,
+            isExternal: builder.isExternal,
+            mixins: _typeBuildersToAnnotations(builder.libraryBuilder, mixins),
+            superclass: supertypeBuilder != null
+                ? _computeTypeAnnotation(
+                        builder.libraryBuilder, supertypeBuilder)
+                    as macro.NamedTypeAnnotationImpl
+                : null);
     _classBuilders[declaration] = builder;
     return declaration;
   }
@@ -1050,16 +1086,19 @@
   }
 }
 
-class _ClassIntrospector implements macro.ClassIntrospector {
+class _TypeIntrospector implements macro.TypeIntrospector {
   final MacroApplications macroApplications;
   final ClassHierarchyBuilder classHierarchy;
 
-  _ClassIntrospector(this.macroApplications, this.classHierarchy);
+  _TypeIntrospector(this.macroApplications, this.classHierarchy);
 
   @override
   Future<List<macro.ConstructorDeclaration>> constructorsOf(
-      macro.ClassDeclaration clazz) {
-    ClassBuilder classBuilder = macroApplications._getClassBuilder(clazz);
+      macro.IntrospectableType type) {
+    if (type is! macro.IntrospectableClassDeclaration) {
+      throw new UnsupportedError('Only introspection on classes is supported');
+    }
+    ClassBuilder classBuilder = macroApplications._getClassBuilder(type);
     List<macro.ConstructorDeclaration> result = [];
     classBuilder.forEachConstructor((_, MemberBuilder memberBuilder) {
       if (memberBuilder is DeclaredSourceConstructorBuilder) {
@@ -1075,8 +1114,11 @@
   }
 
   @override
-  Future<List<macro.FieldDeclaration>> fieldsOf(macro.ClassDeclaration clazz) {
-    ClassBuilder classBuilder = macroApplications._getClassBuilder(clazz);
+  Future<List<macro.FieldDeclaration>> fieldsOf(macro.IntrospectableType type) {
+    if (type is! macro.IntrospectableClassDeclaration) {
+      throw new UnsupportedError('Only introspection on classes is supported');
+    }
+    ClassBuilder classBuilder = macroApplications._getClassBuilder(type);
     List<macro.FieldDeclaration> result = [];
     classBuilder.forEach((_, Builder memberBuilder) {
       if (memberBuilder is SourceFieldBuilder) {
@@ -1088,27 +1130,12 @@
   }
 
   @override
-  Future<List<macro.ClassDeclaration>> interfacesOf(
-      macro.ClassDeclaration clazz) {
-    ClassBuilder classBuilder = macroApplications._getClassBuilder(clazz);
-    ClassHierarchyNode node =
-        classHierarchy.getNodeFromClassBuilder(classBuilder);
-    List<ClassHierarchyNode>? directInterfaceNodes = node.directInterfaceNodes;
-    if (directInterfaceNodes != null) {
-      List<macro.ClassDeclaration> list = [];
-      for (ClassHierarchyNode interfaceNode in directInterfaceNodes) {
-        list.add(
-            macroApplications.getClassDeclaration(interfaceNode.classBuilder));
-      }
-      return new Future.value(list);
-    }
-    return new Future.value(const []);
-  }
-
-  @override
   Future<List<macro.MethodDeclaration>> methodsOf(
-      macro.ClassDeclaration clazz) {
-    ClassBuilder classBuilder = macroApplications._getClassBuilder(clazz);
+      macro.IntrospectableType type) {
+    if (type is! macro.IntrospectableClassDeclaration) {
+      throw new UnsupportedError('Only introspection on classes is supported');
+    }
+    ClassBuilder classBuilder = macroApplications._getClassBuilder(type);
     List<macro.MethodDeclaration> result = [];
     classBuilder.forEach((_, Builder memberBuilder) {
       if (memberBuilder is SourceProcedureBuilder) {
@@ -1118,38 +1145,6 @@
     });
     return new Future.value(result);
   }
-
-  @override
-  Future<List<macro.ClassDeclaration>> mixinsOf(macro.ClassDeclaration clazz) {
-    ClassBuilder classBuilder = macroApplications._getClassBuilder(clazz);
-    ClassHierarchyNode node =
-        classHierarchy.getNodeFromClassBuilder(classBuilder);
-    ClassHierarchyNode? superNode = node.directSuperClassNode;
-    List<macro.ClassDeclaration>? list;
-    while (superNode != null && superNode.isMixinApplication) {
-      (list ??= []).add(macroApplications
-          .getClassDeclaration(superNode.mixedInNode!.classBuilder));
-      superNode = superNode.directSuperClassNode;
-    }
-    return new Future.value(list?.reversed.toList() ?? const []);
-  }
-
-  @override
-  Future<macro.ClassDeclaration?> superclassOf(macro.ClassDeclaration clazz) {
-    ClassBuilder classBuilder = macroApplications._getClassBuilder(clazz);
-    ClassHierarchyNode node =
-        classHierarchy.getNodeFromClassBuilder(classBuilder);
-    ClassHierarchyNode? superNode = node.directSuperClassNode;
-    while (superNode != null &&
-        superNode.classBuilder.isAnonymousMixinApplication) {
-      superNode = superNode.directSuperClassNode;
-    }
-    if (superNode != null) {
-      return new Future.value(
-          macroApplications.getClassDeclaration(superNode.classBuilder));
-    }
-    return new Future.value();
-  }
 }
 
 class _TypeDeclarationResolver implements macro.TypeDeclarationResolver {
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 934983c..db9853c 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
@@ -1659,48 +1659,6 @@
         instanceTypeVariableAccess: InstanceTypeVariableAccessState.Unexpected);
   }
 
-  void _checkBadFunctionParameter(List<TypeVariableBuilder>? typeVariables) {
-    if (typeVariables == null || typeVariables.isEmpty) {
-      return;
-    }
-
-    for (TypeVariableBuilder type in typeVariables) {
-      if (type.name == "Function") {
-        addProblem(messageFunctionAsTypeParameter, type.charOffset,
-            type.name.length, type.fileUri!);
-      }
-    }
-  }
-
-  void _checkBadFunctionDeclUse(
-      String className, TypeParameterScopeKind kind, int charOffset) {
-    String? decType;
-    switch (kind) {
-      case TypeParameterScopeKind.classDeclaration:
-        decType = "class";
-        break;
-      case TypeParameterScopeKind.mixinDeclaration:
-        decType = "mixin";
-        break;
-      case TypeParameterScopeKind.extensionDeclaration:
-        decType = "extension";
-        break;
-      default:
-        break;
-    }
-    if (className != "Function") {
-      return;
-    }
-    if (decType == "class" && importUri.isScheme("dart")) {
-      // Allow declaration of class Function in the sdk.
-      return;
-    }
-    if (decType != null) {
-      addProblem(templateFunctionUsedAsDec.withArguments(decType), charOffset,
-          className.length, fileUri);
-    }
-  }
-
   /// Add a problem that might not be reported immediately.
   ///
   /// Problems will be issued after source information has been added.
@@ -1834,8 +1792,6 @@
       int supertypeOffset,
       {required bool isMacro,
       required bool isAugmentation}) {
-    _checkBadFunctionDeclUse(className, kind, nameOffset);
-    _checkBadFunctionParameter(typeVariables);
     // Nested declaration began in `OutlineBuilder.beginClassDeclaration`.
     TypeParameterScopeBuilder declaration =
         endNestedDeclaration(kind, className)
@@ -2068,9 +2024,6 @@
       int startOffset,
       int nameOffset,
       int endOffset) {
-    _checkBadFunctionDeclUse(
-        extensionName, TypeParameterScopeKind.extensionDeclaration, nameOffset);
-    _checkBadFunctionParameter(typeVariables);
     // Nested declaration began in `OutlineBuilder.beginExtensionDeclaration`.
     TypeParameterScopeBuilder declaration = endNestedDeclaration(
         TypeParameterScopeKind.extensionDeclaration, extensionName)
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
index 30f281c..54e0648 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
@@ -25,6 +25,9 @@
 
   LibraryFeatures get libraryFeatures => libraryBuilder.libraryFeatures;
 
+  @override
+  Uri get importUri => libraryBuilder.importUri;
+
   AsyncMarker asyncMarkerFromTokens(Token? asyncToken, Token? starToken) {
     if (asyncToken == null || identical(asyncToken.stringValue, "sync")) {
       if (starToken == null) {
diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart
index 0a41e53..1d35c50 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -189,7 +189,9 @@
     // the only need we have for these transformations).
     if (!buildComponent) {
       options.target.performOutlineTransformations(
-          trimmedSummaryComponent, kernelTarget.loader.coreTypes);
+          trimmedSummaryComponent,
+          kernelTarget.loader.coreTypes,
+          kernelTarget.loader.referenceFromIndex);
       options.ticker.logMs("Transformed outline");
     }
     // Don't include source (but do add it above to include importUris).
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 08e38e2..112db68 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -423,11 +423,9 @@
 ForInLoopNotAssignable/statement: Fail
 ForInLoopTypeNotIterablePartNullability/example: Fail # Cannot occur but needed for symmetry with ForInLoopTypeNotIterableNullability
 ForInLoopWithConstVariable/example: Fail
-FunctionAsTypeParameter/analyzerCode: Fail
 FunctionTypeDefaultValue/example: Fail
 FunctionTypedParameterVar/part_wrapped_script1: Fail
 FunctionTypedParameterVar/script1: Fail
-FunctionUsedAsDec/analyzerCode: Fail
 GeneratorReturnsValue/example: Fail
 GenericFunctionTypeAsTypeArgumentThroughTypedef/example: Fail
 GetterNotFound/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 5b1af01..0939eac 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1905,20 +1905,6 @@
           T.String field;
         }
 
-FunctionUsedAsDec:
-  problemMessage: "'Function' is a built-in identifier, could not used as a #name name."
-  script:
-    - class Function {}
-    - extension Function on int {}
-    - mixin Function {}
-
-FunctionAsTypeParameter:
-  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:
   problemMessage: "'#name.#name2' can't be used as a type because '#name' isn't defined."
   analyzerCode: NOT_A_TYPE
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.expect
index de46ff9..ca9c504 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.expect
@@ -100,6 +100,10 @@
 class for {}
       ^^^
 
+parser/error_recovery/issue_46346:28:7: Can't use 'Function' as a name here.
+class Function {}
+      ^^^^^^^^
+
 parser/error_recovery/issue_46346:29:7: Can't use 'get' as a name here.
 class get {}
       ^^^
@@ -654,6 +658,7 @@
   beginMetadataStar(class)
   endMetadataStar(0)
   beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
     handleIdentifier(Function, classOrMixinDeclaration)
     handleNoTypeVariables({)
     beginClassDeclaration(class, null, null, null, Function)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.intertwined.expect
index dc599b5..62e2e01 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_46346.dart.intertwined.expect
@@ -789,6 +789,8 @@
       parseClassOrNamedMixinApplication(null, null, null, class)
         listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
         ensureIdentifier(class, classOrMixinDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
           listener: handleIdentifier(Function, classOrMixinDeclaration)
         listener: handleNoTypeVariables({)
         listener: beginClassDeclaration(class, null, null, null, Function)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.expect
index c9c3900..a88025e 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.expect
@@ -100,6 +100,10 @@
 class for = A with B;
       ^^^
 
+parser/error_recovery/issue_46346_prime_1:28:7: Can't use 'Function' as a name here.
+class Function = A with B;
+      ^^^^^^^^
+
 parser/error_recovery/issue_46346_prime_1:29:7: Can't use 'get' as a name here.
 class get = A with B;
       ^^^
@@ -708,6 +712,7 @@
   beginMetadataStar(class)
   endMetadataStar(0)
   beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
     handleIdentifier(Function, classOrMixinDeclaration)
     handleNoTypeVariables(=)
     beginNamedMixinApplication(class, null, null, null, Function)
diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.intertwined.expect
index aa74be1..ed97837 100644
--- a/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.intertwined.expect
+++ b/pkg/front_end/parser_testcases/error_recovery/issue_46346_prime_1.dart.intertwined.expect
@@ -762,6 +762,8 @@
       parseClassOrNamedMixinApplication(null, null, null, class)
         listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
         ensureIdentifier(class, classOrMixinDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
           listener: handleIdentifier(Function, classOrMixinDeclaration)
         listener: handleNoTypeVariables(=)
         listener: beginNamedMixinApplication(class, null, null, null, Function)
diff --git a/pkg/front_end/parser_testcases/general/issue_45703.dart b/pkg/front_end/parser_testcases/general/issue_45703.dart
new file mode 100644
index 0000000..e5a37f6
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_45703.dart
@@ -0,0 +1,16 @@
+class Function {}
+class C<Function> {}
+
+typedef Function = int;
+typedef F<Function> = int;
+
+extension Function on List {}
+extension E<Function> on List<Function> {}
+
+mixin Function {}
+mixin M<Function> implements List<Function> {}
+
+void main() {
+  Function ok;
+  dynamic okToo;
+}
diff --git a/pkg/front_end/parser_testcases/general/issue_45703.dart.expect b/pkg/front_end/parser_testcases/general/issue_45703.dart.expect
new file mode 100644
index 0000000..6ad4c10
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_45703.dart.expect
@@ -0,0 +1,227 @@
+Problems reported:
+
+parser/general/issue_45703:1:7: Can't use 'Function' as a name here.
+class Function {}
+      ^^^^^^^^
+
+parser/general/issue_45703:2:9: Can't use 'Function' as a name here.
+class C<Function> {}
+        ^^^^^^^^
+
+parser/general/issue_45703:4:9: 'Function' can't be used as an identifier because it's a keyword.
+typedef Function = int;
+        ^^^^^^^^
+
+parser/general/issue_45703:5:11: Can't use 'Function' as a name here.
+typedef F<Function> = int;
+          ^^^^^^^^
+
+parser/general/issue_45703:7:11: Can't use 'Function' as a name here.
+extension Function on List {}
+          ^^^^^^^^
+
+parser/general/issue_45703:8:13: Can't use 'Function' as a name here.
+extension E<Function> on List<Function> {}
+            ^^^^^^^^
+
+parser/general/issue_45703:10:7: Can't use 'Function' as a name here.
+mixin Function {}
+      ^^^^^^^^
+
+parser/general/issue_45703:11:9: Can't use 'Function' as a name here.
+mixin M<Function> implements List<Function> {}
+        ^^^^^^^^
+
+beginCompilationUnit(class)
+  beginMetadataStar(class)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+    handleIdentifier(Function, classOrMixinDeclaration)
+    handleNoTypeVariables({)
+    beginClassDeclaration(class, null, null, null, Function)
+      handleNoType(Function)
+      handleClassExtends(null, 1)
+      handleClassNoWithClause()
+      handleImplements(null, 0)
+      handleClassHeader(class, class, null)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+      endClassOrMixinOrExtensionBody(DeclarationKind.Class, 0, {, })
+    endClassDeclaration(class, })
+  endTopLevelDeclaration(class)
+  beginMetadataStar(class)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleIdentifier(C, classOrMixinDeclaration)
+    beginTypeVariables(<)
+      beginMetadataStar(Function)
+      endMetadataStar(0)
+      handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+      handleIdentifier(Function, typeVariableDeclaration)
+      beginTypeVariable(Function)
+        handleTypeVariablesDefined(Function, 1)
+        handleNoType(Function)
+      endTypeVariable(>, 0, null, null)
+    endTypeVariables(<, >)
+    beginClassDeclaration(class, null, null, null, C)
+      handleNoType(>)
+      handleClassExtends(null, 1)
+      handleClassNoWithClause()
+      handleImplements(null, 0)
+      handleClassHeader(class, class, null)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+      endClassOrMixinOrExtensionBody(DeclarationKind.Class, 0, {, })
+    endClassDeclaration(class, })
+  endTopLevelDeclaration(typedef)
+  beginMetadataStar(typedef)
+  endMetadataStar(0)
+  beginUncategorizedTopLevelDeclaration(typedef)
+    beginTypedef(typedef)
+      handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'Function' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: Function}], Function, Function)
+      handleIdentifier(Function, typedefDeclaration)
+      handleNoTypeVariables(=)
+      handleIdentifier(int, typeReference)
+      handleNoTypeArguments(;)
+      handleType(int, null)
+    endTypedef(typedef, =, ;)
+  endTopLevelDeclaration(typedef)
+  beginMetadataStar(typedef)
+  endMetadataStar(0)
+  beginUncategorizedTopLevelDeclaration(typedef)
+    beginTypedef(typedef)
+      handleIdentifier(F, typedefDeclaration)
+      beginTypeVariables(<)
+        beginMetadataStar(Function)
+        endMetadataStar(0)
+        handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+        handleIdentifier(Function, typeVariableDeclaration)
+        beginTypeVariable(Function)
+          handleTypeVariablesDefined(Function, 1)
+          handleNoType(Function)
+        endTypeVariable(>, 0, null, null)
+      endTypeVariables(<, >)
+      handleIdentifier(int, typeReference)
+      handleNoTypeArguments(;)
+      handleType(int, null)
+    endTypedef(typedef, =, ;)
+  endTopLevelDeclaration(extension)
+  beginMetadataStar(extension)
+  endMetadataStar(0)
+  beginExtensionDeclarationPrelude(extension)
+    handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+    handleNoTypeVariables(on)
+    beginExtensionDeclaration(extension, Function)
+      handleIdentifier(List, typeReference)
+      handleNoTypeArguments({)
+      handleType(List, null)
+      handleExtensionShowHide(null, 0, null, 0)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Extension, {)
+      endClassOrMixinOrExtensionBody(DeclarationKind.Extension, 0, {, })
+    endExtensionDeclaration(extension, null, on, null, null, })
+  endTopLevelDeclaration(extension)
+  beginMetadataStar(extension)
+  endMetadataStar(0)
+  beginExtensionDeclarationPrelude(extension)
+    beginTypeVariables(<)
+      beginMetadataStar(Function)
+      endMetadataStar(0)
+      handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+      handleIdentifier(Function, typeVariableDeclaration)
+      beginTypeVariable(Function)
+        handleTypeVariablesDefined(Function, 1)
+        handleNoType(Function)
+      endTypeVariable(>, 0, null, null)
+    endTypeVariables(<, >)
+    beginExtensionDeclaration(extension, E)
+      handleIdentifier(List, typeReference)
+      beginTypeArguments(<)
+        handleIdentifier(Function, typeReference)
+        handleNoTypeArguments(>)
+        handleType(Function, null)
+      endTypeArguments(1, <, >)
+      handleType(List, null)
+      handleExtensionShowHide(null, 0, null, 0)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Extension, {)
+      endClassOrMixinOrExtensionBody(DeclarationKind.Extension, 0, {, })
+    endExtensionDeclaration(extension, null, on, null, null, })
+  endTopLevelDeclaration(mixin)
+  beginMetadataStar(mixin)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(mixin)
+    handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+    handleIdentifier(Function, classOrMixinDeclaration)
+    handleNoTypeVariables({)
+    beginMixinDeclaration(null, mixin, Function)
+      handleMixinOn(null, 0)
+      handleImplements(null, 0)
+      handleMixinHeader(mixin)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Mixin, {)
+      endClassOrMixinOrExtensionBody(DeclarationKind.Mixin, 0, {, })
+    endMixinDeclaration(mixin, })
+  endTopLevelDeclaration(mixin)
+  beginMetadataStar(mixin)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(mixin)
+    handleIdentifier(M, classOrMixinDeclaration)
+    beginTypeVariables(<)
+      beginMetadataStar(Function)
+      endMetadataStar(0)
+      handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+      handleIdentifier(Function, typeVariableDeclaration)
+      beginTypeVariable(Function)
+        handleTypeVariablesDefined(Function, 1)
+        handleNoType(Function)
+      endTypeVariable(>, 0, null, null)
+    endTypeVariables(<, >)
+    beginMixinDeclaration(null, mixin, M)
+      handleMixinOn(null, 0)
+      handleIdentifier(List, typeReference)
+      beginTypeArguments(<)
+        handleIdentifier(Function, typeReference)
+        handleNoTypeArguments(>)
+        handleType(Function, null)
+      endTypeArguments(1, <, >)
+      handleType(List, null)
+      handleImplements(implements, 1)
+      handleMixinHeader(mixin)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Mixin, {)
+      endClassOrMixinOrExtensionBody(DeclarationKind.Mixin, 0, {, })
+    endMixinDeclaration(mixin, })
+  endTopLevelDeclaration(void)
+  beginMetadataStar(void)
+  endMetadataStar(0)
+  beginTopLevelMember(void)
+    beginTopLevelMethod(}, null, null)
+      handleVoidKeyword(void)
+      handleIdentifier(main, topLevelFunctionDeclaration)
+      handleNoTypeVariables(()
+      beginFormalParameters((, MemberKind.TopLevelMethod)
+      endFormalParameters(0, (, ), MemberKind.TopLevelMethod)
+      handleAsyncModifier(null, null)
+      beginBlockFunctionBody({)
+        beginMetadataStar(Function)
+        endMetadataStar(0)
+        handleIdentifier(Function, typeReference)
+        handleNoTypeArguments(ok)
+        handleType(Function, null)
+        beginVariablesDeclaration(ok, null, null)
+          handleIdentifier(ok, localVariableDeclaration)
+          beginInitializedIdentifier(ok)
+            handleNoVariableInitializer(ok)
+          endInitializedIdentifier(ok)
+        endVariablesDeclaration(1, ;)
+        beginMetadataStar(dynamic)
+        endMetadataStar(0)
+        handleIdentifier(dynamic, typeReference)
+        handleNoTypeArguments(okToo)
+        handleType(dynamic, null)
+        beginVariablesDeclaration(okToo, null, null)
+          handleIdentifier(okToo, localVariableDeclaration)
+          beginInitializedIdentifier(okToo)
+            handleNoVariableInitializer(okToo)
+          endInitializedIdentifier(okToo)
+        endVariablesDeclaration(1, ;)
+      endBlockFunctionBody(2, {, })
+    endTopLevelMethod(void, null, })
+  endTopLevelDeclaration()
+endCompilationUnit(9, )
diff --git a/pkg/front_end/parser_testcases/general/issue_45703.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_45703.dart.intertwined.expect
new file mode 100644
index 0000000..7f2c5e3
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_45703.dart.intertwined.expect
@@ -0,0 +1,318 @@
+parseUnit(class)
+  skipErrorTokens(class)
+  listener: beginCompilationUnit(class)
+  syntheticPreviousToken(class)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(class)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(, class, null, Instance of 'DirectiveContext')
+      parseClassOrNamedMixinApplication(null, null, null, class)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+        ensureIdentifier(class, classOrMixinDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, classOrMixinDeclaration)
+        listener: handleNoTypeVariables({)
+        listener: beginClassDeclaration(class, null, null, null, Function)
+        parseClass(Function, class, class, Function)
+          parseClassHeaderOpt(Function, class, class)
+            parseClassExtendsOpt(Function)
+              listener: handleNoType(Function)
+              listener: handleClassExtends(null, 1)
+            parseClassWithClauseOpt(Function)
+              listener: handleClassNoWithClause()
+            parseClassOrMixinOrEnumImplementsOpt(Function)
+              listener: handleImplements(null, 0)
+            listener: handleClassHeader(class, class, null)
+          parseClassOrMixinOrExtensionBody(Function, DeclarationKind.Class, Function)
+            listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+            notEofOrValue(}, })
+            listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 0, {, })
+          listener: endClassDeclaration(class, })
+  listener: endTopLevelDeclaration(class)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(class)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(}, class, null, Instance of 'DirectiveContext')
+      parseClassOrNamedMixinApplication(null, null, null, class)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+        ensureIdentifier(class, classOrMixinDeclaration)
+          listener: handleIdentifier(C, classOrMixinDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(Function)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, typeVariableDeclaration)
+        listener: beginTypeVariable(Function)
+        listener: handleTypeVariablesDefined(Function, 1)
+        listener: handleNoType(Function)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginClassDeclaration(class, null, null, null, C)
+        parseClass(>, class, class, C)
+          parseClassHeaderOpt(>, class, class)
+            parseClassExtendsOpt(>)
+              listener: handleNoType(>)
+              listener: handleClassExtends(null, 1)
+            parseClassWithClauseOpt(>)
+              listener: handleClassNoWithClause()
+            parseClassOrMixinOrEnumImplementsOpt(>)
+              listener: handleImplements(null, 0)
+            listener: handleClassHeader(class, class, null)
+          parseClassOrMixinOrExtensionBody(>, DeclarationKind.Class, C)
+            listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+            notEofOrValue(}, })
+            listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 0, {, })
+          listener: endClassDeclaration(class, })
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(}, typedef, null, Instance of 'DirectiveContext')
+      parseTypedef(typedef)
+        listener: beginUncategorizedTopLevelDeclaration(typedef)
+        listener: beginTypedef(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[ExpectedIdentifierButGotKeyword, 'Function' can't be used as an identifier because it's a keyword., Try renaming this to be an identifier that isn't a keyword., {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, typedefDeclaration)
+        listener: handleNoTypeVariables(=)
+        listener: handleIdentifier(int, typeReference)
+        listener: handleNoTypeArguments(;)
+        listener: handleType(int, null)
+        ensureSemicolon(int)
+        listener: endTypedef(typedef, =, ;)
+  listener: endTopLevelDeclaration(typedef)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(typedef)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, typedef, null, Instance of 'DirectiveContext')
+      parseTypedef(typedef)
+        listener: beginUncategorizedTopLevelDeclaration(typedef)
+        listener: beginTypedef(typedef)
+        ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true)
+          listener: handleIdentifier(F, typedefDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(Function)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, typeVariableDeclaration)
+        listener: beginTypeVariable(Function)
+        listener: handleTypeVariablesDefined(Function, 1)
+        listener: handleNoType(Function)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: handleIdentifier(int, typeReference)
+        listener: handleNoTypeArguments(;)
+        listener: handleType(int, null)
+        ensureSemicolon(int)
+        listener: endTypedef(typedef, =, ;)
+  listener: endTopLevelDeclaration(extension)
+  parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext')
+    parseMetadataStar(;)
+      listener: beginMetadataStar(extension)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(;, extension, null, Instance of 'DirectiveContext')
+      parseExtension(extension)
+        listener: beginExtensionDeclarationPrelude(extension)
+        reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+          listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+        listener: handleNoTypeVariables(on)
+        listener: beginExtensionDeclaration(extension, Function)
+        listener: handleIdentifier(List, typeReference)
+        listener: handleNoTypeArguments({)
+        listener: handleType(List, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
+        parseClassOrMixinOrExtensionBody(List, DeclarationKind.Extension, Function)
+          listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Extension, {)
+          notEofOrValue(}, })
+          listener: endClassOrMixinOrExtensionBody(DeclarationKind.Extension, 0, {, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
+  listener: endTopLevelDeclaration(extension)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(extension)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(}, extension, null, Instance of 'DirectiveContext')
+      parseExtension(extension)
+        listener: beginExtensionDeclarationPrelude(extension)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(Function)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, typeVariableDeclaration)
+        listener: beginTypeVariable(Function)
+        listener: handleTypeVariablesDefined(Function, 1)
+        listener: handleNoType(Function)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginExtensionDeclaration(extension, E)
+        ensureIdentifier(on, typeReference)
+          listener: handleIdentifier(List, typeReference)
+        listener: beginTypeArguments(<)
+        listener: handleIdentifier(Function, typeReference)
+        listener: handleNoTypeArguments(>)
+        listener: handleType(Function, null)
+        listener: endTypeArguments(1, <, >)
+        listener: handleType(List, null)
+        listener: handleExtensionShowHide(null, 0, null, 0)
+        parseClassOrMixinOrExtensionBody(>, DeclarationKind.Extension, E)
+          listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Extension, {)
+          notEofOrValue(}, })
+          listener: endClassOrMixinOrExtensionBody(DeclarationKind.Extension, 0, {, })
+        listener: endExtensionDeclaration(extension, null, on, null, null, })
+  listener: endTopLevelDeclaration(mixin)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(mixin)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(}, mixin, null, Instance of 'DirectiveContext')
+      parseMixin(null, mixin)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(mixin)
+        ensureIdentifier(mixin, classOrMixinDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, classOrMixinDeclaration)
+        listener: handleNoTypeVariables({)
+        listener: beginMixinDeclaration(null, mixin, Function)
+        parseMixinHeaderOpt(Function, mixin)
+          parseMixinOnOpt(Function)
+            listener: handleMixinOn(null, 0)
+          parseClassOrMixinOrEnumImplementsOpt(Function)
+            listener: handleImplements(null, 0)
+          listener: handleMixinHeader(mixin)
+        parseClassOrMixinOrExtensionBody(Function, DeclarationKind.Mixin, Function)
+          listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Mixin, {)
+          notEofOrValue(}, })
+          listener: endClassOrMixinOrExtensionBody(DeclarationKind.Mixin, 0, {, })
+        listener: endMixinDeclaration(mixin, })
+  listener: endTopLevelDeclaration(mixin)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(mixin)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(}, mixin, null, Instance of 'DirectiveContext')
+      parseMixin(null, mixin)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(mixin)
+        ensureIdentifier(mixin, classOrMixinDeclaration)
+          listener: handleIdentifier(M, classOrMixinDeclaration)
+        listener: beginTypeVariables(<)
+        parseMetadataStar(<)
+          listener: beginMetadataStar(Function)
+          listener: endMetadataStar(0)
+        ensureIdentifier(<, typeVariableDeclaration)
+          reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+            listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+          listener: handleIdentifier(Function, typeVariableDeclaration)
+        listener: beginTypeVariable(Function)
+        listener: handleTypeVariablesDefined(Function, 1)
+        listener: handleNoType(Function)
+        listener: endTypeVariable(>, 0, null, null)
+        listener: endTypeVariables(<, >)
+        listener: beginMixinDeclaration(null, mixin, M)
+        parseMixinHeaderOpt(>, mixin)
+          parseMixinOnOpt(>)
+            listener: handleMixinOn(null, 0)
+          parseClassOrMixinOrEnumImplementsOpt(>)
+            ensureIdentifier(implements, typeReference)
+              listener: handleIdentifier(List, typeReference)
+            listener: beginTypeArguments(<)
+            listener: handleIdentifier(Function, typeReference)
+            listener: handleNoTypeArguments(>)
+            listener: handleType(Function, null)
+            listener: endTypeArguments(1, <, >)
+            listener: handleType(List, null)
+            listener: handleImplements(implements, 1)
+          listener: handleMixinHeader(mixin)
+        parseClassOrMixinOrExtensionBody(>, DeclarationKind.Mixin, M)
+          listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Mixin, {)
+          notEofOrValue(}, })
+          listener: endClassOrMixinOrExtensionBody(DeclarationKind.Mixin, 0, {, })
+        listener: endMixinDeclaration(mixin, })
+  listener: endTopLevelDeclaration(void)
+  parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
+    parseMetadataStar(})
+      listener: beginMetadataStar(void)
+      listener: endMetadataStar(0)
+    parseTopLevelMemberImpl(})
+      listener: beginTopLevelMember(void)
+      parseTopLevelMethod(}, null, null, }, Instance of 'VoidType', null, main, false)
+        listener: beginTopLevelMethod(}, null, null)
+        listener: handleVoidKeyword(void)
+        ensureIdentifierPotentiallyRecovered(void, 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(}, Function)
+          parseStatement({)
+            parseStatementX({)
+              parseExpressionStatementOrDeclaration({, false)
+                parseExpressionStatementOrDeclarationAfterModifiers({, {, null, null, null, false)
+                  looksLikeLocalFunction(ok)
+                  listener: beginMetadataStar(Function)
+                  listener: endMetadataStar(0)
+                  listener: handleIdentifier(Function, typeReference)
+                  listener: handleNoTypeArguments(ok)
+                  listener: handleType(Function, null)
+                  listener: beginVariablesDeclaration(ok, null, null)
+                  parseVariablesDeclarationRest(Function, true)
+                    parseOptionallyInitializedIdentifier(Function)
+                      ensureIdentifier(Function, localVariableDeclaration)
+                        listener: handleIdentifier(ok, localVariableDeclaration)
+                      listener: beginInitializedIdentifier(ok)
+                      parseVariableInitializerOpt(ok)
+                        listener: handleNoVariableInitializer(ok)
+                      listener: endInitializedIdentifier(ok)
+                    ensureSemicolon(ok)
+                    listener: endVariablesDeclaration(1, ;)
+          notEofOrValue(}, dynamic)
+          parseStatement(;)
+            parseStatementX(;)
+              parseExpressionStatementOrDeclaration(;, false)
+                parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, false)
+                  looksLikeLocalFunction(okToo)
+                  listener: beginMetadataStar(dynamic)
+                  listener: endMetadataStar(0)
+                  listener: handleIdentifier(dynamic, typeReference)
+                  listener: handleNoTypeArguments(okToo)
+                  listener: handleType(dynamic, null)
+                  listener: beginVariablesDeclaration(okToo, null, null)
+                  parseVariablesDeclarationRest(dynamic, true)
+                    parseOptionallyInitializedIdentifier(dynamic)
+                      ensureIdentifier(dynamic, localVariableDeclaration)
+                        listener: handleIdentifier(okToo, localVariableDeclaration)
+                      listener: beginInitializedIdentifier(okToo)
+                      parseVariableInitializerOpt(okToo)
+                        listener: handleNoVariableInitializer(okToo)
+                      listener: endInitializedIdentifier(okToo)
+                    ensureSemicolon(okToo)
+                    listener: endVariablesDeclaration(1, ;)
+          notEofOrValue(}, })
+          listener: endBlockFunctionBody(2, {, })
+        listener: endTopLevelMethod(void, null, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(class)
+  listener: endCompilationUnit(9, )
diff --git a/pkg/front_end/parser_testcases/general/issue_45703.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_45703.dart.parser.expect
new file mode 100644
index 0000000..feb48f3
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_45703.dart.parser.expect
@@ -0,0 +1,35 @@
+class Function {}
+class C<Function> {}
+
+typedef Function = int;
+typedef F<Function> = int;
+
+extension Function on List {}
+extension E<Function> on List<Function> {}
+
+mixin Function {}
+mixin M<Function> implements List<Function> {}
+
+void main() {
+Function ok;
+dynamic okToo;
+}
+
+
+class[KeywordToken] Function[KeywordToken] {[BeginToken]}[SimpleToken]
+class[KeywordToken] C[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+
+typedef[KeywordToken] Function[KeywordToken] =[SimpleToken] int[StringToken];[SimpleToken]
+typedef[KeywordToken] F[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] =[SimpleToken] int[StringToken];[SimpleToken]
+
+extension[KeywordToken] Function[KeywordToken] on[KeywordToken] List[StringToken] {[BeginToken]}[SimpleToken]
+extension[KeywordToken] E[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] on[KeywordToken] List[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+
+mixin[KeywordToken] Function[KeywordToken] {[BeginToken]}[SimpleToken]
+mixin[KeywordToken] M[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] implements[KeywordToken] List[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+
+void[KeywordToken] main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+Function[KeywordToken] ok[StringToken];[SimpleToken]
+dynamic[KeywordToken] okToo[StringToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_45703.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_45703.dart.scanner.expect
new file mode 100644
index 0000000..feb48f3
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_45703.dart.scanner.expect
@@ -0,0 +1,35 @@
+class Function {}
+class C<Function> {}
+
+typedef Function = int;
+typedef F<Function> = int;
+
+extension Function on List {}
+extension E<Function> on List<Function> {}
+
+mixin Function {}
+mixin M<Function> implements List<Function> {}
+
+void main() {
+Function ok;
+dynamic okToo;
+}
+
+
+class[KeywordToken] Function[KeywordToken] {[BeginToken]}[SimpleToken]
+class[KeywordToken] C[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+
+typedef[KeywordToken] Function[KeywordToken] =[SimpleToken] int[StringToken];[SimpleToken]
+typedef[KeywordToken] F[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] =[SimpleToken] int[StringToken];[SimpleToken]
+
+extension[KeywordToken] Function[KeywordToken] on[KeywordToken] List[StringToken] {[BeginToken]}[SimpleToken]
+extension[KeywordToken] E[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] on[KeywordToken] List[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+
+mixin[KeywordToken] Function[KeywordToken] {[BeginToken]}[SimpleToken]
+mixin[KeywordToken] M[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] implements[KeywordToken] List[StringToken]<[BeginToken]Function[KeywordToken]>[SimpleToken] {[BeginToken]}[SimpleToken]
+
+void[KeywordToken] main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]
+Function[KeywordToken] ok[StringToken];[SimpleToken]
+dynamic[KeywordToken] okToo[StringToken];[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_49197.dart b/pkg/front_end/parser_testcases/general/issue_49197.dart
new file mode 100644
index 0000000..3f0fa23
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_49197.dart
@@ -0,0 +1 @@
+import "Function.dart" as Function;
diff --git a/pkg/front_end/parser_testcases/general/issue_49197.dart.expect b/pkg/front_end/parser_testcases/general/issue_49197.dart.expect
new file mode 100644
index 0000000..bff1674
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_49197.dart.expect
@@ -0,0 +1,23 @@
+Problems reported:
+
+parser/general/issue_49197:1:27: Can't use 'Function' as a name here.
+import "Function.dart" as Function;
+                          ^^^^^^^^
+
+beginCompilationUnit(import)
+  beginMetadataStar(import)
+  endMetadataStar(0)
+  beginUncategorizedTopLevelDeclaration(import)
+    beginImport(import)
+      beginLiteralString("Function.dart")
+      endLiteralString(0, as)
+      beginConditionalUris(as)
+      endConditionalUris(0)
+      handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+      handleIdentifier(Function, importPrefixDeclaration)
+      handleImportPrefix(null, as)
+      beginCombinators(;)
+      endCombinators(0)
+    endImport(import, null, ;)
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_49197.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/issue_49197.dart.intertwined.expect
new file mode 100644
index 0000000..22613d0
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_49197.dart.intertwined.expect
@@ -0,0 +1,33 @@
+parseUnit(import)
+  skipErrorTokens(import)
+  listener: beginCompilationUnit(import)
+  syntheticPreviousToken(import)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(import)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(, import, null, Instance of 'DirectiveContext')
+      parseImport(import)
+        listener: beginUncategorizedTopLevelDeclaration(import)
+        listener: beginImport(import)
+        ensureLiteralString(import)
+          parseLiteralString(import)
+            parseSingleLiteralString(import)
+              listener: beginLiteralString("Function.dart")
+              listener: endLiteralString(0, as)
+        parseConditionalUriStar("Function.dart")
+          listener: beginConditionalUris(as)
+          listener: endConditionalUris(0)
+        parseImportPrefixOpt("Function.dart")
+          ensureIdentifier(as, importPrefixDeclaration)
+            reportRecoverableErrorWithToken(Function, Instance of 'Template<(Token) => Message>')
+              listener: handleRecoverableError(Message[BuiltInIdentifierInDeclaration, Can't use 'Function' as a name here., null, {lexeme: Function}], Function, Function)
+            listener: handleIdentifier(Function, importPrefixDeclaration)
+          listener: handleImportPrefix(null, as)
+        parseCombinatorStar(Function)
+          listener: beginCombinators(;)
+          listener: endCombinators(0)
+        listener: endImport(import, null, ;)
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(import)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/general/issue_49197.dart.parser.expect b/pkg/front_end/parser_testcases/general/issue_49197.dart.parser.expect
new file mode 100644
index 0000000..de8fb6d
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_49197.dart.parser.expect
@@ -0,0 +1,5 @@
+import "Function.dart" as Function;
+
+
+import[KeywordToken] "Function.dart"[StringToken] as[KeywordToken] Function[KeywordToken];[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/general/issue_49197.dart.scanner.expect b/pkg/front_end/parser_testcases/general/issue_49197.dart.scanner.expect
new file mode 100644
index 0000000..de8fb6d
--- /dev/null
+++ b/pkg/front_end/parser_testcases/general/issue_49197.dart.scanner.expect
@@ -0,0 +1,5 @@
+import "Function.dart" as Function;
+
+
+import[KeywordToken] "Function.dart"[StringToken] as[KeywordToken] Function[KeywordToken];[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132.dart b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart
new file mode 100644
index 0000000..e88c3d2
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart
@@ -0,0 +1,33 @@
+class Foo {
+  Foo.foo1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int?;
+
+  Foo.foo2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int?;
+
+  Foo.foo3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int;
+
+  Foo.foo4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int;
+
+  Foo.bar1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int? {}
+
+  Foo.bar2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int? {}
+
+  Foo.bar3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int {}
+
+  Foo.bar4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int {}
+}
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.expect
new file mode 100644
index 0000000..5524e5e
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.expect
@@ -0,0 +1,573 @@
+beginCompilationUnit(class)
+  beginMetadataStar(class)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleIdentifier(Foo, classOrMixinDeclaration)
+    handleNoTypeVariables({)
+    beginClassDeclaration(class, null, null, null, Foo)
+      handleNoType(Foo)
+      handleClassExtends(null, 1)
+      handleClassNoWithClause()
+      handleImplements(null, 0)
+      handleClassHeader(class, class, null)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType({)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo1, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(,)
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo2, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(,)
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo3, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(;)
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo4, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(;)
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar1, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(,)
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar2, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(,)
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar3, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments({)
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar4, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments({)
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+      endClassOrMixinOrExtensionBody(DeclarationKind.Class, 8, {, })
+    endClassDeclaration(class, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.intertwined.expect
new file mode 100644
index 0000000..ca4143a
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.intertwined.expect
@@ -0,0 +1,1157 @@
+parseUnit(class)
+  skipErrorTokens(class)
+  listener: beginCompilationUnit(class)
+  syntheticPreviousToken(class)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(class)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(, class, null, Instance of 'DirectiveContext')
+      parseClassOrNamedMixinApplication(null, null, null, class)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+        ensureIdentifier(class, classOrMixinDeclaration)
+          listener: handleIdentifier(Foo, classOrMixinDeclaration)
+        listener: handleNoTypeVariables({)
+        listener: beginClassDeclaration(class, null, null, null, Foo)
+        parseClass(Foo, class, class, Foo)
+          parseClassHeaderOpt(Foo, class, class)
+            parseClassExtendsOpt(Foo)
+              listener: handleNoType(Foo)
+              listener: handleClassExtends(null, 1)
+            parseClassWithClauseOpt(Foo)
+              listener: handleClassNoWithClause()
+            parseClassOrMixinOrEnumImplementsOpt(Foo)
+              listener: handleImplements(null, 0)
+            listener: handleClassHeader(class, class, null)
+          parseClassOrMixinOrExtensionBody(Foo, DeclarationKind.Class, Foo)
+            listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, Foo)
+              parseMetadataStar({)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod({, null, null, null, null, null, null, null, {, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType({)
+                ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo1, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo1)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo1, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo1, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(a, as)
+                              parseAsOperatorRest(a)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(,)
+                                listener: handleType(int, null)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(b, as)
+                              parseAsOperatorRest(b)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt(?)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(?, false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo2, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo2)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo2, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo2, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(a, is)
+                              parseIsOperatorRest(a)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(,)
+                                listener: handleType(int, null)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(b, is)
+                              parseIsOperatorRest(b)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt(?)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(?, false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo3, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo3)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo3, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo3, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(a, as)
+                              parseAsOperatorRest(a)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(b, as)
+                              parseAsOperatorRest(b)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(;)
+                                listener: handleType(int, null)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt(int)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(int, false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo4, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo4)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo4, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo4, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(a, is)
+                              parseIsOperatorRest(a)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(b, is)
+                              parseIsOperatorRest(b)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(;)
+                                listener: handleType(int, null)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt(int)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(int, false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar1, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar1)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar1, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar1, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(a, as)
+                              parseAsOperatorRest(a)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(,)
+                                listener: handleType(int, null)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(b, as)
+                              parseAsOperatorRest(b)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                  canParseAsConditional(?)
+                                    parseExpressionWithoutCascade(?)
+                                      parsePrecedenceExpression(?, 1, false)
+                                        parseUnaryExpression(?, false)
+                                          parsePrimary(?, expression)
+                                            parseLiteralSetOrMapSuffix(?, null)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt(?)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(?, false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar2, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar2)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar2, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar2, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(a, is)
+                              parseIsOperatorRest(a)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(,)
+                                listener: handleType(int, null)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(b, is)
+                              parseIsOperatorRest(b)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                  canParseAsConditional(?)
+                                    parseExpressionWithoutCascade(?)
+                                      parsePrecedenceExpression(?, 1, false)
+                                        parseUnaryExpression(?, false)
+                                          parsePrimary(?, expression)
+                                            parseLiteralSetOrMapSuffix(?, null)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt(?)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(?, false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar3, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar3)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar3, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar3, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(a, as)
+                              parseAsOperatorRest(a)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(b, as)
+                              parseAsOperatorRest(b)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments({)
+                                listener: handleType(int, null)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt(int)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(int, false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar4, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar4)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar4, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar4, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(a, is)
+                              parseIsOperatorRest(a)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, ?)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(?)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(b, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(b)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(b, is)
+                              parseIsOperatorRest(b)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments({)
+                                listener: handleType(int, null)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(int)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt(int)
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(int, false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, })
+            listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 8, {, })
+          listener: endClassDeclaration(class, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(class)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.parser.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.parser.expect
new file mode 100644
index 0000000..437402a
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.parser.expect
@@ -0,0 +1,69 @@
+class Foo {
+Foo.foo1(dynamic a, dynamic b)
+: x = a as int,
+y = b as int?;
+
+Foo.foo2(dynamic a, dynamic b)
+: x = a is int,
+y = b is int?;
+
+Foo.foo3(dynamic a, dynamic b)
+: x = a as int?,
+y = b as int;
+
+Foo.foo4(dynamic a, dynamic b)
+: x = a is int?,
+y = b is int;
+
+Foo.bar1(dynamic a, dynamic b)
+: x = a as int,
+y = b as int? {}
+
+Foo.bar2(dynamic a, dynamic b)
+: x = a is int,
+y = b is int? {}
+
+Foo.bar3(dynamic a, dynamic b)
+: x = a as int?,
+y = b as int {}
+
+Foo.bar4(dynamic a, dynamic b)
+: x = a is int?,
+y = b is int {}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken].[SimpleToken]foo1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken] {[BeginToken]}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.scanner.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.scanner.expect
new file mode 100644
index 0000000..437402a
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132.dart.scanner.expect
@@ -0,0 +1,69 @@
+class Foo {
+Foo.foo1(dynamic a, dynamic b)
+: x = a as int,
+y = b as int?;
+
+Foo.foo2(dynamic a, dynamic b)
+: x = a is int,
+y = b is int?;
+
+Foo.foo3(dynamic a, dynamic b)
+: x = a as int?,
+y = b as int;
+
+Foo.foo4(dynamic a, dynamic b)
+: x = a is int?,
+y = b is int;
+
+Foo.bar1(dynamic a, dynamic b)
+: x = a as int,
+y = b as int? {}
+
+Foo.bar2(dynamic a, dynamic b)
+: x = a is int,
+y = b is int? {}
+
+Foo.bar3(dynamic a, dynamic b)
+: x = a as int?,
+y = b as int {}
+
+Foo.bar4(dynamic a, dynamic b)
+: x = a is int?,
+y = b is int {}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken].[SimpleToken]foo1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] as[KeywordToken] int[StringToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] b[StringToken] is[KeywordToken] int[StringToken] {[BeginToken]}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132.equivalence_info b/pkg/front_end/parser_testcases/nnbd/issue_49132.equivalence_info
new file mode 100644
index 0000000..b0a9777
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132.equivalence_info
@@ -0,0 +1,7 @@
+files:
+  - issue_49132.dart
+  - issue_49132_prime.dart
+filters:
+  - ignoreListenerArguments
+ignored:
+  - handleParenthesizedExpression
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart
new file mode 100644
index 0000000..214f645
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Foo {
+  dynamic x;
+
+  Foo.foo1(dynamic a) : x = a is int ? {} : [] {
+    // body.
+  }
+
+  Foo.foo2(dynamic a) : x = a is int ? {"a": "b"} : ["a", "b"] {
+    // body.
+  }
+
+  Foo.foo3(dynamic a) : x = a as bool ? {} : [] {
+    // body.
+  }
+
+  Foo.foo4(dynamic a) : x = a as bool ? {"a": "b"} : ["a", "b"] {
+    // body.
+  }
+}
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.expect
new file mode 100644
index 0000000..e753502
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.expect
@@ -0,0 +1,250 @@
+beginCompilationUnit(class)
+  beginMetadataStar(class)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleIdentifier(Foo, classOrMixinDeclaration)
+    handleNoTypeVariables({)
+    beginClassDeclaration(class, null, null, null, Foo)
+      handleNoType(Foo)
+      handleClassExtends(null, 1)
+      handleClassNoWithClause()
+      handleImplements(null, 0)
+      handleClassHeader(class, class, null)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+        beginMetadataStar(dynamic)
+        endMetadataStar(0)
+        beginMember()
+          beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
+            handleIdentifier(dynamic, typeReference)
+            handleNoTypeArguments(x)
+            handleType(dynamic, null)
+            handleIdentifier(x, fieldDeclaration)
+            handleNoFieldInitializer(;)
+          endClassFields(null, null, null, null, null, null, null, 1, dynamic, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo1, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                beginConditionalExpression(?)
+                  handleNoTypeArguments({)
+                  handleLiteralSetOrMap(0, {, null, }, false)
+                  handleConditionalExpressionColon()
+                  handleNoTypeArguments([])
+                  handleLiteralList(0, [, null, ])
+                endConditionalExpression(?, :)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(1, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo2, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                beginConditionalExpression(?)
+                  handleNoTypeArguments({)
+                  beginLiteralString("a")
+                  endLiteralString(0, :)
+                  beginLiteralString("b")
+                  endLiteralString(0, })
+                  handleLiteralMapEntry(:, })
+                  handleLiteralSetOrMap(1, {, null, }, false)
+                  handleConditionalExpressionColon()
+                  handleNoTypeArguments([)
+                  beginLiteralString("a")
+                  endLiteralString(0, ,)
+                  beginLiteralString("b")
+                  endLiteralString(0, ])
+                  handleLiteralList(2, [, null, ])
+                endConditionalExpression(?, :)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(1, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo3, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(bool, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(bool, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                beginConditionalExpression(?)
+                  handleNoTypeArguments({)
+                  handleLiteralSetOrMap(0, {, null, }, false)
+                  handleConditionalExpressionColon()
+                  handleNoTypeArguments([])
+                  handleLiteralList(0, [, null, ])
+                endConditionalExpression(?, :)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(1, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo4, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(bool, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(bool, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                beginConditionalExpression(?)
+                  handleNoTypeArguments({)
+                  beginLiteralString("a")
+                  endLiteralString(0, :)
+                  beginLiteralString("b")
+                  endLiteralString(0, })
+                  handleLiteralMapEntry(:, })
+                  handleLiteralSetOrMap(1, {, null, }, false)
+                  handleConditionalExpressionColon()
+                  handleNoTypeArguments([)
+                  beginLiteralString("a")
+                  endLiteralString(0, ,)
+                  beginLiteralString("b")
+                  endLiteralString(0, ])
+                  handleLiteralList(2, [, null, ])
+                endConditionalExpression(?, :)
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(1, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+      endClassOrMixinOrExtensionBody(DeclarationKind.Class, 5, {, })
+    endClassDeclaration(class, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.intertwined.expect
new file mode 100644
index 0000000..9ec3a2a
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.intertwined.expect
@@ -0,0 +1,652 @@
+parseUnit(class)
+  skipErrorTokens(class)
+  listener: beginCompilationUnit(class)
+  syntheticPreviousToken(class)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(class)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(, class, null, Instance of 'DirectiveContext')
+      parseClassOrNamedMixinApplication(null, null, null, class)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+        ensureIdentifier(class, classOrMixinDeclaration)
+          listener: handleIdentifier(Foo, classOrMixinDeclaration)
+        listener: handleNoTypeVariables({)
+        listener: beginClassDeclaration(class, null, null, null, Foo)
+        parseClass(Foo, class, class, Foo)
+          parseClassHeaderOpt(Foo, class, class)
+            parseClassExtendsOpt(Foo)
+              listener: handleNoType(Foo)
+              listener: handleClassExtends(null, 1)
+            parseClassWithClauseOpt(Foo)
+              listener: handleClassNoWithClause()
+            parseClassOrMixinOrEnumImplementsOpt(Foo)
+              listener: handleImplements(null, 0)
+            listener: handleClassHeader(class, class, null)
+          parseClassOrMixinOrExtensionBody(Foo, DeclarationKind.Class, Foo)
+            listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+            notEofOrValue(}, dynamic)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, Foo)
+              parseMetadataStar({)
+                listener: beginMetadataStar(dynamic)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              parseFields({, null, null, null, null, null, null, null, {, Instance of 'SimpleType', x, DeclarationKind.Class, Foo, false)
+                listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
+                listener: handleIdentifier(dynamic, typeReference)
+                listener: handleNoTypeArguments(x)
+                listener: handleType(dynamic, null)
+                ensureIdentifierPotentiallyRecovered(dynamic, fieldDeclaration, false)
+                  listener: handleIdentifier(x, fieldDeclaration)
+                parseFieldInitializerOpt(x, x, null, null, null, null, null, DeclarationKind.Class, Foo)
+                  listener: handleNoFieldInitializer(;)
+                listener: endClassFields(null, null, null, null, null, null, null, 1, dynamic, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo1, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo1)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo1, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo1, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(a, is)
+                              parseIsOperatorRest(a)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                  canParseAsConditional(?)
+                                    parseExpressionWithoutCascade(?)
+                                      parsePrecedenceExpression(?, 1, false)
+                                        parseUnaryExpression(?, false)
+                                          parsePrimary(?, expression)
+                                            parseLiteralSetOrMapSuffix(?, null)
+                                    parseExpressionWithoutCascade(:)
+                                      parsePrecedenceExpression(:, 1, false)
+                                        parseUnaryExpression(:, false)
+                                          parsePrimary(:, expression)
+                                            parseLiteralListSuffix(:, null)
+                                              rewriteSquareBrackets(:)
+                                                link([, ])
+                                                rewriter()
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, null)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(int)
+                              parseConditionalExpressionRest(int)
+                                listener: beginConditionalExpression(?)
+                                parseExpressionWithoutCascade(?)
+                                  parsePrecedenceExpression(?, 1, false)
+                                    parseUnaryExpression(?, false)
+                                      parsePrimary(?, expression)
+                                        listener: handleNoTypeArguments({)
+                                        parseLiteralSetOrMapSuffix(?, null)
+                                          listener: handleLiteralSetOrMap(0, {, null, }, false)
+                                ensureColon(})
+                                listener: handleConditionalExpressionColon()
+                                parseExpressionWithoutCascade(:)
+                                  parsePrecedenceExpression(:, 1, false)
+                                    parseUnaryExpression(:, false)
+                                      parsePrimary(:, expression)
+                                        listener: handleNoTypeArguments([])
+                                        parseLiteralListSuffix(:, null)
+                                          rewriteSquareBrackets(:)
+                                            link([, ])
+                                            rewriter()
+                                          listener: handleLiteralList(0, [, null, ])
+                                listener: endConditionalExpression(?, :)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(1, :, {)
+                parseAsyncModifierOpt(])
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(], false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo2, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo2)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo2, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo2, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(is)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(is)
+                                      listener: handleSend(a, is)
+                              parseIsOperatorRest(a)
+                                listener: beginIsOperatorType(is)
+                                computeTypeAfterIsOrAs(is)
+                                  canParseAsConditional(?)
+                                    parseExpressionWithoutCascade(?)
+                                      parsePrecedenceExpression(?, 1, false)
+                                        parseUnaryExpression(?, false)
+                                          parsePrimary(?, expression)
+                                            parseLiteralSetOrMapSuffix(?, null)
+                                              parseExpression({)
+                                                parsePrecedenceExpression({, 1, true)
+                                                  parseUnaryExpression({, true)
+                                                    parsePrimary({, expression)
+                                                      parseLiteralString({)
+                                                        parseSingleLiteralString({)
+                                              parseExpression(:)
+                                                parsePrecedenceExpression(:, 1, true)
+                                                  parseUnaryExpression(:, true)
+                                                    parsePrimary(:, expression)
+                                                      parseLiteralString(:)
+                                                        parseSingleLiteralString(:)
+                                    parseExpressionWithoutCascade(:)
+                                      parsePrecedenceExpression(:, 1, false)
+                                        parseUnaryExpression(:, false)
+                                          parsePrimary(:, expression)
+                                            parseLiteralListSuffix(:, null)
+                                              parseExpression([)
+                                                parsePrecedenceExpression([, 1, true)
+                                                  parseUnaryExpression([, true)
+                                                    parsePrimary([, expression)
+                                                      parseLiteralString([)
+                                                        parseSingleLiteralString([)
+                                              parseExpression(,)
+                                                parsePrecedenceExpression(,, 1, true)
+                                                  parseUnaryExpression(,, true)
+                                                    parsePrimary(,, expression)
+                                                      parseLiteralString(,)
+                                                        parseSingleLiteralString(,)
+                                listener: handleIdentifier(int, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(int, null)
+                                listener: endIsOperatorType(is)
+                                listener: handleIsOperator(is, null)
+                                skipChainedAsIsOperators(int)
+                              parseConditionalExpressionRest(int)
+                                listener: beginConditionalExpression(?)
+                                parseExpressionWithoutCascade(?)
+                                  parsePrecedenceExpression(?, 1, false)
+                                    parseUnaryExpression(?, false)
+                                      parsePrimary(?, expression)
+                                        listener: handleNoTypeArguments({)
+                                        parseLiteralSetOrMapSuffix(?, null)
+                                          parseExpression({)
+                                            parsePrecedenceExpression({, 1, true)
+                                              parseUnaryExpression({, true)
+                                                parsePrimary({, expression)
+                                                  parseLiteralString({)
+                                                    parseSingleLiteralString({)
+                                                      listener: beginLiteralString("a")
+                                                      listener: endLiteralString(0, :)
+                                          parseExpression(:)
+                                            parsePrecedenceExpression(:, 1, true)
+                                              parseUnaryExpression(:, true)
+                                                parsePrimary(:, expression)
+                                                  parseLiteralString(:)
+                                                    parseSingleLiteralString(:)
+                                                      listener: beginLiteralString("b")
+                                                      listener: endLiteralString(0, })
+                                          listener: handleLiteralMapEntry(:, })
+                                          listener: handleLiteralSetOrMap(1, {, null, }, false)
+                                ensureColon(})
+                                listener: handleConditionalExpressionColon()
+                                parseExpressionWithoutCascade(:)
+                                  parsePrecedenceExpression(:, 1, false)
+                                    parseUnaryExpression(:, false)
+                                      parsePrimary(:, expression)
+                                        listener: handleNoTypeArguments([)
+                                        parseLiteralListSuffix(:, null)
+                                          parseExpression([)
+                                            parsePrecedenceExpression([, 1, true)
+                                              parseUnaryExpression([, true)
+                                                parsePrimary([, expression)
+                                                  parseLiteralString([)
+                                                    parseSingleLiteralString([)
+                                                      listener: beginLiteralString("a")
+                                                      listener: endLiteralString(0, ,)
+                                          parseExpression(,)
+                                            parsePrecedenceExpression(,, 1, true)
+                                              parseUnaryExpression(,, true)
+                                                parsePrimary(,, expression)
+                                                  parseLiteralString(,)
+                                                    parseSingleLiteralString(,)
+                                                      listener: beginLiteralString("b")
+                                                      listener: endLiteralString(0, ])
+                                          listener: handleLiteralList(2, [, null, ])
+                                listener: endConditionalExpression(?, :)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(1, :, {)
+                parseAsyncModifierOpt(])
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(], false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo3, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo3)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo3, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo3, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(a, as)
+                              parseAsOperatorRest(a)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                  canParseAsConditional(?)
+                                    parseExpressionWithoutCascade(?)
+                                      parsePrecedenceExpression(?, 1, false)
+                                        parseUnaryExpression(?, false)
+                                          parsePrimary(?, expression)
+                                            parseLiteralSetOrMapSuffix(?, null)
+                                    parseExpressionWithoutCascade(:)
+                                      parsePrecedenceExpression(:, 1, false)
+                                        parseUnaryExpression(:, false)
+                                          parsePrimary(:, expression)
+                                            parseLiteralListSuffix(:, null)
+                                              rewriteSquareBrackets(:)
+                                                link([, ])
+                                                rewriter()
+                                listener: handleIdentifier(bool, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(bool, null)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(bool)
+                              parseConditionalExpressionRest(bool)
+                                listener: beginConditionalExpression(?)
+                                parseExpressionWithoutCascade(?)
+                                  parsePrecedenceExpression(?, 1, false)
+                                    parseUnaryExpression(?, false)
+                                      parsePrimary(?, expression)
+                                        listener: handleNoTypeArguments({)
+                                        parseLiteralSetOrMapSuffix(?, null)
+                                          listener: handleLiteralSetOrMap(0, {, null, }, false)
+                                ensureColon(})
+                                listener: handleConditionalExpressionColon()
+                                parseExpressionWithoutCascade(:)
+                                  parsePrecedenceExpression(:, 1, false)
+                                    parseUnaryExpression(:, false)
+                                      parsePrimary(:, expression)
+                                        listener: handleNoTypeArguments([])
+                                        parseLiteralListSuffix(:, null)
+                                          rewriteSquareBrackets(:)
+                                            link([, ])
+                                            rewriter()
+                                          listener: handleLiteralList(0, [, null, ])
+                                listener: endConditionalExpression(?, :)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(1, :, {)
+                parseAsyncModifierOpt(])
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(], false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo4, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo4)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo4, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo4, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseSendOrFunctionLiteral(=, expression)
+                                    parseSend(=, expression)
+                                      isNextIdentifier(=)
+                                      ensureIdentifier(=, expression)
+                                        listener: handleIdentifier(a, expression)
+                                      listener: handleNoTypeArguments(as)
+                                      parseArgumentsOpt(a)
+                                        listener: handleNoArguments(as)
+                                      listener: handleSend(a, as)
+                              parseAsOperatorRest(a)
+                                listener: beginAsOperatorType(as)
+                                computeTypeAfterIsOrAs(as)
+                                  canParseAsConditional(?)
+                                    parseExpressionWithoutCascade(?)
+                                      parsePrecedenceExpression(?, 1, false)
+                                        parseUnaryExpression(?, false)
+                                          parsePrimary(?, expression)
+                                            parseLiteralSetOrMapSuffix(?, null)
+                                              parseExpression({)
+                                                parsePrecedenceExpression({, 1, true)
+                                                  parseUnaryExpression({, true)
+                                                    parsePrimary({, expression)
+                                                      parseLiteralString({)
+                                                        parseSingleLiteralString({)
+                                              parseExpression(:)
+                                                parsePrecedenceExpression(:, 1, true)
+                                                  parseUnaryExpression(:, true)
+                                                    parsePrimary(:, expression)
+                                                      parseLiteralString(:)
+                                                        parseSingleLiteralString(:)
+                                    parseExpressionWithoutCascade(:)
+                                      parsePrecedenceExpression(:, 1, false)
+                                        parseUnaryExpression(:, false)
+                                          parsePrimary(:, expression)
+                                            parseLiteralListSuffix(:, null)
+                                              parseExpression([)
+                                                parsePrecedenceExpression([, 1, true)
+                                                  parseUnaryExpression([, true)
+                                                    parsePrimary([, expression)
+                                                      parseLiteralString([)
+                                                        parseSingleLiteralString([)
+                                              parseExpression(,)
+                                                parsePrecedenceExpression(,, 1, true)
+                                                  parseUnaryExpression(,, true)
+                                                    parsePrimary(,, expression)
+                                                      parseLiteralString(,)
+                                                        parseSingleLiteralString(,)
+                                listener: handleIdentifier(bool, typeReference)
+                                listener: handleNoTypeArguments(?)
+                                listener: handleType(bool, null)
+                                listener: endAsOperatorType(as)
+                                listener: handleAsOperator(as)
+                                skipChainedAsIsOperators(bool)
+                              parseConditionalExpressionRest(bool)
+                                listener: beginConditionalExpression(?)
+                                parseExpressionWithoutCascade(?)
+                                  parsePrecedenceExpression(?, 1, false)
+                                    parseUnaryExpression(?, false)
+                                      parsePrimary(?, expression)
+                                        listener: handleNoTypeArguments({)
+                                        parseLiteralSetOrMapSuffix(?, null)
+                                          parseExpression({)
+                                            parsePrecedenceExpression({, 1, true)
+                                              parseUnaryExpression({, true)
+                                                parsePrimary({, expression)
+                                                  parseLiteralString({)
+                                                    parseSingleLiteralString({)
+                                                      listener: beginLiteralString("a")
+                                                      listener: endLiteralString(0, :)
+                                          parseExpression(:)
+                                            parsePrecedenceExpression(:, 1, true)
+                                              parseUnaryExpression(:, true)
+                                                parsePrimary(:, expression)
+                                                  parseLiteralString(:)
+                                                    parseSingleLiteralString(:)
+                                                      listener: beginLiteralString("b")
+                                                      listener: endLiteralString(0, })
+                                          listener: handleLiteralMapEntry(:, })
+                                          listener: handleLiteralSetOrMap(1, {, null, }, false)
+                                ensureColon(})
+                                listener: handleConditionalExpressionColon()
+                                parseExpressionWithoutCascade(:)
+                                  parsePrecedenceExpression(:, 1, false)
+                                    parseUnaryExpression(:, false)
+                                      parsePrimary(:, expression)
+                                        listener: handleNoTypeArguments([)
+                                        parseLiteralListSuffix(:, null)
+                                          parseExpression([)
+                                            parsePrecedenceExpression([, 1, true)
+                                              parseUnaryExpression([, true)
+                                                parsePrimary([, expression)
+                                                  parseLiteralString([)
+                                                    parseSingleLiteralString([)
+                                                      listener: beginLiteralString("a")
+                                                      listener: endLiteralString(0, ,)
+                                          parseExpression(,)
+                                            parsePrecedenceExpression(,, 1, true)
+                                              parseUnaryExpression(,, true)
+                                                parsePrimary(,, expression)
+                                                  parseLiteralString(,)
+                                                    parseSingleLiteralString(,)
+                                                      listener: beginLiteralString("b")
+                                                      listener: endLiteralString(0, ])
+                                          listener: handleLiteralList(2, [, null, ])
+                                listener: endConditionalExpression(?, :)
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(1, :, {)
+                parseAsyncModifierOpt(])
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(], false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, })
+            listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 5, {, })
+          listener: endClassDeclaration(class, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(class)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.parser.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.parser.expect
new file mode 100644
index 0000000..3a39fc1
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.parser.expect
@@ -0,0 +1,43 @@
+NOTICE: Stream was rewritten by parser!
+
+class Foo {
+dynamic x;
+
+Foo.foo1(dynamic a) : x = a is int ? {} : [] {
+
+}
+
+Foo.foo2(dynamic a) : x = a is int ? {"a": "b"} : ["a", "b"] {
+
+}
+
+Foo.foo3(dynamic a) : x = a as bool ? {} : [] {
+
+}
+
+Foo.foo4(dynamic a) : x = a as bool ? {"a": "b"} : ["a", "b"] {
+
+}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+dynamic[KeywordToken] x[StringToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken] ?[SimpleToken] {[BeginToken]}[SimpleToken] :[SimpleToken] [[BeginToken]][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken] ?[SimpleToken] {[BeginToken]"a"[StringToken]:[SimpleToken] "b"[StringToken]}[SimpleToken] :[SimpleToken] [[BeginToken]"a"[StringToken],[SimpleToken] "b"[StringToken]][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] bool[StringToken] ?[SimpleToken] {[BeginToken]}[SimpleToken] :[SimpleToken] [[BeginToken]][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] bool[StringToken] ?[SimpleToken] {[BeginToken]"a"[StringToken]:[SimpleToken] "b"[StringToken]}[SimpleToken] :[SimpleToken] [[BeginToken]"a"[StringToken],[SimpleToken] "b"[StringToken]][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.scanner.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.scanner.expect
new file mode 100644
index 0000000..443bda0
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_not_nullable.dart.scanner.expect
@@ -0,0 +1,41 @@
+class Foo {
+dynamic x;
+
+Foo.foo1(dynamic a) : x = a is int ? {} : [] {
+
+}
+
+Foo.foo2(dynamic a) : x = a is int ? {"a": "b"} : ["a", "b"] {
+
+}
+
+Foo.foo3(dynamic a) : x = a as bool ? {} : [] {
+
+}
+
+Foo.foo4(dynamic a) : x = a as bool ? {"a": "b"} : ["a", "b"] {
+
+}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+dynamic[KeywordToken] x[StringToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken] ?[SimpleToken] {[BeginToken]}[SimpleToken] :[SimpleToken] [][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] is[KeywordToken] int[StringToken] ?[SimpleToken] {[BeginToken]"a"[StringToken]:[SimpleToken] "b"[StringToken]}[SimpleToken] :[SimpleToken] [[BeginToken]"a"[StringToken],[SimpleToken] "b"[StringToken]][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] bool[StringToken] ?[SimpleToken] {[BeginToken]}[SimpleToken] :[SimpleToken] [][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken])[SimpleToken] :[SimpleToken] x[StringToken] =[SimpleToken] a[StringToken] as[KeywordToken] bool[StringToken] ?[SimpleToken] {[BeginToken]"a"[StringToken]:[SimpleToken] "b"[StringToken]}[SimpleToken] :[SimpleToken] [[BeginToken]"a"[StringToken],[SimpleToken] "b"[StringToken]][SimpleToken] {[BeginToken]
+
+}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart
new file mode 100644
index 0000000..de486f9
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart
@@ -0,0 +1,33 @@
+class Foo {
+  Foo.foo1(dynamic a, dynamic b)
+      : x = (a as int),
+        y = (b as int?);
+
+  Foo.foo2(dynamic a, dynamic b)
+      : x = (a is int),
+        y = (b is int?);
+
+  Foo.foo3(dynamic a, dynamic b)
+      : x = (a as int?),
+        y = (b as int);
+
+  Foo.foo4(dynamic a, dynamic b)
+      : x = (a is int?),
+        y = (b is int);
+
+  Foo.bar1(dynamic a, dynamic b)
+      : x = (a as int),
+        y = (b as int?) {}
+
+  Foo.bar2(dynamic a, dynamic b)
+      : x = (a is int),
+        y = (b is int?) {}
+
+  Foo.bar3(dynamic a, dynamic b)
+      : x = (a as int?),
+        y = (b as int) {}
+
+  Foo.bar4(dynamic a, dynamic b)
+      : x = (a is int?),
+        y = (b is int) {}
+}
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.expect
new file mode 100644
index 0000000..73c3ccc
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.expect
@@ -0,0 +1,589 @@
+beginCompilationUnit(class)
+  beginMetadataStar(class)
+  endMetadataStar(0)
+  beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+    handleIdentifier(Foo, classOrMixinDeclaration)
+    handleNoTypeVariables({)
+    beginClassDeclaration(class, null, null, null, Foo)
+      handleNoType(Foo)
+      handleClassExtends(null, 1)
+      handleClassNoWithClause()
+      handleImplements(null, 0)
+      handleClassHeader(class, class, null)
+      beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType({)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo1, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo2, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo3, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(foo4, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(;)
+            endInitializers(2, :, ;)
+            handleAsyncModifier(null, null)
+            handleEmptyFunctionBody(;)
+          endClassConstructor(null, Foo, (, :, ;)
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(;)
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar1, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar2, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar3, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(a, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(as)
+                handleNoArguments(as)
+                handleSend(b, as)
+                beginAsOperatorType(as)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endAsOperatorType(as)
+                handleAsOperator(as)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+        beginMetadataStar(Foo)
+        endMetadataStar(0)
+        beginMember()
+          beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+            handleNoType(})
+            handleIdentifier(Foo, methodDeclaration)
+            handleIdentifier(bar4, methodDeclarationContinuation)
+            handleQualified(.)
+            handleNoTypeVariables(()
+            beginFormalParameters((, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(a)
+                handleType(dynamic, null)
+                handleIdentifier(a, formalParameterDeclaration)
+                handleFormalParameterWithoutValue(,)
+              endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+              beginMetadataStar(dynamic)
+              endMetadataStar(0)
+              beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                handleIdentifier(dynamic, typeReference)
+                handleNoTypeArguments(b)
+                handleType(dynamic, null)
+                handleIdentifier(b, formalParameterDeclaration)
+                handleFormalParameterWithoutValue())
+              endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+            endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+            beginInitializers(:)
+              beginInitializer(x)
+                handleIdentifier(x, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(x, =)
+                handleIdentifier(a, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(a, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments(?)
+                  handleType(int, ?)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer(,)
+              beginInitializer(y)
+                handleIdentifier(y, expression)
+                handleNoTypeArguments(=)
+                handleNoArguments(=)
+                handleSend(y, =)
+                handleIdentifier(b, expression)
+                handleNoTypeArguments(is)
+                handleNoArguments(is)
+                handleSend(b, is)
+                beginIsOperatorType(is)
+                  handleIdentifier(int, typeReference)
+                  handleNoTypeArguments())
+                  handleType(int, null)
+                endIsOperatorType(is)
+                handleIsOperator(is, null)
+                handleParenthesizedExpression(()
+                handleAssignmentExpression(=)
+              endInitializer({)
+            endInitializers(2, :, {)
+            handleAsyncModifier(null, null)
+            beginBlockFunctionBody({)
+            endBlockFunctionBody(0, {, })
+          endClassConstructor(null, Foo, (, :, })
+        endMember()
+      endClassOrMixinOrExtensionBody(DeclarationKind.Class, 8, {, })
+    endClassDeclaration(class, })
+  endTopLevelDeclaration()
+endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.intertwined.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.intertwined.expect
new file mode 100644
index 0000000..8875225
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.intertwined.expect
@@ -0,0 +1,1305 @@
+parseUnit(class)
+  skipErrorTokens(class)
+  listener: beginCompilationUnit(class)
+  syntheticPreviousToken(class)
+  parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
+    parseMetadataStar()
+      listener: beginMetadataStar(class)
+      listener: endMetadataStar(0)
+    parseTopLevelKeywordDeclaration(, class, null, Instance of 'DirectiveContext')
+      parseClassOrNamedMixinApplication(null, null, null, class)
+        listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
+        ensureIdentifier(class, classOrMixinDeclaration)
+          listener: handleIdentifier(Foo, classOrMixinDeclaration)
+        listener: handleNoTypeVariables({)
+        listener: beginClassDeclaration(class, null, null, null, Foo)
+        parseClass(Foo, class, class, Foo)
+          parseClassHeaderOpt(Foo, class, class)
+            parseClassExtendsOpt(Foo)
+              listener: handleNoType(Foo)
+              listener: handleClassExtends(null, 1)
+            parseClassWithClauseOpt(Foo)
+              listener: handleClassNoWithClause()
+            parseClassOrMixinOrEnumImplementsOpt(Foo)
+              listener: handleImplements(null, 0)
+            listener: handleClassHeader(class, class, null)
+          parseClassOrMixinOrExtensionBody(Foo, DeclarationKind.Class, Foo)
+            listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, Foo)
+              parseMetadataStar({)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod({, null, null, null, null, null, null, null, {, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType({)
+                ensureIdentifierPotentiallyRecovered({, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo1, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo1)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo1, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo1, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(a, as)
+                                              parseAsOperatorRest(a)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(b, as)
+                                              parseAsOperatorRest(b)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo2, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo2)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo2, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo2, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(a, is)
+                                              parseIsOperatorRest(a)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(b, is)
+                                              parseIsOperatorRest(b)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo3, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo3)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo3, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo3, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(a, as)
+                                              parseAsOperatorRest(a)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(b, as)
+                                              parseAsOperatorRest(b)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(foo4, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(foo4)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(foo4, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(foo4, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(a, is)
+                                              parseIsOperatorRest(a)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(b, is)
+                                              parseIsOperatorRest(b)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(;)
+                    listener: endInitializers(2, :, ;)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: handleEmptyFunctionBody(;)
+                listener: endClassConstructor(null, Foo, (, :, ;)
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
+              parseMetadataStar(;)
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(;, null, null, null, null, null, null, null, ;, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(;)
+                ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar1, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar1)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar1, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar1, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(a, as)
+                                              parseAsOperatorRest(a)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(b, as)
+                                              parseAsOperatorRest(b)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar2, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar2)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar2, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar2, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(a, is)
+                                              parseIsOperatorRest(a)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(b, is)
+                                              parseIsOperatorRest(b)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar3, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar3)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar3, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar3, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(a, as)
+                                              parseAsOperatorRest(a)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(as)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(as)
+                                                      listener: handleSend(b, as)
+                                              parseAsOperatorRest(b)
+                                                listener: beginAsOperatorType(as)
+                                                computeTypeAfterIsOrAs(as)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endAsOperatorType(as)
+                                                listener: handleAsOperator(as)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, Foo)
+            parseClassOrMixinOrExtensionOrEnumMemberImpl(}, DeclarationKind.Class, Foo)
+              parseMetadataStar(})
+                listener: beginMetadataStar(Foo)
+                listener: endMetadataStar(0)
+              listener: beginMember()
+              isReservedKeyword(.)
+              parseMethod(}, null, null, null, null, null, null, null, }, Instance of 'NoType', null, Foo, DeclarationKind.Class, Foo, false)
+                listener: beginMethod(DeclarationKind.Class, null, null, null, null, null, null, Foo)
+                listener: handleNoType(})
+                ensureIdentifierPotentiallyRecovered(}, methodDeclaration, false)
+                  listener: handleIdentifier(Foo, methodDeclaration)
+                parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
+                  parseQualifiedRest(Foo, methodDeclarationContinuation)
+                    ensureIdentifier(., methodDeclarationContinuation)
+                      listener: handleIdentifier(bar4, methodDeclarationContinuation)
+                    listener: handleQualified(.)
+                parseMethodTypeVar(bar4)
+                  listener: handleNoTypeVariables(()
+                parseGetterOrFormalParameters(bar4, Foo, false, MemberKind.NonStaticMethod)
+                  parseFormalParameters(bar4, MemberKind.NonStaticMethod)
+                    parseFormalParametersRest((, MemberKind.NonStaticMethod)
+                      listener: beginFormalParameters((, MemberKind.NonStaticMethod)
+                      parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(()
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(a)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(a, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue(,)
+                        listener: endFormalParameter(null, null, null, a, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      parseFormalParameter(,, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                        parseMetadataStar(,)
+                          listener: beginMetadataStar(dynamic)
+                          listener: endMetadataStar(0)
+                        listener: beginFormalParameter(dynamic, MemberKind.NonStaticMethod, null, null, null)
+                        listener: handleIdentifier(dynamic, typeReference)
+                        listener: handleNoTypeArguments(b)
+                        listener: handleType(dynamic, null)
+                        ensureIdentifier(dynamic, formalParameterDeclaration)
+                          listener: handleIdentifier(b, formalParameterDeclaration)
+                        listener: handleFormalParameterWithoutValue())
+                        listener: endFormalParameter(null, null, null, b, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
+                      listener: endFormalParameters(2, (, ), MemberKind.NonStaticMethod)
+                parseInitializersOpt())
+                  parseInitializers(:)
+                    listener: beginInitializers(:)
+                    parseInitializer(:)
+                      listener: beginInitializer(x)
+                      parseInitializerExpressionRest(:)
+                        parseExpression(:)
+                          parsePrecedenceExpression(:, 1, true)
+                            parseUnaryExpression(:, true)
+                              parsePrimary(:, expression)
+                                parseSendOrFunctionLiteral(:, expression)
+                                  parseSend(:, expression)
+                                    isNextIdentifier(:)
+                                    ensureIdentifier(:, expression)
+                                      listener: handleIdentifier(x, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(x)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(x, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(a, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(a)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(a, is)
+                                              parseIsOperatorRest(a)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments(?)
+                                                listener: handleType(int, ?)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(?)
+                                          ensureCloseParen(?, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer(,)
+                    parseInitializer(,)
+                      listener: beginInitializer(y)
+                      parseInitializerExpressionRest(,)
+                        parseExpression(,)
+                          parsePrecedenceExpression(,, 1, true)
+                            parseUnaryExpression(,, true)
+                              parsePrimary(,, expression)
+                                parseSendOrFunctionLiteral(,, expression)
+                                  parseSend(,, expression)
+                                    isNextIdentifier(,)
+                                    ensureIdentifier(,, expression)
+                                      listener: handleIdentifier(y, expression)
+                                    listener: handleNoTypeArguments(=)
+                                    parseArgumentsOpt(y)
+                                      listener: handleNoArguments(=)
+                                    listener: handleSend(y, =)
+                            parsePrecedenceExpression(=, 1, true)
+                              parseUnaryExpression(=, true)
+                                parsePrimary(=, expression)
+                                  parseParenthesizedExpressionOrFunctionLiteral(=)
+                                    parseParenthesizedExpression(=)
+                                      parseExpressionInParenthesis(=)
+                                        parseExpressionInParenthesisRest(()
+                                          parseExpression(()
+                                            parsePrecedenceExpression((, 1, true)
+                                              parseUnaryExpression((, true)
+                                                parsePrimary((, expression)
+                                                  parseSendOrFunctionLiteral((, expression)
+                                                    parseSend((, expression)
+                                                      isNextIdentifier(()
+                                                      ensureIdentifier((, expression)
+                                                        listener: handleIdentifier(b, expression)
+                                                      listener: handleNoTypeArguments(is)
+                                                      parseArgumentsOpt(b)
+                                                        listener: handleNoArguments(is)
+                                                      listener: handleSend(b, is)
+                                              parseIsOperatorRest(b)
+                                                listener: beginIsOperatorType(is)
+                                                computeTypeAfterIsOrAs(is)
+                                                listener: handleIdentifier(int, typeReference)
+                                                listener: handleNoTypeArguments())
+                                                listener: handleType(int, null)
+                                                listener: endIsOperatorType(is)
+                                                listener: handleIsOperator(is, null)
+                                                skipChainedAsIsOperators(int)
+                                          ensureCloseParen(int, ()
+                                      listener: handleParenthesizedExpression(()
+                            listener: handleAssignmentExpression(=)
+                        listener: endInitializer({)
+                    listener: endInitializers(2, :, {)
+                parseAsyncModifierOpt())
+                  listener: handleAsyncModifier(null, null)
+                  inPlainSync()
+                inPlainSync()
+                parseFunctionBody(), false, true)
+                  listener: beginBlockFunctionBody({)
+                  notEofOrValue(}, })
+                  listener: endBlockFunctionBody(0, {, })
+                listener: endClassConstructor(null, Foo, (, :, })
+              listener: endMember()
+            notEofOrValue(}, })
+            listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 8, {, })
+          listener: endClassDeclaration(class, })
+  listener: endTopLevelDeclaration()
+  reportAllErrorTokens(class)
+  listener: endCompilationUnit(1, )
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.parser.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.parser.expect
new file mode 100644
index 0000000..acad12a
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.parser.expect
@@ -0,0 +1,69 @@
+class Foo {
+Foo.foo1(dynamic a, dynamic b)
+: x = (a as int),
+y = (b as int?);
+
+Foo.foo2(dynamic a, dynamic b)
+: x = (a is int),
+y = (b is int?);
+
+Foo.foo3(dynamic a, dynamic b)
+: x = (a as int?),
+y = (b as int);
+
+Foo.foo4(dynamic a, dynamic b)
+: x = (a is int?),
+y = (b is int);
+
+Foo.bar1(dynamic a, dynamic b)
+: x = (a as int),
+y = (b as int?) {}
+
+Foo.bar2(dynamic a, dynamic b)
+: x = (a is int),
+y = (b is int?) {}
+
+Foo.bar3(dynamic a, dynamic b)
+: x = (a as int?),
+y = (b as int) {}
+
+Foo.bar4(dynamic a, dynamic b)
+: x = (a is int?),
+y = (b is int) {}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken].[SimpleToken]foo1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.scanner.expect b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.scanner.expect
new file mode 100644
index 0000000..acad12a
--- /dev/null
+++ b/pkg/front_end/parser_testcases/nnbd/issue_49132_prime.dart.scanner.expect
@@ -0,0 +1,69 @@
+class Foo {
+Foo.foo1(dynamic a, dynamic b)
+: x = (a as int),
+y = (b as int?);
+
+Foo.foo2(dynamic a, dynamic b)
+: x = (a is int),
+y = (b is int?);
+
+Foo.foo3(dynamic a, dynamic b)
+: x = (a as int?),
+y = (b as int);
+
+Foo.foo4(dynamic a, dynamic b)
+: x = (a is int?),
+y = (b is int);
+
+Foo.bar1(dynamic a, dynamic b)
+: x = (a as int),
+y = (b as int?) {}
+
+Foo.bar2(dynamic a, dynamic b)
+: x = (a is int),
+y = (b is int?) {}
+
+Foo.bar3(dynamic a, dynamic b)
+: x = (a as int?),
+y = (b as int) {}
+
+Foo.bar4(dynamic a, dynamic b)
+: x = (a is int?),
+y = (b is int) {}
+}
+
+
+class[KeywordToken] Foo[StringToken] {[BeginToken]
+Foo[StringToken].[SimpleToken]foo1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]foo4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken])[SimpleToken];[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar1[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar2[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar3[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] as[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] as[KeywordToken] int[StringToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+
+Foo[StringToken].[SimpleToken]bar4[StringToken]([BeginToken]dynamic[KeywordToken] a[StringToken],[SimpleToken] dynamic[KeywordToken] b[StringToken])[SimpleToken]
+:[SimpleToken] x[StringToken] =[SimpleToken] ([BeginToken]a[StringToken] is[KeywordToken] int[StringToken]?[SimpleToken])[SimpleToken],[SimpleToken]
+y[StringToken] =[SimpleToken] ([BeginToken]b[StringToken] is[KeywordToken] int[StringToken])[SimpleToken] {[BeginToken]}[SimpleToken]
+}[SimpleToken]
+[SimpleToken]
diff --git a/pkg/front_end/test/ffi_test.dart b/pkg/front_end/test/ffi_test.dart
index 79f7ba7..35fbff6 100644
--- a/pkg/front_end/test/ffi_test.dart
+++ b/pkg/front_end/test/ffi_test.dart
@@ -5,6 +5,6 @@
 import 'package:expect/expect.dart';
 
 void main() {
-  // TODO(dacoharkes): implement dart:ffi tests
+  // TODO(http://dartbug.com/49304): implement dart:ffi tests
   Expect.isTrue(true);
 }
diff --git a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/data_class.dart b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/data_class.dart
index 095e5f3..c5dca16 100644
--- a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/data_class.dart
+++ b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/data_class.dart
@@ -11,7 +11,7 @@
 class DataClass implements ClassDeclarationsMacro, ClassDefinitionMacro {
   const DataClass();
 
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) async {
     Uri dartCore = Uri.parse('dart:core');
     Identifier objectIdentifier =
@@ -46,7 +46,7 @@
       'external ', stringIdentifier, ' toString();']));
   }
 
-  FutureOr<void> buildDefinitionForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDefinitionForClass(IntrospectableClassDeclaration clazz,
       ClassDefinitionBuilder builder) async {
     Uri dartCore = Uri.parse('dart:core');
     Identifier identicalIdentifier =
diff --git a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro.dart b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro.dart
index c9dfea1..7c69409 100644
--- a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro.dart
+++ b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro.dart
@@ -194,7 +194,7 @@
 class ClassDeclarationsMacro1 implements ClassDeclarationsMacro {
   const ClassDeclarationsMacro1();
 
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) {
     StringBuffer sb = new StringBuffer();
     if (clazz.isAbstract) {
@@ -214,7 +214,7 @@
 class ClassDeclarationsMacro2 implements ClassDeclarationsMacro {
   const ClassDeclarationsMacro2();
 
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) async {
     List<ConstructorDeclaration> constructors = await builder.constructorsOf(
         clazz);
@@ -302,7 +302,7 @@
 class ToStringMacro implements ClassDeclarationsMacro {
   const ToStringMacro();
 
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) async {
     Iterable<MethodDeclaration> methods = await builder.methodsOf(clazz);
     if (!methods.any((m) => m.identifier.name == 'toString')) {
@@ -340,22 +340,35 @@
       ClassMemberDeclarationBuilder builder) async {
   }
 
-  Future<void> _findAllMethods(ClassMemberDeclarationBuilder builder,
-      ClassDeclaration cls, List<MethodDeclaration> methods) async {
-    ClassDeclaration? superclass = await builder.superclassOf(cls);
-    if (superclass != null) {
-      await _findAllMethods(builder, superclass, methods);
+  Future<void> _findAllMethods(
+      ClassMemberDeclarationBuilder builder,
+      IntrospectableClassDeclaration cls,
+      List<MethodDeclaration> methods) async {
+    if (cls.superclass != null) {
+      await _findAllMethods(
+        builder,
+        await builder.declarationOf(cls.superclass!.identifier)
+            as IntrospectableClassDeclaration,
+        methods);
     }
-    for (ClassDeclaration mixin in await builder.mixinsOf(cls)) {
-      await _findAllMethods(builder, mixin, methods);
+    for (NamedTypeAnnotation mixin in cls.mixins) {
+      await _findAllMethods(
+        builder,
+        await builder.declarationOf(mixin.identifier)
+            as IntrospectableClassDeclaration,
+        methods);
     }
-    for (ClassDeclaration interface in await builder.interfacesOf(cls)) {
-      await _findAllMethods(builder, interface, methods);
+    for (NamedTypeAnnotation interface in cls.interfaces) {
+      await _findAllMethods(
+        builder,
+        await builder.declarationOf(interface.identifier)
+            as IntrospectableClassDeclaration,
+        methods);
     }
     methods.addAll(await builder.methodsOf(cls));
   }
 
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) async {
     List<MethodDeclaration> methods = [];
     await _findAllMethods(builder, clazz, methods);
@@ -381,9 +394,11 @@
 class SupertypesMacro implements ClassDefinitionMacro {
   const SupertypesMacro();
 
-  FutureOr<void> buildDefinitionForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDefinitionForClass(IntrospectableClassDeclaration clazz,
       ClassDefinitionBuilder builder) async {
-    ClassDeclaration? superClass = await builder.superclassOf(clazz);
+    ClassDeclaration? superClass = clazz.superclass == null ? null :
+        await builder.declarationOf(clazz.superclass!.identifier)
+            as ClassDeclaration?;
     FunctionDefinitionBuilder getSuperClassBuilder = await builder.buildMethod(
         (await builder.methodsOf(clazz))
             .firstWhere((m) => m.identifier.name == 'getSuperClass')
diff --git a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro1.dart b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro1.dart
index e732909..6ea516d 100644
--- a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro1.dart
+++ b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro1.dart
@@ -11,7 +11,7 @@
   const Macro1();
 
   @override
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) {
     builder.declareInClass(new DeclarationCode.fromString('''
   get isMacro => true;
diff --git a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro2.dart b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro2.dart
index 6173f58..c895088 100644
--- a/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro2.dart
+++ b/pkg/front_end/test/macros/application/data/pkgs/macro/lib/macro2.dart
@@ -13,7 +13,7 @@
   const Macro2();
 
   @override
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) {
     if (isMacro) {
       builder.declareInClass(new DeclarationCode.fromString('''
diff --git a/pkg/front_end/test/macros/application/data/tests/supertypes.dart b/pkg/front_end/test/macros/application/data/tests/supertypes.dart
index b236bc0..3ae5f30 100644
--- a/pkg/front_end/test/macros/application/data/tests/supertypes.dart
+++ b/pkg/front_end/test/macros/application/data/tests/supertypes.dart
@@ -13,7 +13,7 @@
 
 augment class A {
 augment prefix0.String getSuperClass() {
-    return "Object";
+    return "null";
   }
 }
 augment class B {
@@ -23,7 +23,7 @@
 }
 augment class M {
 augment prefix0.String getSuperClass() {
-    return "Object";
+    return "null";
   }
 }
 augment class C {
@@ -38,7 +38,7 @@
 definitions:
 augment class A {
 augment String getSuperClass() {
-    return "Object";
+    return "null";
   }
 }*/
 @SupertypesMacro()
@@ -62,7 +62,7 @@
 definitions:
 augment class M {
 augment String getSuperClass() {
-    return "Object";
+    return "null";
   }
 }*/
 @SupertypesMacro()
diff --git a/pkg/front_end/test/macros/application/data/tests/supertypes.dart.expect b/pkg/front_end/test/macros/application/data/tests/supertypes.dart.expect
index 535be53b..f13fc5e 100644
--- a/pkg/front_end/test/macros/application/data/tests/supertypes.dart.expect
+++ b/pkg/front_end/test/macros/application/data/tests/supertypes.dart.expect
@@ -11,7 +11,7 @@
     : super core::Object::•()
     ;
   method /* from org-dartlang-augmentation:/a/b/c/main.dart-0 */ getSuperClass() → core::String {
-    return "Object";
+    return "null";
   }
 }
 @#C1
@@ -26,7 +26,7 @@
 @#C1
 class M extends core::Object /*isMixinDeclaration*/  {
   method /* from org-dartlang-augmentation:/a/b/c/main.dart-0 */ getSuperClass() → core::String {
-    return "Object";
+    return "null";
   }
 }
 abstract class _C&A&M = self::A with self::M /*isAnonymousMixin*/  {
diff --git a/pkg/front_end/test/macros/declaration/macro_declaration_test.dart b/pkg/front_end/test/macros/declaration/macro_declaration_test.dart
index 3b906dc..218fb83 100644
--- a/pkg/front_end/test/macros/declaration/macro_declaration_test.dart
+++ b/pkg/front_end/test/macros/declaration/macro_declaration_test.dart
@@ -303,8 +303,9 @@
       MacroInstanceIdentifier macro,
       Declaration declaration,
       IdentifierResolver identifierResolver,
+      TypeDeclarationResolver typeDeclarationResolver,
       TypeResolver typeResolver,
-      ClassIntrospector classIntrospector) async {
+      TypeIntrospector typeIntrospector) async {
     return new _MacroExecutionResult();
   }
 
@@ -313,9 +314,9 @@
       MacroInstanceIdentifier macro,
       Declaration declaration,
       IdentifierResolver identifierResolver,
-      TypeResolver typeResolver,
-      ClassIntrospector classIntrospector,
       TypeDeclarationResolver typeDeclarationResolver,
+      TypeResolver typeResolver,
+      TypeIntrospector typeIntrospector,
       TypeInferrer typeInferrer) async {
     return new _MacroExecutionResult();
   }
diff --git a/pkg/front_end/test/macros/incremental/data/pkgs/macro/lib/macro.dart b/pkg/front_end/test/macros/incremental/data/pkgs/macro/lib/macro.dart
index 9b3df34..a2dc611 100644
--- a/pkg/front_end/test/macros/incremental/data/pkgs/macro/lib/macro.dart
+++ b/pkg/front_end/test/macros/incremental/data/pkgs/macro/lib/macro.dart
@@ -11,14 +11,14 @@
   const ToStringMacro();
 
   @override
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) async {
     Iterable<MethodDeclaration> methods = await builder.methodsOf(clazz);
     if (!methods.any((m) => m.identifier.name == 'toString')) {
       Iterable<FieldDeclaration> fields = await builder.fieldsOf(clazz);
       Uri dartCore = Uri.parse('dart:core');
       Identifier stringClass =
-          await builder.resolveIdentifier(dartCore, 'String');
+      await builder.resolveIdentifier(dartCore, 'String');
       List<Object> parts = [stringClass, '''
  toString() {
     return "${clazz.identifier.name}('''
@@ -44,7 +44,7 @@
   const InjectMacro();
 
   @override
-  FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
+  FutureOr<void> buildDeclarationsForClass(IntrospectableClassDeclaration clazz,
       ClassMemberDeclarationBuilder builder) async {
     Iterable<MethodDeclaration> methods = await builder.methodsOf(clazz);
     if (!methods.any((m) => m.identifier.name == 'injectedMethod')) {
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index ba8d1d7..eaad1d4 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -577,6 +577,7 @@
 height
 hello
 helpful
+helps
 hfs
 highlight
 highlighting
@@ -670,6 +671,7 @@
 intervals
 intl
 introspect
+introspectable
 introspection
 introspector
 ints
@@ -783,6 +785,7 @@
 macros
 maintaining
 malbounded
+manage
 mangled
 manipulation
 manner
@@ -879,6 +882,7 @@
 omitting
 op
 opens
+operate
 opt
 optimizations
 opting
diff --git a/pkg/front_end/test/token_test.dart b/pkg/front_end/test/token_test.dart
index aad4e9f..69f13b4 100644
--- a/pkg/front_end/test/token_test.dart
+++ b/pkg/front_end/test/token_test.dart
@@ -92,6 +92,7 @@
       Keyword.EXTENSION,
       Keyword.EXTERNAL,
       Keyword.FACTORY,
+      Keyword.FUNCTION,
       Keyword.GET,
       Keyword.IMPLEMENTS,
       Keyword.IMPORT,
@@ -171,7 +172,6 @@
     var pseudoKeywords = new Set<Keyword>.from([
       Keyword.ASYNC,
       Keyword.AWAIT,
-      Keyword.FUNCTION,
       Keyword.HIDE,
       Keyword.INOUT,
       Keyword.NATIVE,
diff --git a/pkg/front_end/testcases/extensions/async_extensions.dart.weak.transformed.expect b/pkg/front_end/testcases/extensions/async_extensions.dart.weak.transformed.expect
index 1ed196c..bf6bac9 100644
--- a/pkg/front_end/testcases/extensions/async_extensions.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/extensions/async_extensions.dart.weak.transformed.expect
@@ -10,18 +10,7 @@
   method asyncStarMethod = self::Extension|asyncStarMethod;
   tearoff asyncStarMethod = self::Extension|get#asyncStarMethod;
 }
-static method Extension|syncStarMethod(lowered final core::int #this) → dynamic /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {}
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
-}
+static method Extension|syncStarMethod(lowered final core::int #this) → dynamic sync* {}
 static method Extension|get#syncStarMethod(lowered final core::int #this) → () → dynamic
   return () → dynamic => self::Extension|syncStarMethod(#this);
 static method Extension|asyncMethod(lowered final core::int #this) → dynamic async /* futureValueType= dynamic */ {}
diff --git a/pkg/front_end/testcases/general/async_function.dart.weak.transformed.expect b/pkg/front_end/testcases/general/async_function.dart.weak.transformed.expect
index 55fe823..c48871c6 100644
--- a/pkg/front_end/testcases/general/async_function.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/async_function.dart.weak.transformed.expect
@@ -12,47 +12,13 @@
 static method asyncString2() → asy::Future<core::String> async /* futureValueType= core::String */ {
   return self::asyncString();
 }
-static method syncStarString() → core::Iterable<core::String> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = "foo";
-          [yield] true;
-        }
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = self::syncStarString2();
-          [yield] true;
-        }
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = self::stringList;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::String>(:sync_op_gen);
+static method syncStarString() → core::Iterable<core::String> sync* {
+  yield "foo";
+  yield* self::syncStarString2();
+  yield* self::stringList;
 }
-static method syncStarString2() → core::Iterable<core::String> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = "foo";
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::String>(:sync_op_gen);
+static method syncStarString2() → core::Iterable<core::String> sync* {
+  yield "foo";
 }
 static method asyncStarString() → asy::Stream<core::String> async* {
   yield "foo";
diff --git a/pkg/front_end/testcases/general/function_bad_use.dart.weak.expect b/pkg/front_end/testcases/general/function_bad_use.dart.weak.expect
index 044f5c0..df40478 100644
--- a/pkg/front_end/testcases/general/function_bad_use.dart.weak.expect
+++ b/pkg/front_end/testcases/general/function_bad_use.dart.weak.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: Can't use 'Function' as a name here.
 // class Function {}
 //       ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: Can't use 'Function' as a name here.
 // class C<Function> {}
 //         ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: Can't use 'Function' as a name here.
 // mixin M<Function> implements List<Function> {}
 //         ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/function_bad_use.dart.weak.modular.expect b/pkg/front_end/testcases/general/function_bad_use.dart.weak.modular.expect
index 044f5c0..df40478 100644
--- a/pkg/front_end/testcases/general/function_bad_use.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/function_bad_use.dart.weak.modular.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: Can't use 'Function' as a name here.
 // class Function {}
 //       ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: Can't use 'Function' as a name here.
 // class C<Function> {}
 //         ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: Can't use 'Function' as a name here.
 // mixin M<Function> implements List<Function> {}
 //         ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/function_bad_use.dart.weak.outline.expect b/pkg/front_end/testcases/general/function_bad_use.dart.weak.outline.expect
index 9e4f7cf..5dd785f 100644
--- a/pkg/front_end/testcases/general/function_bad_use.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/function_bad_use.dart.weak.outline.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: Can't use 'Function' as a name here.
 // class Function {}
 //       ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: Can't use 'Function' as a name here.
 // class C<Function> {}
 //         ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: Can't use 'Function' as a name here.
 // mixin M<Function> implements List<Function> {}
 //         ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/function_bad_use.dart.weak.transformed.expect b/pkg/front_end/testcases/general/function_bad_use.dart.weak.transformed.expect
index 044f5c0..df40478 100644
--- a/pkg/front_end/testcases/general/function_bad_use.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/function_bad_use.dart.weak.transformed.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/function_bad_use.dart:1:7: Error: Can't use 'Function' as a name here.
 // class Function {}
 //       ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:3:9: Error: Can't use 'Function' as a name here.
 // class C<Function> {}
 //         ^^^^^^^^
 //
-// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: 'Function' is a built-in identifier, could not used as a type identifier.
+// pkg/front_end/testcases/general/function_bad_use.dart:5:9: Error: Can't use 'Function' as a name here.
 // mixin M<Function> implements List<Function> {}
 //         ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/ignore_function.dart.weak.expect b/pkg/front_end/testcases/general/ignore_function.dart.weak.expect
index 4524d99..d13b046 100644
--- a/pkg/front_end/testcases/general/ignore_function.dart.weak.expect
+++ b/pkg/front_end/testcases/general/ignore_function.dart.weak.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: Can't use 'Function' as a name here.
 // class Function {
 //       ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/ignore_function.dart.weak.modular.expect b/pkg/front_end/testcases/general/ignore_function.dart.weak.modular.expect
index 4524d99..d13b046 100644
--- a/pkg/front_end/testcases/general/ignore_function.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/ignore_function.dart.weak.modular.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: Can't use 'Function' as a name here.
 // class Function {
 //       ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/ignore_function.dart.weak.outline.expect b/pkg/front_end/testcases/general/ignore_function.dart.weak.outline.expect
index d0e86be..18b6327 100644
--- a/pkg/front_end/testcases/general/ignore_function.dart.weak.outline.expect
+++ b/pkg/front_end/testcases/general/ignore_function.dart.weak.outline.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: Can't use 'Function' as a name here.
 // class Function {
 //       ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/ignore_function.dart.weak.transformed.expect b/pkg/front_end/testcases/general/ignore_function.dart.weak.transformed.expect
index 4524d99..d13b046 100644
--- a/pkg/front_end/testcases/general/ignore_function.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/ignore_function.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: 'Function' is a built-in identifier, could not used as a class name.
+// pkg/front_end/testcases/general/ignore_function.dart:18:7: Error: Can't use 'Function' as a name here.
 // class Function {
 //       ^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/general/issue37753.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue37753.dart.weak.transformed.expect
index 64d5279..a0ac6b6 100644
--- a/pkg/front_end/testcases/general/issue37753.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/issue37753.dart.weak.transformed.expect
@@ -2,40 +2,12 @@
 import self as self;
 import "dart:core" as core;
 
-static method getElements() → core::Iterable<core::int> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        core::Iterable<core::int> elements;
-        elements = (() → core::Iterable<core::int> /* originally sync* */ {
-          function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-            core::int :await_jump_var = 0;
-            dynamic :await_ctx_var;
-            function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-              {
-                {
-                  :iterator.{core::_SyncIterator::_current} = 7;
-                  [yield] true;
-                }
-              }
-              return false;
-            }
-            return :sync_op;
-          }
-          return new core::_SyncIterable::•<core::int>(:sync_op_gen);
-        })(){() → core::Iterable<core::int>};
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = elements;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::int>(:sync_op_gen);
+static method getElements() → core::Iterable<core::int> sync* {
+  core::Iterable<core::int> elements;
+  elements = (() → core::Iterable<core::int> sync* {
+    yield 7;
+  })(){() → core::Iterable<core::int>};
+  yield* elements;
 }
 static method main() → dynamic
   return core::print(self::getElements());
diff --git a/pkg/front_end/testcases/general/issue_49132.dart b/pkg/front_end/testcases/general/issue_49132.dart
new file mode 100644
index 0000000..2239ee8
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Foo {
+  dynamic x;
+  dynamic y;
+
+  Foo.foo1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int?;
+
+  Foo.foo2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int?;
+
+  Foo.foo3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int;
+
+  Foo.foo4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int;
+
+  Foo.bar1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int? {}
+
+  Foo.bar2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int? {}
+
+  Foo.bar3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int {}
+
+  Foo.bar4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_49132.dart.textual_outline.expect
new file mode 100644
index 0000000..b068215c
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart.textual_outline.expect
@@ -0,0 +1,28 @@
+class Foo {
+  dynamic x;
+  dynamic y;
+  Foo.foo1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int?;
+  Foo.foo2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int?;
+  Foo.foo3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int;
+  Foo.foo4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int;
+  Foo.bar1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int? {}
+  Foo.bar2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int? {}
+  Foo.bar3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int {}
+  Foo.bar4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_49132.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..428fba9
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart.textual_outline_modelled.expect
@@ -0,0 +1,28 @@
+class Foo {
+  Foo.bar1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int? {}
+  Foo.bar2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int? {}
+  Foo.bar3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int {}
+  Foo.bar4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int {}
+  Foo.foo1(dynamic a, dynamic b)
+      : x = a as int,
+        y = b as int?;
+  Foo.foo2(dynamic a, dynamic b)
+      : x = a is int,
+        y = b is int?;
+  Foo.foo3(dynamic a, dynamic b)
+      : x = a as int?,
+        y = b as int;
+  Foo.foo4(dynamic a, dynamic b)
+      : x = a is int?,
+        y = b is int;
+  dynamic x;
+  dynamic y;
+}
diff --git a/pkg/front_end/testcases/general/issue_49132.dart.weak.expect b/pkg/front_end/testcases/general/issue_49132.dart.weak.expect
new file mode 100644
index 0000000..71886ca
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart.weak.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  field dynamic y;
+  constructor foo1(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int, self::Foo::y = b as{ForNonNullableByDefault} core::int?, super core::Object::•()
+    ;
+  constructor foo2(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int, self::Foo::y = b is{ForNonNullableByDefault} core::int?, super core::Object::•()
+    ;
+  constructor foo3(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int?, self::Foo::y = b as{ForNonNullableByDefault} core::int, super core::Object::•()
+    ;
+  constructor foo4(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int?, self::Foo::y = b is{ForNonNullableByDefault} core::int, super core::Object::•()
+    ;
+  constructor bar1(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int, self::Foo::y = b as{ForNonNullableByDefault} core::int?, super core::Object::•() {}
+  constructor bar2(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int, self::Foo::y = b is{ForNonNullableByDefault} core::int?, super core::Object::•() {}
+  constructor bar3(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int?, self::Foo::y = b as{ForNonNullableByDefault} core::int, super core::Object::•() {}
+  constructor bar4(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int?, self::Foo::y = b is{ForNonNullableByDefault} core::int, super core::Object::•() {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue_49132.dart.weak.modular.expect
new file mode 100644
index 0000000..71886ca
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart.weak.modular.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  field dynamic y;
+  constructor foo1(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int, self::Foo::y = b as{ForNonNullableByDefault} core::int?, super core::Object::•()
+    ;
+  constructor foo2(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int, self::Foo::y = b is{ForNonNullableByDefault} core::int?, super core::Object::•()
+    ;
+  constructor foo3(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int?, self::Foo::y = b as{ForNonNullableByDefault} core::int, super core::Object::•()
+    ;
+  constructor foo4(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int?, self::Foo::y = b is{ForNonNullableByDefault} core::int, super core::Object::•()
+    ;
+  constructor bar1(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int, self::Foo::y = b as{ForNonNullableByDefault} core::int?, super core::Object::•() {}
+  constructor bar2(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int, self::Foo::y = b is{ForNonNullableByDefault} core::int?, super core::Object::•() {}
+  constructor bar3(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int?, self::Foo::y = b as{ForNonNullableByDefault} core::int, super core::Object::•() {}
+  constructor bar4(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int?, self::Foo::y = b is{ForNonNullableByDefault} core::int, super core::Object::•() {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_49132.dart.weak.outline.expect
new file mode 100644
index 0000000..091ce78
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart.weak.outline.expect
@@ -0,0 +1,24 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  field dynamic y;
+  constructor foo1(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor foo2(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor foo3(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor foo4(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor bar1(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor bar2(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor bar3(dynamic a, dynamic b) → self::Foo
+    ;
+  constructor bar4(dynamic a, dynamic b) → self::Foo
+    ;
+}
diff --git a/pkg/front_end/testcases/general/issue_49132.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_49132.dart.weak.transformed.expect
new file mode 100644
index 0000000..71886ca
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132.dart.weak.transformed.expect
@@ -0,0 +1,28 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  field dynamic y;
+  constructor foo1(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int, self::Foo::y = b as{ForNonNullableByDefault} core::int?, super core::Object::•()
+    ;
+  constructor foo2(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int, self::Foo::y = b is{ForNonNullableByDefault} core::int?, super core::Object::•()
+    ;
+  constructor foo3(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int?, self::Foo::y = b as{ForNonNullableByDefault} core::int, super core::Object::•()
+    ;
+  constructor foo4(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int?, self::Foo::y = b is{ForNonNullableByDefault} core::int, super core::Object::•()
+    ;
+  constructor bar1(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int, self::Foo::y = b as{ForNonNullableByDefault} core::int?, super core::Object::•() {}
+  constructor bar2(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int, self::Foo::y = b is{ForNonNullableByDefault} core::int?, super core::Object::•() {}
+  constructor bar3(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::int?, self::Foo::y = b as{ForNonNullableByDefault} core::int, super core::Object::•() {}
+  constructor bar4(dynamic a, dynamic b) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int?, self::Foo::y = b is{ForNonNullableByDefault} core::int, super core::Object::•() {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart
new file mode 100644
index 0000000..214f645
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Foo {
+  dynamic x;
+
+  Foo.foo1(dynamic a) : x = a is int ? {} : [] {
+    // body.
+  }
+
+  Foo.foo2(dynamic a) : x = a is int ? {"a": "b"} : ["a", "b"] {
+    // body.
+  }
+
+  Foo.foo3(dynamic a) : x = a as bool ? {} : [] {
+    // body.
+  }
+
+  Foo.foo4(dynamic a) : x = a as bool ? {"a": "b"} : ["a", "b"] {
+    // body.
+  }
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.textual_outline.expect
new file mode 100644
index 0000000..e703049
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+class Foo {
+  dynamic x;
+  Foo.foo1(dynamic a) : x = a is int ? {} : [] {}
+  Foo.foo2(dynamic a) : x = a is int ? {"a": "b"} : ["a", "b"] {}
+  Foo.foo3(dynamic a) : x = a as bool ? {} : [] {}
+  Foo.foo4(dynamic a) : x = a as bool ? {"a": "b"} : ["a", "b"] {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..370ba71
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.textual_outline_modelled.expect
@@ -0,0 +1,7 @@
+class Foo {
+  Foo.foo1(dynamic a) : x = a is int ? {} : [] {}
+  Foo.foo2(dynamic a) : x = a is int ? {"a": "b"} : ["a", "b"] {}
+  Foo.foo3(dynamic a) : x = a as bool ? {} : [] {}
+  Foo.foo4(dynamic a) : x = a as bool ? {"a": "b"} : ["a", "b"] {}
+  dynamic x;
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.expect b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.expect
new file mode 100644
index 0000000..21c18c3
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  constructor foo1(dynamic a) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int ?{core::Object} <dynamic, dynamic>{} : <dynamic>[], super core::Object::•() {}
+  constructor foo2(dynamic a) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int ?{core::Object} <core::String, core::String>{"a": "b"} : <core::String>["a", "b"], super core::Object::•() {}
+  constructor foo3(dynamic a) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::bool ?{core::Object} <dynamic, dynamic>{} : <dynamic>[], super core::Object::•() {}
+  constructor foo4(dynamic a) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::bool ?{core::Object} <core::String, core::String>{"a": "b"} : <core::String>["a", "b"], super core::Object::•() {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.modular.expect b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.modular.expect
new file mode 100644
index 0000000..21c18c3
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.modular.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  constructor foo1(dynamic a) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int ?{core::Object} <dynamic, dynamic>{} : <dynamic>[], super core::Object::•() {}
+  constructor foo2(dynamic a) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int ?{core::Object} <core::String, core::String>{"a": "b"} : <core::String>["a", "b"], super core::Object::•() {}
+  constructor foo3(dynamic a) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::bool ?{core::Object} <dynamic, dynamic>{} : <dynamic>[], super core::Object::•() {}
+  constructor foo4(dynamic a) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::bool ?{core::Object} <core::String, core::String>{"a": "b"} : <core::String>["a", "b"], super core::Object::•() {}
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.outline.expect
new file mode 100644
index 0000000..84415df
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.outline.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  constructor foo1(dynamic a) → self::Foo
+    ;
+  constructor foo2(dynamic a) → self::Foo
+    ;
+  constructor foo3(dynamic a) → self::Foo
+    ;
+  constructor foo4(dynamic a) → self::Foo
+    ;
+}
diff --git a/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.transformed.expect
new file mode 100644
index 0000000..3d5d727
--- /dev/null
+++ b/pkg/front_end/testcases/general/issue_49132_not_nullable.dart.weak.transformed.expect
@@ -0,0 +1,15 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  field dynamic x;
+  constructor foo1(dynamic a) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int ?{core::Object} <dynamic, dynamic>{} : core::_GrowableList::•<dynamic>(0), super core::Object::•() {}
+  constructor foo2(dynamic a) → self::Foo
+    : self::Foo::x = a is{ForNonNullableByDefault} core::int ?{core::Object} <core::String, core::String>{"a": "b"} : core::_GrowableList::_literal2<core::String>("a", "b"), super core::Object::•() {}
+  constructor foo3(dynamic a) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::bool ?{core::Object} <dynamic, dynamic>{} : core::_GrowableList::•<dynamic>(0), super core::Object::•() {}
+  constructor foo4(dynamic a) → self::Foo
+    : self::Foo::x = a as{ForNonNullableByDefault} core::bool ?{core::Object} <core::String, core::String>{"a": "b"} : core::_GrowableList::_literal2<core::String>("a", "b"), super core::Object::•() {}
+}
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync_star.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync_star.dart.weak.transformed.expect
index 90ecc1f..579df9a 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync_star.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync_star.dart.weak.transformed.expect
@@ -3,22 +3,8 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  () →* core::Iterable<Null>* f = () → core::Iterable<Null>* /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-      core::int* :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = null;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<Null>(:sync_op_gen);
+  () →* core::Iterable<Null>* f = () → core::Iterable<Null>* sync* {
+    yield null;
   };
   core::Iterable<dynamic>* y = f(){() →* core::Iterable<Null>*};
   core::Iterable<core::String*>* z = f(){() →* core::Iterable<Null>*};
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_sync_star.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_sync_star.dart.weak.transformed.expect
index 7bdb16ae..7132d44 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_sync_star.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_sync_star.dart.weak.transformed.expect
@@ -3,26 +3,9 @@
 import "dart:core" as core;
 
 static method test() → dynamic {
-  () →* core::Iterable<core::num*>* f = () → core::Iterable<core::num*>* /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-      core::int* :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = 1;
-            [yield] true;
-          }
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = core::_GrowableList::_literal2<core::num*>(3, 4.0);
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::num*>(:sync_op_gen);
+  () →* core::Iterable<core::num*>* f = () → core::Iterable<core::num*>* sync* {
+    yield 1;
+    yield* core::_GrowableList::_literal2<core::num*>(3, 4.0);
   };
   core::Iterable<core::num*>* g = f(){() →* core::Iterable<core::num*>*};
   core::Iterable<core::int*>* h = f(){() →* core::Iterable<core::num*>*} as{TypeError} core::Iterable<core::int*>*;
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 35e82c4..1f13874 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
@@ -97,42 +97,19 @@
                                                                ^" in core::_GrowableList::•<dynamic>(0) as{TypeError} asy::Stream<core::List<core::int*>*>*;
   yield* self::MyStream::•<core::List<core::int*>*>();
 }
-static method bar() → core::Iterable<core::Map<core::int*, core::int*>*>* /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-    core::int* :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = core::Map::•<core::int*, core::int*>();
-          [yield] true;
-        }
-        {
-          :iterator.{core::_SyncIterator::_current} = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:23:63: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'Map<int, int>'.
+static method bar() → core::Iterable<core::Map<core::int*, core::int*>*>* sync* {
+  yield core::Map::•<core::int*, core::int*>();
+  yield invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:23:63: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'Map<int, int>'.
  - 'List' is from 'dart:core'.
  - 'Map' is from 'dart:core'.
   yield /*error:YIELD_OF_INVALID_TYPE*/ /*@typeArgs=dynamic*/ [];
                                                               ^" in core::_GrowableList::•<dynamic>(0) as{TypeError} core::Map<core::int*, core::int*>*;
-          [yield] true;
-        }
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:24:79: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'Iterable<Map<int, int>>'.
+  yield* invalid-expression "pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart:24:79: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'Iterable<Map<int, int>>'.
  - 'Map' is from 'dart:core'.
  - 'Iterable' is from 'dart:core'.
   yield* /*error:YIELD_OF_INVALID_TYPE*/ new /*@ typeArgs=dynamic, dynamic */ Map();
                                                                               ^" in core::Map::•<dynamic, dynamic>() as{TypeError} core::Iterable<core::Map<core::int*, core::int*>*>*;
-          [yield] true;
-        }
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = core::_GrowableList::•<core::Map<core::int*, core::int*>*>(0);
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::Map<core::int*, core::int*>*>(:sync_op_gen);
+  yield* core::_GrowableList::•<core::Map<core::int*, core::int*>*>(0);
 }
 static method main() → dynamic {}
 
diff --git a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.weak.transformed.expect
index c0bf62a..9486b2b 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.weak.transformed.expect
@@ -14,22 +14,8 @@
   function f3() → asy::Future<core::int*>* async /* futureValueType= core::int* */ {
     return 42;
   }
-  function f4() → core::Iterable<core::int*>* /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-      core::int* :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = 42;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::int*>(:sync_op_gen);
+  function f4() → core::Iterable<core::int*>* sync* {
+    yield 42;
   }
   function f5() → asy::Stream<core::int*>* async* {
     yield 42;
diff --git a/pkg/front_end/testcases/inference/local_return_and_yield.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/local_return_and_yield.dart.weak.transformed.expect
index 24b6944..58cba14 100644
--- a/pkg/front_end/testcases/inference/local_return_and_yield.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/local_return_and_yield.dart.weak.transformed.expect
@@ -24,39 +24,11 @@
     return /*@ returnType=dynamic */ (/*@ type=dynamic */ x) => x;
                                      ^" in ((dynamic x) → dynamic => x) as{TypeError} FutureOr<(core::int*) →* core::int*>*;
   }
-  function c() → core::Iterable<(core::int*) →* core::int*>* /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-      core::int* :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = (core::int* x) → core::int* => x;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<(core::int*) →* core::int*>(:sync_op_gen);
+  function c() → core::Iterable<(core::int*) →* core::int*>* sync* {
+    yield(core::int* x) → core::int* => x;
   }
-  function d() → core::Iterable<(core::int*) →* core::int*>* /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-      core::int* :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = core::_GrowableList::_literal1<(core::int*) →* core::int*>((core::int* x) → core::int* => x);
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<(core::int*) →* core::int*>(:sync_op_gen);
+  function d() → core::Iterable<(core::int*) →* core::int*>* sync* {
+    yield* core::_GrowableList::_literal1<(core::int*) →* core::int*>((core::int* x) → core::int* => x);
   }
   function e() → asy::Stream<(core::int*) →* core::int*>* async* {
     yield(core::int* x) → core::int* => x;
diff --git a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.weak.transformed.expect b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.weak.transformed.expect
index b867e07..ab01829 100644
--- a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.weak.transformed.expect
@@ -23,39 +23,11 @@
   return /*@ returnType=dynamic */ (/*@ type=dynamic */ x) => x;
                                    ^" in ((dynamic x) → dynamic => x) as{TypeError} FutureOr<(core::int*) →* core::int*>*;
 }
-static method c() → core::Iterable<(core::int*) →* core::int*>* /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-    core::int* :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = (core::int* x) → core::int* => x;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<(core::int*) →* core::int*>(:sync_op_gen);
+static method c() → core::Iterable<(core::int*) →* core::int*>* sync* {
+  yield(core::int* x) → core::int* => x;
 }
-static method d() → core::Iterable<(core::int*) →* core::int*>* /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>*, dynamic, dynamic) →* core::bool* {
-    core::int* :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>* :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = core::_GrowableList::_literal1<(core::int*) →* core::int*>((core::int* x) → core::int* => x);
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<(core::int*) →* core::int*>(:sync_op_gen);
+static method d() → core::Iterable<(core::int*) →* core::int*>* sync* {
+  yield* core::_GrowableList::_literal1<(core::int*) →* core::int*>((core::int* x) → core::int* => x);
 }
 static method e() → asy::Stream<(core::int*) →* core::int*>* async* {
   yield(core::int* x) → core::int* => x;
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect
index 0ce9817..a8a9162 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.strong.transformed.expect
@@ -42,80 +42,24 @@
 
 static method getNull() → dynamic
   return null;
-static method getIterableNull() → core::Iterable<dynamic> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = null;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+static method getIterableNull() → core::Iterable<dynamic> sync* {
+  yield null;
 }
-static method getIterableBool() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = true;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+static method getIterableBool() → core::Iterable<core::bool> sync* {
+  yield true;
 }
-static method test1() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+static method test1() → core::Iterable<core::bool> sync* {
+  yield self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
 }
 static method test2() → core::Iterable<core::bool>
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
 static method test3() → core::bool
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-static method test4() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:21:10: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+static method test4() → core::Iterable<core::bool> sync* {
+  yield* invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:21:10: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   yield* getIterableNull(); // error
          ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
 }
 static method test5() → core::Iterable<core::bool>
   return invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
@@ -124,64 +68,22 @@
                           ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
 static method test6() → core::Iterable<core::bool>
   return self::getIterableBool();
-static method test7() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+static method test7() → core::Iterable<core::bool> sync* {
+  yield* self::getIterableBool();
 }
 static method test() → dynamic async /* futureValueType= dynamic */ {
-  function test1() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+  function test1() → core::Iterable<core::bool> sync* {
+    yield self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
   }
   function test2() → core::Iterable<core::bool>
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
   function test3() → core::bool
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-  function test4() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:38:12: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+  function test4() → core::Iterable<core::bool> sync* {
+    yield* invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:38:12: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
     yield* getIterableNull(); // error
            ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
   }
   function test5() → core::Iterable<core::bool>
     return invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
@@ -190,86 +92,30 @@
                             ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   function test6() → core::Iterable<core::bool>
     return self::getIterableBool();
-  function test7() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+  function test7() → core::Iterable<core::bool> sync* {
+    yield* self::getIterableBool();
   }
   core::Iterable<core::bool> var1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:49:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   })(); // error
-    ^" in (() → core::Iterable<dynamic> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = self::getNull();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+    ^" in (() → core::Iterable<dynamic> sync* {
+    yield self::getNull();
   })(){() → core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::Iterable<core::bool> var2 = (() → dynamic => self::getNull())(){() → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::bool var3 = (() → dynamic => self::getNull())(){() → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
   core::Iterable<core::bool> var4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:54:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   })(); // error
-    ^" in (() → core::Iterable<dynamic> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableNull();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+    ^" in (() → core::Iterable<dynamic> sync* {
+    yield* self::getIterableNull();
   })(){() → core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::Iterable<core::bool> var5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:55:50: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   Iterable<bool> var5 = (() => getIterableNull())(); // error
                                                  ^" in (() → core::Iterable<dynamic> => self::getIterableNull())(){() → core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::Iterable<core::bool> var6 = (() → core::Iterable<core::bool> => self::getIterableBool())(){() → core::Iterable<core::bool>};
-  core::Iterable<core::bool> var7 = (() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+  core::Iterable<core::bool> var7 = (() → core::Iterable<core::bool> sync* {
+    yield* self::getIterableBool();
   })(){() → core::Iterable<core::bool>};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect
index 0ce9817..a8a9162 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.weak.transformed.expect
@@ -42,80 +42,24 @@
 
 static method getNull() → dynamic
   return null;
-static method getIterableNull() → core::Iterable<dynamic> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = null;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+static method getIterableNull() → core::Iterable<dynamic> sync* {
+  yield null;
 }
-static method getIterableBool() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = true;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+static method getIterableBool() → core::Iterable<core::bool> sync* {
+  yield true;
 }
-static method test1() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_current} = self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+static method test1() → core::Iterable<core::bool> sync* {
+  yield self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
 }
 static method test2() → core::Iterable<core::bool>
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
 static method test3() → core::bool
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-static method test4() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:21:10: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+static method test4() → core::Iterable<core::bool> sync* {
+  yield* invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:21:10: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   yield* getIterableNull(); // error
          ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
 }
 static method test5() → core::Iterable<core::bool>
   return invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:24:27: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
@@ -124,64 +68,22 @@
                           ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
 static method test6() → core::Iterable<core::bool>
   return self::getIterableBool();
-static method test7() → core::Iterable<core::bool> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
-          [yield] true;
-        }
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+static method test7() → core::Iterable<core::bool> sync* {
+  yield* self::getIterableBool();
 }
 static method test() → dynamic async /* futureValueType= dynamic */ {
-  function test1() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+  function test1() → core::Iterable<core::bool> sync* {
+    yield self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
   }
   function test2() → core::Iterable<core::bool>
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
   function test3() → core::bool
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-  function test4() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:38:12: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
+  function test4() → core::Iterable<core::bool> sync* {
+    yield* invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:38:12: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
     yield* getIterableNull(); // error
            ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
   }
   function test5() → core::Iterable<core::bool>
     return invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:41:29: Error: A value of type 'Iterable<dynamic>' can't be returned from a function with return type 'Iterable<bool>'.
@@ -190,86 +92,30 @@
                             ^" in self::getIterableNull() as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   function test6() → core::Iterable<core::bool>
     return self::getIterableBool();
-  function test7() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+  function test7() → core::Iterable<core::bool> sync* {
+    yield* self::getIterableBool();
   }
   core::Iterable<core::bool> var1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:49:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   })(); // error
-    ^" in (() → core::Iterable<dynamic> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = self::getNull();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+    ^" in (() → core::Iterable<dynamic> sync* {
+    yield self::getNull();
   })(){() → core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::Iterable<core::bool> var2 = (() → dynamic => self::getNull())(){() → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::bool var3 = (() → dynamic => self::getNull())(){() → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
   core::Iterable<core::bool> var4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:54:5: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   })(); // error
-    ^" in (() → core::Iterable<dynamic> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableNull();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+    ^" in (() → core::Iterable<dynamic> sync* {
+    yield* self::getIterableNull();
   })(){() → core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::Iterable<core::bool> var5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437b.dart:55:50: Error: A value of type 'Iterable<dynamic>' can't be assigned to a variable of type 'Iterable<bool>'.
  - 'Iterable' is from 'dart:core'.
   Iterable<bool> var5 = (() => getIterableNull())(); // error
                                                  ^" in (() → core::Iterable<dynamic> => self::getIterableNull())(){() → core::Iterable<dynamic>} as{TypeError,ForNonNullableByDefault} core::Iterable<core::bool>;
   core::Iterable<core::bool> var6 = (() → core::Iterable<core::bool> => self::getIterableBool())(){() → core::Iterable<core::bool>};
-  core::Iterable<core::bool> var7 = (() → core::Iterable<core::bool> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_yieldEachIterable} = self::getIterableBool();
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<core::bool>(:sync_op_gen);
+  core::Iterable<core::bool> var7 = (() → core::Iterable<core::bool> sync* {
+    yield* self::getIterableBool();
   })(){() → core::Iterable<core::bool>};
 }
 static method main() → dynamic {}
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 1415bf4..961fd5b 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
@@ -104,18 +104,7 @@
   return null;
 }
 static method returnAsync7() → asy::Future<core::int?> async /* futureValueType= core::int? */ {}
-static method yieldSync() → core::Iterable<dynamic> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {}
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
-}
+static method yieldSync() → core::Iterable<dynamic> sync* {}
 static method yieldAsync() → asy::Stream<dynamic> async* {}
 static method caseReturn1(self::Enum e) → self::Enum {
   switch(e) /*isExplicitlyExhaustive*/ {
@@ -184,18 +173,7 @@
     return null;
   }
   function returnAsync7() → asy::Future<core::int?> async /* futureValueType= core::int? */ {}
-  function yieldSync() → core::Iterable<dynamic> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {}
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
-  }
+  function yieldSync() → core::Iterable<dynamic> sync* {}
   function yieldAsync() → asy::Stream<dynamic> async* {}
   function caseReturn1(self::Enum e) → self::Enum {
     switch(e) /*isExplicitlyExhaustive*/ {
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 c823636..f2e3ba6 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
@@ -105,18 +105,7 @@
   return null;
 }
 static method returnAsync7() → asy::Future<core::int?> async /* futureValueType= core::int? */ {}
-static method yieldSync() → core::Iterable<dynamic> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {}
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
-}
+static method yieldSync() → core::Iterable<dynamic> sync* {}
 static method yieldAsync() → asy::Stream<dynamic> async* {}
 static method caseReturn1(self::Enum e) → self::Enum {
   switch(e) /*isExplicitlyExhaustive*/ {
@@ -188,18 +177,7 @@
     return null;
   }
   function returnAsync7() → asy::Future<core::int?> async /* futureValueType= core::int? */ {}
-  function yieldSync() → core::Iterable<dynamic> /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {}
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
-  }
+  function yieldSync() → core::Iterable<dynamic> sync* {}
   function yieldAsync() → asy::Stream<dynamic> async* {}
   function caseReturn1(self::Enum e) → self::Enum {
     switch(e) /*isExplicitlyExhaustive*/ {
diff --git a/pkg/front_end/testcases/regress/issue_29983.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_29983.dart.weak.transformed.expect
index 692911f..a23c69e 100644
--- a/pkg/front_end/testcases/regress/issue_29983.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29983.dart.weak.transformed.expect
@@ -21,48 +21,16 @@
 import self as self;
 import "dart:core" as core;
 
-static method f() → dynamic /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        invalid-expression "pkg/front_end/testcases/regress/issue_29983.dart:7:3: Error: 'sync*' and 'async*' can't return a value.
+static method f() → dynamic sync* {
+  invalid-expression "pkg/front_end/testcases/regress/issue_29983.dart:7:3: Error: 'sync*' and 'async*' can't return a value.
   return missing;
   ^";
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
 }
-static method g() → dynamic /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      invalid-expression "pkg/front_end/testcases/regress/issue_29983.dart:11:14: Error: 'sync*' and 'async*' can't return a value.
+static method g() → dynamic sync* 
+  invalid-expression "pkg/front_end/testcases/regress/issue_29983.dart:11:14: Error: 'sync*' and 'async*' can't return a value.
 g() sync* => dummy;
              ^";
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
-}
-static method h() → dynamic /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        (() → core::String => "return")(){() → core::String};
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+static method h() → dynamic sync* {
+  (() → core::String => "return")(){() → core::String};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_37681.dart.weak.transformed.expect b/pkg/front_end/testcases/regress/issue_37681.dart.weak.transformed.expect
index e18b48b..e34a210 100644
--- a/pkg/front_end/testcases/regress/issue_37681.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_37681.dart.weak.transformed.expect
@@ -40,22 +40,8 @@
       if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription<dynamic>?} == null))
         await :for-iterator.{asy::_StreamIterator::cancel}(){() → asy::Future<dynamic>};
   }
-  function f_sync_star() → core::int /* originally sync* */ {
-    function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-      core::int :await_jump_var = 0;
-      dynamic :await_ctx_var;
-      function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-        {
-          {
-            :iterator.{core::_SyncIterator::_current} = 42;
-            [yield] true;
-          }
-        }
-        return false;
-      }
-      return :sync_op;
-    }
-    return new core::_SyncIterable::•<dynamic>(:sync_op_gen);
+  function f_sync_star() → core::int sync* {
+    yield 42;
   }
   {
     core::Iterator<dynamic> :sync-for-iterator = ((f_sync_star(){() → core::int} as{ForNonNullableByDefault} dynamic) as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}{core::Iterator<dynamic>};
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index fb51b79..2005fb1 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -14,7 +14,6 @@
 static_field_lowering/opt_in: SemiFuzzFailure
 
 dart2js/mixin_super/main: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49339
-dartdevc/static_interop_erasure/main: SemiFuzzCrash # https://github.com/dart-lang/sdk/issues/49301
 
 const_functions/const_functions_list: SemiFuzzCrash
 generic_metadata/typedef_generic_types_in_arguments_and_bounds: SemiFuzzCrash
diff --git a/pkg/frontend_server/lib/compute_kernel.dart b/pkg/frontend_server/lib/compute_kernel.dart
index d9334e3..24a0fa4 100644
--- a/pkg/frontend_server/lib/compute_kernel.dart
+++ b/pkg/frontend_server/lib/compute_kernel.dart
@@ -397,7 +397,9 @@
         incrementalComponent.setMainMethodAndMode(
             null, true, incrementalComponent.mode);
         target.performOutlineTransformations(
-            incrementalComponent, incrementalCompilerResult.coreTypes!);
+            incrementalComponent,
+            incrementalCompilerResult.coreTypes!,
+            incrementalCompilerResult.referenceFromIndex);
         makeStable(incrementalComponent);
         return Future.value(fe.serializeComponent(incrementalComponent,
             includeSources: false, includeOffsets: false));
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index ced147d..c466238 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -318,8 +318,8 @@
   /// transformation is not applied when compiling full kernel programs to
   /// prevent affecting the internal invariants of the compiler and accidentally
   /// slowing down compilation.
-  void performOutlineTransformations(
-      Component component, CoreTypes coreTypes) {}
+  void performOutlineTransformations(Component component, CoreTypes coreTypes,
+      ReferenceFromIndex? referenceFromIndex) {}
 
   /// Perform target-specific transformations on the given libraries that must
   /// run before constant evaluation.
@@ -553,6 +553,7 @@
   Class? concreteStringLiteralClass(CoreTypes coreTypes, String value) => null;
 
   Class? concreteAsyncResultClass(CoreTypes coreTypes) => null;
+  Class? concreteSyncStarResultClass(CoreTypes coreTypes) => null;
 
   ConstantsBackend get constantsBackend;
 
@@ -1011,8 +1012,10 @@
   }
 
   @override
-  void performOutlineTransformations(Component component, CoreTypes coreTypes) {
-    _target.performOutlineTransformations(component, coreTypes);
+  void performOutlineTransformations(Component component, CoreTypes coreTypes,
+      ReferenceFromIndex? referenceFromIndex) {
+    _target.performOutlineTransformations(
+        component, coreTypes, referenceFromIndex);
   }
 
   @override
@@ -1077,8 +1080,10 @@
   bool get excludeNonSources;
 
   @override
-  void performOutlineTransformations(Component component, CoreTypes coreTypes) {
-    super.performOutlineTransformations(component, coreTypes);
+  void performOutlineTransformations(Component component, CoreTypes coreTypes,
+      ReferenceFromIndex? referenceFromIndex) {
+    super.performOutlineTransformations(
+        component, coreTypes, referenceFromIndex);
     if (!excludeNonSources) return;
 
     List<Library> libraries = new List.of(component.libraries);
diff --git a/pkg/test_runner/lib/src/test_case.dart b/pkg/test_runner/lib/src/test_case.dart
index 66522b5..4409754 100644
--- a/pkg/test_runner/lib/src/test_case.dart
+++ b/pkg/test_runner/lib/src/test_case.dart
@@ -320,10 +320,9 @@
                 diagnostics.add("Unable to capture stack traces: $error");
               }
             }
-
-            if (!process.kill()) {
-              diagnostics.add("Unable to kill ${process.pid}");
-            }
+          }
+          if (!process.kill()) {
+            diagnostics.add("Unable to kill ${process.pid}");
           }
           return 1;
         }
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index ed2255b..ef6b991 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -192,7 +192,7 @@
     Uri? packagesUri = null;
     final packageConfig = this.packageConfig ?? Platform.packageConfig;
     if (packageConfig != null) {
-      packagesUri = Uri.parse(packageConfig);
+      packagesUri = resolveInputUri(packageConfig);
     }
 
     if (verbose) {
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 8a380dc..6e70384 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -510,7 +510,7 @@
   // it does it will need the obfuscation prohibitions.
   obfuscationProhibitions.transformComponent(component, coreTypes, target);
 
-  deferred_loading.transformComponent(component);
+  deferred_loading.transformComponent(component, coreTypes, target);
 }
 
 /// Runs given [action] with [CompilerContext]. This is needed to
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 7efa5d9..a74b718 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -41,6 +41,7 @@
   Class? _twoByteString;
   Class? _smi;
   Class? _double; // _Double, not double.
+  Class? _syncStarIterable;
 
   VmTarget(this.flags);
 
@@ -208,7 +209,7 @@
     bool productMode = environmentDefines!["dart.vm.product"] == "true";
     transformAsync.transformProcedure(
         new TypeEnvironment(coreTypes, hierarchy), procedure,
-        productMode: productMode, desugarAsync: flags.supportMirrors);
+        productMode: productMode, desugarAsync: !flags.compactAsync);
     logger?.call("Transformed async functions");
 
     lowering.transformProcedure(
@@ -501,6 +502,12 @@
       coreTypes.futureImplClass;
 
   @override
+  Class? concreteSyncStarResultClass(CoreTypes coreTypes) {
+    return _syncStarIterable ??=
+        coreTypes.index.getClass('dart:async', '_SyncStarIterable');
+  }
+
+  @override
   ConstantsBackend get constantsBackend => const ConstantsBackend();
 
   @override
diff --git a/pkg/vm/lib/transformations/continuation.dart b/pkg/vm/lib/transformations/continuation.dart
index adba50a..9241252 100644
--- a/pkg/vm/lib/transformations/continuation.dart
+++ b/pkg/vm/lib/transformations/continuation.dart
@@ -143,9 +143,15 @@
             helper, staticTypeContext, desugarAsync));
         return node;
       case AsyncMarker.SyncStar:
-        return new SyncStarFunctionRewriter(
-                helper, node, staticTypeContext, desugarAsync)
-            .rewrite();
+        if (desugarAsync) {
+          return new SyncStarFunctionRewriter(
+                  helper, node, staticTypeContext, desugarAsync)
+              .rewrite();
+        } else {
+          node.transformOrRemoveChildren(new RecursiveContinuationRewriter(
+              helper, staticTypeContext, desugarAsync));
+          return node;
+        }
       case AsyncMarker.Async:
         if (desugarAsync) {
           return new AsyncFunctionRewriter(
diff --git a/pkg/vm/lib/transformations/deferred_loading.dart b/pkg/vm/lib/transformations/deferred_loading.dart
index e581096..2280c37 100644
--- a/pkg/vm/lib/transformations/deferred_loading.dart
+++ b/pkg/vm/lib/transformations/deferred_loading.dart
@@ -5,8 +5,12 @@
 library vm.transformations.deferred_loading;
 
 import 'package:kernel/ast.dart';
+import 'package:kernel/core_types.dart' show CoreTypes;
+import 'package:kernel/target/targets.dart' show Target;
+
 import '../dominators.dart';
 import '../metadata/loading_units.dart';
+import 'pragma.dart';
 
 class _LoadingUnitBuilder {
   late int id;
@@ -37,7 +41,42 @@
   String toString() => "_LibraryVertex(${library.importUri})";
 }
 
-List<LoadingUnit> computeLoadingUnits(Component component) {
+class HasEntryPointVisitor extends RecursiveVisitor {
+  final PragmaAnnotationParser parser;
+  bool _hasEntryPoint = false;
+
+  HasEntryPointVisitor(this.parser);
+
+  visitAnnotations(List<Expression> annotations) {
+    for (var ann in annotations) {
+      ParsedPragma? pragma = parser.parsePragma(ann);
+      if (pragma is ParsedEntryPointPragma) {
+        _hasEntryPoint = true;
+        return;
+      }
+    }
+  }
+
+  @override
+  visitClass(Class klass) {
+    visitAnnotations(klass.annotations);
+    klass.visitChildren(this);
+  }
+
+  @override
+  defaultMember(Member node) {
+    visitAnnotations(node.annotations);
+  }
+
+  bool hasEntryPoint(Library lib) {
+    _hasEntryPoint = false;
+    visitLibrary(lib);
+    return _hasEntryPoint;
+  }
+}
+
+List<LoadingUnit> computeLoadingUnits(
+    Component component, HasEntryPointVisitor visitor) {
   // 1. Build the dominator tree for the library import graph.
   final map = <Library, _LibraryVertex>{};
   for (final lib in component.libraries) {
@@ -51,10 +90,15 @@
   }
   final root = map[component.mainMethod!.enclosingLibrary]!;
 
-  // Fake imports from root library to every core library so they end up in
-  // the same loading unit attributed to the user's root library.
+  // Fake imports from root library to every core library or library containing
+  // an entry point pragma so that they end up in the same loading unit
+  // attributed to the user's root library.
   for (final vertex in map.values) {
-    if (vertex.library.importUri.isScheme("dart")) {
+    if (vertex == root) {
+      continue;
+    }
+    if (vertex.library.importUri.isScheme("dart") ||
+        visitor.hasEntryPoint(vertex.library)) {
       root.successors.add(vertex);
       vertex.isLoadingRoot = false;
     }
@@ -127,8 +171,12 @@
   return loadingUnits.map((u) => u.asLoadingUnit()).toList();
 }
 
-Component transformComponent(Component component) {
-  final metadata = new LoadingUnitsMetadata(computeLoadingUnits(component));
+Component transformComponent(
+    Component component, CoreTypes coreTypes, Target target) {
+  final parser = ConstantPragmaAnnotationParser(coreTypes, target);
+  final visitor = HasEntryPointVisitor(parser);
+  final metadata =
+      new LoadingUnitsMetadata(computeLoadingUnits(component, visitor));
   final repo = new LoadingUnitsMetadataRepository();
   component.addMetadataRepository(repo);
   repo.mapping[component] = metadata;
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index b061cb1b..6bd2768 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -788,10 +788,19 @@
               : _typesBuilder.fromStaticType(function.returnType, false);
           break;
         case AsyncMarker.AsyncStar:
-        case AsyncMarker.SyncStar:
           _summary.result =
               _typesBuilder.fromStaticType(function.returnType, false);
           break;
+        case AsyncMarker.SyncStar:
+          final Class? concreteClass =
+              target.concreteSyncStarResultClass(_environment.coreTypes);
+          _summary.result = (concreteClass != null)
+              ? _entryPointsListener
+                  .addAllocatedClass(concreteClass)
+                  .cls
+                  .concreteType
+              : _typesBuilder.fromStaticType(function.returnType, false);
+          break;
         default:
           _summary.result = _returnValue!;
       }
diff --git a/pkg/vm/test/kernel_service_test.dart b/pkg/vm/test/kernel_service_test.dart
new file mode 100644
index 0000000..aabc109
--- /dev/null
+++ b/pkg/vm/test/kernel_service_test.dart
@@ -0,0 +1,175 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. 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' show utf8;
+import 'dart:isolate' show RawReceivePort, ReceivePort, SendPort;
+
+import "../bin/kernel_service.dart" as kernel_service;
+
+import 'package:front_end/src/api_unstable/vm.dart' show Verbosity;
+
+final bool verbose = new bool.fromEnvironment('TEST_VERBOSE');
+
+Future<void> main() async {
+  kernel_service.Status result;
+
+  // Expect to work with both absolute and relative package specification
+  // if the file specified exists and is valid.
+  result = await singleShotCompile(
+      relativeEntry, fooSourceFiles, absolutePackageConfig);
+  expect(result, kernel_service.Status.ok);
+  result = await singleShotCompile(
+      relativeEntry, fooSourceFiles, relativePackageConfig);
+  expect(result, kernel_service.Status.ok);
+
+  // Expect an error with both absolute and relative package specification
+  // if the file specified does not exist.
+  result = await singleShotCompile(
+      relativeEntry, fooSourceFiles, nonExistentAbsolutePackageConfig);
+  expect(result, kernel_service.Status.error);
+  result = await singleShotCompile(
+      relativeEntry, fooSourceFiles, nonExistentRelativePackageConfig);
+  expect(result, kernel_service.Status.error);
+
+  // Expect an error with both absolute and relative package specification
+  // if the file specified does exist but is invalid.
+  result = await singleShotCompile(
+      relativeEntry, fooSourceFiles, invalidAbsolutePackageConfig);
+  expect(result, kernel_service.Status.error);
+  result = await singleShotCompile(
+      relativeEntry, fooSourceFiles, invalidRelativePackageConfig);
+  expect(result, kernel_service.Status.error);
+}
+
+void expect(kernel_service.Status actual, kernel_service.Status expected) {
+  if (actual != expected) {
+    throw "Got $actual but expected $expected";
+  }
+}
+
+String relativeEntry = "entry.dart";
+
+String relativePackageConfig = "packageConfig.json";
+String absolutePackageConfig = Uri.base.resolve(relativePackageConfig).path;
+
+String nonExistentRelativePackageConfig = "nonexisting.json";
+String nonExistentAbsolutePackageConfig =
+    Uri.base.resolve(nonExistentRelativePackageConfig).path;
+
+String invalidRelativePackageConfig = "invalidPackageConfig.json";
+String invalidAbsolutePackageConfig =
+    Uri.base.resolve(invalidRelativePackageConfig).path;
+
+List fooSourceFiles = [
+  Uri.base.resolve(relativeEntry).path,
+  utf8.encode("""
+        import "package:foo/bar.dart";
+        main() {
+          bar();
+        }
+      """),
+  Uri.base.resolve("foo/lib/bar.dart").path,
+  utf8.encode("""
+        bar() {
+          print("Hello from bar!");
+        }
+      """),
+  absolutePackageConfig,
+  utf8.encode("""
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": "foo/",
+              "packageUri": "lib/"
+            }
+          ]
+        }
+      """),
+  invalidAbsolutePackageConfig,
+  utf8.encode(/* missing comma after rootUri line*/ """
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": "foo/"
+              "packageUri": "lib/"
+            }
+          ]
+        }
+      """),
+];
+
+Future<kernel_service.Status> singleShotCompile(
+    String entryFile, List sourceFiles, String? packageConfig) async {
+  final RawReceivePort kernelServicePort = kernel_service.main();
+  final SendPort sendPort = kernelServicePort.sendPort;
+  final ReceivePort myReceivePort = new ReceivePort();
+
+  sendPort.send([
+    /* [0] = int = tag = */ kernel_service.kCompileTag,
+    /* [1] = SendPort = sendport = */ myReceivePort.sendPort,
+    /* [2] = String? = inputFileUri = */ entryFile,
+    /* [3] = various = platformKernel = */ null,
+    /* [4] = bool = incremental = */ false,
+    /* [5] = bool = snapshot = */ false,
+    /* [6] = int = nullSafety = */ kernel_service.kNullSafetyOptionStrong,
+    /* [7] = int = isolateGroupId = */ 42,
+    /* [8] = List = sourceFiles = */ sourceFiles,
+    /* [9] = bool = enableAsserts = */ true,
+    /* [10] = List<String>? = experimentalFlags = */ [],
+    /* [11] = String? = packageConfig = */ packageConfig,
+    /* [12] = String? = multirootFilepaths = */ null,
+    /* [13] = String? = multirootScheme = */ null,
+    /* [14] = String? = workingDirectory = */ null,
+    /* [15] = String = verbosityLevel = */ Verbosity.all.name,
+    /* [16] = bool = enableMirrors = */ false,
+  ]);
+
+  // Wait for kernel-service response.
+  final StreamIterator streamIterator = new StreamIterator(myReceivePort);
+  await streamIterator.moveNext();
+
+  // Close ports so we can return below.
+  kernelServicePort.close();
+  myReceivePort.close();
+
+  // Examine kernel-service response.
+  final List m = streamIterator.current as List;
+  final int status = m.first;
+  if (status == kernel_service.Status.ok.index) {
+    expectLength(m, 2);
+    final List<int> bytes = m[1];
+    if (verbose) {
+      print("OK --- ${bytes.length} bytes dill");
+    }
+    return kernel_service.Status.ok;
+  } else if (status == kernel_service.Status.error.index) {
+    expectLength(m, 3);
+    final String errors = m[1];
+    final List<int> bytes = m[2];
+    if (verbose) {
+      print("Compiled with errors --- $errors and ${bytes.length} bytes dill");
+    }
+    return kernel_service.Status.error;
+  } else if (status == kernel_service.Status.crash.index) {
+    expectLength(m, 2);
+    final String errors = m[1];
+    if (verbose) {
+      print("Compiler crashed --- $errors");
+    }
+    return kernel_service.Status.crash;
+  } else {
+    throw "Unknow status: $m";
+  }
+}
+
+void expectLength(List list, int expectedLength) {
+  if (list.length != expectedLength) {
+    throw "Expected $expectedLength entries, got ${list.length}: $list";
+  }
+}
diff --git a/pkg/vm/test/transformations/deferred_loading_test.dart b/pkg/vm/test/transformations/deferred_loading_test.dart
index 5b7cce8..61a2534 100644
--- a/pkg/vm/test/transformations/deferred_loading_test.dart
+++ b/pkg/vm/test/transformations/deferred_loading_test.dart
@@ -6,6 +6,7 @@
 
 import 'package:kernel/target/targets.dart';
 import 'package:kernel/ast.dart';
+import 'package:kernel/core_types.dart';
 import 'package:kernel/kernel.dart';
 import 'package:test/test.dart';
 import 'package:vm/transformations/deferred_loading.dart'
@@ -24,7 +25,9 @@
   final reversed = component.libraries.reversed.toList();
   component.libraries.setAll(0, reversed);
 
-  component = transformComponent(component);
+  final coreTypes = CoreTypes(component);
+
+  component = transformComponent(component, coreTypes, target);
 
   // Remove core libraries so the expected output isn't enormous and broken by
   // core libraries changes.
diff --git a/pkg/vm/testcases/transformations/ffi/finalizable_sync_star.dart.expect b/pkg/vm/testcases/transformations/ffi/finalizable_sync_star.dart.expect
index fc74d17..aad0076 100644
--- a/pkg/vm/testcases/transformations/ffi/finalizable_sync_star.dart.expect
+++ b/pkg/vm/testcases/transformations/ffi/finalizable_sync_star.dart.expect
@@ -13,48 +13,27 @@
 }
 static method doSomething() → core::int
   return 3;
-static method useFinalizableSyncStar(ffi::Finalizable finalizable) → core::Iterable<core::int> /* originally sync* */ {
-  function :sync_op_gen() → (core::_SyncIterator<dynamic>?, dynamic, dynamic) → core::bool* {
-    core::int :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    ffi::Finalizable finalizable = finalizable;
-    function :sync_op(core::_SyncIterator<dynamic>? :iterator, dynamic :exception, dynamic :stack_trace) → core::bool* yielding {
-      {
-        {
-          [@vm.call-site-attributes.metadata=receiverType:dart.core::_SyncIterator<dynamic>?] :iterator.{core::_SyncIterator::_current} = block {
-            final core::int :expressionValueWrappedFinalizable = self::doSomething();
-            _in::reachabilityFence(finalizable);
-          } =>:expressionValueWrappedFinalizable;
-          [yield] true;
-        }
-        final self::MyFinalizable finalizable2 = new self::MyFinalizable::•();
-        {
-          [@vm.call-site-attributes.metadata=receiverType:dart.core::_SyncIterator<dynamic>?] :iterator.{core::_SyncIterator::_current} = block {
-            final core::int :expressionValueWrappedFinalizable = 5;
-            _in::reachabilityFence(finalizable);
-            _in::reachabilityFence(finalizable2);
-          } =>:expressionValueWrappedFinalizable;
-          [yield] true;
-        }
-        final self::MyFinalizable finalizable3 = new self::MyFinalizable::•();
-        {
-          [@vm.call-site-attributes.metadata=receiverType:dart.core::_SyncIterator<dynamic>?] :iterator.{core::_SyncIterator::_current} = block {
-            final core::int :expressionValueWrappedFinalizable = 10;
-            _in::reachabilityFence(finalizable);
-            _in::reachabilityFence(finalizable2);
-            _in::reachabilityFence(finalizable3);
-          } =>:expressionValueWrappedFinalizable;
-          [yield] true;
-        }
-        _in::reachabilityFence(finalizable2);
-        _in::reachabilityFence(finalizable3);
-        _in::reachabilityFence(finalizable);
-      }
-      return false;
-    }
-    return :sync_op;
-  }
-  return new core::_SyncIterable::•<core::int>(:sync_op_gen);
+static method useFinalizableSyncStar(ffi::Finalizable finalizable) → core::Iterable<core::int> sync* {
+  yield block {
+    final core::int :expressionValueWrappedFinalizable = self::doSomething();
+    _in::reachabilityFence(finalizable);
+  } =>:expressionValueWrappedFinalizable;
+  final self::MyFinalizable finalizable2 = new self::MyFinalizable::•();
+  yield block {
+    final core::int :expressionValueWrappedFinalizable = 5;
+    _in::reachabilityFence(finalizable);
+    _in::reachabilityFence(finalizable2);
+  } =>:expressionValueWrappedFinalizable;
+  final self::MyFinalizable finalizable3 = new self::MyFinalizable::•();
+  yield block {
+    final core::int :expressionValueWrappedFinalizable = 10;
+    _in::reachabilityFence(finalizable);
+    _in::reachabilityFence(finalizable2);
+    _in::reachabilityFence(finalizable3);
+  } =>:expressionValueWrappedFinalizable;
+  _in::reachabilityFence(finalizable2);
+  _in::reachabilityFence(finalizable3);
+  _in::reachabilityFence(finalizable);
 }
 static method main() → void {
   final self::MyFinalizable finalizable = new self::MyFinalizable::•();
diff --git a/runtime/bin/ffi_test/ffi_test_functions.cc b/runtime/bin/ffi_test/ffi_test_functions.cc
index 1545f8e..1b810c2 100644
--- a/runtime/bin/ffi_test/ffi_test_functions.cc
+++ b/runtime/bin/ffi_test/ffi_test_functions.cc
@@ -574,7 +574,6 @@
 // Returns a closure.
 // Note this closure is not properly marked as DART_EXPORT or extern "C".
 // Used for testing passing a pointer to a closure to Dart.
-// TODO(dacoharkes): is this a supported use case?
 DART_EXPORT IntptrBinOp IntptrAdditionClosure() {
   std::cout << "IntptrAdditionClosure()\n";
   IntptrBinOp retval = [](intptr_t a, intptr_t b) { return a + b; };
diff --git a/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart b/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart
index 16ee4c9..c89d729 100644
--- a/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart
+++ b/runtime/observatory/tests/service/step_through_for_each_sync_star_2_test.dart
@@ -36,7 +36,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 10}:11", // on '+' in 'x + y'
   "$file:${LINE + 10}:3", // on yield
 
@@ -45,7 +44,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 11}:1", // on ending '}' of 'generator'
 
   "$file:${LINE + 4}:1", // on ending '}' of 'code''
diff --git a/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart b/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart
index 676c5e0..af127dd 100644
--- a/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart
+++ b/runtime/observatory/tests/service/step_through_for_each_sync_star_test.dart
@@ -37,7 +37,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 10}:13", // on '+' in 'z = x + y'
   "$file:${LINE + 11}:3", // on yield
 
@@ -46,7 +45,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 12}:1", // on ending '}' of 'generator'
 
   "$file:${LINE + 4}:1", // on ending '}' of 'code''
diff --git a/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_2_test.dart b/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_2_test.dart
index 16ee4c9..c89d729 100644
--- a/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_2_test.dart
+++ b/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_2_test.dart
@@ -36,7 +36,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 10}:11", // on '+' in 'x + y'
   "$file:${LINE + 10}:3", // on yield
 
@@ -45,7 +44,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 11}:1", // on ending '}' of 'generator'
 
   "$file:${LINE + 4}:1", // on ending '}' of 'code''
diff --git a/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_test.dart b/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_test.dart
index 676c5e0..af127dd 100644
--- a/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_test.dart
+++ b/runtime/observatory_2/tests/service_2/step_through_for_each_sync_star_test.dart
@@ -37,7 +37,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 10}:13", // on '+' in 'z = x + y'
   "$file:${LINE + 11}:3", // on yield
 
@@ -46,7 +45,6 @@
   "$file:${LINE + 2}:5", // on 'print'
   "$file:${LINE + 1}:25", // on 'generator' (in 'for' line)
 
-  "$file:${LINE + 6}:10", // after 'generator' (definition line)
   "$file:${LINE + 12}:1", // on ending '}' of 'generator'
 
   "$file:${LINE + 4}:1", // on ending '}' of 'code''
diff --git a/runtime/tools/ffi/sdk_lib_ffi_generator.dart b/runtime/tools/ffi/sdk_lib_ffi_generator.dart
index 64b985a..d0f2873 100644
--- a/runtime/tools/ffi/sdk_lib_ffi_generator.dart
+++ b/runtime/tools/ffi/sdk_lib_ffi_generator.dart
@@ -319,9 +319,7 @@
 }
 
 Uri dartPath() {
-  // TODO(dacoharkes): Use "../../../tools/sdks/dart-sdk/bin/dart" when the
-  // pinned fully supports extension methods.
-  return Uri.parse("dart");
+  return Platform.script.resolve("../../../tools/sdks/dart-sdk/bin/dart");
 }
 
 class Config {
diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc
index c5523fb..67d6ca8 100644
--- a/runtime/vm/app_snapshot.cc
+++ b/runtime/vm/app_snapshot.cc
@@ -6916,10 +6916,8 @@
 
   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);
+    FATAL("Missing loading unit assignment: %s\n",
+          Object::Handle(obj).ToCString());
   }
   return unit_id == LoadingUnit::kRootId || unit_id == current_loading_unit_id_;
 }
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index b94cc03..4dba074 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -2715,11 +2715,21 @@
                                 Register dst,
                                 Register size,
                                 Register temp) {
-  RELEASE_ASSERT(src == ESI);
-  RELEASE_ASSERT(dst == EDI);
-  RELEASE_ASSERT(size == ECX);
-  shrl(size, Immediate(target::kWordSizeLog2));
-  rep_movsd();
+  // This loop is equivalent to
+  //   shrl(size, Immediate(target::kWordSizeLog2));
+  //   rep_movsd();
+  // but shows better performance on certain micro-benchmarks.
+  Label loop, done;
+  cmpl(size, Immediate(0));
+  j(EQUAL, &done, kNearJump);
+  Bind(&loop);
+  movl(temp, Address(src, 0));
+  addl(src, Immediate(target::kWordSize));
+  movl(Address(dst, 0), temp);
+  addl(dst, Immediate(target::kWordSize));
+  subl(size, Immediate(target::kWordSize));
+  j(NOT_ZERO, &loop, kNearJump);
+  Bind(&done);
 }
 
 void Assembler::PushCodeObject() {
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index 2d3ebb0..8cd8bf6 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -2306,11 +2306,21 @@
                                 Register dst,
                                 Register size,
                                 Register temp) {
-  RELEASE_ASSERT(src == RSI);
-  RELEASE_ASSERT(dst == RDI);
-  RELEASE_ASSERT(size == RCX);
-  shrq(size, Immediate(target::kWordSizeLog2));
-  rep_movsq();
+  // This loop is equivalent to
+  //   shrq(size, Immediate(target::kWordSizeLog2));
+  //   rep_movsq()
+  // but shows better performance on certain micro-benchmarks.
+  Label loop, done;
+  cmpq(size, Immediate(0));
+  j(EQUAL, &done, kNearJump);
+  Bind(&loop);
+  movq(temp, Address(src, 0));
+  addq(src, Immediate(target::kWordSize));
+  movq(Address(dst, 0), temp);
+  addq(dst, Immediate(target::kWordSize));
+  subq(size, Immediate(target::kWordSize));
+  j(NOT_ZERO, &loop, kNearJump);
+  Bind(&done);
 }
 
 void Assembler::GenerateUnRelocatedPcRelativeCall(intptr_t offset_into_target) {
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 58a3f56..ae1740f 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -6850,6 +6850,10 @@
     return Code::ZoneHandle(
         compiler->zone(),
         compiler->isolate_group()->object_store()->return_async_star_stub());
+  } else if (function.IsCompactSyncStarFunction()) {
+    return Code::ZoneHandle(
+        compiler->zone(),
+        compiler->isolate_group()->object_store()->return_sync_star_stub());
   } else {
     UNREACHABLE();
   }
@@ -7293,8 +7297,13 @@
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
   switch (stub_id_) {
+    case StubId::kCloneSuspendState:
+      locs->set_in(
+          0, Location::RegisterLocation(CloneSuspendStateStubABI::kSourceReg));
+      break;
     case StubId::kInitAsync:
     case StubId::kInitAsyncStar:
+    case StubId::kInitSyncStar:
       locs->set_in(0, Location::RegisterLocation(
                           InitSuspendableFunctionStubABI::kTypeArgsReg));
       break;
@@ -7307,12 +7316,18 @@
   ObjectStore* object_store = compiler->isolate_group()->object_store();
   Code& stub = Code::ZoneHandle(compiler->zone());
   switch (stub_id_) {
+    case StubId::kCloneSuspendState:
+      stub = object_store->clone_suspend_state_stub();
+      break;
     case StubId::kInitAsync:
       stub = object_store->init_async_stub();
       break;
     case StubId::kInitAsyncStar:
       stub = object_store->init_async_star_stub();
       break;
+    case StubId::kInitSyncStar:
+      stub = object_store->init_sync_star_stub();
+      break;
   }
   compiler->GenerateStubCall(source(), stub, UntaggedPcDescriptors::kOther,
                              locs(), deopt_id(), env());
@@ -7341,6 +7356,9 @@
     case StubId::kYieldAsyncStar:
       stub = object_store->yield_async_star_stub();
       break;
+    case StubId::kYieldSyncStar:
+      stub = object_store->yield_sync_star_stub();
+      break;
   }
   compiler->GenerateStubCall(source(), stub, UntaggedPcDescriptors::kOther,
                              locs(), deopt_id(), env());
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index 676dd00..c7626f7 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -9583,8 +9583,10 @@
 class Call1ArgStubInstr : public TemplateDefinition<1, Throws> {
  public:
   enum class StubId {
+    kCloneSuspendState,
     kInitAsync,
     kInitAsyncStar,
+    kInitSyncStar,
   };
 
   Call1ArgStubInstr(const InstructionSource& source,
@@ -9624,6 +9626,7 @@
   enum class StubId {
     kAwait,
     kYieldAsyncStar,
+    kYieldSyncStar,
   };
 
   SuspendInstr(const InstructionSource& source,
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index fd5b452..96b12f4 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -1367,12 +1367,18 @@
 void Call1ArgStubInstr::PrintOperandsTo(BaseTextBuffer* f) const {
   const char* name = "";
   switch (stub_id_) {
+    case StubId::kCloneSuspendState:
+      name = "CloneSuspendState";
+      break;
     case StubId::kInitAsync:
       name = "InitAsync";
       break;
     case StubId::kInitAsyncStar:
       name = "InitAsyncStar";
       break;
+    case StubId::kInitSyncStar:
+      name = "InitSyncStar";
+      break;
   }
   f->Printf("%s(", name);
   operand()->PrintTo(f);
@@ -1388,6 +1394,9 @@
     case StubId::kYieldAsyncStar:
       name = "YieldAsyncStar";
       break;
+    case StubId::kYieldSyncStar:
+      name = "YieldSyncStar";
+      break;
   }
   f->Printf("%s(", name);
   operand()->PrintTo(f);
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 0ccfd45..aeb0cab 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -702,6 +702,30 @@
     body += B->Suspend(TokenPosition::kNoSource,
                        SuspendInstr::StubId::kYieldAsyncStar);
     body += Drop();
+  } else if (dart_function.IsCompactSyncStarFunction()) {
+    const auto& result_type =
+        AbstractType::Handle(Z, dart_function.result_type());
+    auto& type_args = TypeArguments::ZoneHandle(Z);
+    if (result_type.IsType() &&
+        (result_type.type_class() == IG->object_store()->iterable_class())) {
+      ASSERT(result_type.IsFinalized());
+      type_args = result_type.arguments();
+    }
+
+    body += TranslateInstantiatedTypeArguments(type_args);
+    body += B->Call1ArgStub(TokenPosition::kNoSource,
+                            Call1ArgStubInstr::StubId::kInitSyncStar);
+    body += Drop();
+    body += NullConstant();
+    body += B->Suspend(TokenPosition::kNoSource,
+                       SuspendInstr::StubId::kYieldSyncStar);
+    body += Drop();
+    // Clone context if there are any captured parameter variables, so
+    // each invocation of .iterator would get its own copy of parameters.
+    const LocalScope* scope = parsed_function()->scope();
+    if (scope->num_context_variables() > 0) {
+      body += CloneContext(scope->context_slots());
+    }
   }
   return body;
 }
@@ -5279,22 +5303,7 @@
 
   if ((flags & kYieldStatementFlagNative) == 0) {
     Fragment instructions;
-    // Generate the following code for yield <expr>:
-    //
-    // _AsyncStarStreamController controller = :suspend_state._functionData;
-    // if (controller.add(<expr>)) {
-    //   return;
-    // }
-    // suspend();
-    //
-    // Generate the following code for yield* <expr>:
-    //
-    // _AsyncStarStreamController controller = :suspend_state._functionData;
-    // controller.addStream(<expr>);
-    // if (suspend()) {
-    //   return;
-    // }
-    //
+    const bool is_yield_star = (flags & kYieldStatementFlagYieldStar) != 0;
 
     // Load :suspend_state variable using low-level FP-relative load
     // in order to avoid confusing SSA construction (which cannot
@@ -5313,41 +5322,85 @@
       instructions += DebugStepCheck(pos);
     }
 
-    auto& add_method = Function::ZoneHandle(Z);
-    const bool is_yield_star = (flags & kYieldStatementFlagYieldStar) != 0;
-    if (is_yield_star) {
-      add_method =
-          IG->object_store()->async_star_stream_controller_add_stream();
-    } else {
-      add_method = IG->object_store()->async_star_stream_controller_add();
-    }
-    instructions +=
-        StaticCall(TokenPosition::kNoSource, add_method, 2, ICData::kNoRebind);
+    if (parsed_function()->function().IsCompactAsyncStarFunction()) {
+      // In the async* functions, generate the following code for yield <expr>:
+      //
+      // _AsyncStarStreamController controller = :suspend_state._functionData;
+      // if (controller.add(<expr>)) {
+      //   return;
+      // }
+      // suspend();
+      //
+      // Generate the following code for yield* <expr>:
+      //
+      // _AsyncStarStreamController controller = :suspend_state._functionData;
+      // controller.addStream(<expr>);
+      // if (suspend()) {
+      //   return;
+      // }
+      //
 
-    if (is_yield_star) {
-      // Discard result of _AsyncStarStreamController.addStream().
-      instructions += Drop();
-      // Suspend and test value passed to the resumed async* body.
+      auto& add_method = Function::ZoneHandle(Z);
+      if (is_yield_star) {
+        add_method =
+            IG->object_store()->async_star_stream_controller_add_stream();
+      } else {
+        add_method = IG->object_store()->async_star_stream_controller_add();
+      }
+      instructions += StaticCall(TokenPosition::kNoSource, add_method, 2,
+                                 ICData::kNoRebind);
+
+      if (is_yield_star) {
+        // Discard result of _AsyncStarStreamController.addStream().
+        instructions += Drop();
+        // Suspend and test value passed to the resumed async* body.
+        instructions += NullConstant();
+        instructions += B->Suspend(pos, SuspendInstr::StubId::kYieldAsyncStar);
+      } else {
+        // Test value returned by _AsyncStarStreamController.add().
+      }
+
+      TargetEntryInstr* exit;
+      TargetEntryInstr* continue_execution;
+      instructions += BranchIfTrue(&exit, &continue_execution, false);
+
+      Fragment do_exit(exit);
+      do_exit += TranslateFinallyFinalizers(nullptr, -1);
+      do_exit += NullConstant();
+      do_exit += Return(TokenPosition::kNoSource);
+
+      instructions = Fragment(instructions.entry, continue_execution);
+      if (!is_yield_star) {
+        instructions += NullConstant();
+        instructions += B->Suspend(pos, SuspendInstr::StubId::kYieldAsyncStar);
+        instructions += Drop();
+      }
+
+    } else if (parsed_function()->function().IsCompactSyncStarFunction()) {
+      // In the sync* functions, generate the following code for yield <expr>:
+      //
+      // _SyncStarIterator iterator = :suspend_state._functionData;
+      // iterator._current = <expr>;
+      // suspend();
+      //
+      // Generate the following code for yield* <expr>:
+      //
+      // _SyncStarIterator iterator = :suspend_state._functionData;
+      // iterator._yieldStarIterable = <expr>;
+      // suspend();
+      //
+      auto& field = Field::ZoneHandle(Z);
+      if (is_yield_star) {
+        field = IG->object_store()->sync_star_iterator_yield_star_iterable();
+      } else {
+        field = IG->object_store()->sync_star_iterator_current();
+      }
+      instructions += B->StoreInstanceFieldGuarded(field);
       instructions += NullConstant();
-      instructions += B->Suspend(pos, SuspendInstr::StubId::kYieldAsyncStar);
-    } else {
-      // Test value returned by _AsyncStarStreamController.add().
-    }
-
-    TargetEntryInstr* exit;
-    TargetEntryInstr* continue_execution;
-    instructions += BranchIfTrue(&exit, &continue_execution, false);
-
-    Fragment do_exit(exit);
-    do_exit += TranslateFinallyFinalizers(nullptr, -1);
-    do_exit += NullConstant();
-    do_exit += Return(TokenPosition::kNoSource);
-
-    instructions = Fragment(instructions.entry, continue_execution);
-    if (!is_yield_star) {
-      instructions += NullConstant();
-      instructions += B->Suspend(pos, SuspendInstr::StubId::kYieldAsyncStar);
+      instructions += B->Suspend(pos, SuspendInstr::StubId::kYieldSyncStar);
       instructions += Drop();
+    } else {
+      UNREACHABLE();
     }
 
     return instructions;
@@ -5604,6 +5657,13 @@
           function.set_is_inlinable(false);
           function.set_is_visible(true);
           ASSERT(function.IsCompactAsyncStarFunction());
+        } else if (function_node_helper.async_marker_ ==
+                   FunctionNodeHelper::kSyncStar) {
+          function.set_modifier(UntaggedFunction::kSyncGen);
+          function.set_is_debuggable(true);
+          function.set_is_inlinable(false);
+          function.set_is_visible(true);
+          ASSERT(function.IsCompactSyncStarFunction());
         } else {
           ASSERT((function_node_helper.async_marker_ ==
                   FunctionNodeHelper::kSync) ||
@@ -5632,7 +5692,8 @@
           // need to manually label it generated:
           if (function.parent_function() != Function::null()) {
             const auto& parent = Function::Handle(function.parent_function());
-            if (parent.IsSyncGenerator()) {
+            if (parent.IsSyncGenerator() &&
+                !parent.IsCompactSyncStarFunction()) {
               function.set_is_generated_body(true);
             }
           }
@@ -5643,6 +5704,7 @@
           }
           ASSERT(!function.IsCompactAsyncFunction());
           ASSERT(!function.IsCompactAsyncStarFunction());
+          ASSERT(!function.IsCompactSyncStarFunction());
         }
 
         // If the start token position is synthetic, the end token position
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 4d50fc7..69abb4e 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -901,6 +901,7 @@
   const MethodRecognizer::Kind kind = function.recognized_kind();
 
   switch (kind) {
+    case MethodRecognizer::kSuspendState_clone:
     case MethodRecognizer::kSuspendState_resume:
     case MethodRecognizer::kTypedData_ByteDataView_factory:
     case MethodRecognizer::kTypedData_Int8ArrayView_factory:
@@ -1049,6 +1050,13 @@
 
   const MethodRecognizer::Kind kind = function.recognized_kind();
   switch (kind) {
+    case MethodRecognizer::kSuspendState_clone: {
+      ASSERT_EQUAL(function.NumParameters(), 1);
+      body += LoadLocal(parsed_function_->RawParameterVariable(0));
+      body += Call1ArgStub(TokenPosition::kNoSource,
+                           Call1ArgStubInstr::StubId::kCloneSuspendState);
+      break;
+    }
     case MethodRecognizer::kSuspendState_resume: {
       const Code& resume_stub =
           Code::ZoneHandle(Z, IG->object_store()->resume_stub());
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index 4f9b035..010e653 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -95,11 +95,12 @@
     0xaeca06ef)                                                                \
   V(_SuspendState, set:_errorCallback, SuspendState_setErrorCallback,          \
     0xc40903ac)                                                                \
+  V(_SuspendState, _clone, SuspendState_clone, 0xae1a40a0)                     \
   V(_SuspendState, _createAsyncCallbacks, SuspendState_createAsyncCallbacks,   \
     0x68be1bf3)                                                                \
   V(_SuspendState, _createAsyncStarCallback,                                   \
     SuspendState_createAsyncStarCallback, 0xfa7537e4)                          \
-  V(_SuspendState, _resume, SuspendState_resume, 0xc738e9d2)                   \
+  V(_SuspendState, _resume, SuspendState_resume, 0x5d7a8489)                   \
   V(_IntegerImplementation, toDouble, IntegerToDouble, 0x97728b46)             \
   V(_Double, _add, DoubleAdd, 0xea666327)                                      \
   V(_Double, _sub, DoubleSub, 0x28474c2e)                                      \
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 5f8ec14..fb828f0 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1212,6 +1212,7 @@
   static word return_async_not_future_stub_offset();
   static word return_async_star_stub_offset();
   static word return_async_stub_offset();
+  static word return_sync_star_stub_offset();
   static word stack_overflow_shared_without_fpu_regs_entry_point_offset();
   static word stack_overflow_shared_without_fpu_regs_stub_offset();
   static word stack_overflow_shared_with_fpu_regs_entry_point_offset();
@@ -1260,6 +1261,10 @@
   static word suspend_state_yield_async_star_entry_point_offset();
   static word suspend_state_return_async_star_entry_point_offset();
 
+  static word suspend_state_init_sync_star_entry_point_offset();
+  static word suspend_state_yield_sync_star_entry_point_offset();
+  static word suspend_state_return_sync_star_entry_point_offset();
+
   static word suspend_state_handle_exception_entry_point_offset();
 
   static word OffsetFromThread(const dart::Object& object);
@@ -1291,10 +1296,13 @@
   static word suspend_state_handle_exception_offset();
   static word suspend_state_init_async_offset();
   static word suspend_state_init_async_star_offset();
+  static word suspend_state_init_sync_star_offset();
   static word suspend_state_return_async_offset();
   static word suspend_state_return_async_not_future_offset();
   static word suspend_state_return_async_star_offset();
+  static word suspend_state_return_sync_star_offset();
   static word suspend_state_yield_async_star_offset();
+  static word suspend_state_yield_sync_star_offset();
 };
 
 class Isolate : public AllStatic {
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index fa6301e..fe183da 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -230,21 +230,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 504;
+    ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 528;
+    ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 500;
+    ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 516;
+    ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 508;
+    ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 524;
+    ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 520;
+    ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -276,115 +282,115 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 20;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 400;
+    Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    816;
+    836;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    820;
+    840;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 292;
+    Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 308;
+    Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 312;
+    Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 316;
+    Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 200;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 856;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 876;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 296;
+    Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 880;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 904;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 860;
+    Thread_double_truncate_round_supported_offset = 880;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 884;
+    Thread_service_extension_stream_offset = 908;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    336;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     340;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 252;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    344;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    252;
+    256;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    380;
+    384;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 376;
+    Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 272;
+    Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    836;
+    856;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 276;
+    Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 284;
+    Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 344;
+    Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 392;
+    Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 388;
+    Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    384;
+    388;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 396;
+    Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    824;
+    844;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    852;
+    872;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 888;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 912;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     64;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 256;
+    Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 260;
+    Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 268;
+    Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 328;
+    Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 332;
+    Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 232;
+    Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -412,49 +418,57 @@
     Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     212;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 828;
+    Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 848;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 832;
+    Thread_saved_shadow_call_stack_offset = 852;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    840;
+    860;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 264;
+    Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 352;
+    Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 28;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     76;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 788;
+    Thread_suspend_state_await_entry_point_offset = 796;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 784;
+    Thread_suspend_state_init_async_entry_point_offset = 792;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 792;
+    Thread_suspend_state_return_async_entry_point_offset = 800;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 796;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 804;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 800;
+    Thread_suspend_state_init_async_star_entry_point_offset = 808;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 804;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 812;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 808;
+    Thread_suspend_state_return_async_star_entry_point_offset = 816;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 812;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 820;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 824;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 828;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word Thread_top_offset = 48;
@@ -465,17 +479,17 @@
     Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 288;
+    Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     32;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 36;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 844;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 864;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 848;
-static constexpr dart::compiler::target::word Thread_random_offset = 864;
+    Thread_callback_stack_return_offset = 868;
+static constexpr dart::compiler::target::word Thread_random_offset = 888;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 872;
+    Thread_jump_to_frame_entry_point_offset = 352;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 896;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -568,7 +582,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        752, 756, 760, 764, 768, -1, 772, -1, 776, 780, -1, -1, -1, -1, -1, -1};
+        760, 764, 768, 772, 776, -1, 780, -1, 784, 788, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 12;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -882,21 +896,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -929,117 +949,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 40;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1632;
+    1672;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1640;
+    1680;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1752;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1792;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1720;
+    Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1760;
+    Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1672;
+    1712;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1648;
+    1688;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -1067,49 +1087,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1656;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1664;
+    Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1680;
+    1720;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1576;
+    Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1568;
+    Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1584;
+    Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -1120,18 +1148,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word Thread_random_offset = 1728;
+    Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1736;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1776;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -1226,8 +1254,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -1539,21 +1567,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 504;
+    ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 528;
+    ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 500;
+    ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 516;
+    ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 508;
+    ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 524;
+    ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 520;
+    ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -1585,115 +1619,115 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 20;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 400;
+    Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    784;
+    804;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    788;
+    808;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 292;
+    Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 308;
+    Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 312;
+    Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 316;
+    Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 200;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 824;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 844;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 296;
+    Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 848;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 872;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 828;
+    Thread_double_truncate_round_supported_offset = 848;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 852;
+    Thread_service_extension_stream_offset = 876;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    336;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     340;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 252;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    344;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    252;
+    256;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    380;
+    384;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 376;
+    Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 272;
+    Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    804;
+    824;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 276;
+    Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 284;
+    Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 344;
+    Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 392;
+    Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 388;
+    Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    384;
+    388;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 396;
+    Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    792;
+    812;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    820;
+    840;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 856;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 880;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     64;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 256;
+    Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 260;
+    Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 268;
+    Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 328;
+    Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 332;
+    Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 232;
+    Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -1721,49 +1755,57 @@
     Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     212;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 796;
+    Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 816;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 800;
+    Thread_saved_shadow_call_stack_offset = 820;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    808;
+    828;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 264;
+    Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 352;
+    Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 28;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     76;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 756;
+    Thread_suspend_state_await_entry_point_offset = 764;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 752;
+    Thread_suspend_state_init_async_entry_point_offset = 760;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 760;
+    Thread_suspend_state_return_async_entry_point_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 764;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 772;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 768;
+    Thread_suspend_state_init_async_star_entry_point_offset = 776;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 772;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 780;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 776;
+    Thread_suspend_state_return_async_star_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 780;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 788;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 792;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 796;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 800;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word Thread_top_offset = 48;
@@ -1774,17 +1816,17 @@
     Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 288;
+    Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     32;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 36;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 812;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 832;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 816;
-static constexpr dart::compiler::target::word Thread_random_offset = 832;
+    Thread_callback_stack_return_offset = 836;
+static constexpr dart::compiler::target::word Thread_random_offset = 856;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 840;
+    Thread_jump_to_frame_entry_point_offset = 352;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 864;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -2188,21 +2230,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -2235,117 +2283,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 40;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1696;
+    1736;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1816;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1856;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1784;
+    Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1824;
+    Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -2373,49 +2421,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1720;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1728;
+    Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1640;
+    Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1632;
+    Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1648;
+    Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -2426,18 +2482,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word Thread_random_offset = 1792;
+    Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1800;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1840;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -2532,9 +2588,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -2846,21 +2902,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -2893,117 +2955,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 36;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1632;
+    1672;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1640;
+    1680;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1752;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1792;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1720;
+    Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1760;
+    Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1672;
+    1712;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1648;
+    1688;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -3031,49 +3093,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1656;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1664;
+    Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1680;
+    1720;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1576;
+    Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1568;
+    Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1584;
+    Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -3084,18 +3154,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word Thread_random_offset = 1728;
+    Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1736;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1776;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -3190,8 +3260,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 16;
@@ -3503,21 +3573,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -3550,117 +3626,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 36;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1696;
+    1736;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1816;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1856;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1784;
+    Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1824;
+    Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -3688,49 +3764,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1720;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1728;
+    Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1640;
+    Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1632;
+    Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1648;
+    Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -3741,18 +3825,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word Thread_random_offset = 1792;
+    Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1800;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1840;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -3847,9 +3931,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 16;
@@ -4161,21 +4245,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 504;
+    ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 528;
+    ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 500;
+    ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 516;
+    ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 508;
+    ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 524;
+    ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 520;
+    ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -4207,115 +4297,115 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 20;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 400;
+    Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    856;
+    876;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    860;
+    880;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 292;
+    Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 308;
+    Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 312;
+    Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 316;
+    Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 200;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 896;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 916;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 296;
+    Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 920;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 944;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 900;
+    Thread_double_truncate_round_supported_offset = 920;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 924;
+    Thread_service_extension_stream_offset = 948;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    336;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     340;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 252;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    344;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    252;
+    256;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    380;
+    384;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 376;
+    Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 272;
+    Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    876;
+    896;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 276;
+    Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 284;
+    Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 344;
+    Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 392;
+    Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 388;
+    Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    384;
+    388;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 396;
+    Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    864;
+    884;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    892;
+    912;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 928;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 952;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     64;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 256;
+    Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 260;
+    Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 268;
+    Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 328;
+    Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 332;
+    Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 232;
+    Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -4343,49 +4433,57 @@
     Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     212;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 868;
+    Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 888;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 872;
+    Thread_saved_shadow_call_stack_offset = 892;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    880;
+    900;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 264;
+    Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 352;
+    Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 28;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     76;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 828;
+    Thread_suspend_state_await_entry_point_offset = 836;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 824;
+    Thread_suspend_state_init_async_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 832;
+    Thread_suspend_state_return_async_entry_point_offset = 840;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 836;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 844;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 840;
+    Thread_suspend_state_init_async_star_entry_point_offset = 848;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 844;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 852;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 848;
+    Thread_suspend_state_return_async_star_entry_point_offset = 856;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 852;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 860;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 864;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 868;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 872;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word Thread_top_offset = 48;
@@ -4396,17 +4494,17 @@
     Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 288;
+    Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     32;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 36;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 884;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 904;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 888;
-static constexpr dart::compiler::target::word Thread_random_offset = 904;
+    Thread_callback_stack_return_offset = 908;
+static constexpr dart::compiler::target::word Thread_random_offset = 928;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 912;
+    Thread_jump_to_frame_entry_point_offset = 352;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 936;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -4499,9 +4597,9 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,  -1,  -1, -1, -1, 752, 756, 760, -1,  -1,  764,
-        768, 772, -1, -1, -1, 776, 780, 784, 788, 792, 796,
-        800, 804, -1, -1, -1, -1,  808, 812, 816, 820};
+        -1,  -1,  -1, -1, -1, 760, 764, 768, -1,  -1,  772,
+        776, 780, -1, -1, -1, 784, 788, 792, 796, 800, 804,
+        808, 812, -1, -1, -1, -1,  816, 820, 824, 828};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 12;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -4815,21 +4913,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -4862,117 +4966,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 40;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1696;
+    1736;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1808;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1848;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1776;
+    Thread_double_truncate_round_supported_offset = 1816;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1816;
+    Thread_service_extension_stream_offset = 1856;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1728;
+    1768;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1760;
+    1800;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1824;
+    1864;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -5000,49 +5104,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1712;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1752;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1720;
+    Thread_saved_shadow_call_stack_offset = 1760;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1632;
+    Thread_suspend_state_await_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1624;
+    Thread_suspend_state_init_async_entry_point_offset = 1640;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1640;
+    Thread_suspend_state_return_async_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1648;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1656;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1664;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1672;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1680;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1696;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1720;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -5053,18 +5165,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1752;
-static constexpr dart::compiler::target::word Thread_random_offset = 1784;
+    Thread_callback_stack_return_offset = 1792;
+static constexpr dart::compiler::target::word Thread_random_offset = 1824;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1792;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1832;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -5159,9 +5271,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,   -1,   -1, -1, -1, 1480, 1488, 1496, -1,   -1,   1504,
-        1512, 1520, -1, -1, -1, 1528, 1536, 1544, 1552, 1560, 1568,
-        1576, 1584, -1, -1, -1, -1,   1592, 1600, 1608, 1616};
+        -1,   -1,   -1, -1, -1, 1496, 1504, 1512, -1,   -1,   1520,
+        1528, 1536, -1, -1, -1, 1544, 1552, 1560, 1568, 1576, 1584,
+        1592, 1600, -1, -1, -1, -1,   1608, 1616, 1624, 1632};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -5467,21 +5579,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 504;
+    ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 528;
+    ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 500;
+    ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 516;
+    ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 508;
+    ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 524;
+    ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 520;
+    ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -5513,115 +5631,115 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 20;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 400;
+    Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    816;
+    836;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    820;
+    840;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 292;
+    Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 308;
+    Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 312;
+    Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 316;
+    Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 200;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 856;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 876;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 296;
+    Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 880;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 904;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 860;
+    Thread_double_truncate_round_supported_offset = 880;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 884;
+    Thread_service_extension_stream_offset = 908;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    336;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     340;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 252;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    344;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    252;
+    256;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    380;
+    384;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 376;
+    Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 272;
+    Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    836;
+    856;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 276;
+    Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 284;
+    Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 344;
+    Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 392;
+    Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 388;
+    Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    384;
+    388;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 396;
+    Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    824;
+    844;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    852;
+    872;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 888;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 912;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     64;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 256;
+    Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 260;
+    Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 268;
+    Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 328;
+    Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 332;
+    Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 232;
+    Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -5649,49 +5767,57 @@
     Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     212;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 828;
+    Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 848;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 832;
+    Thread_saved_shadow_call_stack_offset = 852;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    840;
+    860;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 264;
+    Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 352;
+    Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 28;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     76;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 788;
+    Thread_suspend_state_await_entry_point_offset = 796;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 784;
+    Thread_suspend_state_init_async_entry_point_offset = 792;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 792;
+    Thread_suspend_state_return_async_entry_point_offset = 800;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 796;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 804;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 800;
+    Thread_suspend_state_init_async_star_entry_point_offset = 808;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 804;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 812;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 808;
+    Thread_suspend_state_return_async_star_entry_point_offset = 816;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 812;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 820;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 824;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 828;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word Thread_top_offset = 48;
@@ -5702,17 +5828,17 @@
     Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 288;
+    Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     32;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 36;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 844;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 864;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 848;
-static constexpr dart::compiler::target::word Thread_random_offset = 864;
+    Thread_callback_stack_return_offset = 868;
+static constexpr dart::compiler::target::word Thread_random_offset = 888;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 872;
+    Thread_jump_to_frame_entry_point_offset = 352;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 896;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -5805,7 +5931,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        752, 756, 760, 764, 768, -1, 772, -1, 776, 780, -1, -1, -1, -1, -1, -1};
+        760, 764, 768, 772, 776, -1, 780, -1, 784, 788, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 12;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -6111,21 +6237,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -6158,117 +6290,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 40;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1632;
+    1672;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1640;
+    1680;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1752;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1792;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1720;
+    Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1760;
+    Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1672;
+    1712;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1648;
+    1688;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -6296,49 +6428,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1656;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1664;
+    Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1680;
+    1720;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1576;
+    Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1568;
+    Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1584;
+    Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -6349,18 +6489,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word Thread_random_offset = 1728;
+    Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1736;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1776;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -6455,8 +6595,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -6760,21 +6900,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 504;
+    ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 528;
+    ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 500;
+    ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 516;
+    ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 508;
+    ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 524;
+    ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 520;
+    ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -6806,115 +6952,115 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 20;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 400;
+    Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    784;
+    804;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    788;
+    808;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 292;
+    Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 308;
+    Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 312;
+    Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 316;
+    Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 200;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 824;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 844;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 296;
+    Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 848;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 872;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 828;
+    Thread_double_truncate_round_supported_offset = 848;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 852;
+    Thread_service_extension_stream_offset = 876;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    336;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     340;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 252;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    344;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    252;
+    256;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    380;
+    384;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 376;
+    Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 272;
+    Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    804;
+    824;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 276;
+    Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 284;
+    Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 344;
+    Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 392;
+    Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 388;
+    Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    384;
+    388;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 396;
+    Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    792;
+    812;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    820;
+    840;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 856;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 880;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     64;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 256;
+    Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 260;
+    Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 268;
+    Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 328;
+    Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 332;
+    Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 232;
+    Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -6942,49 +7088,57 @@
     Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     212;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 796;
+    Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 816;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 800;
+    Thread_saved_shadow_call_stack_offset = 820;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    808;
+    828;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 264;
+    Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 352;
+    Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 28;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     76;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 756;
+    Thread_suspend_state_await_entry_point_offset = 764;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 752;
+    Thread_suspend_state_init_async_entry_point_offset = 760;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 760;
+    Thread_suspend_state_return_async_entry_point_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 764;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 772;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 768;
+    Thread_suspend_state_init_async_star_entry_point_offset = 776;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 772;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 780;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 776;
+    Thread_suspend_state_return_async_star_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 780;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 788;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 792;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 796;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 800;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word Thread_top_offset = 48;
@@ -6995,17 +7149,17 @@
     Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 288;
+    Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     32;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 36;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 812;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 832;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 816;
-static constexpr dart::compiler::target::word Thread_random_offset = 832;
+    Thread_callback_stack_return_offset = 836;
+static constexpr dart::compiler::target::word Thread_random_offset = 856;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 840;
+    Thread_jump_to_frame_entry_point_offset = 352;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 864;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -7401,21 +7555,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -7448,117 +7608,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 40;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1696;
+    1736;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1816;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1856;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1784;
+    Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1824;
+    Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -7586,49 +7746,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1720;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1728;
+    Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1640;
+    Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1632;
+    Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1648;
+    Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -7639,18 +7807,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word Thread_random_offset = 1792;
+    Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1800;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1840;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -7745,9 +7913,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -8051,21 +8219,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -8098,117 +8272,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 36;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1632;
+    1672;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1640;
+    1680;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1752;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1792;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1720;
+    Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1760;
+    Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1672;
+    1712;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1648;
+    1688;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -8236,49 +8410,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1656;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1664;
+    Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1680;
+    1720;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1576;
+    Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1568;
+    Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1584;
+    Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -8289,18 +8471,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word Thread_random_offset = 1728;
+    Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1736;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1776;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -8395,8 +8577,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 16;
@@ -8700,21 +8882,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -8747,117 +8935,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 36;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1696;
+    1736;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1816;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1856;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1784;
+    Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1824;
+    Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -8885,49 +9073,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1720;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1760;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1728;
+    Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1640;
+    Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1632;
+    Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1648;
+    Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -8938,18 +9134,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word Thread_random_offset = 1792;
+    Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1800;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1840;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -9044,9 +9240,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 16;
@@ -9350,21 +9546,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 504;
+    ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 528;
+    ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 500;
+    ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 516;
+    ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 508;
+    ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 524;
+    ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 520;
+    ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 12;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 4;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset = 8;
@@ -9396,115 +9598,115 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 20;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 400;
+    Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    856;
+    876;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    860;
+    880;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 292;
+    Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 308;
+    Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 312;
+    Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 316;
+    Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 200;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 896;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 916;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 296;
+    Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 140;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 920;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 944;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 900;
+    Thread_double_truncate_round_supported_offset = 920;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 924;
+    Thread_service_extension_stream_offset = 948;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    336;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 248;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     340;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 252;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    344;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    252;
+    256;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    380;
+    384;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 376;
+    Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 272;
+    Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    876;
+    896;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 276;
+    Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 284;
+    Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 344;
+    Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 392;
+    Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 388;
+    Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    384;
+    388;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 396;
+    Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    864;
+    884;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    892;
+    912;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 40;
-static constexpr dart::compiler::target::word Thread_isolate_group_offset = 928;
+static constexpr dart::compiler::target::word Thread_isolate_group_offset = 952;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     64;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 256;
+    Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 260;
+    Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 268;
+    Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 328;
+    Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 332;
+    Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 232;
+    Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -9532,49 +9734,57 @@
     Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     212;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 868;
+    Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 888;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 872;
+    Thread_saved_shadow_call_stack_offset = 892;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    880;
+    900;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 264;
+    Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 352;
+    Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 28;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     76;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 828;
+    Thread_suspend_state_await_entry_point_offset = 836;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 824;
+    Thread_suspend_state_init_async_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 832;
+    Thread_suspend_state_return_async_entry_point_offset = 840;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 836;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 844;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 840;
+    Thread_suspend_state_init_async_star_entry_point_offset = 848;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 844;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 852;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 848;
+    Thread_suspend_state_return_async_star_entry_point_offset = 856;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 852;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 860;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 864;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 868;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 872;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word Thread_top_offset = 48;
@@ -9585,17 +9795,17 @@
     Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 288;
+    Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     32;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 36;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 884;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 904;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 888;
-static constexpr dart::compiler::target::word Thread_random_offset = 904;
+    Thread_callback_stack_return_offset = 908;
+static constexpr dart::compiler::target::word Thread_random_offset = 928;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 348;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 912;
+    Thread_jump_to_frame_entry_point_offset = 352;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 936;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -9688,9 +9898,9 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,  -1,  -1, -1, -1, 752, 756, 760, -1,  -1,  764,
-        768, 772, -1, -1, -1, 776, 780, 784, 788, 792, 796,
-        800, 804, -1, -1, -1, -1,  808, 812, 816, 820};
+        -1,  -1,  -1, -1, -1, 760, 764, 768, -1,  -1,  772,
+        776, 780, -1, -1, -1, 784, 788, 792, 796, 800, 804,
+        808, 812, -1, -1, -1, -1,  816, 820, 824, 828};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 12;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -9996,21 +10206,27 @@
 static constexpr dart::compiler::target::word ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_await_offset = 1008;
+    ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_handle_exception_offset = 1056;
+    ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_offset = 1000;
+    ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_init_async_star_offset = 1032;
+    ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_offset = 1016;
+    ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_return_async_star_offset = 1048;
+    ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word OneByteString_data_offset = 16;
 static constexpr dart::compiler::target::word PointerBase_data_offset = 8;
 static constexpr dart::compiler::target::word Pointer_type_arguments_offset =
@@ -10043,117 +10259,117 @@
 static constexpr dart::compiler::target::word
     SuspendState_then_callback_offset = 40;
 static constexpr dart::compiler::target::word
-    Thread_AllocateArray_entry_point_offset = 776;
+    Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1696;
+    1736;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 560;
+    Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 592;
+    Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 600;
+    Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 608;
+    Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 216;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 568;
+    Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 256;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1808;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1848;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    Thread_double_truncate_round_supported_offset = 1776;
+    Thread_double_truncate_round_supported_offset = 1816;
 static constexpr dart::compiler::target::word
-    Thread_service_extension_stream_offset = 1816;
+    Thread_service_extension_stream_offset = 1856;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    648;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 472;
-static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
     656;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 480;
+static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
+    664;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    480;
+    488;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    736;
+    744;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 728;
+    Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 520;
+    Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1728;
+    1768;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 528;
+    Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 544;
+    Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 664;
+    Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 760;
+    Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 752;
+    Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    744;
+    752;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 768;
+    Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1704;
+    1744;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1760;
+    1800;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word Thread_isolate_group_offset =
-    1824;
+    1864;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     128;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 488;
+    Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 496;
+    Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 512;
+    Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 632;
+    Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 640;
+    Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 440;
+    Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -10181,49 +10397,57 @@
     Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word Thread_return_async_stub_offset =
     400;
+static constexpr dart::compiler::target::word
+    Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 200;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 712;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1712;
+    Thread_predefined_symbols_address_offset = 720;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1752;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1720;
+    Thread_saved_shadow_call_stack_offset = 1760;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 504;
+    Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 680;
+    Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 56;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     112;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     152;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_await_entry_point_offset = 1632;
+    Thread_suspend_state_await_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_entry_point_offset = 1624;
+    Thread_suspend_state_init_async_entry_point_offset = 1640;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_entry_point_offset = 1640;
+    Thread_suspend_state_return_async_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_not_future_entry_point_offset = 1648;
+    Thread_suspend_state_return_async_not_future_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_init_async_star_entry_point_offset = 1656;
+    Thread_suspend_state_init_async_star_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_yield_async_star_entry_point_offset = 1664;
+    Thread_suspend_state_yield_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_return_async_star_entry_point_offset = 1672;
+    Thread_suspend_state_return_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    Thread_suspend_state_handle_exception_entry_point_offset = 1680;
+    Thread_suspend_state_init_sync_star_entry_point_offset = 1696;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_yield_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_return_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    Thread_suspend_state_handle_exception_entry_point_offset = 1720;
 static constexpr dart::compiler::target::word
     Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word Thread_top_offset = 96;
@@ -10234,18 +10458,18 @@
     Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 552;
+    Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     64;
 static constexpr dart::compiler::target::word Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    Thread_callback_stack_return_offset = 1752;
-static constexpr dart::compiler::target::word Thread_random_offset = 1784;
+    Thread_callback_stack_return_offset = 1792;
+static constexpr dart::compiler::target::word Thread_random_offset = 1824;
 static constexpr dart::compiler::target::word
-    Thread_jump_to_frame_entry_point_offset = 672;
-static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1792;
+    Thread_jump_to_frame_entry_point_offset = 680;
+static constexpr dart::compiler::target::word Thread_tsan_utils_offset = 1832;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_function_offset =
     0;
 static constexpr dart::compiler::target::word TsanUtils_setjmp_buffer_offset =
@@ -10340,9 +10564,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,   -1,   -1, -1, -1, 1480, 1488, 1496, -1,   -1,   1504,
-        1512, 1520, -1, -1, -1, 1528, 1536, 1544, 1552, 1560, 1568,
-        1576, 1584, -1, -1, -1, -1,   1592, 1600, 1608, 1616};
+        -1,   -1,   -1, -1, -1, 1496, 1504, 1512, -1,   -1,   1520,
+        1528, 1536, -1, -1, -1, 1544, 1552, 1560, 1568, 1576, 1584,
+        1592, 1600, -1, -1, -1, -1,   1608, 1616, 1624, 1632};
 static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -10678,21 +10902,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 504;
+    AOT_ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 528;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 500;
+    AOT_ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 516;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 508;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    AOT_ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 524;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 520;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     12;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 4;
@@ -10729,120 +10959,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 16;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 400;
+    AOT_Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 816;
+    AOT_Thread_active_exception_offset = 836;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 820;
+    AOT_Thread_active_stacktrace_offset = 840;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 292;
+    AOT_Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 308;
+    AOT_Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 312;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 316;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    856;
+    876;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     120;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 296;
+    AOT_Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 140;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    880;
+    904;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 860;
+    AOT_Thread_double_truncate_round_supported_offset = 880;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 884;
+    AOT_Thread_service_extension_stream_offset = 908;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    336;
+    340;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    248;
+    252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 340;
+    AOT_Thread_deoptimize_entry_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 252;
+    AOT_Thread_deoptimize_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 380;
+    AOT_Thread_double_abs_address_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 376;
+    AOT_Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 272;
+    AOT_Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 836;
+    AOT_Thread_execution_state_offset = 856;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 276;
+    AOT_Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 284;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 344;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 392;
+    AOT_Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 388;
+    AOT_Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 384;
+    AOT_Thread_float_not_address_offset = 388;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 396;
+    AOT_Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 824;
+    AOT_Thread_global_object_pool_offset = 844;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 852;
+    AOT_Thread_exit_through_ffi_offset = 872;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    888;
+    912;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 64;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 256;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 260;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 268;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 328;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 332;
+    AOT_Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 232;
+    AOT_Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -10872,19 +11102,21 @@
     AOT_Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 212;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 828;
+    AOT_Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 848;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 832;
+    AOT_Thread_saved_shadow_call_stack_offset = 852;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 840;
+    AOT_Thread_safepoint_state_offset = 860;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 264;
+    AOT_Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 352;
+    AOT_Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     28;
 static constexpr dart::compiler::target::word
@@ -10892,31 +11124,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 76;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 788;
+    AOT_Thread_suspend_state_await_entry_point_offset = 796;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 784;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 792;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 792;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 800;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 796;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 804;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 800;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 808;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 804;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 812;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 808;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 816;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 812;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 820;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 824;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 828;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 48;
@@ -10928,19 +11166,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 288;
+    AOT_Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 32;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 36;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    844;
+    864;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 848;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 864;
+    AOT_Thread_callback_stack_return_offset = 868;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 888;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 348;
+    AOT_Thread_jump_to_frame_entry_point_offset = 352;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    872;
+    896;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -11053,7 +11291,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        752, 756, 760, 764, 768, -1, 772, -1, 776, 780, -1, -1, -1, -1, -1, -1};
+        760, 764, 768, 772, 776, -1, 780, -1, 784, 788, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     12;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
@@ -11403,21 +11641,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -11454,120 +11698,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1632;
+    AOT_Thread_active_exception_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1640;
+    AOT_Thread_active_stacktrace_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1720;
+    AOT_Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1760;
+    AOT_Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1672;
+    AOT_Thread_execution_state_offset = 1712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1648;
+    AOT_Thread_global_object_pool_offset = 1688;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1704;
+    AOT_Thread_exit_through_ffi_offset = 1744;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -11597,20 +11841,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1656;
+    1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1664;
+    AOT_Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1680;
+    AOT_Thread_safepoint_state_offset = 1720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -11618,31 +11864,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1576;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1568;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1584;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -11654,19 +11906,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1728;
+    AOT_Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -11780,8 +12032,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -12134,21 +12386,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -12185,120 +12443,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1696;
+    AOT_Thread_active_exception_offset = 1736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1704;
+    AOT_Thread_active_stacktrace_offset = 1744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1816;
+    1856;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1784;
+    AOT_Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1824;
+    AOT_Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1736;
+    AOT_Thread_execution_state_offset = 1776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1712;
+    AOT_Thread_global_object_pool_offset = 1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1768;
+    AOT_Thread_exit_through_ffi_offset = 1808;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -12328,20 +12586,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1720;
+    1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1728;
+    AOT_Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1744;
+    AOT_Thread_safepoint_state_offset = 1784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -12349,31 +12609,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1640;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1632;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1648;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -12385,19 +12651,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1792;
+    AOT_Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1800;
+    1840;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -12511,9 +12777,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -12862,21 +13128,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -12913,120 +13185,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 28;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1632;
+    AOT_Thread_active_exception_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1640;
+    AOT_Thread_active_stacktrace_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1720;
+    AOT_Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1760;
+    AOT_Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1672;
+    AOT_Thread_execution_state_offset = 1712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1648;
+    AOT_Thread_global_object_pool_offset = 1688;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1704;
+    AOT_Thread_exit_through_ffi_offset = 1744;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -13056,20 +13328,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1656;
+    1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1664;
+    AOT_Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1680;
+    AOT_Thread_safepoint_state_offset = 1720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -13077,31 +13351,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1576;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1568;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1584;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -13113,19 +13393,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1728;
+    AOT_Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -13239,8 +13519,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -13589,21 +13869,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -13640,120 +13926,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 28;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1696;
+    AOT_Thread_active_exception_offset = 1736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1704;
+    AOT_Thread_active_stacktrace_offset = 1744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1816;
+    1856;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1784;
+    AOT_Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1824;
+    AOT_Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1736;
+    AOT_Thread_execution_state_offset = 1776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1712;
+    AOT_Thread_global_object_pool_offset = 1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1768;
+    AOT_Thread_exit_through_ffi_offset = 1808;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -13783,20 +14069,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1720;
+    1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1728;
+    AOT_Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1744;
+    AOT_Thread_safepoint_state_offset = 1784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -13804,31 +14092,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1640;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1632;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1648;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -13840,19 +14134,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1792;
+    AOT_Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1800;
+    1840;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -13966,9 +14260,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -14317,21 +14611,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 504;
+    AOT_ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 528;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 500;
+    AOT_ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 516;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 508;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    AOT_ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 524;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 520;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     12;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 4;
@@ -14368,120 +14668,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 16;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 400;
+    AOT_Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 856;
+    AOT_Thread_active_exception_offset = 876;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 860;
+    AOT_Thread_active_stacktrace_offset = 880;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 292;
+    AOT_Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 308;
+    AOT_Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 312;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 316;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    896;
+    916;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     120;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 296;
+    AOT_Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 140;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    920;
+    944;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 900;
+    AOT_Thread_double_truncate_round_supported_offset = 920;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 924;
+    AOT_Thread_service_extension_stream_offset = 948;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    336;
+    340;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    248;
+    252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 340;
+    AOT_Thread_deoptimize_entry_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 252;
+    AOT_Thread_deoptimize_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 380;
+    AOT_Thread_double_abs_address_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 376;
+    AOT_Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 272;
+    AOT_Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 876;
+    AOT_Thread_execution_state_offset = 896;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 276;
+    AOT_Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 284;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 344;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 392;
+    AOT_Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 388;
+    AOT_Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 384;
+    AOT_Thread_float_not_address_offset = 388;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 396;
+    AOT_Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 864;
+    AOT_Thread_global_object_pool_offset = 884;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 892;
+    AOT_Thread_exit_through_ffi_offset = 912;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    928;
+    952;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 64;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 256;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 260;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 268;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 328;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 332;
+    AOT_Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 232;
+    AOT_Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -14511,19 +14811,21 @@
     AOT_Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 212;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 868;
+    AOT_Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 888;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 872;
+    AOT_Thread_saved_shadow_call_stack_offset = 892;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 880;
+    AOT_Thread_safepoint_state_offset = 900;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 264;
+    AOT_Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 352;
+    AOT_Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     28;
 static constexpr dart::compiler::target::word
@@ -14531,31 +14833,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 76;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 828;
+    AOT_Thread_suspend_state_await_entry_point_offset = 836;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 824;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 832;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 840;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 836;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 844;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 840;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 848;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 844;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 852;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 848;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 856;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 852;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 860;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 864;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 868;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 872;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 48;
@@ -14567,19 +14875,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 288;
+    AOT_Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 32;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 36;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    884;
+    904;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 888;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 904;
+    AOT_Thread_callback_stack_return_offset = 908;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 928;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 348;
+    AOT_Thread_jump_to_frame_entry_point_offset = 352;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    912;
+    936;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -14692,9 +15000,9 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,  -1,  -1, -1, -1, 752, 756, 760, -1,  -1,  764,
-        768, 772, -1, -1, -1, 776, 780, 784, 788, 792, 796,
-        800, 804, -1, -1, -1, -1,  808, 812, 816, 820};
+        -1,  -1,  -1, -1, -1, 760, 764, 768, -1,  -1,  772,
+        776, 780, -1, -1, -1, 784, 788, 792, 796, 800, 804,
+        808, 812, -1, -1, -1, -1,  816, 820, 824, 828};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     12;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
@@ -15044,21 +15352,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -15095,120 +15409,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1688;
+    AOT_Thread_active_exception_offset = 1728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1696;
+    AOT_Thread_active_stacktrace_offset = 1736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1808;
+    1848;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1776;
+    AOT_Thread_double_truncate_round_supported_offset = 1816;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1816;
+    AOT_Thread_service_extension_stream_offset = 1856;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1728;
+    AOT_Thread_execution_state_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1704;
+    AOT_Thread_global_object_pool_offset = 1744;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1760;
+    AOT_Thread_exit_through_ffi_offset = 1800;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1824;
+    1864;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -15238,20 +15552,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1720;
+    AOT_Thread_saved_shadow_call_stack_offset = 1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1736;
+    AOT_Thread_safepoint_state_offset = 1776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -15259,31 +15575,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1632;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1624;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1640;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1648;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1656;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1664;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1672;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1680;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1696;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1720;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -15295,19 +15617,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1752;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1784;
+    AOT_Thread_callback_stack_return_offset = 1792;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1824;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1792;
+    1832;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -15421,9 +15743,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,   -1,   -1, -1, -1, 1480, 1488, 1496, -1,   -1,   1504,
-        1512, 1520, -1, -1, -1, 1528, 1536, 1544, 1552, 1560, 1568,
-        1576, 1584, -1, -1, -1, -1,   1592, 1600, 1608, 1616};
+        -1,   -1,   -1, -1, -1, 1496, 1504, 1512, -1,   -1,   1520,
+        1528, 1536, -1, -1, -1, 1544, 1552, 1560, 1568, 1576, 1584,
+        1592, 1600, -1, -1, -1, -1,   1608, 1616, 1624, 1632};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -15765,21 +16087,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 504;
+    AOT_ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 528;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 500;
+    AOT_ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 516;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 508;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    AOT_ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 524;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 520;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     12;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 4;
@@ -15816,120 +16144,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 16;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 400;
+    AOT_Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 816;
+    AOT_Thread_active_exception_offset = 836;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 820;
+    AOT_Thread_active_stacktrace_offset = 840;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 292;
+    AOT_Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 308;
+    AOT_Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 312;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 316;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    856;
+    876;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     120;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 296;
+    AOT_Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 140;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    880;
+    904;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 860;
+    AOT_Thread_double_truncate_round_supported_offset = 880;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 884;
+    AOT_Thread_service_extension_stream_offset = 908;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    336;
+    340;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    248;
+    252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 340;
+    AOT_Thread_deoptimize_entry_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 252;
+    AOT_Thread_deoptimize_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 380;
+    AOT_Thread_double_abs_address_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 376;
+    AOT_Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 272;
+    AOT_Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 836;
+    AOT_Thread_execution_state_offset = 856;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 276;
+    AOT_Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 284;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 344;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 392;
+    AOT_Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 388;
+    AOT_Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 384;
+    AOT_Thread_float_not_address_offset = 388;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 396;
+    AOT_Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 824;
+    AOT_Thread_global_object_pool_offset = 844;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 852;
+    AOT_Thread_exit_through_ffi_offset = 872;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    888;
+    912;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 64;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 256;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 260;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 268;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 328;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 332;
+    AOT_Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 232;
+    AOT_Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -15959,19 +16287,21 @@
     AOT_Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 212;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 828;
+    AOT_Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 848;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 832;
+    AOT_Thread_saved_shadow_call_stack_offset = 852;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 840;
+    AOT_Thread_safepoint_state_offset = 860;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 264;
+    AOT_Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 352;
+    AOT_Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     28;
 static constexpr dart::compiler::target::word
@@ -15979,31 +16309,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 76;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 788;
+    AOT_Thread_suspend_state_await_entry_point_offset = 796;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 784;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 792;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 792;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 800;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 796;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 804;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 800;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 808;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 804;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 812;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 808;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 816;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 812;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 820;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 824;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 828;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 48;
@@ -16015,19 +16351,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 288;
+    AOT_Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 32;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 36;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    844;
+    864;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 848;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 864;
+    AOT_Thread_callback_stack_return_offset = 868;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 888;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 348;
+    AOT_Thread_jump_to_frame_entry_point_offset = 352;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    872;
+    896;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -16140,7 +16476,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        752, 756, 760, 764, 768, -1, 772, -1, 776, 780, -1, -1, -1, -1, -1, -1};
+        760, 764, 768, 772, 776, -1, 780, -1, 784, 788, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     12;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
@@ -16481,21 +16817,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -16532,120 +16874,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1632;
+    AOT_Thread_active_exception_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1640;
+    AOT_Thread_active_stacktrace_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1720;
+    AOT_Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1760;
+    AOT_Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1672;
+    AOT_Thread_execution_state_offset = 1712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1648;
+    AOT_Thread_global_object_pool_offset = 1688;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1704;
+    AOT_Thread_exit_through_ffi_offset = 1744;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -16675,20 +17017,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1656;
+    1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1664;
+    AOT_Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1680;
+    AOT_Thread_safepoint_state_offset = 1720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -16696,31 +17040,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1576;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1568;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1584;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -16732,19 +17082,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1728;
+    AOT_Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -16858,8 +17208,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -17203,21 +17553,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -17254,120 +17610,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1696;
+    AOT_Thread_active_exception_offset = 1736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1704;
+    AOT_Thread_active_stacktrace_offset = 1744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1816;
+    1856;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1784;
+    AOT_Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1824;
+    AOT_Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1736;
+    AOT_Thread_execution_state_offset = 1776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1712;
+    AOT_Thread_global_object_pool_offset = 1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1768;
+    AOT_Thread_exit_through_ffi_offset = 1808;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -17397,20 +17753,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1720;
+    1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1728;
+    AOT_Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1744;
+    AOT_Thread_safepoint_state_offset = 1784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -17418,31 +17776,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1640;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1632;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1648;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -17454,19 +17818,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1792;
+    AOT_Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1800;
+    1840;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -17580,9 +17944,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -17922,21 +18286,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -17973,120 +18343,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 28;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1632;
+    AOT_Thread_active_exception_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1640;
+    AOT_Thread_active_stacktrace_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1720;
+    AOT_Thread_double_truncate_round_supported_offset = 1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1760;
+    AOT_Thread_service_extension_stream_offset = 1800;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1672;
+    AOT_Thread_execution_state_offset = 1712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1648;
+    AOT_Thread_global_object_pool_offset = 1688;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1704;
+    AOT_Thread_exit_through_ffi_offset = 1744;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -18116,20 +18486,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1656;
+    1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1664;
+    AOT_Thread_saved_shadow_call_stack_offset = 1704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1680;
+    AOT_Thread_safepoint_state_offset = 1720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -18137,31 +18509,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1576;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1568;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1584;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1592;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1608;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1600;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1608;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1616;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1624;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1640;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1648;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1656;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -18173,19 +18551,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1688;
+    1728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1696;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1728;
+    AOT_Thread_callback_stack_return_offset = 1736;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1736;
+    1776;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -18299,8 +18677,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, -1,   -1,   1512, 1520,
-        1528, 1536, 1544, -1,   1552, 1560, -1,   -1};
+        1496, 1504, 1512, 1520, -1,   -1,   1528, 1536,
+        1544, 1552, 1560, -1,   1568, 1576, -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -18640,21 +19018,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -18691,120 +19075,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 28;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1696;
+    AOT_Thread_active_exception_offset = 1736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1704;
+    AOT_Thread_active_stacktrace_offset = 1744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1776;
+    1816;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1816;
+    1856;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1784;
+    AOT_Thread_double_truncate_round_supported_offset = 1824;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1824;
+    AOT_Thread_service_extension_stream_offset = 1864;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1736;
+    AOT_Thread_execution_state_offset = 1776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1712;
+    AOT_Thread_global_object_pool_offset = 1752;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1768;
+    AOT_Thread_exit_through_ffi_offset = 1808;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1832;
+    1872;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -18834,20 +19218,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1720;
+    1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1728;
+    AOT_Thread_saved_shadow_call_stack_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1744;
+    AOT_Thread_safepoint_state_offset = 1784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -18855,31 +19241,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1640;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1632;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1648;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1656;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1664;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1672;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1680;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1688;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1720;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1728;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -18891,19 +19283,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1752;
+    1792;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1760;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1792;
+    AOT_Thread_callback_stack_return_offset = 1800;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1832;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1800;
+    1840;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -19017,9 +19409,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1480, 1488, 1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560,
-        1568, 1576, 1584, 1592, -1,   -1,   -1,   -1,   1600, 1608, -1,
-        -1,   1616, 1624, 1632, -1,   -1,   -1,   -1,   -1,   -1};
+        1496, 1504, 1512, 1520, 1528, 1536, 1544, 1552, 1560, 1568, 1576,
+        1584, 1592, 1600, 1608, -1,   -1,   -1,   -1,   1616, 1624, -1,
+        -1,   1632, 1640, 1648, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -19359,21 +19751,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 504;
+    AOT_ObjectStore_suspend_state_await_offset = 508;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 528;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 500;
+    AOT_ObjectStore_suspend_state_init_async_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 516;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 508;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 532;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 512;
+    AOT_ObjectStore_suspend_state_return_async_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 524;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 516;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 520;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 528;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 540;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 524;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 536;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     12;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 4;
@@ -19410,120 +19808,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 16;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 400;
+    AOT_Thread_AllocateArray_entry_point_offset = 404;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 856;
+    AOT_Thread_active_exception_offset = 876;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 860;
+    AOT_Thread_active_stacktrace_offset = 880;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 292;
+    AOT_Thread_array_write_barrier_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 300;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 304;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 304;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 308;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 308;
+    AOT_Thread_allocate_object_entry_point_offset = 312;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 312;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 316;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 316;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    896;
+    916;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 204;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 364;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 368;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     120;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 356;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 296;
+    AOT_Thread_call_to_runtime_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 140;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    920;
+    944;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 44;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 900;
+    AOT_Thread_double_truncate_round_supported_offset = 920;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 924;
+    AOT_Thread_service_extension_stream_offset = 948;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    336;
+    340;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    248;
+    252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 340;
+    AOT_Thread_deoptimize_entry_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 252;
+    AOT_Thread_deoptimize_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 380;
+    AOT_Thread_double_abs_address_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 376;
+    AOT_Thread_double_negate_address_offset = 380;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 52;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 272;
+    AOT_Thread_enter_safepoint_stub_offset = 276;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 876;
+    AOT_Thread_execution_state_offset = 896;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 276;
+    AOT_Thread_exit_safepoint_stub_offset = 280;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 280;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 284;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 284;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 288;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 344;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 348;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 132;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 392;
+    AOT_Thread_float_absolute_address_offset = 396;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 388;
+    AOT_Thread_float_negate_address_offset = 392;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 384;
+    AOT_Thread_float_not_address_offset = 388;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 396;
+    AOT_Thread_float_zerow_address_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 864;
+    AOT_Thread_global_object_pool_offset = 884;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 892;
+    AOT_Thread_exit_through_ffi_offset = 912;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    928;
+    952;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 64;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 256;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 260;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 268;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 80;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 328;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 332;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 332;
+    AOT_Thread_switchable_call_miss_entry_offset = 336;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 232;
+    AOT_Thread_switchable_call_miss_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 360;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 364;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 148;
 static constexpr dart::compiler::target::word
@@ -19553,19 +19951,21 @@
     AOT_Thread_return_async_star_stub_offset = 220;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 212;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 224;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 368;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 868;
+    AOT_Thread_predefined_symbols_address_offset = 372;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 888;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 872;
+    AOT_Thread_saved_shadow_call_stack_offset = 892;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 880;
+    AOT_Thread_safepoint_state_offset = 900;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 264;
+    AOT_Thread_slow_type_test_stub_offset = 268;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 352;
+    AOT_Thread_slow_type_test_entry_point_offset = 356;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     28;
 static constexpr dart::compiler::target::word
@@ -19573,31 +19973,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 60;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 324;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 228;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 320;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 324;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 224;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 228;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 76;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 828;
+    AOT_Thread_suspend_state_await_entry_point_offset = 836;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 824;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 832;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 832;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 840;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 836;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 844;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 840;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 848;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 844;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 852;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 848;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 856;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 852;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 860;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 864;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 868;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 872;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 48;
@@ -19609,19 +20015,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 104;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 288;
+    AOT_Thread_write_barrier_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 32;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 36;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    884;
+    904;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 888;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 904;
+    AOT_Thread_callback_stack_return_offset = 908;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 928;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 348;
+    AOT_Thread_jump_to_frame_entry_point_offset = 352;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    912;
+    936;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -19734,9 +20140,9 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,  -1,  -1, -1, -1, 752, 756, 760, -1,  -1,  764,
-        768, 772, -1, -1, -1, 776, 780, 784, 788, 792, 796,
-        800, 804, -1, -1, -1, -1,  808, 812, 816, 820};
+        -1,  -1,  -1, -1, -1, 760, 764, 768, -1,  -1,  772,
+        776, 780, -1, -1, -1, 784, 788, 792, 796, 800, 804,
+        808, 812, -1, -1, -1, -1,  816, 820, 824, 828};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     12;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
@@ -20077,21 +20483,27 @@
 static constexpr dart::compiler::target::word AOT_ObjectStore_type_type_offset =
     224;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_await_offset = 1008;
+    AOT_ObjectStore_suspend_state_await_offset = 1016;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_handle_exception_offset = 1056;
+    AOT_ObjectStore_suspend_state_handle_exception_offset = 1088;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_offset = 1000;
+    AOT_ObjectStore_suspend_state_init_async_offset = 1008;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_init_async_star_offset = 1032;
+    AOT_ObjectStore_suspend_state_init_async_star_offset = 1040;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_offset = 1016;
+    AOT_ObjectStore_suspend_state_init_sync_star_offset = 1064;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1024;
+    AOT_ObjectStore_suspend_state_return_async_offset = 1024;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_return_async_star_offset = 1048;
+    AOT_ObjectStore_suspend_state_return_async_not_future_offset = 1032;
 static constexpr dart::compiler::target::word
-    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1040;
+    AOT_ObjectStore_suspend_state_return_async_star_offset = 1056;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_return_sync_star_offset = 1080;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_async_star_offset = 1048;
+static constexpr dart::compiler::target::word
+    AOT_ObjectStore_suspend_state_yield_sync_star_offset = 1072;
 static constexpr dart::compiler::target::word AOT_OneByteString_data_offset =
     16;
 static constexpr dart::compiler::target::word AOT_PointerBase_data_offset = 8;
@@ -20128,120 +20540,120 @@
 static constexpr dart::compiler::target::word
     AOT_SuspendState_then_callback_offset = 32;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 776;
+    AOT_Thread_AllocateArray_entry_point_offset = 784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1688;
+    AOT_Thread_active_exception_offset = 1728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1696;
+    AOT_Thread_active_stacktrace_offset = 1736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 560;
+    AOT_Thread_array_write_barrier_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 576;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 344;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 584;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 592;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 592;
+    AOT_Thread_allocate_object_entry_point_offset = 600;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 600;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 608;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_parameterized_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 608;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 616;
 static constexpr dart::compiler::target::word
     AOT_Thread_allocate_object_slow_stub_offset = 376;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1768;
+    1808;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_exception_handler_stub_offset = 384;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 704;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 712;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     216;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 688;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 568;
+    AOT_Thread_call_to_runtime_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 256;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1808;
+    1848;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 88;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_truncate_round_supported_offset = 1776;
+    AOT_Thread_double_truncate_round_supported_offset = 1816;
 static constexpr dart::compiler::target::word
-    AOT_Thread_service_extension_stream_offset = 1816;
+    AOT_Thread_service_extension_stream_offset = 1856;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    648;
+    656;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    472;
+    480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 656;
+    AOT_Thread_deoptimize_entry_offset = 664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 480;
+    AOT_Thread_deoptimize_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 736;
+    AOT_Thread_double_abs_address_offset = 744;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 728;
+    AOT_Thread_double_negate_address_offset = 736;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 104;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 520;
+    AOT_Thread_enter_safepoint_stub_offset = 528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1728;
+    AOT_Thread_execution_state_offset = 1768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 528;
+    AOT_Thread_exit_safepoint_stub_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 536;
+    AOT_Thread_exit_safepoint_ignore_unwind_in_progress_stub_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 544;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 664;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 672;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 240;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 760;
+    AOT_Thread_float_absolute_address_offset = 768;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 752;
+    AOT_Thread_float_negate_address_offset = 760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 744;
+    AOT_Thread_float_not_address_offset = 752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 768;
+    AOT_Thread_float_zerow_address_offset = 776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1704;
+    AOT_Thread_global_object_pool_offset = 1744;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1760;
+    AOT_Thread_exit_through_ffi_offset = 1800;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_group_offset =
-    1824;
+    1864;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 488;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 496;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 512;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 520;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 632;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 640;
+    AOT_Thread_switchable_call_miss_entry_offset = 648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 440;
+    AOT_Thread_switchable_call_miss_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 696;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 704;
 static constexpr dart::compiler::target::word
     AOT_Thread_late_initialization_error_shared_with_fpu_regs_stub_offset = 272;
 static constexpr dart::compiler::target::word
@@ -20271,20 +20683,22 @@
     AOT_Thread_return_async_star_stub_offset = 416;
 static constexpr dart::compiler::target::word
     AOT_Thread_return_async_stub_offset = 400;
+static constexpr dart::compiler::target::word
+    AOT_Thread_return_sync_star_stub_offset = 424;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     200;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 720;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1712;
+    1752;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1720;
+    AOT_Thread_saved_shadow_call_stack_offset = 1760;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1736;
+    AOT_Thread_safepoint_state_offset = 1776;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 504;
+    AOT_Thread_slow_type_test_stub_offset = 512;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 680;
+    AOT_Thread_slow_type_test_entry_point_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     56;
 static constexpr dart::compiler::target::word
@@ -20292,31 +20706,37 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 120;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 624;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 632;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 432;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 616;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 424;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 432;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 152;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_await_entry_point_offset = 1632;
+    AOT_Thread_suspend_state_await_entry_point_offset = 1648;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_entry_point_offset = 1624;
+    AOT_Thread_suspend_state_init_async_entry_point_offset = 1640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_entry_point_offset = 1640;
+    AOT_Thread_suspend_state_return_async_entry_point_offset = 1656;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1648;
+    AOT_Thread_suspend_state_return_async_not_future_entry_point_offset = 1664;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1656;
+    AOT_Thread_suspend_state_init_async_star_entry_point_offset = 1672;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1664;
+    AOT_Thread_suspend_state_yield_async_star_entry_point_offset = 1680;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1672;
+    AOT_Thread_suspend_state_return_async_star_entry_point_offset = 1688;
 static constexpr dart::compiler::target::word
-    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1680;
+    AOT_Thread_suspend_state_init_sync_star_entry_point_offset = 1696;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_yield_sync_star_entry_point_offset = 1704;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_return_sync_star_entry_point_offset = 1712;
+static constexpr dart::compiler::target::word
+    AOT_Thread_suspend_state_handle_exception_entry_point_offset = 1720;
 static constexpr dart::compiler::target::word
     AOT_Thread_top_exit_frame_info_offset = 144;
 static constexpr dart::compiler::target::word AOT_Thread_top_offset = 96;
@@ -20328,19 +20748,19 @@
     AOT_Thread_unboxed_double_runtime_arg_offset = 192;
 static constexpr dart::compiler::target::word AOT_Thread_vm_tag_offset = 176;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 552;
+    AOT_Thread_write_barrier_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 64;
 static constexpr dart::compiler::target::word AOT_Thread_heap_base_offset = 72;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1744;
+    1784;
 static constexpr dart::compiler::target::word
-    AOT_Thread_callback_stack_return_offset = 1752;
-static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1784;
+    AOT_Thread_callback_stack_return_offset = 1792;
+static constexpr dart::compiler::target::word AOT_Thread_random_offset = 1824;
 static constexpr dart::compiler::target::word
-    AOT_Thread_jump_to_frame_entry_point_offset = 672;
+    AOT_Thread_jump_to_frame_entry_point_offset = 680;
 static constexpr dart::compiler::target::word AOT_Thread_tsan_utils_offset =
-    1792;
+    1832;
 static constexpr dart::compiler::target::word
     AOT_TsanUtils_setjmp_function_offset = 0;
 static constexpr dart::compiler::target::word
@@ -20454,9 +20874,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        -1,   -1,   -1, -1, -1, 1480, 1488, 1496, -1,   -1,   1504,
-        1512, 1520, -1, -1, -1, 1528, 1536, 1544, 1552, 1560, 1568,
-        1576, 1584, -1, -1, -1, -1,   1592, 1600, 1608, 1616};
+        -1,   -1,   -1, -1, -1, 1496, 1504, 1512, -1,   -1,   1520,
+        1528, 1536, -1, -1, -1, 1544, 1552, 1560, 1568, 1576, 1584,
+        1592, 1600, -1, -1, -1, -1,   1608, 1616, 1624, 1632};
 static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
     24;
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index d4b23a4..4b3ba6c 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -181,10 +181,13 @@
   FIELD(ObjectStore, suspend_state_handle_exception_offset)                    \
   FIELD(ObjectStore, suspend_state_init_async_offset)                          \
   FIELD(ObjectStore, suspend_state_init_async_star_offset)                     \
+  FIELD(ObjectStore, suspend_state_init_sync_star_offset)                      \
   FIELD(ObjectStore, suspend_state_return_async_offset)                        \
   FIELD(ObjectStore, suspend_state_return_async_not_future_offset)             \
   FIELD(ObjectStore, suspend_state_return_async_star_offset)                   \
+  FIELD(ObjectStore, suspend_state_return_sync_star_offset)                    \
   FIELD(ObjectStore, suspend_state_yield_async_star_offset)                    \
+  FIELD(ObjectStore, suspend_state_yield_sync_star_offset)                     \
   FIELD(OneByteString, data_offset)                                            \
   FIELD(PointerBase, data_offset)                                              \
   FIELD(Pointer, type_arguments_offset)                                        \
@@ -278,6 +281,7 @@
   FIELD(Thread, return_async_not_future_stub_offset)                           \
   FIELD(Thread, return_async_star_stub_offset)                                 \
   FIELD(Thread, return_async_stub_offset)                                      \
+  FIELD(Thread, return_sync_star_stub_offset)                                  \
                                                                                \
   FIELD(Thread, object_null_offset)                                            \
   FIELD(Thread, predefined_symbols_address_offset)                             \
@@ -302,6 +306,9 @@
   FIELD(Thread, suspend_state_init_async_star_entry_point_offset)              \
   FIELD(Thread, suspend_state_yield_async_star_entry_point_offset)             \
   FIELD(Thread, suspend_state_return_async_star_entry_point_offset)            \
+  FIELD(Thread, suspend_state_init_sync_star_entry_point_offset)               \
+  FIELD(Thread, suspend_state_yield_sync_star_entry_point_offset)              \
+  FIELD(Thread, suspend_state_return_sync_star_entry_point_offset)             \
   FIELD(Thread, suspend_state_handle_exception_entry_point_offset)             \
   FIELD(Thread, top_exit_frame_info_offset)                                    \
   FIELD(Thread, top_offset)                                                    \
diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc
index 213650a..7dbc578 100644
--- a/runtime/vm/compiler/stub_code_compiler.cc
+++ b/runtime/vm/compiler/stub_code_compiler.cc
@@ -1298,6 +1298,85 @@
   }
 }
 
+// Helper to generate allocation of _SuspendState instance.
+// Initializes tags, frame_capacity and frame_size.
+// Other fields are not initialized.
+//
+// Input:
+//   frame_size_reg: size of the frame payload in bytes.
+// Output:
+//   result_reg: allocated instance.
+// Clobbers:
+//   result_reg, temp_reg.
+static void GenerateAllocateSuspendState(Assembler* assembler,
+                                         Label* slow_case,
+                                         Register result_reg,
+                                         Register frame_size_reg,
+                                         Register temp_reg) {
+  // Check for allocation tracing.
+  NOT_IN_PRODUCT(
+      __ MaybeTraceAllocation(kSuspendStateCid, slow_case, temp_reg));
+
+  // Compute the rounded instance size.
+  const intptr_t fixed_size_plus_alignment_padding =
+      (target::SuspendState::HeaderSize() +
+       target::SuspendState::FrameSizeGrowthGap() * target::kWordSize +
+       target::ObjectAlignment::kObjectAlignment - 1);
+  __ AddImmediate(temp_reg, frame_size_reg, fixed_size_plus_alignment_padding);
+  __ AndImmediate(temp_reg, -target::ObjectAlignment::kObjectAlignment);
+
+  // Now allocate the object.
+  __ LoadFromOffset(result_reg, Address(THR, target::Thread::top_offset()));
+  __ AddRegisters(temp_reg, result_reg);
+  // Check if the allocation fits into the remaining space.
+  __ CompareWithMemoryValue(temp_reg,
+                            Address(THR, target::Thread::end_offset()));
+  __ BranchIf(UNSIGNED_GREATER_EQUAL, slow_case);
+
+  // Successfully allocated the object, now update top to point to
+  // next object start and initialize the object.
+  __ StoreToOffset(temp_reg, Address(THR, target::Thread::top_offset()));
+  __ SubRegisters(temp_reg, result_reg);
+  __ AddImmediate(result_reg, kHeapObjectTag);
+
+  if (!FLAG_precompiled_mode) {
+    // Use rounded object size to calculate and save frame capacity.
+    __ AddImmediate(temp_reg, temp_reg,
+                    -target::SuspendState::payload_offset());
+    __ StoreToOffset(
+        temp_reg, FieldAddress(result_reg,
+                               target::SuspendState::frame_capacity_offset()));
+    // Restore rounded object size.
+    __ AddImmediate(temp_reg, temp_reg, target::SuspendState::payload_offset());
+  }
+
+  // Calculate the size tag.
+  {
+    Label size_tag_overflow, done;
+    __ CompareImmediate(temp_reg, target::UntaggedObject::kSizeTagMaxSizeTag);
+    __ BranchIf(UNSIGNED_GREATER, &size_tag_overflow, Assembler::kNearJump);
+    __ LslImmediate(temp_reg,
+                    target::UntaggedObject::kTagBitsSizeTagPos -
+                        target::ObjectAlignment::kObjectAlignmentLog2);
+    __ Jump(&done, Assembler::kNearJump);
+
+    __ Bind(&size_tag_overflow);
+    // Set overflow size tag value.
+    __ LoadImmediate(temp_reg, 0);
+
+    __ Bind(&done);
+    uword tags = target::MakeTagWordForNewSpaceObject(kSuspendStateCid, 0);
+    __ OrImmediate(temp_reg, tags);
+    __ StoreToOffset(
+        temp_reg,
+        FieldAddress(result_reg, target::Object::tags_offset()));  // Tags.
+  }
+
+  __ StoreToOffset(
+      frame_size_reg,
+      FieldAddress(result_reg, target::SuspendState::frame_size_offset()));
+}
+
 void StubCodeCompiler::GenerateSuspendStub(
     Assembler* assembler,
     intptr_t suspend_entry_point_offset_in_thread,
@@ -1350,65 +1429,9 @@
   __ Comment("Allocate SuspendState");
   __ MoveRegister(kFunctionData, kSuspendState);
 
-  // Check for allocation tracing.
-  NOT_IN_PRODUCT(
-      __ MaybeTraceAllocation(kSuspendStateCid, &alloc_slow_case, kTemp));
+  GenerateAllocateSuspendState(assembler, &alloc_slow_case, kSuspendState,
+                               kFrameSize, kTemp);
 
-  // Compute the rounded instance size.
-  const intptr_t fixed_size_plus_alignment_padding =
-      (target::SuspendState::HeaderSize() +
-       target::SuspendState::FrameSizeGrowthGap() * target::kWordSize +
-       target::ObjectAlignment::kObjectAlignment - 1);
-  __ AddImmediate(kTemp, kFrameSize, fixed_size_plus_alignment_padding);
-  __ AndImmediate(kTemp, -target::ObjectAlignment::kObjectAlignment);
-
-  // Now allocate the object.
-  __ LoadFromOffset(kSuspendState, Address(THR, target::Thread::top_offset()));
-  __ AddRegisters(kTemp, kSuspendState);
-  // Check if the allocation fits into the remaining space.
-  __ CompareWithMemoryValue(kTemp, Address(THR, target::Thread::end_offset()));
-  __ BranchIf(UNSIGNED_GREATER_EQUAL, &alloc_slow_case);
-
-  // Successfully allocated the object, now update top to point to
-  // next object start and initialize the object.
-  __ StoreToOffset(kTemp, Address(THR, target::Thread::top_offset()));
-  __ SubRegisters(kTemp, kSuspendState);
-  __ AddImmediate(kSuspendState, kHeapObjectTag);
-
-  if (!FLAG_precompiled_mode) {
-    // Use rounded object size to calculate and save frame capacity.
-    __ AddImmediate(kTemp, kTemp, -target::SuspendState::payload_offset());
-    __ StoreToOffset(
-        kTemp, FieldAddress(kSuspendState,
-                            target::SuspendState::frame_capacity_offset()));
-    // Restore rounded object size.
-    __ AddImmediate(kTemp, kTemp, target::SuspendState::payload_offset());
-  }
-
-  // Calculate the size tag.
-  {
-    Label size_tag_overflow, done;
-    __ CompareImmediate(kTemp, target::UntaggedObject::kSizeTagMaxSizeTag);
-    __ BranchIf(UNSIGNED_GREATER, &size_tag_overflow, Assembler::kNearJump);
-    __ LslImmediate(kTemp, target::UntaggedObject::kTagBitsSizeTagPos -
-                               target::ObjectAlignment::kObjectAlignmentLog2);
-    __ Jump(&done, Assembler::kNearJump);
-
-    __ Bind(&size_tag_overflow);
-    // Set overflow size tag value.
-    __ LoadImmediate(kTemp, 0);
-
-    __ Bind(&done);
-    uword tags = target::MakeTagWordForNewSpaceObject(kSuspendStateCid, 0);
-    __ OrImmediate(kTemp, tags);
-    __ StoreToOffset(
-        kTemp,
-        FieldAddress(kSuspendState, target::Object::tags_offset()));  // Tags.
-  }
-
-  __ StoreToOffset(
-      kFrameSize,
-      FieldAddress(kSuspendState, target::SuspendState::frame_size_offset()));
   __ StoreCompressedIntoObjectNoBarrier(
       kSuspendState,
       FieldAddress(kSuspendState, target::SuspendState::function_data_offset()),
@@ -1592,6 +1615,13 @@
       target::ObjectStore::suspend_state_yield_async_star_offset());
 }
 
+void StubCodeCompiler::GenerateYieldSyncStarStub(Assembler* assembler) {
+  GenerateSuspendStub(
+      assembler,
+      target::Thread::suspend_state_yield_sync_star_entry_point_offset(),
+      target::ObjectStore::suspend_state_yield_sync_star_offset());
+}
+
 void StubCodeCompiler::GenerateInitSuspendableFunctionStub(
     Assembler* assembler,
     intptr_t init_entry_point_offset_in_thread,
@@ -1626,6 +1656,13 @@
       target::ObjectStore::suspend_state_init_async_star_offset());
 }
 
+void StubCodeCompiler::GenerateInitSyncStarStub(Assembler* assembler) {
+  GenerateInitSuspendableFunctionStub(
+      assembler,
+      target::Thread::suspend_state_init_sync_star_entry_point_offset(),
+      target::ObjectStore::suspend_state_init_sync_star_offset());
+}
+
 void StubCodeCompiler::GenerateResumeStub(Assembler* assembler) {
   const Register kSuspendState = ResumeStubABI::kSuspendStateReg;
   const Register kTemp = ResumeStubABI::kTempReg;
@@ -1864,6 +1901,14 @@
       target::Thread::return_async_star_stub_offset());
 }
 
+void StubCodeCompiler::GenerateReturnSyncStarStub(Assembler* assembler) {
+  GenerateReturnStub(
+      assembler,
+      target::Thread::suspend_state_return_sync_star_entry_point_offset(),
+      target::ObjectStore::suspend_state_return_sync_star_offset(),
+      target::Thread::return_sync_star_stub_offset());
+}
+
 void StubCodeCompiler::GenerateAsyncExceptionHandlerStub(Assembler* assembler) {
   const Register kSuspendState = AsyncExceptionHandlerStubABI::kSuspendStateReg;
   ASSERT(kSuspendState != kExceptionObjectReg);
@@ -1915,6 +1960,102 @@
   __ Breakpoint();
 }
 
+void StubCodeCompiler::GenerateCloneSuspendStateStub(Assembler* assembler) {
+  const Register kSource = CloneSuspendStateStubABI::kSourceReg;
+  const Register kDestination = CloneSuspendStateStubABI::kDestinationReg;
+  const Register kTemp = CloneSuspendStateStubABI::kTempReg;
+  const Register kFrameSize = CloneSuspendStateStubABI::kFrameSizeReg;
+  const Register kSrcFrame = CloneSuspendStateStubABI::kSrcFrameReg;
+  const Register kDstFrame = CloneSuspendStateStubABI::kDstFrameReg;
+  Label alloc_slow_case;
+
+#ifdef DEBUG
+  {
+    // Can only clone _SuspendState objects with copied frames.
+    Label okay;
+    __ LoadFromOffset(kTemp,
+                      FieldAddress(kSource, target::SuspendState::pc_offset()));
+    __ CompareImmediate(kTemp, 0);
+    __ BranchIf(NOT_EQUAL, &okay);
+    __ Breakpoint();
+    __ Bind(&okay);
+  }
+#endif
+
+  __ LoadFromOffset(
+      kFrameSize,
+      FieldAddress(kSource, target::SuspendState::frame_size_offset()));
+
+  GenerateAllocateSuspendState(assembler, &alloc_slow_case, kDestination,
+                               kFrameSize, kTemp);
+
+  // Copy pc.
+  __ LoadFromOffset(kTemp,
+                    FieldAddress(kSource, target::SuspendState::pc_offset()));
+  __ StoreToOffset(
+      kTemp, FieldAddress(kDestination, target::SuspendState::pc_offset()));
+
+  // Copy function_data.
+  __ LoadCompressedFieldFromOffset(
+      kTemp, kSource, target::SuspendState::function_data_offset());
+  __ StoreCompressedIntoObjectNoBarrier(
+      kDestination,
+      FieldAddress(kDestination, target::SuspendState::function_data_offset()),
+      kTemp);
+
+  // Copy then_callback.
+  __ LoadCompressedFieldFromOffset(
+      kTemp, kSource, target::SuspendState::then_callback_offset());
+  __ StoreCompressedIntoObjectNoBarrier(
+      kDestination,
+      FieldAddress(kDestination, target::SuspendState::then_callback_offset()),
+      kTemp);
+
+  // Copy error_callback.
+  __ LoadCompressedFieldFromOffset(
+      kTemp, kSource, target::SuspendState::error_callback_offset());
+  __ StoreCompressedIntoObjectNoBarrier(
+      kDestination,
+      FieldAddress(kDestination, target::SuspendState::error_callback_offset()),
+      kTemp);
+
+  // Copy payload frame.
+  if (kSrcFrame == THR) {
+    __ PushRegister(THR);
+  }
+  const uword offset = target::SuspendState::payload_offset() - kHeapObjectTag;
+  __ AddImmediate(kSrcFrame, kSource, offset);
+  __ AddImmediate(kDstFrame, kDestination, offset);
+  __ CopyMemoryWords(kSrcFrame, kDstFrame, kFrameSize, kTemp);
+  if (kSrcFrame == THR) {
+    __ PopRegister(THR);
+  }
+
+  // Update value of :suspend_state variable in the copied frame
+  // for the new SuspendState.
+  __ LoadFromOffset(
+      kTemp,
+      FieldAddress(kDestination, target::SuspendState::frame_size_offset()));
+  __ AddRegisters(kTemp, kDestination);
+  __ StoreToOffset(kDestination,
+                   FieldAddress(kTemp, target::SuspendState::payload_offset() +
+                                           SuspendStateFpOffset()));
+
+  __ MoveRegister(CallingConventions::kReturnReg, kDestination);
+  __ Ret();
+
+  __ Bind(&alloc_slow_case);
+  __ Comment("CloneSuspendState slow case");
+  __ EnterStubFrame();
+  __ PushObject(NullObject());  // Make space on stack for the return value.
+  __ PushRegister(kSource);
+  __ CallRuntime(kCloneSuspendStateRuntimeEntry, 1);
+  __ Drop(1);                                      // Drop argument
+  __ PopRegister(CallingConventions::kReturnReg);  // Get result.
+  __ LeaveStubFrame();
+  __ Ret();
+}
+
 }  // namespace compiler
 
 }  // namespace dart
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 650f518..c2fc343 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -533,7 +533,7 @@
   static const Register kResultReg = R0;
 };
 
-// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub).
+// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub, YieldSyncStarStub).
 struct SuspendStubABI {
   static const Register kArgumentReg = R0;
   static const Register kTempReg = R1;
@@ -544,7 +544,8 @@
   static const Register kDstFrameReg = R9;
 };
 
-// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub).
+// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub,
+// InitSyncStarStub).
 struct InitSuspendableFunctionStubABI {
   static const Register kTypeArgsReg = R0;
 };
@@ -566,7 +567,7 @@
 };
 
 // ABI for ReturnStub (ReturnAsyncStub, ReturnAsyncNotFutureStub,
-// ReturnAsyncStarStub).
+// ReturnAsyncStarStub, ReturnSyncStarStub).
 struct ReturnStubABI {
   static const Register kSuspendStateReg = R2;
 };
@@ -576,6 +577,16 @@
   static const Register kSuspendStateReg = R2;
 };
 
+// ABI for CloneSuspendStateStub.
+struct CloneSuspendStateStubABI {
+  static const Register kSourceReg = R0;
+  static const Register kDestinationReg = R1;
+  static const Register kTempReg = R2;
+  static const Register kFrameSizeReg = R3;
+  static const Register kSrcFrameReg = R4;
+  static const Register kDstFrameReg = R8;
+};
+
 // ABI for DispatchTableNullErrorStub and consequently for all dispatch
 // table calls (though normal functions will not expect or use this
 // register). This ABI is added to distinguish memory corruption errors from
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index fea118e..a6cfa13 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -367,7 +367,7 @@
   static const Register kResultReg = R0;
 };
 
-// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub).
+// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub, YieldSyncStarStub).
 struct SuspendStubABI {
   static const Register kArgumentReg = R0;
   static const Register kTempReg = R1;
@@ -378,7 +378,8 @@
   static const Register kDstFrameReg = R6;
 };
 
-// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub).
+// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub,
+// InitSyncStarStub).
 struct InitSuspendableFunctionStubABI {
   static const Register kTypeArgsReg = R0;
 };
@@ -400,7 +401,7 @@
 };
 
 // ABI for ReturnStub (ReturnAsyncStub, ReturnAsyncNotFutureStub,
-// ReturnAsyncStarStub).
+// ReturnAsyncStarStub, ReturnSyncStarStub).
 struct ReturnStubABI {
   static const Register kSuspendStateReg = R2;
 };
@@ -410,6 +411,16 @@
   static const Register kSuspendStateReg = R2;
 };
 
+// ABI for CloneSuspendStateStub.
+struct CloneSuspendStateStubABI {
+  static const Register kSourceReg = R0;
+  static const Register kDestinationReg = R1;
+  static const Register kTempReg = R2;
+  static const Register kFrameSizeReg = R3;
+  static const Register kSrcFrameReg = R4;
+  static const Register kDstFrameReg = R5;
+};
+
 // ABI for DispatchTableNullErrorStub and consequently for all dispatch
 // table calls (though normal functions will not expect or use this
 // register). This ABI is added to distinguish memory corruption errors from
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 335e9b7..dbd0375 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -263,7 +263,7 @@
   static const Register kResultReg = EAX;
 };
 
-// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub).
+// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub, YieldSyncStarStub).
 struct SuspendStubABI {
   static const Register kArgumentReg = EAX;
   static const Register kTempReg = EDX;
@@ -281,7 +281,8 @@
   static const intptr_t kResumePcDistance = 4;
 };
 
-// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub).
+// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub,
+// InitSyncStarStub).
 struct InitSuspendableFunctionStubABI {
   static const Register kTypeArgsReg = EAX;
 };
@@ -305,7 +306,7 @@
 };
 
 // ABI for ReturnStub (ReturnAsyncStub, ReturnAsyncNotFutureStub,
-// ReturnAsyncStarStub).
+// ReturnAsyncStarStub, ReturnSyncStarStub).
 struct ReturnStubABI {
   static const Register kSuspendStateReg = EBX;
 };
@@ -315,6 +316,17 @@
   static const Register kSuspendStateReg = EBX;
 };
 
+// ABI for CloneSuspendStateStub.
+struct CloneSuspendStateStubABI {
+  static const Register kSourceReg = EAX;
+  static const Register kDestinationReg = EBX;
+  static const Register kTempReg = EDX;
+  static const Register kFrameSizeReg = ECX;
+  // Can reuse THR.
+  static const Register kSrcFrameReg = ESI;
+  static const Register kDstFrameReg = EDI;
+};
+
 // ABI for DispatchTableNullErrorStub and consequently for all dispatch
 // table calls (though normal functions will not expect or use this
 // register). This ABI is added to distinguish memory corruption errors from
diff --git a/runtime/vm/constants_riscv.h b/runtime/vm/constants_riscv.h
index e073037..8ccc529 100644
--- a/runtime/vm/constants_riscv.h
+++ b/runtime/vm/constants_riscv.h
@@ -377,7 +377,7 @@
   static constexpr Register kResultReg = A0;
 };
 
-// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub).
+// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub, YieldSyncStarStub).
 struct SuspendStubABI {
   static const Register kArgumentReg = A0;
   static const Register kTempReg = T0;
@@ -388,7 +388,8 @@
   static const Register kDstFrameReg = T5;
 };
 
-// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub).
+// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub,
+// InitSyncStarStub).
 struct InitSuspendableFunctionStubABI {
   static const Register kTypeArgsReg = A0;
 };
@@ -410,7 +411,7 @@
 };
 
 // ABI for ReturnStub (ReturnAsyncStub, ReturnAsyncNotFutureStub,
-// ReturnAsyncStarStub).
+// ReturnAsyncStarStub, ReturnSyncStarStub).
 struct ReturnStubABI {
   static const Register kSuspendStateReg = T1;
 };
@@ -420,6 +421,16 @@
   static const Register kSuspendStateReg = T1;
 };
 
+// ABI for CloneSuspendStateStub.
+struct CloneSuspendStateStubABI {
+  static const Register kSourceReg = A0;
+  static const Register kDestinationReg = A1;
+  static const Register kTempReg = T0;
+  static const Register kFrameSizeReg = T1;
+  static const Register kSrcFrameReg = T2;
+  static const Register kDstFrameReg = T3;
+};
+
 // ABI for DispatchTableNullErrorStub and consequently for all dispatch
 // table calls (though normal functions will not expect or use this
 // register). This ABI is added to distinguish memory corruption errors from
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 5128f43..9354ac7 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -338,7 +338,7 @@
   static const Register kResultReg = RAX;
 };
 
-// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub).
+// ABI for SuspendStub (AwaitStub, YieldAsyncStarStub, YieldSyncStarStub).
 struct SuspendStubABI {
   static const Register kArgumentReg = RAX;
   static const Register kTempReg = RDX;
@@ -354,7 +354,8 @@
   static const intptr_t kResumePcDistance = 5;
 };
 
-// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub).
+// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub,
+// InitSyncStarStub).
 struct InitSuspendableFunctionStubABI {
   static const Register kTypeArgsReg = RAX;
 };
@@ -376,7 +377,7 @@
 };
 
 // ABI for ReturnStub (ReturnAsyncStub, ReturnAsyncNotFutureStub,
-// ReturnAsyncStarStub).
+// ReturnAsyncStarStub, ReturnSyncStarStub).
 struct ReturnStubABI {
   static const Register kSuspendStateReg = RBX;
 };
@@ -386,6 +387,16 @@
   static const Register kSuspendStateReg = RBX;
 };
 
+// ABI for CloneSuspendStateStub.
+struct CloneSuspendStateStubABI {
+  static const Register kSourceReg = RAX;
+  static const Register kDestinationReg = RBX;
+  static const Register kTempReg = RDX;
+  static const Register kFrameSizeReg = RCX;
+  static const Register kSrcFrameReg = RSI;
+  static const Register kDstFrameReg = RDI;
+};
+
 // ABI for DispatchTableNullErrorStub and consequently for all dispatch
 // table calls (though normal functions will not expect or use this
 // register). This ABI is added to distinguish memory corruption errors from
diff --git a/runtime/vm/heap/heap.h b/runtime/vm/heap/heap.h
index f4fb748..3ceab79 100644
--- a/runtime/vm/heap/heap.h
+++ b/runtime/vm/heap/heap.h
@@ -219,9 +219,9 @@
   }
   void ResetObjectIdTable();
 
-  void SetLoadingUnit(ObjectPtr raw_obj, intptr_t object_id) {
+  void SetLoadingUnit(ObjectPtr raw_obj, intptr_t unit_id) {
     ASSERT(Thread::Current()->IsMutatorThread());
-    SetWeakEntry(raw_obj, kLoadingUnits, object_id);
+    SetWeakEntry(raw_obj, kLoadingUnits, unit_id);
   }
   intptr_t GetLoadingUnit(ObjectPtr raw_obj) const {
     ASSERT(Thread::Current()->IsMutatorThread());
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index e37a681..54dc5d9 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -2049,6 +2049,13 @@
     function.set_is_inlinable(false);
     function.set_is_visible(true);
     ASSERT(function.IsCompactAsyncStarFunction());
+  } else if (function_node_helper.async_marker_ ==
+             FunctionNodeHelper::kSyncStar) {
+    function.set_modifier(UntaggedFunction::kSyncGen);
+    function.set_is_debuggable(true);
+    function.set_is_inlinable(false);
+    function.set_is_visible(true);
+    ASSERT(function.IsCompactSyncStarFunction());
   } else {
     ASSERT(function_node_helper.async_marker_ == FunctionNodeHelper::kSync);
     function.set_is_debuggable(function_node_helper.dart_async_marker_ ==
@@ -2074,6 +2081,7 @@
     }
     ASSERT(!function.IsCompactAsyncFunction());
     ASSERT(!function.IsCompactAsyncStarFunction());
+    ASSERT(!function.IsCompactSyncStarFunction());
   }
 
   if (!native_name.IsNull()) {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 47633fe..3cc799f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -26086,6 +26086,40 @@
   return result.ptr();
 }
 
+SuspendStatePtr SuspendState::Clone(Thread* thread,
+                                    const SuspendState& src,
+                                    Heap::Space space) {
+  ASSERT(src.pc() != 0);
+  Zone* zone = thread->zone();
+  const intptr_t frame_size = src.frame_size();
+  const SuspendState& dst = SuspendState::Handle(
+      zone,
+      SuspendState::New(frame_size, Instance::Handle(zone, src.function_data()),
+                        space));
+  dst.set_then_callback(Closure::Handle(zone, src.then_callback()));
+  dst.set_error_callback(Closure::Handle(zone, src.error_callback()));
+  {
+    NoSafepointScope no_safepoint;
+    memmove(dst.payload(), src.payload(), frame_size);
+    // Update value of :suspend_state variable in the copied frame.
+    const uword fp = reinterpret_cast<uword>(dst.payload() + frame_size);
+    *reinterpret_cast<ObjectPtr*>(
+        LocalVarAddress(fp, runtime_frame_layout.FrameSlotForVariableIndex(
+                                kSuspendStateVarIndex))) = dst.ptr();
+    dst.set_pc(src.pc());
+    // Trigger write barrier if needed.
+    if (dst.ptr()->IsOldObject()) {
+      if (!dst.untag()->IsRemembered()) {
+        dst.untag()->EnsureInRememberedSet(thread);
+      }
+      if (thread->is_marking()) {
+        thread->DeferredMarkingStackAddObject(dst.ptr());
+      }
+    }
+  }
+  return dst.ptr();
+}
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
 void SuspendState::set_frame_capacity(intptr_t frame_capcity) const {
   ASSERT(frame_capcity >= 0);
@@ -26106,6 +26140,14 @@
   untag()->set_function_data(function_data.ptr());
 }
 
+void SuspendState::set_then_callback(const Closure& then_callback) const {
+  untag()->set_then_callback(then_callback.ptr());
+}
+
+void SuspendState::set_error_callback(const Closure& error_callback) const {
+  untag()->set_error_callback(error_callback.ptr());
+}
+
 const char* SuspendState::ToCString() const {
   return "SuspendState";
 }
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index bdb1787..1b32e7e 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3596,11 +3596,18 @@
     return IsAsyncGenerator() && is_debuggable();
   }
 
+  // TODO(dartbug.com/48378): replace this predicate with IsSyncGenerator()
+  // after old sync* functions are removed.
+  bool IsCompactSyncStarFunction() const {
+    return IsSyncGenerator() && is_debuggable();
+  }
+
   // Returns true for functions which execution can be suspended
   // using Suspend/Resume stubs. Such functions have an artificial
   // :suspend_state local variable at the fixed location of the frame.
   bool IsSuspendableFunction() const {
-    return IsCompactAsyncFunction() || IsCompactAsyncStarFunction();
+    return IsCompactAsyncFunction() || IsCompactAsyncStarFunction() ||
+           IsCompactSyncStarFunction();
   }
 
   // Recognise synthetic sync-yielding functions like the inner-most:
@@ -11865,10 +11872,22 @@
                              const Instance& function_data,
                              Heap::Space space = Heap::kNew);
 
+  // Makes a copy of [src] object.
+  // The object should be holding a suspended frame.
+  static SuspendStatePtr Clone(Thread* thread,
+                               const SuspendState& src,
+                               Heap::Space space = Heap::kNew);
+
   uword pc() const { return untag()->pc_; }
+
+  intptr_t frame_size() const { return untag()->frame_size_; }
+
   InstancePtr function_data() const {
     return untag()->function_data();
   }
+
+  ClosurePtr then_callback() const { return untag()->then_callback(); }
+
   ClosurePtr error_callback() const {
     return untag()->error_callback();
   }
@@ -11886,6 +11905,8 @@
   void set_then_callback(const Closure& then_callback) const;
   void set_error_callback(const Closure& error_callback) const;
 
+  uint8_t* payload() const { return untag()->payload(); }
+
   FINAL_HEAP_OBJECT_IMPLEMENTATION(SuspendState, Instance);
   friend class Class;
 };
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index fd957bc..1d11933 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -1578,16 +1578,10 @@
 }
 
 void Pointer::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  // TODO(dacoharkes): what is the JSONStream used for?
-  // should it fail because it's not supported?
-  // or should it print something reasonable as default?
   Instance::PrintJSONImpl(stream, ref);
 }
 
 void DynamicLibrary::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  // TODO(dacoharkes): what is the JSONStream used for?
-  // should it fail because it's not supported?
-  // or should it print something reasonable as default?
   Instance::PrintJSONImpl(stream, ref);
 }
 
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index 733ed33..8bdf269 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -352,10 +352,34 @@
   ASSERT(!function.IsNull());
   set_suspend_state_return_async_star(function);
 
+  function = cls.LookupFunctionAllowPrivate(Symbols::_initSyncStar());
+  ASSERT(!function.IsNull());
+  set_suspend_state_init_sync_star(function);
+
+  function = cls.LookupFunctionAllowPrivate(Symbols::_yieldSyncStar());
+  ASSERT(!function.IsNull());
+  set_suspend_state_yield_sync_star(function);
+
+  function = cls.LookupFunctionAllowPrivate(Symbols::_returnSyncStar());
+  ASSERT(!function.IsNull());
+  set_suspend_state_return_sync_star(function);
+
   function = cls.LookupFunctionAllowPrivate(Symbols::_handleException());
   ASSERT(!function.IsNull());
   set_suspend_state_handle_exception(function);
 
+  cls = async_lib.LookupClassAllowPrivate(Symbols::_SyncStarIterator());
+  ASSERT(!cls.IsNull());
+  RELEASE_ASSERT(cls.EnsureIsFinalized(thread) == Error::null());
+
+  field = cls.LookupFieldAllowPrivate(Symbols::_current());
+  ASSERT(!field.IsNull());
+  set_sync_star_iterator_current(field);
+
+  field = cls.LookupFieldAllowPrivate(Symbols::_yieldStarIterable());
+  ASSERT(!field.IsNull());
+  set_sync_star_iterator_yield_star_iterable(field);
+
   const Library& core_lib = Library::Handle(zone, core_library());
   cls = core_lib.LookupClassAllowPrivate(Symbols::_CompileTimeError());
   ASSERT(!cls.IsNull());
@@ -383,6 +407,10 @@
   ASSERT(!cls.IsNull());
   set_expando_class(cls);
 
+  cls = core_lib.LookupClassAllowPrivate(Symbols::Iterable());
+  ASSERT(!cls.IsNull());
+  set_iterable_class(cls);
+
   // Cache the core private functions used for fast instance of checks.
   simple_instance_of_function_ =
       PrivateObjectLookup(Symbols::_simpleInstanceOf());
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index bbfe908..02a3f48 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -126,6 +126,7 @@
   RW(Class, float64x2_class)                                                   \
   RW(Class, error_class)                                                       \
   RW(Class, expando_class)                                                     \
+  RW(Class, iterable_class)                                                    \
   RW(Class, weak_property_class)                                               \
   RW(Class, weak_reference_class)                                              \
   RW(Class, finalizer_class)                                                   \
@@ -177,10 +178,15 @@
   RW(Function, suspend_state_init_async_star)                                  \
   RW(Function, suspend_state_yield_async_star)                                 \
   RW(Function, suspend_state_return_async_star)                                \
+  RW(Function, suspend_state_init_sync_star)                                   \
+  RW(Function, suspend_state_yield_sync_star)                                  \
+  RW(Function, suspend_state_return_sync_star)                                 \
   RW(Function, suspend_state_handle_exception)                                 \
   RW(Class, async_star_stream_controller)                                      \
   RW(Class, stream_class)                                                      \
   RW(Field, async_star_stream_controller_async_star_body)                      \
+  RW(Field, sync_star_iterator_current)                                        \
+  RW(Field, sync_star_iterator_yield_star_iterable)                            \
   ARW_RELAXED(Smi, future_timeout_future_index)                                \
   ARW_RELAXED(Smi, future_wait_future_index)                                   \
   RW(CompressedStackMaps, canonicalized_stack_map_entries)                     \
@@ -252,6 +258,7 @@
   RW(Code, unreachable_tts_stub)                                               \
   RW(Code, slow_tts_stub)                                                      \
   RW(Code, await_stub)                                                         \
+  RW(Code, clone_suspend_state_stub)                                           \
   RW(Code, init_async_stub)                                                    \
   RW(Code, resume_stub)                                                        \
   RW(Code, return_async_stub)                                                  \
@@ -259,6 +266,9 @@
   RW(Code, init_async_star_stub)                                               \
   RW(Code, yield_async_star_stub)                                              \
   RW(Code, return_async_star_stub)                                             \
+  RW(Code, init_sync_star_stub)                                                \
+  RW(Code, yield_sync_star_stub)                                               \
+  RW(Code, return_sync_star_stub)                                              \
   RW(Array, dispatch_table_code_entries)                                       \
   RW(GrowableObjectArray, instructions_tables)                                 \
   RW(Array, obfuscation_map)                                                   \
@@ -336,6 +346,7 @@
   DO(init_late_instance_field_stub, InitLateInstanceField)                     \
   DO(init_late_final_instance_field_stub, InitLateFinalInstanceField)          \
   DO(await_stub, Await)                                                        \
+  DO(clone_suspend_state_stub, CloneSuspendState)                              \
   DO(init_async_stub, InitAsync)                                               \
   DO(resume_stub, Resume)                                                      \
   DO(return_async_stub, ReturnAsync)                                           \
@@ -343,6 +354,9 @@
   DO(init_async_star_stub, InitAsyncStar)                                      \
   DO(yield_async_star_stub, YieldAsyncStar)                                    \
   DO(return_async_star_stub, ReturnAsyncStar)                                  \
+  DO(init_sync_star_stub, InitSyncStar)                                        \
+  DO(yield_sync_star_stub, YieldSyncStar)                                      \
+  DO(return_sync_star_stub, ReturnSyncStar)                                    \
   DO(instance_of_stub, InstanceOf)
 
 #define ISOLATE_OBJECT_STORE_FIELD_LIST(R_, RW)                                \
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 1b22693..b87fa96 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -1429,30 +1429,50 @@
 }
 
 #if defined(DART_PRECOMPILER)
-class AssignLoadingUnitsCodeVisitor : public CodeVisitor {
+class AssignLoadingUnitsCodeVisitor : public ObjectVisitor {
  public:
   explicit AssignLoadingUnitsCodeVisitor(Zone* zone)
       : heap_(Thread::Current()->heap()),
+        code_(Code::Handle(zone)),
         func_(Function::Handle(zone)),
         cls_(Class::Handle(zone)),
         lib_(Library::Handle(zone)),
         unit_(LoadingUnit::Handle(zone)),
         obj_(Object::Handle(zone)) {}
 
+  void VisitObject(ObjectPtr obj) {
+    if (obj->IsCode()) {
+      code_ ^= obj;
+      VisitCode(code_);
+    }
+  }
+
   void VisitCode(const Code& code) {
     intptr_t id;
     if (code.IsFunctionCode()) {
       func_ ^= code.function();
-      cls_ = func_.Owner();
+      obj_ = func_.Owner();
+      cls_ ^= obj_.ptr();
       lib_ = cls_.library();
-      unit_ = lib_.loading_unit();
-      id = unit_.id();
+      if (lib_.IsNull()) {
+        // E.g., dynamic.
+        id = LoadingUnit::kRootId;
+      } else {
+        unit_ = lib_.loading_unit();
+        if (unit_.IsNull()) {
+          return;  // Assignment remains LoadingUnit::kIllegalId
+        }
+        id = unit_.id();
+      }
     } else if (code.IsAllocationStubCode()) {
       cls_ ^= code.owner();
       lib_ = cls_.library();
       unit_ = lib_.loading_unit();
+      if (unit_.IsNull()) {
+        return;  // Assignment remains LoadingUnit::kIllegalId
+      }
       id = unit_.id();
-    } else if (code.IsStubCode()) {
+    } else if (code.IsTypeTestStubCode() || code.IsStubCode()) {
       id = LoadingUnit::kRootId;
     } else {
       UNREACHABLE();
@@ -1484,6 +1504,7 @@
 
  private:
   Heap* heap_;
+  Code& code_;
   Function& func_;
   Class& cls_;
   Library& lib_;
@@ -1493,31 +1514,16 @@
 
 void ProgramVisitor::AssignUnits(Thread* thread) {
   StackZone stack_zone(thread);
-  Zone* zone = stack_zone.GetZone();
+  Heap* heap = thread->heap();
 
-  // VM stubs.
-  Instructions& inst = Instructions::Handle(zone);
-  Code& code = Code::Handle(zone);
-  for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
-    inst = StubCode::EntryAt(i).instructions();
-    thread->heap()->SetLoadingUnit(inst.ptr(), LoadingUnit::kRootId);
-  }
+  // Oddballs.
+  heap->SetLoadingUnit(Object::null(), LoadingUnit::kRootId);
+  heap->SetLoadingUnit(Object::empty_object_pool().ptr(), LoadingUnit::kRootId);
 
-  // Isolate stubs.
-  ObjectStore* object_store = thread->isolate_group()->object_store();
-  ObjectPtr* from = object_store->from();
-  ObjectPtr* to = object_store->to_snapshot(Snapshot::kFullAOT);
-  for (ObjectPtr* p = from; p <= to; p++) {
-    if ((*p)->IsHeapObject() && (*p)->IsCode()) {
-      code ^= *p;
-      inst = code.instructions();
-      thread->heap()->SetLoadingUnit(inst.ptr(), LoadingUnit::kRootId);
-    }
-  }
-
-  // Function code / allocation stubs.
-  AssignLoadingUnitsCodeVisitor visitor(zone);
-  WalkProgram(zone, thread->isolate_group(), &visitor);
+  AssignLoadingUnitsCodeVisitor visitor(thread->zone());
+  HeapIterationScope iter(thread);
+  iter.IterateVMIsolateObjects(&visitor);
+  iter.IterateObjects(&visitor);
 }
 
 class ProgramHashVisitor : public CodeVisitor {
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index caa9315..4601174 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -744,6 +744,17 @@
   arguments.SetReturn(result);
 }
 
+// Makes a copy of the given SuspendState object, including the payload frame.
+// Arg0: the SuspendState object to be cloned.
+// Return value: newly allocated object.
+DEFINE_RUNTIME_ENTRY(CloneSuspendState, 1) {
+  const SuspendState& src =
+      SuspendState::CheckedHandle(zone, arguments.ArgAt(0));
+  const SuspendState& dst = SuspendState::Handle(
+      zone, SuspendState::Clone(thread, src, SpaceForRuntimeAllocation()));
+  arguments.SetReturn(dst);
+}
+
 // Helper routine for tracing a type check.
 static void PrintTypeCheck(const char* message,
                            const Instance& instance,
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index 90a51a9..ad8bb99 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -23,6 +23,7 @@
   V(BreakpointRuntimeHandler)                                                  \
   V(SingleStepHandler)                                                         \
   V(CloneContext)                                                              \
+  V(CloneSuspendState)                                                         \
   V(DoubleToInteger)                                                           \
   V(FixCallersTarget)                                                          \
   V(FixCallersTargetMonomorphic)                                               \
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index f41b7a9..9a75218 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -556,7 +556,7 @@
   // We skip compiled sync generators. Once a sync generator has been compiled,
   // there is another function with the same range which actually contains the
   // user code.
-  if (!func.IsSyncGenerator()) {
+  if (!func.IsSyncGenerator() || func.IsSuspendableFunction()) {
     JSONObject range(jsarr);
     range.AddProperty("scriptIndex", script_index);
     range.AddProperty("startPos", begin_pos);
diff --git a/runtime/vm/stub_code_list.h b/runtime/vm/stub_code_list.h
index 39e1f49..5c496f0 100644
--- a/runtime/vm/stub_code_list.h
+++ b/runtime/vm/stub_code_list.h
@@ -158,7 +158,11 @@
   V(InitAsyncStar)                                                             \
   V(YieldAsyncStar)                                                            \
   V(ReturnAsyncStar)                                                           \
+  V(InitSyncStar)                                                              \
+  V(YieldSyncStar)                                                             \
+  V(ReturnSyncStar)                                                            \
   V(AsyncExceptionHandler)                                                     \
+  V(CloneSuspendState)                                                         \
   V(UnknownDartCode)
 
 }  // namespace dart
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index f0fe6a8..082c168 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -187,6 +187,7 @@
   V(InterpolateSingle, "_interpolateSingle")                                   \
   V(InvocationMirror, "_InvocationMirror")                                     \
   V(IsolateSpawnException, "IsolateSpawnException")                            \
+  V(Iterable, "Iterable")                                                      \
   V(Iterator, "iterator")                                                      \
   V(KernelProgramInfo, "KernelProgramInfo")                                    \
   V(LanguageError, "LanguageError")                                            \
@@ -383,6 +384,7 @@
   V(_String, "String")                                                         \
   V(_SuspendState, "_SuspendState")                                            \
   V(_SyncIterator, "_SyncIterator")                                            \
+  V(_SyncStarIterator, "_SyncStarIterator")                                    \
   V(_SyncStreamController, "_SyncStreamController")                            \
   V(_TransferableTypedDataImpl, "_TransferableTypedDataImpl")                  \
   V(_Type, "_Type")                                                            \
@@ -413,6 +415,7 @@
   V(_typedDataBase, "_typedDataBase")                                          \
   V(_await, "_await")                                                          \
   V(_classRangeCheck, "_classRangeCheck")                                      \
+  V(_current, "_current")                                                      \
   V(_ensureScheduleImmediate, "_ensureScheduleImmediate")                      \
   V(_future, "_future")                                                        \
   V(_handleException, "_handleException")                                      \
@@ -422,6 +425,7 @@
   V(_hasValue, "_hasValue")                                                    \
   V(_initAsync, "_initAsync")                                                  \
   V(_initAsyncStar, "_initAsyncStar")                                          \
+  V(_initSyncStar, "_initSyncStar")                                            \
   V(_instanceOf, "_instanceOf")                                                \
   V(_listGetAt, "_listGetAt")                                                  \
   V(_listLength, "_listLength")                                                \
@@ -442,6 +446,7 @@
   V(_returnAsync, "_returnAsync")                                              \
   V(_returnAsyncNotFuture, "_returnAsyncNotFuture")                            \
   V(_returnAsyncStar, "_returnAsyncStar")                                      \
+  V(_returnSyncStar, "_returnSyncStar")                                        \
   V(_runExtension, "_runExtension")                                            \
   V(_runPendingImmediateCallback, "_runPendingImmediateCallback")              \
   V(_scanFlags, "_scanFlags")                                                  \
@@ -455,6 +460,8 @@
   V(_varData, "_varData")                                                      \
   V(_wordCharacterMap, "_wordCharacterMap")                                    \
   V(_yieldAsyncStar, "_yieldAsyncStar")                                        \
+  V(_yieldStarIterable, "_yieldStarIterable")                                  \
+  V(_yieldSyncStar, "_yieldSyncStar")                                          \
   V(add, "add")                                                                \
   V(addStream, "addStream")                                                    \
   V(asyncStarBody, "asyncStarBody")                                            \
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 4d95cb4..906efbf 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -137,6 +137,8 @@
     StubCode::ReturnAsyncNotFuture().ptr(), nullptr)                           \
   V(CodePtr, return_async_star_stub_, StubCode::ReturnAsyncStar().ptr(),       \
     nullptr)                                                                   \
+  V(CodePtr, return_sync_star_stub_, StubCode::ReturnSyncStar().ptr(),         \
+    nullptr)                                                                   \
   V(CodePtr, stack_overflow_shared_without_fpu_regs_stub_,                     \
     StubCode::StackOverflowSharedWithoutFPURegs().ptr(), nullptr)              \
   V(CodePtr, stack_overflow_shared_with_fpu_regs_stub_,                        \
@@ -182,6 +184,9 @@
   V(suspend_state_init_async_star)                                             \
   V(suspend_state_yield_async_star)                                            \
   V(suspend_state_return_async_star)                                           \
+  V(suspend_state_init_sync_star)                                              \
+  V(suspend_state_yield_sync_star)                                             \
+  V(suspend_state_return_sync_star)                                            \
   V(suspend_state_handle_exception)
 
 // This assertion marks places which assume that boolean false immediate
diff --git a/sdk/lib/_internal/vm/lib/async_patch.dart b/sdk/lib/_internal/vm/lib/async_patch.dart
index 2431b2a..50a419b 100644
--- a/sdk/lib/_internal/vm/lib/async_patch.dart
+++ b/sdk/lib/_internal/vm/lib/async_patch.dart
@@ -551,6 +551,35 @@
     return functionData;
   }
 
+  @pragma("vm:entry-point", "call")
+  @pragma("vm:invisible")
+  static Object? _initSyncStar<T>() {
+    if (_trace) print('_initSyncStar<$T>');
+    return _SyncStarIterable<T>();
+  }
+
+  @pragma("vm:entry-point", "call")
+  @pragma("vm:invisible")
+  Object? _yieldSyncStar(Object? object) {
+    if (_trace) print('_yieldSyncStar($object)');
+    final data = _functionData;
+    if (data is _SyncStarIterable) {
+      data._stateAtStart = this;
+      return data;
+    } else {
+      // Update state in the iterator in case SuspendState was reallocated.
+      unsafeCast<_SyncStarIterator>(data)._state = this;
+    }
+    return true;
+  }
+
+  @pragma("vm:entry-point", "call")
+  @pragma("vm:invisible")
+  static bool _returnSyncStar(Object suspendState, Object? returnValue) {
+    if (_trace) print('_returnSyncStar');
+    return false;
+  }
+
   @pragma("vm:recognized", "other")
   @pragma("vm:prefer-inline")
   external set _functionData(Object value);
@@ -577,6 +606,125 @@
 
   @pragma("vm:recognized", "other")
   @pragma("vm:never-inline")
-  external void _resume(
+  external Object? _resume(
       Object? value, Object? exception, StackTrace? stackTrace);
+
+  @pragma("vm:recognized", "other")
+  @pragma("vm:prefer-inline")
+  external _SuspendState _clone();
+}
+
+class _SyncStarIterable<T> extends Iterable<T> {
+  _SuspendState? _stateAtStart;
+
+  _SyncStarIterable();
+
+  Iterator<T> get iterator {
+    return _SyncStarIterator<T>(_stateAtStart!._clone());
+  }
+}
+
+class _SyncStarIterator<T> implements Iterator<T> {
+  _SuspendState? _state;
+  Iterator<T>? _yieldStarIterator;
+
+  // Stack of suspended sync* methods.
+  List<_SuspendState>? _stack;
+
+  // sync* method sets either _yieldStarIterable
+  // or _current before suspending.
+  @pragma("vm:entry-point")
+  T? _current;
+  @pragma("vm:entry-point")
+  Iterable<T>? _yieldStarIterable;
+
+  @override
+  T get current => _current as T;
+
+  _SyncStarIterator(_SuspendState state) : _state = state {
+    state._functionData = this;
+  }
+
+  @pragma('vm:prefer-inline')
+  bool _handleSyncStarMethodCompletion() {
+    _current = null;
+    _state = null;
+    final stack = _stack;
+    if (stack != null && stack.isNotEmpty) {
+      _state = stack.removeLast();
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  bool moveNext() {
+    if (_state == null) {
+      return false;
+    }
+
+    Object? pendingException;
+    StackTrace? pendingStackTrace;
+    while (true) {
+      // First delegate to an active nested iterator (if any).
+      final iterator = _yieldStarIterator;
+      if (iterator != null) {
+        try {
+          if (iterator.moveNext()) {
+            _current = iterator.current;
+            return true;
+          }
+        } catch (exception, stackTrace) {
+          pendingException = exception;
+          pendingStackTrace = stackTrace;
+        }
+        _yieldStarIterator = null;
+      }
+
+      try {
+        // Resume current sync* method in order to move to the next value.
+        final bool hasMore =
+            _state!._resume(null, pendingException, pendingStackTrace) as bool;
+        pendingException = null;
+        pendingStackTrace = null;
+        if (!hasMore) {
+          if (_handleSyncStarMethodCompletion()) {
+            continue;
+          }
+          return false;
+        }
+      } catch (exception, stackTrace) {
+        pendingException = exception;
+        pendingStackTrace = stackTrace;
+        if (_handleSyncStarMethodCompletion()) {
+          continue;
+        }
+        rethrow;
+      }
+
+      // Case: yield* some_iterator.
+      final iterable = _yieldStarIterable;
+      if (iterable != null) {
+        if (iterable is _SyncStarIterable) {
+          // We got a recursive yield* of sync* function. Instead of creating
+          // a new iterator we replace our current _state (remembering the
+          // current _state for later resumption).
+          final stack = (_stack ??= []);
+          stack.add(_state!);
+          final nestedState =
+              unsafeCast<_SyncStarIterable>(iterable)._stateAtStart!._clone();
+          nestedState._functionData = this;
+          _state = nestedState;
+        } else {
+          _yieldStarIterator = iterable.iterator;
+        }
+        _yieldStarIterable = null;
+        _current = null;
+        // Fetch the next item.
+        continue;
+      }
+
+      return true;
+    }
+  }
 }
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 83a6a8a..824dcf9 100644
--- a/sdk/lib/_internal/vm/lib/ffi_dynamic_library_patch.dart
+++ b/sdk/lib/_internal/vm/lib/ffi_dynamic_library_patch.dart
@@ -37,8 +37,6 @@
   @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
   @pragma("vm:external-name", "Ffi_dl_getHandle")
   external int getHandle();
 
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 671f68a..cf06901 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -20555,6 +20555,23 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@Native("MathMLElement")
+class MathMLElement extends Element {
+  // To suppress missing implicit constructor warnings.
+  factory MathMLElement._() {
+    throw new UnsupportedError("Not supported");
+  }
+  /**
+   * Constructor instantiated by the DOM when a custom element has been created.
+   *
+   * This can only be called by subclasses from their created constructor.
+   */
+  MathMLElement.created() : super.created();
+}
+// Copyright (c) 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.
+
 @Native("MediaCapabilities")
 class MediaCapabilities extends JavaScriptObject {
   // To suppress missing implicit constructor warnings.
diff --git a/tests/ffi/vmspecific_static_checks_test.dart b/tests/ffi/vmspecific_static_checks_test.dart
index a46983f..692fc1e 100644
--- a/tests/ffi/vmspecific_static_checks_test.dart
+++ b/tests/ffi/vmspecific_static_checks_test.dart
@@ -43,10 +43,6 @@
   testLookupFunctionTypeMismatch();
   testLookupFunctionPointervoid();
   testLookupFunctionPointerNFdyn();
-  testNativeFunctionSignatureInvalidReturn();
-  testNativeFunctionSignatureInvalidParam();
-  testNativeFunctionSignatureInvalidOptionalNamed();
-  testNativeFunctionSignatureInvalidOptionalPositional();
   testHandleVariance();
   testEmptyStructLookupFunctionArgument();
   testEmptyStructLookupFunctionReturn();
@@ -332,28 +328,6 @@
   // l.lookupFunction<PointerNFdynN, PointerNFdynD>("cos");
 }
 
-// TODO(dacoharkes): make the next 4 test compile errors
-typedef Invalid1 = int Function(Int8);
-typedef Invalid2 = Int8 Function(int);
-typedef Invalid3 = Int8 Function({Int8 named});
-typedef Invalid4 = Int8 Function([Int8 positional]);
-
-void testNativeFunctionSignatureInvalidReturn() {
-  // Pointer<NativeFunction<Invalid1>> p = fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidParam() {
-  // Pointer<NativeFunction<Invalid2>> p = fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidOptionalNamed() {
-  // Pointer<NativeFunction<Invalid3>> p = fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidOptionalPositional() {
-  // Pointer<NativeFunction<Invalid4>> p = fromAddress(999);
-}
-
 // error on missing field annotation
 class TestStruct extends Struct {
   @Double()
diff --git a/tests/ffi_2/prepare_flutter_bundle.dart b/tests/ffi_2/prepare_flutter_bundle.dart
index a72b8193..802060b 100644
--- a/tests/ffi_2/prepare_flutter_bundle.dart
+++ b/tests/ffi_2/prepare_flutter_bundle.dart
@@ -9,9 +9,6 @@
 
 import 'package:path/path.dart' as path;
 
-// TODO(dacoharkes): Migrate script to be nullsafe and generate nullsafe
-// Flutter app.
-
 main(List<String> args) async {
   if (args.length != 1) {
     print('Usage ${Platform.executable} ${Platform.script} <output-dir>');
@@ -82,7 +79,6 @@
     * Add the cpp files to Pods/Development Pods/<deep nesting>/ios/Classes
       to ensure they are statically linked to the app.
 ''');
-  // TODO(dacoharkes): Automate these steps. How to automate the XCode step?
 }
 
 void dumpTestList(List<String> testFiles, String message) {
diff --git a/tests/ffi_2/vmspecific_static_checks_test.dart b/tests/ffi_2/vmspecific_static_checks_test.dart
index ec07492..fa9df58 100644
--- a/tests/ffi_2/vmspecific_static_checks_test.dart
+++ b/tests/ffi_2/vmspecific_static_checks_test.dart
@@ -45,10 +45,6 @@
   testLookupFunctionTypeMismatch();
   testLookupFunctionPointervoid();
   testLookupFunctionPointerNFdyn();
-  testNativeFunctionSignatureInvalidReturn();
-  testNativeFunctionSignatureInvalidParam();
-  testNativeFunctionSignatureInvalidOptionalNamed();
-  testNativeFunctionSignatureInvalidOptionalPositional();
   testHandleVariance();
   testEmptyStructLookupFunctionArgument();
   testEmptyStructLookupFunctionReturn();
@@ -334,28 +330,6 @@
   // l.lookupFunction<PointerNFdynN, PointerNFdynD>("cos");
 }
 
-// TODO(dacoharkes): make the next 4 test compile errors
-typedef Invalid1 = int Function(Int8);
-typedef Invalid2 = Int8 Function(int);
-typedef Invalid3 = Int8 Function({Int8 named});
-typedef Invalid4 = Int8 Function([Int8 positional]);
-
-void testNativeFunctionSignatureInvalidReturn() {
-  // Pointer<NativeFunction<Invalid1>> p = fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidParam() {
-  // Pointer<NativeFunction<Invalid2>> p = fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidOptionalNamed() {
-  // Pointer<NativeFunction<Invalid3>> p = fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidOptionalPositional() {
-  // Pointer<NativeFunction<Invalid4>> p = fromAddress(999);
-}
-
 // error on missing field annotation
 class TestStruct extends Struct {
   @Double()
diff --git a/tests/language/deferred/exported_main_lib.dart b/tests/language/deferred/exported_main_lib.dart
new file mode 100644
index 0000000..667aec6
--- /dev/null
+++ b/tests/language/deferred/exported_main_lib.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print("Usurper to the role of root library!");
+}
diff --git a/tests/language/deferred/exported_main_test.dart b/tests/language/deferred/exported_main_test.dart
new file mode 100644
index 0000000..60b5473
--- /dev/null
+++ b/tests/language/deferred/exported_main_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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 "exported_main_lib.dart";
+
+@pragma("vm:entry-point")
+foo() {
+  // The frontend will not recognize that this is the root library. Though this
+  // library is not reachable from what the frontend considers the root library,
+  // the entry point pragma will still cause this function to compiled by
+  // gen_snaption, so it is important that this library is assigned to a
+  // loading unit.
+}
diff --git a/tests/language/deferred/loading_unit_root_has_only_export_lib1.dart b/tests/language/deferred/loading_unit_root_has_only_export_lib1.dart
new file mode 100644
index 0000000..2026bbb
--- /dev/null
+++ b/tests/language/deferred/loading_unit_root_has_only_export_lib1.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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 "loading_unit_root_has_only_export_lib2.dart";
diff --git a/tests/language/deferred/loading_unit_root_has_only_export_lib2.dart b/tests/language/deferred/loading_unit_root_has_only_export_lib2.dart
new file mode 100644
index 0000000..97a77d5
--- /dev/null
+++ b/tests/language/deferred/loading_unit_root_has_only_export_lib2.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+foo() => "in lib2";
diff --git a/tests/language/deferred/loading_unit_root_has_only_export_test.dart b/tests/language/deferred/loading_unit_root_has_only_export_test.dart
new file mode 100644
index 0000000..21c2bd7
--- /dev/null
+++ b/tests/language/deferred/loading_unit_root_has_only_export_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+import "loading_unit_root_has_only_export_lib1.dart" deferred as lib;
+
+main() async {
+  await lib.loadLibrary();
+  Expect.equals(lib.foo(), "in lib2");
+}
diff --git a/tests/language_2/deferred/exported_main_lib.dart b/tests/language_2/deferred/exported_main_lib.dart
new file mode 100644
index 0000000..8c92d0c
--- /dev/null
+++ b/tests/language_2/deferred/exported_main_lib.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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
+
+main() {
+  print("Usurper to the role of root library!");
+}
diff --git a/tests/language_2/deferred/exported_main_test.dart b/tests/language_2/deferred/exported_main_test.dart
new file mode 100644
index 0000000..b7e19fb
--- /dev/null
+++ b/tests/language_2/deferred/exported_main_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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
+
+export "exported_main_lib.dart";
+
+@pragma("vm:entry-point")
+foo() {
+  // The frontend will not recognize that this is the root library. Though this
+  // library is not reachable from what the frontend considers the root library,
+  // the entry point pragma will still cause this function to compiled by
+  // gen_snaption, so it is important that this library is assigned to a
+  // loading unit.
+}
diff --git a/tests/language_2/deferred/loading_unit_root_has_only_export_lib1.dart b/tests/language_2/deferred/loading_unit_root_has_only_export_lib1.dart
new file mode 100644
index 0000000..073fb85
--- /dev/null
+++ b/tests/language_2/deferred/loading_unit_root_has_only_export_lib1.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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
+
+export "loading_unit_root_has_only_export_lib2.dart";
diff --git a/tests/language_2/deferred/loading_unit_root_has_only_export_lib2.dart b/tests/language_2/deferred/loading_unit_root_has_only_export_lib2.dart
new file mode 100644
index 0000000..cfd8e4e
--- /dev/null
+++ b/tests/language_2/deferred/loading_unit_root_has_only_export_lib2.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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
+
+foo() => "in lib2";
diff --git a/tests/language_2/deferred/loading_unit_root_has_only_export_test.dart b/tests/language_2/deferred/loading_unit_root_has_only_export_test.dart
new file mode 100644
index 0000000..5fff57b
--- /dev/null
+++ b/tests/language_2/deferred/loading_unit_root_has_only_export_test.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for 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";
+import "loading_unit_root_has_only_export_lib1.dart" deferred as lib;
+
+main() async {
+  await lib.loadLibrary();
+  Expect.equals(lib.foo(), "in lib2");
+}
diff --git a/tests/web/native/static_interop_erasure/factory_stub_lib.dart b/tests/web/native/static_interop_erasure/factory_stub_lib.dart
new file mode 100644
index 0000000..e7e3b85
--- /dev/null
+++ b/tests/web/native/static_interop_erasure/factory_stub_lib.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+@JS()
+library factory_stub_lib;
+
+import 'package:js/js.dart';
+
+import 'factory_stub_test.dart';
+
+@JS('NativeClass')
+@staticInterop
+class StaticNativeClassCopy {
+  external StaticNativeClassCopy();
+  factory StaticNativeClassCopy.nestedFactory() {
+    StaticNativeClass.nestedFactory();
+    return StaticNativeClassCopy();
+  }
+}
diff --git a/tests/web/native/static_interop_erasure/factory_stub_test.dart b/tests/web/native/static_interop_erasure/factory_stub_test.dart
index 71fe516..b71ef8e 100644
--- a/tests/web/native/static_interop_erasure/factory_stub_test.dart
+++ b/tests/web/native/static_interop_erasure/factory_stub_test.dart
@@ -14,6 +14,7 @@
 
 import '../native_testing.dart';
 import '../native_testing.dart' as native_testing;
+import 'factory_stub_lib.dart';
 
 NativeClass makeNativeClass() native;
 
@@ -34,23 +35,15 @@
   // This and `StaticNativeClassCopy.nestedFactory` exist to ensure that we
   // cover the case where invocations on factories are visible before their
   // declarations in the AST. This will test whether we correctly create the
-  // stub even if we haven't visited the declaration yet.
-  factory StaticNativeClass.nestedFactory() {
-    StaticNativeClassCopy.nestedFactory();
+  // stub even if we haven't visited the declaration yet. It will also test the
+  // case where stubs need to be added before function bodies are visited so
+  // that mutually recursive factories can resolve.
+  factory StaticNativeClass.nestedFactory({bool callCopyFactory = false}) {
+    if (callCopyFactory) StaticNativeClassCopy.nestedFactory();
     return StaticNativeClass();
   }
 }
 
-@JS('NativeClass')
-@staticInterop
-class StaticNativeClassCopy {
-  external StaticNativeClassCopy();
-  factory StaticNativeClassCopy.nestedFactory() {
-    StaticNativeClass.simpleFactory();
-    return StaticNativeClassCopy();
-  }
-}
-
 void main() {
   nativeTesting();
   native_testing.JS('', r'''
@@ -69,5 +62,5 @@
   StaticNativeClass staticNativeClass = StaticNativeClass.redirectingFactory();
   staticNativeClass = StaticNativeClass.simpleFactory();
   staticNativeClass = StaticNativeClass.factoryWithParam(staticNativeClass);
-  staticNativeClass = StaticNativeClass.nestedFactory();
+  staticNativeClass = StaticNativeClass.nestedFactory(callCopyFactory: true);
 }
diff --git a/tools/VERSION b/tools/VERSION
index d47f5f9..0184f27 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 18
 PATCH 0
-PRERELEASE 233
+PRERELEASE 234
 PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/dom/dom.json b/tools/dom/dom.json
index 295e137..4b3eb87 100644
--- a/tools/dom/dom.json
+++ b/tools/dom/dom.json
@@ -12423,6 +12423,10 @@
     },
     "support_level": "untriaged"
   },
+  "MathMLElement": {
+    "members": {},
+    "support_level": "untriaged"
+  },
   "Matrix": {
     "members": {
       "Matrix": {},
diff --git a/tools/dom/idl/dart/dart.idl b/tools/dom/idl/dart/dart.idl
index 0021d66..4665656 100644
--- a/tools/dom/idl/dart/dart.idl
+++ b/tools/dom/idl/dart/dart.idl
@@ -681,3 +681,5 @@
 // PositionCallback can be used on a deprecated Position object,
 // a GeolocationPosition object, or a Firefox-specific object.
 callback PositionCallback = void(object position);
+
+interface MathMLElement : Element {};