Version 2.15.0-94.0.dev

Merge commit '2a7237bd05142ca908b5e2f7f082580fe05132a0' into 'dev'
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart
index 51b100f..097c93c 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix/data_driven/element_matcher.dart
@@ -316,7 +316,11 @@
         ElementKind.setterKind
       ];
     } else if (node is PropertyAccess) {
-      return const [ElementKind.getterKind, ElementKind.setterKind];
+      return const [
+        ElementKind.fieldKind,
+        ElementKind.getterKind,
+        ElementKind.setterKind
+      ];
     } else if (node is SimpleIdentifier) {
       return _kindsForNode(node.parent, child: node);
     }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
index 9022e5d..6d0dc25 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/data_driven/rename_test.dart
@@ -623,6 +623,37 @@
 ''');
   }
 
+  Future<void> test_instance_reference_inPropertyAccess() async {
+    setPackageContent('''
+class A {
+  static B m() => B();
+}
+class B {
+  @deprecated
+  final String f = '';
+  final C g = C();
+}
+class C {
+  final String h = '';
+}
+''');
+    setPackageData(_rename(['f', 'B'], 'g.h'));
+    await resolveTestCode('''
+import '$importUri';
+
+void f() {
+  A.m().f;
+}
+''');
+    await assertHasFix('''
+import '$importUri';
+
+void f() {
+  A.m().g.h;
+}
+''');
+  }
+
   Future<void> test_instance_reference_removed() async {
     setPackageContent('''
 class C {
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 8f85644..f0583b2 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -80,7 +80,7 @@
 /// TODO(scheglov) Clean up the list of implicitly analyzed files.
 class AnalysisDriver implements AnalysisDriverGeneric {
   /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 176;
+  static const int DATA_VERSION = 177;
 
   /// The number of exception contexts allowed to write. Once this field is
   /// zero, we stop writing any new exception contexts in this process.
diff --git a/pkg/analyzer/lib/src/summary2/element_builder.dart b/pkg/analyzer/lib/src/summary2/element_builder.dart
index a503d40..2c2649d 100644
--- a/pkg/analyzer/lib/src/summary2/element_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/element_builder.dart
@@ -1025,7 +1025,9 @@
   bool _shouldBeConstField(FieldDeclaration node) {
     var fields = node.fields;
     return fields.isConst ||
-        fields.isFinal && _enclosingContext.hasConstConstructor;
+        !node.isStatic &&
+            fields.isFinal &&
+            _enclosingContext.hasConstConstructor;
   }
 
   void _visitPropertyFirst<T extends AstNode>(List<AstNode> nodes) {
diff --git a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
index bca27b9..f238eba 100644
--- a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
@@ -83,6 +83,70 @@
 ''');
   }
 
+  test_expressionFromConstructorTearoff_withoutTypeArgs() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C.new;
+var x = g('Hello');
+''');
+  }
+
+  test_expressionFromConstructorTearoff_withTypeArgs_assignable() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C<int>.new;
+var x = g(0);
+''');
+  }
+
+  test_expressionFromConstructorTearoff_withTypeArgs_notAssignable() async {
+    await assertErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C<int>.new;
+var x = g('Hello');
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 56, 7),
+    ]);
+  }
+
+  test_expressionFromFunctionTearoff_withoutTypeArgs() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f;
+var x = g('Hello');
+''');
+  }
+
+  test_expressionFromFunctionTearoff_withTypeArgs_assignable() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f<int>;
+var x = g(0);
+''');
+  }
+
+  test_expressionFromFunctionTearoff_withTypeArgs_notAssignable() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f<int>;
+var x = g('Hello');
+''', [
+      error(CompileTimeErrorCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 45, 7),
+    ]);
+  }
+
   test_invocation_functionTypes_optional() async {
     await assertErrorsInCode('''
 void acceptFunOptBool(void funNumOptBool([bool b])) {}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
index a464554..63aacca 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
@@ -18,6 +18,64 @@
 @reflectiveTest
 class InvalidAssignmentTest extends PubPackageResolutionTest
     with InvalidAssignmentTestCases {
+  test_constructorTearoff_inferredTypeArgs() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+var g = C<int>.new;
+''');
+  }
+
+  test_constructorTearoff_withExplicitTypeArgs() async {
+    await assertNoErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+C Function(int) g = C<int>.new;
+''');
+  }
+
+  test_constructorTearoff_withExplicitTypeArgs_invalid() async {
+    await assertErrorsInCode('''
+class C<T> {
+  C(T a);
+}
+
+C Function(String) g = C<int>.new;
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 49, 10),
+    ]);
+  }
+
+  test_functionTearoff_inferredTypeArgs() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+var g = f<int>;
+''');
+  }
+
+  test_functionTearoff_withExplicitTypeArgs() async {
+    await assertNoErrorsInCode('''
+void f<T>(T a) {}
+
+void Function(int) g = f<int>;
+''');
+  }
+
+  test_functionTearoff_withExplicitTypeArgs_invalid() async {
+    await assertErrorsInCode('''
+void f<T>(T a) {}
+
+void Function(String) g = f<int>;
+''', [
+      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 45, 6),
+    ]);
+  }
+
   test_ifNullAssignment() async {
     await assertErrorsInCode('''
 void f(int i) {
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 5bd8d77..87594bb 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -2004,6 +2004,29 @@
 ''');
   }
 
+  test_class_field_static_final_hasConstConstructor() async {
+    var library = await checkLibrary('''
+class C {
+  static final f = 0;
+  const C();
+}
+''');
+    checkElementText(library, r'''
+library
+  definingUnit
+    classes
+      class C @6
+        fields
+          static final f @25
+            type: int
+        constructors
+          const @40
+        accessors
+          synthetic static get f @-1
+            returnType: int
+''');
+  }
+
   test_class_field_static_late() async {
     var library = await checkLibrary('class C { static late int i; }');
     checkElementText(library, r'''
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index 7cae519..234a3a9 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -85,10 +85,10 @@
   bool get isUnnamed => true;
 
   /// The names of the named arguments in call-site order.
-  List<String> get namedArguments => const <String>[];
+  List<String> get namedArguments => const [];
 
   /// The names of the named arguments in canonicalized order.
-  List<String> getOrderedNamedArguments() => const <String>[];
+  List<String> getOrderedNamedArguments() => const [];
 
   CallStructure get nonGeneric => typeArgumentCount == 0
       ? this
@@ -209,10 +209,9 @@
 
   NamedCallStructure(
       int argumentCount, List<String> namedArguments, int typeArgumentCount)
-      : this.internal(
-            argumentCount, namedArguments, typeArgumentCount, <String>[]);
+      : this._(argumentCount, namedArguments, typeArgumentCount, []);
 
-  NamedCallStructure.internal(int argumentCount, this.namedArguments,
+  NamedCallStructure._(int argumentCount, this.namedArguments,
       int typeArgumentCount, this._orderedNamedArguments)
       : assert(namedArguments.isNotEmpty),
         super.unnamed(argumentCount, typeArgumentCount);
@@ -233,7 +232,7 @@
   bool get isNormalized => namedArguments == _orderedNamedArguments;
 
   @override
-  CallStructure toNormalized() => NamedCallStructure.internal(
+  CallStructure toNormalized() => NamedCallStructure._(
       argumentCount,
       getOrderedNamedArguments(),
       typeArgumentCount,
diff --git a/pkg/compiler/lib/src/universe/class_hierarchy.dart b/pkg/compiler/lib/src/universe/class_hierarchy.dart
index 6ea468a..bedf4b2 100644
--- a/pkg/compiler/lib/src/universe/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/universe/class_hierarchy.dart
@@ -261,7 +261,7 @@
   @override
   Iterable<ClassEntity> subclassesOf(ClassEntity cls) {
     ClassHierarchyNode hierarchy = _classHierarchyNodes[cls];
-    if (hierarchy == null) return const <ClassEntity>[];
+    if (hierarchy == null) return const [];
     return hierarchy
         .subclassesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED);
   }
@@ -269,7 +269,7 @@
   @override
   Iterable<ClassEntity> strictSubclassesOf(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
-    if (subclasses == null) return const <ClassEntity>[];
+    if (subclasses == null) return const [];
     return subclasses.subclassesByMask(
         ClassHierarchyNode.EXPLICITLY_INSTANTIATED,
         strict: true);
@@ -304,7 +304,7 @@
   Iterable<ClassEntity> subtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
-      return const <ClassEntity>[];
+      return const [];
     } else {
       return classSet
           .subtypesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED);
@@ -315,7 +315,7 @@
   Iterable<ClassEntity> strictSubtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
-      return const <ClassEntity>[];
+      return const [];
     } else {
       return classSet.subtypesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED,
           strict: true);
@@ -326,7 +326,7 @@
   Iterable<ClassEntity> allSubtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
-      return const <ClassEntity>[];
+      return const [];
     } else {
       return classSet.subtypesByMask(ClassHierarchyNode.ALL);
     }
@@ -472,7 +472,7 @@
       // the common subclasses of "subclass of A" and "subtype of I" returns
       // "subclasses of {B, D}". The inclusion of class `C` is implied because
       // it is a subclass of `B`.
-      List<ClassEntity> classes = <ClassEntity>[];
+      List<ClassEntity> classes = [];
       forEachStrictSubclassOf(cls1, (ClassEntity subclass) {
         if (isSubtypeOf(subclass, cls2)) {
           classes.add(subclass);
@@ -494,7 +494,7 @@
         return SubclassResult.SUBTYPE1;
       }
       // Find all the root subclasses of [cls2] of that implement [cls1].
-      List<ClassEntity> classes = <ClassEntity>[];
+      List<ClassEntity> classes = [];
       forEachStrictSubclassOf(cls2, (ClassEntity subclass) {
         if (isSubtypeOf(subclass, cls1)) {
           classes.add(subclass);
@@ -528,7 +528,7 @@
       // the common subclasses of "subtype of A" and "subtype of I" returns
       // "subclasses of {B, D, E}". The inclusion of classes `C` and `F` is
       // implied because they are subclasses of `B` and `E`, respectively.
-      List<ClassEntity> classes = <ClassEntity>[];
+      List<ClassEntity> classes = [];
       forEachStrictSubtypeOf(cls1, (ClassEntity subclass) {
         if (isSubtypeOf(subclass, cls2)) {
           classes.add(subclass);
@@ -569,11 +569,9 @@
 class ClassHierarchyBuilder {
   // We keep track of subtype and subclass relationships in four
   // distinct sets to make class hierarchy analysis faster.
-  final Map<ClassEntity, ClassHierarchyNode> _classHierarchyNodes =
-      <ClassEntity, ClassHierarchyNode>{};
-  final Map<ClassEntity, ClassSet> _classSets = <ClassEntity, ClassSet>{};
-  final Map<ClassEntity, Set<ClassEntity>> mixinUses =
-      Map<ClassEntity, Set<ClassEntity>>();
+  final Map<ClassEntity, ClassHierarchyNode> _classHierarchyNodes = {};
+  final Map<ClassEntity, ClassSet> _classSets = {};
+  final Map<ClassEntity, Set<ClassEntity>> mixinUses = {};
 
   final CommonElements _commonElements;
   final ClassQueries _classQueries;
@@ -668,8 +666,7 @@
   void registerMixinUse(ClassEntity mixinApplication, ClassEntity mixin) {
     // TODO(johnniwinther): Add map restricted to live classes.
     // We don't support patch classes as mixin.
-    Set<ClassEntity> users =
-        mixinUses.putIfAbsent(mixin, () => Set<ClassEntity>());
+    Set<ClassEntity> users = mixinUses.putIfAbsent(mixin, () => {});
     users.add(mixinApplication);
   }
 
@@ -764,7 +761,7 @@
         builder._classHierarchyNodes[memberHoldingClass];
 
     if (_inheritingClasses == null) {
-      _inheritingClasses = Set<ClassEntity>();
+      _inheritingClasses = {};
       _inheritingClasses.addAll(memberHoldingClassNode
           .subclassesByMask(ClassHierarchyNode.ALL, strict: false));
       for (ClassHierarchyNode mixinApplication
@@ -774,7 +771,7 @@
       }
     }
 
-    Set<ClassEntity> validatingSet = Set<ClassEntity>();
+    Set<ClassEntity> validatingSet = {};
 
     void processHierarchy(ClassHierarchyNode mixerNode) {
       for (ClassEntity inheritingClass in _inheritingClasses) {
@@ -839,7 +836,7 @@
         failedAt(
             x, "No ClassSet for $x (${x.runtimeType}): ${builder._classSets}"));
 
-    Set<ClassEntity> classes = Set<ClassEntity>();
+    Set<ClassEntity> classes = {};
 
     if (builder._isSubtypeOf(x, y)) {
       // [x] implements [y] itself, possible through supertypes.
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index 3a3c138..ebc630d 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -52,8 +52,7 @@
   /// Enum set for selecting instantiated classes in
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
-  static final EnumSet<Instantiation> INSTANTIATED =
-      EnumSet<Instantiation>.fromValues(const <Instantiation>[
+  static final EnumSet<Instantiation> INSTANTIATED = EnumSet.fromValues(const [
     Instantiation.DIRECTLY_INSTANTIATED,
     Instantiation.INDIRECTLY_INSTANTIATED,
     Instantiation.ABSTRACTLY_INSTANTIATED,
@@ -63,7 +62,7 @@
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static final EnumSet<Instantiation> EXPLICITLY_INSTANTIATED =
-      EnumSet<Instantiation>.fromValues(const <Instantiation>[
+      EnumSet.fromValues(const [
     Instantiation.DIRECTLY_INSTANTIATED,
     Instantiation.ABSTRACTLY_INSTANTIATED
   ], fixed: true);
@@ -72,7 +71,7 @@
   /// [ClassHierarchyNode.subclassesByMask],
   /// [ClassHierarchyNode.subclassesByMask] and [ClassSet.subtypesByMask].
   static final EnumSet<Instantiation> ALL =
-      EnumSet<Instantiation>.fromValues(Instantiation.values, fixed: true);
+      EnumSet.fromValues(Instantiation.values, fixed: true);
 
   /// Creates an enum set for selecting the returned classes in
   /// [ClassHierarchyNode.subclassesByMask],
@@ -82,7 +81,7 @@
       bool includeIndirectlyInstantiated = true,
       bool includeUninstantiated = true,
       bool includeAbstractlyInstantiated = true}) {
-    EnumSet<Instantiation> mask = EnumSet<Instantiation>();
+    EnumSet<Instantiation> mask = EnumSet();
     if (includeDirectlyInstantiated) {
       mask.add(Instantiation.DIRECTLY_INSTANTIATED);
     }
@@ -99,8 +98,8 @@
   }
 
   final ClassHierarchyNode parentNode;
-  final EnumSet<Instantiation> _mask = EnumSet<Instantiation>.fromValues(
-      const <Instantiation>[Instantiation.UNINSTANTIATED]);
+  final EnumSet<Instantiation> _mask =
+      EnumSet.fromValues(const [Instantiation.UNINSTANTIATED]);
   final IndexedClass cls;
 
   final int hierarchyDepth;
@@ -204,7 +203,7 @@
   }
 
   /// The nodes for the direct subclasses of [cls].
-  List<ClassHierarchyNode> _directSubclasses = <ClassHierarchyNode>[];
+  List<ClassHierarchyNode> _directSubclasses = [];
 
   ClassHierarchyNode(this.parentNode, this.cls, this.hierarchyDepth) {
     if (parentNode != null) {
@@ -619,12 +618,12 @@
   /// A class that implements [cls] through its superclasses is not included in
   /// the iterable.
   Iterable<ClassHierarchyNode> get subtypeNodes {
-    return _subtypes ?? const <ClassHierarchyNode>[];
+    return _subtypes ?? const [];
   }
 
   /// Returns an [Iterable] of the classes that mix in [cls] directly.
   Iterable<ClassHierarchyNode> get mixinApplicationNodes {
-    return _mixinApplications ?? const <ClassHierarchyNode>[];
+    return _mixinApplications ?? const [];
   }
 
   /// Returns an [Iterable] of the subclasses of [cls] possibly including [cls].
@@ -752,10 +751,10 @@
       return;
     }
     if (_subtypes == null) {
-      _subtypes = <ClassHierarchyNode>[subtype];
+      _subtypes = [subtype];
     } else {
       int hierarchyDepth = subtype.hierarchyDepth;
-      List<ClassHierarchyNode> newSubtypes = <ClassHierarchyNode>[];
+      List<ClassHierarchyNode> newSubtypes = [];
       bool added = false;
       for (ClassHierarchyNode otherSubtype in _subtypes) {
         int otherHierarchyDepth = otherSubtype.hierarchyDepth;
@@ -798,21 +797,15 @@
 
   /// Adds [mixinApplication] as a class that mixes in [cls].
   void addMixinApplication(ClassHierarchyNode mixinApplication) {
-    if (_mixinApplications == null) {
-      _mixinApplications = <ClassHierarchyNode>[mixinApplication];
-    } else {
-      _mixinApplications.add(mixinApplication);
-    }
+    (_mixinApplications ??= []).add(mixinApplication);
   }
 
   /// Returns the most specific subtype of [cls] (including [cls]) that is
   /// directly instantiated or a superclass of all directly instantiated
   /// subtypes. If no subtypes of [cls] are instantiated, `null` is returned.
   ClassEntity getLubOfInstantiatedSubtypes() {
-    if (_leastUpperInstantiatedSubtype == null) {
-      _leastUpperInstantiatedSubtype = _computeLeastUpperInstantiatedSubtype();
-    }
-    return _leastUpperInstantiatedSubtype;
+    return _leastUpperInstantiatedSubtype ??=
+        _computeLeastUpperInstantiatedSubtype();
   }
 
   ClassEntity _computeLeastUpperInstantiatedSubtype() {
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index d960d16..37155d5 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -328,7 +328,7 @@
 
   void registerStaticUse(StaticUse staticUse, MemberUsedCallback memberUsed) {
     MemberEntity element = staticUse.element;
-    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet();
     MemberUsage usage = _getMemberUsage(element, useSet);
     switch (staticUse.kind) {
       case StaticUseKind.STATIC_TEAR_OFF:
@@ -421,7 +421,7 @@
       ClassEntity cls, MemberEntity member, MemberUsedCallback memberUsed,
       {bool checkEnqueuerConsistency = false}) {
     if (!member.isInstanceMember) return;
-    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet();
     MemberUsage usage = _getMemberUsage(member, useSet);
     if (useSet.isNotEmpty) {
       if (checkEnqueuerConsistency) {
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index 7c934bf..6661fc9 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -17,7 +17,7 @@
   final Map<String, FunctionSetNode> _nodes;
 
   factory FunctionSet(Iterable<MemberEntity> liveInstanceMembers) {
-    Map<String, FunctionSetNode> nodes = Map<String, FunctionSetNode>();
+    Map<String, FunctionSetNode> nodes = {};
     for (MemberEntity member in liveInstanceMembers) {
       String name = member.name;
       (nodes[name] ??= FunctionSetNode(name)).add(member);
@@ -136,14 +136,13 @@
 /// selectors with the same [name].
 class FunctionSetNode {
   final String name;
-  final Map<SelectorMask, FunctionSetQuery> cache =
-      <SelectorMask, FunctionSetQuery>{};
+  final Map<SelectorMask, FunctionSetQuery> cache = {};
 
   // Initially, we keep the elements in a list because it is more
   // compact than a hash set. Once we get enough elements, we change
   // the representation to be a set to get faster contains checks.
   static const int MAX_ELEMENTS_IN_LIST = 8;
-  Iterable<MemberEntity> elements = <MemberEntity>[];
+  Iterable<MemberEntity> elements = [];
   bool isList = true;
 
   FunctionSetNode(this.name);
@@ -211,12 +210,10 @@
     Setlet<MemberEntity> functions;
     for (MemberEntity element in elements) {
       if (selectorMask.applies(element, domain)) {
-        if (functions == null) {
-          // Defer the allocation of the functions set until we are
-          // sure we need it. This allows us to return immutable empty
-          // lists when the filtering produced no results.
-          functions = Setlet<MemberEntity>();
-        }
+        // Defer the allocation of the functions set until we are
+        // sure we need it. This allows us to return immutable empty
+        // lists when the filtering produced no results.
+        functions ??= Setlet();
         functions.add(element);
       }
     }
@@ -229,11 +226,8 @@
       FunctionSetQuery noSuchMethodQuery =
           noSuchMethods.query(noSuchMethodMask, domain);
       if (!noSuchMethodQuery.functions.isEmpty) {
-        if (functions == null) {
-          functions = Setlet<MemberEntity>.from(noSuchMethodQuery.functions);
-        } else {
-          functions.addAll(noSuchMethodQuery.functions);
-        }
+        functions ??= Setlet();
+        functions.addAll(noSuchMethodQuery.functions);
       }
     }
     cache[selectorMask] = result = (functions != null)
@@ -276,7 +270,7 @@
   AbstractValue computeMask(AbstractValueDomain domain) => domain.emptyType;
 
   @override
-  Iterable<MemberEntity> get functions => const <MemberEntity>[];
+  Iterable<MemberEntity> get functions => const [];
 
   @override
   String toString() => '<empty>';
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index 591b05a..451b6c5 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -17,7 +17,7 @@
 
   AbstractUsage.cloned(this._pendingUse);
 
-  AbstractUsage() : this._pendingUse = EnumSet<T>() {
+  AbstractUsage() : this._pendingUse = EnumSet() {
     _pendingUse.addAll(_originalUse);
   }
 
@@ -615,14 +615,12 @@
 
 /// Common [EnumSet]s used for [MemberUse].
 class MemberUses {
-  static const EnumSet<MemberUse> NONE = EnumSet<MemberUse>.fixed(0);
-  static const EnumSet<MemberUse> NORMAL_ONLY = EnumSet<MemberUse>.fixed(1);
-  static const EnumSet<MemberUse> CLOSURIZE_INSTANCE_ONLY =
-      EnumSet<MemberUse>.fixed(2);
-  static const EnumSet<MemberUse> CLOSURIZE_STATIC_ONLY =
-      EnumSet<MemberUse>.fixed(4);
-  static const EnumSet<MemberUse> ALL_INSTANCE = EnumSet<MemberUse>.fixed(3);
-  static const EnumSet<MemberUse> ALL_STATIC = EnumSet<MemberUse>.fixed(5);
+  static const EnumSet<MemberUse> NONE = EnumSet.fixed(0);
+  static const EnumSet<MemberUse> NORMAL_ONLY = EnumSet.fixed(1);
+  static const EnumSet<MemberUse> CLOSURIZE_INSTANCE_ONLY = EnumSet.fixed(2);
+  static const EnumSet<MemberUse> CLOSURIZE_STATIC_ONLY = EnumSet.fixed(4);
+  static const EnumSet<MemberUse> ALL_INSTANCE = EnumSet.fixed(3);
+  static const EnumSet<MemberUse> ALL_STATIC = EnumSet.fixed(5);
 }
 
 typedef MemberUsedCallback = void Function(
@@ -666,10 +664,10 @@
 
 /// Common [EnumSet]s used for [ClassUse].
 class ClassUses {
-  static const EnumSet<ClassUse> NONE = EnumSet<ClassUse>.fixed(0);
-  static const EnumSet<ClassUse> INSTANTIATED_ONLY = EnumSet<ClassUse>.fixed(1);
-  static const EnumSet<ClassUse> IMPLEMENTED_ONLY = EnumSet<ClassUse>.fixed(2);
-  static const EnumSet<ClassUse> ALL = EnumSet<ClassUse>.fixed(3);
+  static const EnumSet<ClassUse> NONE = EnumSet.fixed(0);
+  static const EnumSet<ClassUse> INSTANTIATED_ONLY = EnumSet.fixed(1);
+  static const EnumSet<ClassUse> IMPLEMENTED_ONLY = EnumSet.fixed(2);
+  static const EnumSet<ClassUse> ALL = EnumSet.fixed(3);
 }
 
 typedef ClassUsedCallback = void Function(
@@ -820,15 +818,15 @@
 /// Access sets used for registration of member usage.
 class Accesses {
   /// Statically bound access of a member.
-  static const EnumSet<Access> staticAccess = EnumSet<Access>.fixed(1);
+  static const EnumSet<Access> staticAccess = EnumSet.fixed(1);
 
   /// Dynamically bound access of a member. This implies the statically bound
   /// access of the member.
-  static const EnumSet<Access> dynamicAccess = EnumSet<Access>.fixed(3);
+  static const EnumSet<Access> dynamicAccess = EnumSet.fixed(3);
 
   /// Direct access of a super class member. This implies the statically bound
   /// access of the member.
-  static const EnumSet<Access> superAccess = EnumSet<Access>.fixed(5);
+  static const EnumSet<Access> superAccess = EnumSet.fixed(5);
 }
 
 /// The accesses of a member collected during closed world computation.
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index bd6cdc2..098ef7e 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -199,7 +199,7 @@
   /// Register [type] as the instantiation [kind] using [constructor].
   void addInstantiation(
       ConstructorEntity constructor, InterfaceType type, Instantiation kind) {
-    instantiationMap ??= <ConstructorEntity, Set<Instance>>{};
+    instantiationMap ??= {};
     instantiationMap
         .putIfAbsent(constructor, () => Set<Instance>())
         .add(Instance(type, kind));
@@ -259,36 +259,30 @@
   /// Instantiation information for all classes with instantiated types.
   ///
   /// Invariant: Elements are declaration elements.
-  final Map<ClassEntity, InstantiationInfo> _instantiationInfo =
-      <ClassEntity, InstantiationInfo>{};
+  final Map<ClassEntity, InstantiationInfo> _instantiationInfo = {};
 
   /// Classes implemented by directly instantiated classes.
-  final Set<ClassEntity> _implementedClasses = Set<ClassEntity>();
+  final Set<ClassEntity> _implementedClasses = {};
 
   /// The set of all referenced static fields.
   ///
   /// Invariant: Elements are declaration elements.
-  final Set<FieldEntity> _allReferencedStaticFields = Set<FieldEntity>();
+  final Set<FieldEntity> _allReferencedStaticFields = {};
 
   /// Documentation wanted -- johnniwinther
   ///
   /// Invariant: Elements are declaration elements.
-  final Set<FunctionEntity> _methodsNeedingSuperGetter = Set<FunctionEntity>();
-  final Map<String, Map<Selector, SelectorConstraints>> _invokedNames =
-      <String, Map<Selector, SelectorConstraints>>{};
-  final Map<String, Map<Selector, SelectorConstraints>> _invokedGetters =
-      <String, Map<Selector, SelectorConstraints>>{};
-  final Map<String, Map<Selector, SelectorConstraints>> _invokedSetters =
-      <String, Map<Selector, SelectorConstraints>>{};
+  final Set<FunctionEntity> _methodsNeedingSuperGetter = {};
+  final Map<String, Map<Selector, SelectorConstraints>> _invokedNames = {};
+  final Map<String, Map<Selector, SelectorConstraints>> _invokedGetters = {};
+  final Map<String, Map<Selector, SelectorConstraints>> _invokedSetters = {};
 
-  final Map<ClassEntity, ClassUsage> _processedClasses =
-      <ClassEntity, ClassUsage>{};
+  final Map<ClassEntity, ClassUsage> _processedClasses = {};
 
   Map<ClassEntity, ClassUsage> get classUsageForTesting => _processedClasses;
 
   /// Map of registered usage of members of live classes.
-  final Map<MemberEntity, MemberUsage> _memberUsage =
-      <MemberEntity, MemberUsage>{};
+  final Map<MemberEntity, MemberUsage> _memberUsage = {};
 
   Map<MemberEntity, MemberUsage> get memberUsageForTesting => _memberUsage;
 
@@ -297,30 +291,26 @@
   ///
   /// A method is fully invoked if all is optional parameter have been passed
   /// in some invocation.
-  final Map<String, Set<MemberUsage>> _invokableInstanceMembersByName =
-      <String, Set<MemberUsage>>{};
+  final Map<String, Set<MemberUsage>> _invokableInstanceMembersByName = {};
 
   /// Map containing instance members of live classes that have not yet been
   /// read from dynamically.
-  final Map<String, Set<MemberUsage>> _readableInstanceMembersByName =
-      <String, Set<MemberUsage>>{};
+  final Map<String, Set<MemberUsage>> _readableInstanceMembersByName = {};
 
   /// Map containing instance members of live classes that have not yet been
   /// written to dynamically.
-  final Map<String, Set<MemberUsage>> _writableInstanceMembersByName =
-      <String, Set<MemberUsage>>{};
+  final Map<String, Set<MemberUsage>> _writableInstanceMembersByName = {};
 
-  final Set<FieldEntity> _fieldSetters = Set<FieldEntity>();
+  final Set<FieldEntity> _fieldSetters = {};
 
-  final Set<DartType> _isChecks = Set<DartType>();
+  final Set<DartType> _isChecks = {};
   final Set<TypeVariableType> _namedTypeVariablesNewRti = {};
 
   /// Set of all closures in the program. Used by the mirror tracking system
   /// to find all live closure instances.
-  final Set<Local> _localFunctions = Set<Local>();
+  final Set<Local> _localFunctions = {};
 
-  final Set<FunctionEntity> _closurizedMembersWithFreeTypeVariables =
-      Set<FunctionEntity>();
+  final Set<FunctionEntity> _closurizedMembersWithFreeTypeVariables = {};
 
   final CompilerOptions _options;
   final ElementEnvironment _elementEnvironment;
@@ -343,13 +333,13 @@
 
   bool _closed = false;
   KClosedWorld _closedWorldCache;
-  final Set<MemberEntity> _liveInstanceMembers = Set<MemberEntity>();
+  final Set<MemberEntity> _liveInstanceMembers = {};
 
-  final Set<ConstantValue> _constantValues = Set<ConstantValue>();
+  final Set<ConstantValue> _constantValues = {};
 
-  final Set<Local> _genericLocalFunctions = Set<Local>();
+  final Set<Local> _genericLocalFunctions = {};
 
-  Set<MemberEntity> _processedMembers = Set<MemberEntity>();
+  Set<MemberEntity> _processedMembers = {};
 
   bool get isClosed => _closed;
 
@@ -402,7 +392,7 @@
   // TODO(johnniwinther): Improve semantic precision.
   @override
   Iterable<ClassEntity> get directlyInstantiatedClasses {
-    Set<ClassEntity> classes = Set<ClassEntity>();
+    Set<ClassEntity> classes = {};
     getInstantiationMap().forEach((ClassEntity cls, InstantiationInfo info) {
       if (info.hasInstantiation) {
         classes.add(cls);
@@ -465,18 +455,18 @@
 
   Iterable<CallStructure> _getMatchingCallStructures(
       Map<Selector, SelectorConstraints> selectors, MemberEntity member) {
-    if (selectors == null) return const <CallStructure>[];
+    if (selectors == null) return const [];
     Set<CallStructure> callStructures;
     for (Selector selector in selectors.keys) {
       if (selector.appliesUnnamed(member)) {
         SelectorConstraints masks = selectors[selector];
         if (masks.canHit(member, selector.memberName, this)) {
-          callStructures ??= Set<CallStructure>();
+          callStructures ??= {};
           callStructures.add(selector.callStructure);
         }
       }
     }
-    return callStructures ?? const <CallStructure>[];
+    return callStructures ?? const [];
   }
 
   bool _hasMatchingSelector(
@@ -624,7 +614,7 @@
     }
 
     MemberEntity element = staticUse.element;
-    EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+    EnumSet<MemberUse> useSet = EnumSet();
     MemberUsage usage = _getMemberUsage(element, useSet);
 
     if ((element.isStatic || element.isTopLevel) && element.isField) {
@@ -753,8 +743,8 @@
     // [f] might add elements to [: map[memberName] :] during the loop below
     // so we create a new list for [: map[memberName] :] and prepend the
     // [remaining] members after the loop.
-    map[memberName] = Set<MemberUsage>();
-    Set<MemberUsage> remaining = Set<MemberUsage>();
+    map[memberName] = {};
+    Set<MemberUsage> remaining = {};
     for (MemberUsage usage in members) {
       if (!updateUsage(usage)) {
         remaining.add(usage);
@@ -850,7 +840,7 @@
 
     MemberUsage usage = _memberUsage[member];
     if (usage == null) {
-      EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+      EnumSet<MemberUse> useSet = EnumSet();
       usage = _getMemberUsage(member, useSet,
           checkEnqueuerConsistency: checkEnqueuerConsistency);
       if (useSet.isNotEmpty) {
@@ -867,7 +857,7 @@
         usage = usage.clone();
       }
       if (usage.hasPendingDynamicUse) {
-        EnumSet<MemberUse> useSet = EnumSet<MemberUse>();
+        EnumSet<MemberUse> useSet = EnumSet();
         if (usage.hasPendingDynamicRead && _hasInvokedGetter(member)) {
           useSet.addAll(usage.read(Accesses.dynamicAccess));
         }
@@ -919,8 +909,7 @@
   }
 
   Map<ClassEntity, Set<ClassEntity>> populateHierarchyNodes() {
-    Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
-        Map<ClassEntity, Set<ClassEntity>>();
+    Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses = {};
 
     // Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
     // properties of the [ClassHierarchyNode] for [cls].
@@ -938,8 +927,7 @@
       ClassEntity superclass = _classQueries.getSuperClass(cls);
       while (superclass != null) {
         Set<ClassEntity> typesImplementedBySubclassesOfCls =
-            typesImplementedBySubclasses.putIfAbsent(
-                superclass, () => Set<ClassEntity>());
+            typesImplementedBySubclasses.putIfAbsent(superclass, () => {});
         for (InterfaceType current in _classQueries.getSupertypes(cls)) {
           typesImplementedBySubclassesOfCls.add(current.element);
         }
@@ -957,7 +945,7 @@
   }
 
   Iterable<MemberEntity> computeAssignedInstanceMembers() {
-    Set<MemberEntity> assignedInstanceMembers = Set<MemberEntity>();
+    Set<MemberEntity> assignedInstanceMembers = {};
     for (MemberEntity instanceMember in _liveInstanceMembers) {
       if (_hasInvokedSetter(instanceMember)) {
         assignedInstanceMembers.add(instanceMember);
@@ -1025,7 +1013,7 @@
           "Member $member is processed but has not usage.");
     }
 
-    Set<InterfaceType> instantiatedTypes = Set<InterfaceType>();
+    Set<InterfaceType> instantiatedTypes = {};
     getInstantiationMap().forEach((_, InstantiationInfo info) {
       if (info.instantiationMap != null) {
         for (Set<Instance> instances in info.instantiationMap.values) {
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index b66d87c..5235fe1 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -17,9 +17,8 @@
 
 class SelectorKind {
   final String name;
-  @override
-  final int hashCode;
-  const SelectorKind(this.name, this.hashCode);
+  final int index;
+  const SelectorKind(this.name, this.index);
 
   static const SelectorKind GETTER = SelectorKind('getter', 0);
   static const SelectorKind SETTER = SelectorKind('setter', 1);
@@ -28,12 +27,13 @@
   static const SelectorKind INDEX = SelectorKind('index', 4);
   static const SelectorKind SPECIAL = SelectorKind('special', 5);
 
-  int get index => hashCode;
+  @override
+  int get hashCode => index;
 
   @override
   String toString() => name;
 
-  static List<SelectorKind> values = const <SelectorKind>[
+  static const List<SelectorKind> values = [
     GETTER,
     SETTER,
     CALL,
@@ -109,8 +109,7 @@
   factory Selector(SelectorKind kind, Name name, CallStructure callStructure) {
     // TODO(johnniwinther): Maybe use equality instead of implicit hashing.
     int hashCode = computeHashCode(kind, name, callStructure);
-    List<Selector> list =
-        canonicalizedValues.putIfAbsent(hashCode, () => <Selector>[]);
+    List<Selector> list = canonicalizedValues.putIfAbsent(hashCode, () => []);
     for (int i = 0; i < list.length; i++) {
       Selector existing = list[i];
       if (existing.match(kind, name, callStructure)) {
diff --git a/pkg/compiler/lib/src/universe/side_effects.dart b/pkg/compiler/lib/src/universe/side_effects.dart
index 963b52c..c05eaf7 100644
--- a/pkg/compiler/lib/src/universe/side_effects.dart
+++ b/pkg/compiler/lib/src/universe/side_effects.dart
@@ -295,7 +295,7 @@
 
   void addInput(SideEffectsBuilder input) {
     if (_free) return;
-    (input._depending ??= Set<SideEffectsBuilder>()).add(this);
+    (input._depending ??= {}).add(this);
   }
 
   bool add(SideEffects input) {
@@ -305,8 +305,7 @@
 
   SideEffects get sideEffects => _sideEffects;
 
-  Iterable<SideEffectsBuilder> get depending =>
-      _depending != null ? _depending : const <SideEffectsBuilder>[];
+  Iterable<SideEffectsBuilder> get depending => _depending ?? const [];
 
   MemberEntity get member => _member;
 
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index f213d7a..bb33b0e 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -129,7 +129,7 @@
     }
   }
 
-  List<DartType> get typeArguments => _typeArguments ?? const <DartType>[];
+  List<DartType> get typeArguments => _typeArguments ?? const [];
 
   @override
   int get hashCode => Hashing.listHash(
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index 7ddd42e..ea42f4a 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -148,7 +148,7 @@
       _constraints = null;
       return true;
     }
-    _constraints ??= Set<StrongModeConstraint>();
+    _constraints ??= {};
     return _constraints.add(constraint);
   }
 
@@ -220,26 +220,23 @@
 }
 
 abstract class WorldBuilderBase {
-  final Map<Entity, Set<DartType>> staticTypeArgumentDependencies =
-      <Entity, Set<DartType>>{};
+  final Map<Entity, Set<DartType>> staticTypeArgumentDependencies = {};
 
-  final Map<Selector, Set<DartType>> dynamicTypeArgumentDependencies =
-      <Selector, Set<DartType>>{};
+  final Map<Selector, Set<DartType>> dynamicTypeArgumentDependencies = {};
 
-  final Set<TypeVariableType> typeVariableTypeLiterals =
-      Set<TypeVariableType>();
+  final Set<TypeVariableType> typeVariableTypeLiterals = {};
 
   void _registerStaticTypeArgumentDependency(
       Entity element, List<DartType> typeArguments) {
     staticTypeArgumentDependencies
-        .putIfAbsent(element, () => Set<DartType>())
+        .putIfAbsent(element, () => {})
         .addAll(typeArguments);
   }
 
   void _registerDynamicTypeArgumentDependency(
       Selector selector, List<DartType> typeArguments) {
     dynamicTypeArgumentDependencies
-        .putIfAbsent(selector, () => Set<DartType>())
+        .putIfAbsent(selector, () => {})
         .addAll(typeArguments);
   }
 
diff --git a/pkg/compiler/lib/src/universe/world_impact.dart b/pkg/compiler/lib/src/universe/world_impact.dart
index 85b9bb0..1413ae0 100644
--- a/pkg/compiler/lib/src/universe/world_impact.dart
+++ b/pkg/compiler/lib/src/universe/world_impact.dart
@@ -24,18 +24,18 @@
 
   MemberEntity get member => null;
 
-  Iterable<DynamicUse> get dynamicUses => const <DynamicUse>[];
+  Iterable<DynamicUse> get dynamicUses => const [];
 
-  Iterable<StaticUse> get staticUses => const <StaticUse>[];
+  Iterable<StaticUse> get staticUses => const [];
 
   // TODO(johnniwinther): Replace this by called constructors with type
   // arguments.
   // TODO(johnniwinther): Collect all checked types for checked mode separately
   // to support serialization.
 
-  Iterable<TypeUse> get typeUses => const <TypeUse>[];
+  Iterable<TypeUse> get typeUses => const [];
 
-  Iterable<ConstantUse> get constantUses => const <ConstantUse>[];
+  Iterable<ConstantUse> get constantUses => const [];
 
   bool get isEmpty => true;
 
@@ -113,49 +113,49 @@
   @override
   void registerDynamicUse(DynamicUse dynamicUse) {
     assert(dynamicUse != null);
-    _dynamicUses ??= Setlet<DynamicUse>();
+    _dynamicUses ??= Setlet();
     _dynamicUses.add(dynamicUse);
   }
 
   @override
   Iterable<DynamicUse> get dynamicUses {
-    return _dynamicUses != null ? _dynamicUses : const <DynamicUse>[];
+    return _dynamicUses ?? const [];
   }
 
   @override
   void registerTypeUse(TypeUse typeUse) {
     assert(typeUse != null);
-    _typeUses ??= Setlet<TypeUse>();
+    _typeUses ??= Setlet();
     _typeUses.add(typeUse);
   }
 
   @override
   Iterable<TypeUse> get typeUses {
-    return _typeUses != null ? _typeUses : const <TypeUse>[];
+    return _typeUses ?? const [];
   }
 
   @override
   void registerStaticUse(StaticUse staticUse) {
     assert(staticUse != null);
-    _staticUses ??= Setlet<StaticUse>();
+    _staticUses ??= Setlet();
     _staticUses.add(staticUse);
   }
 
   @override
   Iterable<StaticUse> get staticUses {
-    return _staticUses != null ? _staticUses : const <StaticUse>[];
+    return _staticUses ?? const [];
   }
 
   @override
   void registerConstantUse(ConstantUse constantUse) {
     assert(constantUse != null);
-    _constantUses ??= Setlet<ConstantUse>();
+    _constantUses ??= Setlet();
     _constantUses.add(constantUse);
   }
 
   @override
   Iterable<ConstantUse> get constantUses {
-    return _constantUses != null ? _constantUses : const <ConstantUse>[];
+    return _constantUses ?? const [];
   }
 }
 
@@ -164,7 +164,7 @@
 class StagedWorldImpactBuilder implements WorldImpactBuilder {
   final bool collectImpacts;
   WorldImpactBuilderImpl _currentBuilder;
-  List<WorldImpactBuilderImpl> _builders = <WorldImpactBuilderImpl>[];
+  List<WorldImpactBuilderImpl> _builders = [];
 
   StagedWorldImpactBuilder({this.collectImpacts = false});
 
@@ -242,57 +242,45 @@
 
   @override
   Iterable<DynamicUse> get dynamicUses {
-    return _dynamicUses != null ? _dynamicUses : worldImpact.dynamicUses;
+    return _dynamicUses ?? worldImpact.dynamicUses;
   }
 
   @override
   void registerDynamicUse(DynamicUse dynamicUse) {
-    if (_dynamicUses == null) {
-      _dynamicUses = Setlet<DynamicUse>();
-      _dynamicUses.addAll(worldImpact.dynamicUses);
-    }
+    _dynamicUses ??= Setlet.from(worldImpact.dynamicUses);
     _dynamicUses.add(dynamicUse);
   }
 
   @override
   void registerTypeUse(TypeUse typeUse) {
-    if (_typeUses == null) {
-      _typeUses = Setlet<TypeUse>();
-      _typeUses.addAll(worldImpact.typeUses);
-    }
+    _typeUses ??= Setlet.from(worldImpact.typeUses);
     _typeUses.add(typeUse);
   }
 
   @override
   Iterable<TypeUse> get typeUses {
-    return _typeUses != null ? _typeUses : worldImpact.typeUses;
+    return _typeUses ?? worldImpact.typeUses;
   }
 
   @override
   void registerStaticUse(StaticUse staticUse) {
-    if (_staticUses == null) {
-      _staticUses = Setlet<StaticUse>();
-      _staticUses.addAll(worldImpact.staticUses);
-    }
+    _staticUses ??= Setlet.from(worldImpact.staticUses);
     _staticUses.add(staticUse);
   }
 
   @override
   Iterable<StaticUse> get staticUses {
-    return _staticUses != null ? _staticUses : worldImpact.staticUses;
+    return _staticUses ?? worldImpact.staticUses;
   }
 
   @override
   Iterable<ConstantUse> get constantUses {
-    return _constantUses != null ? _constantUses : worldImpact.constantUses;
+    return _constantUses ?? worldImpact.constantUses;
   }
 
   @override
   void registerConstantUse(ConstantUse constantUse) {
-    if (_constantUses == null) {
-      _constantUses = Setlet<ConstantUse>();
-      _constantUses.addAll(worldImpact.constantUses);
-    }
+    _constantUses ??= Setlet.from(worldImpact.constantUses);
     _constantUses.add(constantUse);
   }
 
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index e654eea..c4fcdd7 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -55,10 +55,8 @@
 namespace compiler {
 
 bool IsSameObject(const Object& a, const Object& b) {
-  if (a.IsMint() && b.IsMint()) {
-    return Mint::Cast(a).value() == Mint::Cast(b).value();
-  } else if (a.IsDouble() && b.IsDouble()) {
-    return Double::Cast(a).value() == Double::Cast(b).value();
+  if (a.IsInstance() && b.IsInstance()) {
+    return Instance::Cast(a).IsIdenticalTo(Instance::Cast(b));
   }
   return a.ptr() == b.ptr();
 }
diff --git a/tools/VERSION b/tools/VERSION
index b80682d..389bae8 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 15
 PATCH 0
-PRERELEASE 93
+PRERELEASE 94
 PRERELEASE_PATCH 0
\ No newline at end of file