Version 2.18.0-217.0.dev

Merge commit '6651c297795ce8707bdb4d43f7e247e386c05da2' into 'dev'
diff --git a/pkg/compiler/test/model/cfe_constant_evaluation_test.dart b/pkg/compiler/test/model/cfe_constant_evaluation_test.dart
index a3d52f9..6ba6b39 100644
--- a/pkg/compiler/test/model/cfe_constant_evaluation_test.dart
+++ b/pkg/compiler/test/model/cfe_constant_evaluation_test.dart
@@ -534,6 +534,47 @@
     ConstantData(
         'const Subclass<B>(B())', 'ConstructedConstant(Subclass<B*>())'),
   ]),
+  TestData('Nested Unevaluated', '''
+//@dart = 2.12
+class Foo {
+  const Foo(
+    int Function(String)? a1,
+    int Function(String)? a2,
+    int Function(String)? a3,
+    int Function(String)? a4,
+  ) : _foo = a1 ??
+            a2 ??
+            a3 ??
+            a4 ??
+            bar;
+  final int Function(String) _foo;
+}
+
+int bar(String o) => int.parse(o);
+ ''', [
+    ConstantData(
+      '''Foo(
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+  )''',
+      <Map<String, String>, String>{
+        {}: 'ConstructedConstant(Foo(_foo=FunctionConstant(bar)))',
+        {'baz': 'true'}:
+            'ConstructedConstant(Foo(_foo=FunctionConstant(int.parse)))'
+      },
+    ),
+    ConstantData(
+      '''String.fromEnvironment(String.fromEnvironment(String.fromEnvironment("foo")))''',
+      <Map<String, String>, String>{
+        {}: 'StringConstant("")',
+        {'foo': 'bar', 'bar': 'baz'}: 'StringConstant("")',
+        {'foo': 'bar', 'bar': 'baz', 'baz': 'hello'}: 'StringConstant("hello")',
+        {'foo': 'bar', 'bar': 'baz', 'baz': 'world'}: 'StringConstant("world")',
+      },
+    ),
+  ]),
 ];
 
 main(List<String> args) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart b/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart
index 37ab572..f52f249 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart
@@ -26,7 +26,7 @@
     if (constant is AbortConstant) return constant;
     if (evaluator.shouldBeUnevaluated) {
       parts.add(evaluator.unevaluated(
-          element, makeLiteral([evaluator.extract(constant)])));
+          element, makeLiteral([evaluator._wrap(constant)])));
       return null;
     } else {
       return addConstant(constant, element);
@@ -134,7 +134,7 @@
         if (part.isEmpty) continue;
         lists.add(new ConstantExpression(new ListConstant(elementType, part)));
       } else if (part is Constant) {
-        lists.add(evaluator.extract(part));
+        lists.add(evaluator._wrap(part));
       } else {
         throw 'Non-constant in constant list';
       }
@@ -208,7 +208,7 @@
         if (part.isEmpty) continue;
         sets.add(new ConstantExpression(new SetConstant(elementType, part)));
       } else if (part is Constant) {
-        sets.add(evaluator.extract(part));
+        sets.add(evaluator._wrap(part));
       } else {
         throw 'Non-constant in constant set';
       }
@@ -247,8 +247,7 @@
       parts.add(evaluator.unevaluated(
           element.key,
           new MapLiteral([
-            new MapLiteralEntry(
-                evaluator.extract(key), evaluator.extract(value))
+            new MapLiteralEntry(evaluator._wrap(key), evaluator._wrap(value))
           ], isConst: true)));
       return null;
     } else {
@@ -347,7 +346,7 @@
         maps.add(
             new ConstantExpression(new MapConstant(keyType, valueType, part)));
       } else if (part is Constant) {
-        maps.add(evaluator.extract(part));
+        maps.add(evaluator._wrap(part));
       } else {
         throw 'Non-constant in constant map';
       }
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
index e1cffbd..1718ce3 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -22,7 +22,6 @@
 
 import 'package:kernel/ast.dart';
 import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/clone.dart';
 import 'package:kernel/core_types.dart';
 import 'package:kernel/src/const_canonical_type.dart';
 import 'package:kernel/src/legacy_erasure.dart';
@@ -835,7 +834,7 @@
   TreeNode visitConstantExpression(
       ConstantExpression node, TreeNode? removalSentinel) {
     Constant constant = node.constant;
-    if (constant is UnevaluatedConstant) {
+    if (constant is UnevaluatedConstant && constantEvaluator.hasEnvironment) {
       Expression expression = constant.expression;
       return evaluateAndTransformWithContext(expression, expression);
     } else {
@@ -898,7 +897,6 @@
 
   final Map<Constant, Constant> canonicalizationCache;
   final Map<Node, Constant?> nodeCache;
-  final CloneVisitorNotMembers cloner = new CloneVisitorNotMembers();
 
   late Map<Class, bool> primitiveEqualCache;
 
@@ -910,7 +908,6 @@
 
   InstanceBuilder? instanceBuilder;
   EvaluationEnvironment env;
-  Set<Expression> replacementNodes = new Set<Expression>.identity();
   Map<Constant, Constant> lowered = new Map<Constant, Constant>.identity();
 
   bool seenUnevaluatedChild = false; // Any children that were left unevaluated?
@@ -1209,17 +1206,11 @@
     return node.accept(new RedundantFileUriExpressionRemover()) as Expression;
   }
 
-  /// Extract an expression from a (possibly unevaluated) constant to become
-  /// part of the expression tree of another unevaluated constant.
-  /// Makes sure a particular expression occurs only once in the tree by
-  /// cloning further instances.
-  Expression extract(Constant constant) {
-    Expression expression = constant.asExpression();
-    if (!replacementNodes.add(expression)) {
-      expression = cloner.clone(expression);
-      replacementNodes.add(expression);
-    }
-    return expression;
+  /// Wrap a constant in a ConstantExpression.
+  ///
+  /// For use with unevaluated constants.
+  ConstantExpression _wrap(Constant constant) {
+    return new ConstantExpression(constant);
   }
 
   /// Enter a region of lazy evaluation. All leaf nodes are evaluated normally
@@ -1754,7 +1745,7 @@
           return error;
         }
         if (constant is UnevaluatedConstant) {
-          instanceBuilder!.unusedArguments.add(extract(constant));
+          instanceBuilder!.unusedArguments.add(_wrap(constant));
         }
       }
       if (error != null) return error;
@@ -2040,7 +2031,7 @@
       }
 
       for (UnevaluatedConstant constant in env.unevaluatedUnreadConstants) {
-        instanceBuilder!.unusedArguments.add(extract(constant));
+        instanceBuilder!.unusedArguments.add(_wrap(constant));
       }
 
       // ignore: unnecessary_null_comparison
@@ -2065,10 +2056,10 @@
         enterLazy();
         Constant constant = _evaluateSubexpression(statement.message!);
         if (constant is AbortConstant) return constant;
-        message = extract(constant);
+        message = _wrap(constant);
         leaveLazy();
       }
-      instanceBuilder!.asserts.add(new AssertStatement(extract(condition),
+      instanceBuilder!.asserts.add(new AssertStatement(_wrap(condition),
           message: message,
           conditionStartOffset: statement.conditionStartOffset,
           conditionEndOffset: statement.conditionEndOffset));
@@ -2081,8 +2072,8 @@
         final Constant message = _evaluateSubexpression(statement.message!);
         if (message is AbortConstant) return message;
         if (shouldBeUnevaluated) {
-          instanceBuilder!.asserts.add(new AssertStatement(extract(condition),
-              message: extract(message),
+          instanceBuilder!.asserts.add(new AssertStatement(_wrap(condition),
+              message: _wrap(message),
               conditionStartOffset: statement.conditionStartOffset,
               conditionEndOffset: statement.conditionEndOffset));
         } else if (message is StringConstant) {
@@ -2150,7 +2141,7 @@
           node,
           new DynamicInvocation(
               node.kind,
-              extract(receiver),
+              _wrap(receiver),
               node.name,
               unevaluatedArguments(
                   positionalArguments, {}, node.arguments.types))
@@ -2195,7 +2186,7 @@
           node,
           new InstanceInvocation(
               node.kind,
-              extract(receiver),
+              _wrap(receiver),
               node.name,
               unevaluatedArguments(
                   positionalArguments, {}, node.arguments.types),
@@ -2293,11 +2284,10 @@
     if (left is AbortConstant) return left;
     final Constant right = _evaluateSubexpression(node.right);
     if (right is AbortConstant) return right;
-
     if (shouldBeUnevaluated) {
       return unevaluated(
           node,
-          new EqualsCall(extract(left), extract(right),
+          new EqualsCall(_wrap(left), _wrap(right),
               functionType: node.functionType,
               interfaceTarget: node.interfaceTarget)
             ..fileOffset = node.fileOffset);
@@ -2313,7 +2303,7 @@
 
     if (shouldBeUnevaluated) {
       return unevaluated(node,
-          new EqualsNull(extract(expression))..fileOffset = node.fileOffset);
+          new EqualsNull(_wrap(expression))..fileOffset = node.fileOffset);
     }
 
     return _handleEquals(node, expression, nullConstant);
@@ -2604,10 +2594,8 @@
       Constant right = _evaluateSubexpression(node.right);
       if (right is AbortConstant) return right;
       leaveLazy();
-      return unevaluated(
-          node,
-          new LogicalExpression(
-              extract(left), node.operatorEnum, extract(right)));
+      return unevaluated(node,
+          new LogicalExpression(_wrap(left), node.operatorEnum, _wrap(right)));
     }
     switch (node.operatorEnum) {
       case LogicalExpressionOperator.OR:
@@ -2688,8 +2676,8 @@
       leaveLazy();
       return unevaluated(
           node,
-          new ConditionalExpression(extract(condition), extract(then),
-              extract(otherwise), env.substituteType(node.staticType)));
+          new ConditionalExpression(_wrap(condition), _wrap(then),
+              _wrap(otherwise), env.substituteType(node.staticType)));
     } else {
       return createEvaluationErrorConstant(
           node.condition,
@@ -2737,7 +2725,7 @@
     } else if (shouldBeUnevaluated) {
       return unevaluated(
           node,
-          new InstanceGet(node.kind, extract(receiver), node.name,
+          new InstanceGet(node.kind, _wrap(receiver), node.name,
               resultType: node.resultType,
               interfaceTarget: node.interfaceTarget));
     } else if (receiver is NullConstant) {
@@ -2797,7 +2785,7 @@
       return canonicalize(intFolder.makeIntConstant(receiver.value.length));
     } else if (shouldBeUnevaluated) {
       return unevaluated(
-          node, new DynamicGet(node.kind, extract(receiver), node.name));
+          node, new DynamicGet(node.kind, _wrap(receiver), node.name));
     } else if (receiver is NullConstant) {
       return createEvaluationErrorConstant(node, messageConstEvalNullValue);
     }
@@ -2979,7 +2967,7 @@
         } else {
           // The value is either unevaluated constant or a non-primitive
           // constant in an unevaluated expression.
-          return extract(value as Constant);
+          return _wrap(value as Constant);
         }
       }, growable: false);
       return unevaluated(node, new StringConcatenation(expressions));
@@ -3254,7 +3242,7 @@
     if (shouldBeUnevaluated) {
       return unevaluated(
           node,
-          new AsExpression(extract(constant), env.substituteType(node.type))
+          new AsExpression(_wrap(constant), env.substituteType(node.type))
             ..isForNonNullableByDefault =
                 _staticTypeContext!.isNonNullableByDefault);
     }
@@ -3277,7 +3265,7 @@
     if (shouldBeUnevaluated) {
       return unevaluated(
           node,
-          new IsExpression(extract(constant), node.type)
+          new IsExpression(_wrap(constant), env.substituteType(node.type))
             ..fileOffset = node.fileOffset
             ..flags = node.flags);
     }
@@ -3349,7 +3337,7 @@
       return makeBoolConstant(constant != trueConstant);
     }
     if (shouldBeUnevaluated) {
-      return unevaluated(node, new Not(extract(constant)));
+      return unevaluated(node, new Not(_wrap(constant)));
     }
     return createEvaluationErrorConstant(
         node,
@@ -3368,7 +3356,7 @@
       return createEvaluationErrorConstant(node, messageConstEvalNonNull);
     }
     if (shouldBeUnevaluated) {
-      return unevaluated(node, new NullCheck(extract(constant)));
+      return unevaluated(node, new NullCheck(_wrap(constant)));
     }
     return constant;
   }
@@ -3397,7 +3385,7 @@
     if (shouldBeUnevaluated) {
       return unevaluated(
           node,
-          new Instantiation(extract(constant),
+          new Instantiation(_wrap(constant),
               node.typeArguments.map((t) => env.substituteType(t)).toList()));
     }
     List<TypeParameter>? typeParameters;
@@ -3691,11 +3679,11 @@
     final List<NamedExpression> named = new List<NamedExpression>.filled(
         namedArgs.length, dummyNamedExpression);
     for (int i = 0; i < positionalArgs.length; ++i) {
-      positional[i] = extract(positionalArgs[i]);
+      positional[i] = _wrap(positionalArgs[i]);
     }
     int i = 0;
     namedArgs.forEach((String name, Constant value) {
-      named[i++] = new NamedExpression(name, extract(value));
+      named[i++] = new NamedExpression(name, _wrap(value));
     });
     return new Arguments(positional, named: named, types: types);
   }
@@ -4146,7 +4134,7 @@
   InstanceCreation buildUnevaluatedInstance() {
     final Map<Reference, Expression> fieldValues = <Reference, Expression>{};
     fields.forEach((Field field, Constant value) {
-      fieldValues[field.fieldReference] = evaluator.extract(value);
+      fieldValues[field.fieldReference] = evaluator._wrap(value);
     });
     return new InstanceCreation(
         klass.reference, typeArguments, fieldValues, asserts, unusedArguments);
@@ -4327,11 +4315,6 @@
   }
 
   @override
-  Expression asExpression() {
-    throw new UnimplementedError();
-  }
-
-  @override
   DartType getType(StaticTypeContext context) {
     throw new UnimplementedError();
   }
@@ -4399,11 +4382,6 @@
   }
 
   @override
-  Expression asExpression() {
-    throw new UnimplementedError();
-  }
-
-  @override
   DartType getType(StaticTypeContext context) {
     throw new UnimplementedError();
   }
@@ -4465,11 +4443,6 @@
   }
 
   @override
-  Expression asExpression() {
-    throw new UnimplementedError();
-  }
-
-  @override
   DartType getType(StaticTypeContext context) {
     throw new UnimplementedError();
   }
@@ -4532,11 +4505,6 @@
   }
 
   @override
-  Expression asExpression() {
-    throw new UnimplementedError();
-  }
-
-  @override
   DartType getType(StaticTypeContext context) {
     throw new UnimplementedError();
   }
diff --git a/pkg/front_end/outline_extraction_testcases/.dart_tool/package_config.json b/pkg/front_end/outline_extraction_testcases/.dart_tool/package_config.json
new file mode 100644
index 0000000..7816160
--- /dev/null
+++ b/pkg/front_end/outline_extraction_testcases/.dart_tool/package_config.json
@@ -0,0 +1,4 @@
+{
+  "configVersion": 2,
+  "packages": []
+}
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/.packages b/pkg/front_end/outline_extraction_testcases/.packages
deleted file mode 100644
index 68325fa..0000000
--- a/pkg/front_end/outline_extraction_testcases/.packages
+++ /dev/null
@@ -1 +0,0 @@
-# dummy
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/factories/.dart_tool/package_config.json b/pkg/front_end/outline_extraction_testcases/factories/.dart_tool/package_config.json
new file mode 100644
index 0000000..140964c
--- /dev/null
+++ b/pkg/front_end/outline_extraction_testcases/factories/.dart_tool/package_config.json
@@ -0,0 +1,9 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": ".."
+    }
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/factories/.packages b/pkg/front_end/outline_extraction_testcases/factories/.packages
deleted file mode 100644
index 6607aec..0000000
--- a/pkg/front_end/outline_extraction_testcases/factories/.packages
+++ /dev/null
@@ -1 +0,0 @@
-foo:.
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/named_import_with_export_and_named_constructor_and_class_type_parameter/.dart_tool/package_config.json b/pkg/front_end/outline_extraction_testcases/named_import_with_export_and_named_constructor_and_class_type_parameter/.dart_tool/package_config.json
new file mode 100644
index 0000000..140964c
--- /dev/null
+++ b/pkg/front_end/outline_extraction_testcases/named_import_with_export_and_named_constructor_and_class_type_parameter/.dart_tool/package_config.json
@@ -0,0 +1,9 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": ".."
+    }
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/named_import_with_export_and_named_constructor_and_class_type_parameter/.packages b/pkg/front_end/outline_extraction_testcases/named_import_with_export_and_named_constructor_and_class_type_parameter/.packages
deleted file mode 100644
index 6607aec..0000000
--- a/pkg/front_end/outline_extraction_testcases/named_import_with_export_and_named_constructor_and_class_type_parameter/.packages
+++ /dev/null
@@ -1 +0,0 @@
-foo:.
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/split_import_export_part/.dart_tool/package_config.json b/pkg/front_end/outline_extraction_testcases/split_import_export_part/.dart_tool/package_config.json
new file mode 100644
index 0000000..de99a55
--- /dev/null
+++ b/pkg/front_end/outline_extraction_testcases/split_import_export_part/.dart_tool/package_config.json
@@ -0,0 +1,9 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foobar",
+      "rootUri": ".."
+    }
+  ]
+}
\ No newline at end of file
diff --git a/pkg/front_end/outline_extraction_testcases/split_import_export_part/.packages b/pkg/front_end/outline_extraction_testcases/split_import_export_part/.packages
deleted file mode 100644
index d19a7e0..0000000
--- a/pkg/front_end/outline_extraction_testcases/split_import_export_part/.packages
+++ /dev/null
@@ -1 +0,0 @@
-foobar:.
\ No newline at end of file
diff --git a/pkg/front_end/test/async_but_no_await_git_test.dart b/pkg/front_end/test/async_but_no_await_git_test.dart
index fb27bc2..0823d43 100644
--- a/pkg/front_end/test/async_but_no_await_git_test.dart
+++ b/pkg/front_end/test/async_but_no_await_git_test.dart
@@ -33,7 +33,7 @@
 
   Uri packageConfigUri = repoDir.resolve(".dart_tool/package_config.json");
   if (!new File.fromUri(packageConfigUri).existsSync()) {
-    throw "Couldn't find .packages";
+    throw "Couldn't find .dart_tool/package_config.json";
   }
   compilerOptions.packagesFileUri = packageConfigUri;
 
diff --git a/pkg/front_end/test/fasta/messages_suite.dart b/pkg/front_end/test/fasta/messages_suite.dart
index 3a90827..8c9862a 100644
--- a/pkg/front_end/test/fasta/messages_suite.dart
+++ b/pkg/front_end/test/fasta/messages_suite.dart
@@ -785,14 +785,13 @@
     Uri output =
         suite.fileSystem.currentDirectory.resolve("$dir/main.dart.dill");
 
-    // Setup .packages if it (or package_config.json) doesn't exist.
-    Uri dotPackagesUri =
-        suite.fileSystem.currentDirectory.resolve("$dir/.packages");
-    Uri packageConfigJsonUri = suite.fileSystem.currentDirectory
+    // Setup .dart_tool/package_config.json if it doesn't exist.
+    Uri packageConfigUri = suite.fileSystem.currentDirectory
         .resolve("$dir/.dart_tool/package_config.json");
-    if (!await suite.fileSystem.entityForUri(dotPackagesUri).exists() &&
-        !await suite.fileSystem.entityForUri(packageConfigJsonUri).exists()) {
-      suite.fileSystem.entityForUri(dotPackagesUri).writeAsBytesSync([]);
+    if (!await suite.fileSystem.entityForUri(packageConfigUri).exists()) {
+      suite.fileSystem
+          .entityForUri(packageConfigUri)
+          .writeAsStringSync('{"configVersion": 2, "packages": []}');
     }
 
     print("Compiling $main");
@@ -805,7 +804,7 @@
           ..explicitExperimentalFlags = example.experimentalFlags ?? {}
           ..target = new VmTarget(new TargetFlags())
           ..fileSystem = new HybridFileSystem(suite.fileSystem)
-          ..packagesFileUri = dotPackagesUri
+          ..packagesFileUri = packageConfigUri
           ..onDiagnostic = messages.add
           ..environmentDefines = const {}),
         main,
diff --git a/pkg/front_end/test/flutter_gallery_leak_tester.dart b/pkg/front_end/test/flutter_gallery_leak_tester.dart
index ff245b5..922bb31 100644
--- a/pkg/front_end/test/flutter_gallery_leak_tester.dart
+++ b/pkg/front_end/test/flutter_gallery_leak_tester.dart
@@ -182,7 +182,7 @@
     "--output-dill",
     "$rootPath/flutter_server_tmp.dill",
     "--packages",
-    "$rootPath/gallery/.packages",
+    "$rootPath/gallery/.dart_tool/package_config.json",
     "-Ddart.vm.profile=false",
     "-Ddart.vm.product=false",
     "--enable-asserts",
diff --git a/pkg/front_end/test/id_testing/data/directory_testing/.dart_tool/package_config.json b/pkg/front_end/test/id_testing/data/directory_testing/.dart_tool/package_config.json
new file mode 100644
index 0000000..27929ac
--- /dev/null
+++ b/pkg/front_end/test/id_testing/data/directory_testing/.dart_tool/package_config.json
@@ -0,0 +1,9 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../lib"
+    }
+  ]
+}
diff --git a/pkg/front_end/test/incremental_suite.dart b/pkg/front_end/test/incremental_suite.dart
index e96910b..78f31b4 100644
--- a/pkg/front_end/test/incremental_suite.dart
+++ b/pkg/front_end/test/incremental_suite.dart
@@ -400,7 +400,7 @@
       invalidateFilenames.remove(filename);
     }
     String source = sourceFiles[filename];
-    if (filename == ".packages") {
+    if (filename == ".dart_tool/package_config.json") {
       packagesUri = uri;
     }
     File file = new File.fromUri(uri);
@@ -477,7 +477,7 @@
     Uri? packagesUri;
     for (String filename in module[moduleName].keys) {
       Uri uri = base.resolve(filename);
-      if (uri.pathSegments.last == ".packages") {
+      if (uri.pathSegments.last == "package_config.json") {
         packagesUri = uri;
       } else {
         moduleSources.add(uri);
@@ -683,9 +683,7 @@
       for (String filename in sourceFiles.keys) {
         String data = sourceFiles[filename] ?? "";
         Uri uri = base.resolve(filename);
-        if (filename == ".packages") {
-          packagesUri = uri;
-        } else if (filename == ".dart_tool/package_config.json") {
+        if (filename == ".dart_tool/package_config.json") {
           packagesUri = uri;
         }
         if (world["enableStringReplacement"] == true) {
@@ -693,8 +691,8 @@
         }
         fs.entityForUri(uri).writeAsStringSync(data);
       }
-      if (world["dotPackagesFile"] != null) {
-        packagesUri = base.resolve(world["dotPackagesFile"]);
+      if (world["packageConfigFile"] != null) {
+        packagesUri = base.resolve(world["packageConfigFile"]);
       }
 
       if (brandNewWorld) {
diff --git a/pkg/front_end/test/lint_suite.dart b/pkg/front_end/test/lint_suite.dart
index 2d91952..009efff 100644
--- a/pkg/front_end/test/lint_suite.dart
+++ b/pkg/front_end/test/lint_suite.dart
@@ -167,23 +167,23 @@
       description.cache.firstToken = scanner.tokenize();
       description.cache.lineStarts = scanner.lineStarts;
 
-      Uri dotPackages =
+      Uri packageConfig =
           description.uri.resolve(".dart_tool/package_config.json");
       while (true) {
-        if (new File.fromUri(dotPackages).existsSync()) {
+        if (new File.fromUri(packageConfig).existsSync()) {
           break;
         }
         // Stupid bailout.
-        if (dotPackages.pathSegments.length < Uri.base.pathSegments.length) {
+        if (packageConfig.pathSegments.length < Uri.base.pathSegments.length) {
           break;
         }
-        dotPackages =
-            dotPackages.resolve("../../.dart_tool/package_config.json");
+        packageConfig =
+            packageConfig.resolve("../../.dart_tool/package_config.json");
       }
 
-      File dotPackagesFile = new File.fromUri(dotPackages);
-      if (dotPackagesFile.existsSync()) {
-        description.cache.packages = await loadPackageConfigUri(dotPackages);
+      File packageConfigUri = new File.fromUri(packageConfig);
+      if (packageConfigUri.existsSync()) {
+        description.cache.packages = await loadPackageConfigUri(packageConfig);
       }
     }
 
diff --git a/pkg/front_end/test/outline_extractor_suite.dart b/pkg/front_end/test/outline_extractor_suite.dart
index 4548f0c..42adf8c 100644
--- a/pkg/front_end/test/outline_extractor_suite.dart
+++ b/pkg/front_end/test/outline_extractor_suite.dart
@@ -100,7 +100,7 @@
   @override
   Future<Result<TestDescription>> run(
       TestDescription description, Context context) async {
-    Uri? packages = description.uri.resolve(".packages");
+    Uri? packages = description.uri.resolve(".dart_tool/package_config.json");
     if (!new File.fromUri(packages).existsSync()) {
       packages = null;
     }
@@ -141,7 +141,7 @@
   @override
   Future<Result<TestDescription>> run(
       TestDescription description, Context context) async {
-    Uri? packages = description.uri.resolve(".packages");
+    Uri? packages = description.uri.resolve(".dart_tool/package_config.json");
     if (!new File.fromUri(packages).existsSync()) {
       packages = null;
     }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect
index 9106d0c..96b1d69 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.expect
@@ -95,9 +95,9 @@
     : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•()
     ;
 }
-static const field self::Foo foo1 = #C9;
+static const field self::Foo foo1 = #C12;
 static const field self::Foo foo2 = invalid-expression "This assertion failed with message: x is not positive";
-static const field self::Foo foo3 = #C12;
+static const field self::Foo foo3 = #C16;
 static const field self::Foo foo4 = invalid-expression "This assertion failed with a non-String message.";
 static const field self::Foo foo5 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   const Foo.withInvalidCondition(this.x) : assert(x);
@@ -107,7 +107,7 @@
 static const field self::Bar bar3 = invalid-expression "This assertion failed.";
 static const field self::Bar bar4 = invalid-expression "This assertion failed.";
 static method main() → dynamic {
-  core::print(#C9);
+  core::print(#C12);
 }
 
 constants  {
@@ -118,11 +118,15 @@
   #C5 = eval const core::bool::fromEnvironment(#C1)
   #C6 = 1
   #C7 = false
-  #C8 = "foo was "
-  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
-  #C10 = 42
-  #C11 = "btw foo was "
-  #C12 = eval self::Foo{x:#C10, assert(#C7, "${#C11}${const core::bool::fromEnvironment(#C1)}")}
+  #C8 = eval #C2 =={core::Object::==}{(core::Object) → core::bool} #C7
+  #C9 = "foo was "
+  #C10 = eval "${#C9}${#C3}"
+  #C11 = eval #C4 =={core::Object::==}{(core::Object) → core::bool} #C7
+  #C12 = eval self::Foo{x:#C6, assert(#C8, #C10), assert(#C11)}
+  #C13 = 42
+  #C14 = "btw foo was "
+  #C15 = eval "${#C14}${#C5}"
+  #C16 = eval self::Foo{x:#C13, assert(#C7, #C15)}
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.modular.expect
index 9106d0c..96b1d69 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.modular.expect
@@ -95,9 +95,9 @@
     : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•()
     ;
 }
-static const field self::Foo foo1 = #C9;
+static const field self::Foo foo1 = #C12;
 static const field self::Foo foo2 = invalid-expression "This assertion failed with message: x is not positive";
-static const field self::Foo foo3 = #C12;
+static const field self::Foo foo3 = #C16;
 static const field self::Foo foo4 = invalid-expression "This assertion failed with a non-String message.";
 static const field self::Foo foo5 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   const Foo.withInvalidCondition(this.x) : assert(x);
@@ -107,7 +107,7 @@
 static const field self::Bar bar3 = invalid-expression "This assertion failed.";
 static const field self::Bar bar4 = invalid-expression "This assertion failed.";
 static method main() → dynamic {
-  core::print(#C9);
+  core::print(#C12);
 }
 
 constants  {
@@ -118,11 +118,15 @@
   #C5 = eval const core::bool::fromEnvironment(#C1)
   #C6 = 1
   #C7 = false
-  #C8 = "foo was "
-  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
-  #C10 = 42
-  #C11 = "btw foo was "
-  #C12 = eval self::Foo{x:#C10, assert(#C7, "${#C11}${const core::bool::fromEnvironment(#C1)}")}
+  #C8 = eval #C2 =={core::Object::==}{(core::Object) → core::bool} #C7
+  #C9 = "foo was "
+  #C10 = eval "${#C9}${#C3}"
+  #C11 = eval #C4 =={core::Object::==}{(core::Object) → core::bool} #C7
+  #C12 = eval self::Foo{x:#C6, assert(#C8, #C10), assert(#C11)}
+  #C13 = 42
+  #C14 = "btw foo was "
+  #C15 = eval "${#C14}${#C5}"
+  #C16 = eval self::Foo{x:#C13, assert(#C7, #C15)}
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect
index d6b50e0..dc5b38b 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.weak.transformed.expect
@@ -95,9 +95,9 @@
     : self::Bar::x = x, assert(x.{core::num::<}(0){(core::num) → core::bool}), super core::Object::•()
     ;
 }
-static const field self::Foo foo1 = #C9;
+static const field self::Foo foo1 = #C12;
 static const field self::Foo foo2 = invalid-expression "This assertion failed with message: x is not positive";
-static const field self::Foo foo3 = #C12;
+static const field self::Foo foo3 = #C16;
 static const field self::Foo foo4 = invalid-expression "This assertion failed with a non-String message.";
 static const field self::Foo foo5 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
   const Foo.withInvalidCondition(this.x) : assert(x);
@@ -107,7 +107,7 @@
 static const field self::Bar bar3 = invalid-expression "This assertion failed.";
 static const field self::Bar bar4 = invalid-expression "This assertion failed.";
 static method main() → dynamic {
-  core::print(#C13);
+  core::print(#C12);
 }
 
 constants  {
@@ -118,12 +118,15 @@
   #C5 = eval const core::bool::fromEnvironment(#C1)
   #C6 = 1
   #C7 = false
-  #C8 = "foo was "
-  #C9 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
-  #C10 = 42
-  #C11 = "btw foo was "
-  #C12 = eval self::Foo{x:#C10, assert(#C7, "${#C11}${const core::bool::fromEnvironment(#C1)}")}
-  #C13 = eval self::Foo{x:#C6, assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7, "${#C8}${const core::bool::fromEnvironment(#C1)}"), assert(const core::bool::fromEnvironment(#C1) =={core::Object::==}{(core::Object) → core::bool} #C7)}
+  #C8 = eval #C2 =={core::Object::==}{(core::Object) → core::bool} #C7
+  #C9 = "foo was "
+  #C10 = eval "${#C9}${#C3}"
+  #C11 = eval #C4 =={core::Object::==}{(core::Object) → core::bool} #C7
+  #C12 = eval self::Foo{x:#C6, assert(#C8, #C10), assert(#C11)}
+  #C13 = 42
+  #C14 = "btw foo was "
+  #C15 = eval "${#C14}${#C5}"
+  #C16 = eval self::Foo{x:#C13, assert(#C7, #C15)}
 }
 
 Extra constant evaluation status:
@@ -135,7 +138,7 @@
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:12:22 -> BoolConstant(false)
 Evaluated with empty environment: StringConcatenation @ org-dartlang-testcase:///const_asserts.dart:14:73 -> StringConstant("btw foo was false")
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:14:44 -> BoolConstant(false)
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:25:24 -> InstanceConstant(const Foo{Foo.x: 1})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:36:9 -> InstanceConstant(const Foo{Foo.x: 1})
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_asserts.dart:25:24 -> InstanceConstant(const Foo{Foo.x: 1})
 Extra constant evaluation: evaluated: 31, effectively constant: 10
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.expect
index 4f9249f..531858a 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.expect
@@ -9,44 +9,55 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::bool> listWithUnevaluated = #C5;
-static const field core::List<core::bool> listWithUnevaluatedSpread = #C8;
-static const field core::Set<core::bool> setWithUnevaluated = #C10;
-static const field core::Set<core::bool> setWithUnevaluatedSpread = #C12;
-static const field core::List<core::int> a = #C13;
-static const field core::List<core::int?> b = #C14;
-static const field core::Set<core::List<core::int?>> setNotAgnosticOK = #C15;
-static const field invalid-type MapWithUnevaluated = #C16;
-static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = #C19;
+static const field core::List<core::bool> listWithUnevaluated = #C9;
+static const field core::List<core::bool> listWithUnevaluatedSpread = #C12;
+static const field core::Set<core::bool> setWithUnevaluated = #C18;
+static const field core::Set<core::bool> setWithUnevaluatedSpread = #C20;
+static const field core::List<core::int> a = #C21;
+static const field core::List<core::int?> b = #C22;
+static const field core::Set<core::List<core::int?>> setNotAgnosticOK = #C23;
+static const field invalid-type MapWithUnevaluated = #C27;
+static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = #C30;
 static method main() → dynamic {
-  core::print(#C5);
-  core::print(#C8);
-  core::print(#C10);
+  core::print(#C9);
   core::print(#C12);
+  core::print(#C18);
+  core::print(#C20);
   core::print(<core::String>{"hello"});
-  core::print(#C21);
+  core::print(#C32);
 }
 
 constants  {
   #C1 = "foo"
-  #C2 = "bar"
-  #C3 = true
-  #C4 = <core::bool*>[#C3]
-  #C5 = eval const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4
-  #C6 = false
-  #C7 = <core::bool*>[#C6]
-  #C8 = eval #C4 + const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4 + #C7
-  #C9 = <core::bool*>{#C3}
-  #C10 = eval const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9
-  #C11 = <core::bool*>{#C6}
-  #C12 = eval #C9 + const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9 + #C11
-  #C13 = <core::int*>[]
-  #C14 = <core::int?>[]
-  #C15 = <core::List<core::int?>*>{#C13, #C14}
-  #C16 = eval const <dynamic, dynamic>{const core::bool::fromEnvironment(#C1): const core::bool::fromEnvironment(#C2)}
-  #C17 = 0
-  #C18 = 1
-  #C19 = <core::List<core::int?>*, core::int*>{#C13:#C17, #C14:#C18)
-  #C20 = "hello"
-  #C21 = <core::String*>{#C20}
+  #C2 = eval const core::bool::fromEnvironment(#C1)
+  #C3 = eval const <dynamic>[#C2]
+  #C4 = "bar"
+  #C5 = eval const core::bool::fromEnvironment(#C4)
+  #C6 = eval const <dynamic>[#C5]
+  #C7 = true
+  #C8 = <core::bool*>[#C7]
+  #C9 = eval #C3 + #C6 + #C8
+  #C10 = false
+  #C11 = <core::bool*>[#C10]
+  #C12 = eval #C8 + #C9 + #C11
+  #C13 = eval const core::bool::fromEnvironment(#C1)
+  #C14 = eval const <dynamic>{#C13}
+  #C15 = eval const core::bool::fromEnvironment(#C4)
+  #C16 = eval const <dynamic>{#C15}
+  #C17 = <core::bool*>{#C7}
+  #C18 = eval #C14 + #C16 + #C17
+  #C19 = <core::bool*>{#C10}
+  #C20 = eval #C17 + #C18 + #C19
+  #C21 = <core::int*>[]
+  #C22 = <core::int?>[]
+  #C23 = <core::List<core::int?>*>{#C21, #C22}
+  #C24 = eval const core::bool::fromEnvironment(#C1)
+  #C25 = eval const core::bool::fromEnvironment(#C4)
+  #C26 = eval const <dynamic, dynamic>{#C24: #C25}
+  #C27 = eval #C26
+  #C28 = 0
+  #C29 = 1
+  #C30 = <core::List<core::int?>*, core::int*>{#C21:#C28, #C22:#C29)
+  #C31 = "hello"
+  #C32 = <core::String*>{#C31}
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.modular.expect
index 4f9249f..531858a 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.modular.expect
@@ -9,44 +9,55 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::bool> listWithUnevaluated = #C5;
-static const field core::List<core::bool> listWithUnevaluatedSpread = #C8;
-static const field core::Set<core::bool> setWithUnevaluated = #C10;
-static const field core::Set<core::bool> setWithUnevaluatedSpread = #C12;
-static const field core::List<core::int> a = #C13;
-static const field core::List<core::int?> b = #C14;
-static const field core::Set<core::List<core::int?>> setNotAgnosticOK = #C15;
-static const field invalid-type MapWithUnevaluated = #C16;
-static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = #C19;
+static const field core::List<core::bool> listWithUnevaluated = #C9;
+static const field core::List<core::bool> listWithUnevaluatedSpread = #C12;
+static const field core::Set<core::bool> setWithUnevaluated = #C18;
+static const field core::Set<core::bool> setWithUnevaluatedSpread = #C20;
+static const field core::List<core::int> a = #C21;
+static const field core::List<core::int?> b = #C22;
+static const field core::Set<core::List<core::int?>> setNotAgnosticOK = #C23;
+static const field invalid-type MapWithUnevaluated = #C27;
+static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = #C30;
 static method main() → dynamic {
-  core::print(#C5);
-  core::print(#C8);
-  core::print(#C10);
+  core::print(#C9);
   core::print(#C12);
+  core::print(#C18);
+  core::print(#C20);
   core::print(<core::String>{"hello"});
-  core::print(#C21);
+  core::print(#C32);
 }
 
 constants  {
   #C1 = "foo"
-  #C2 = "bar"
-  #C3 = true
-  #C4 = <core::bool*>[#C3]
-  #C5 = eval const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4
-  #C6 = false
-  #C7 = <core::bool*>[#C6]
-  #C8 = eval #C4 + const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4 + #C7
-  #C9 = <core::bool*>{#C3}
-  #C10 = eval const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9
-  #C11 = <core::bool*>{#C6}
-  #C12 = eval #C9 + const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9 + #C11
-  #C13 = <core::int*>[]
-  #C14 = <core::int?>[]
-  #C15 = <core::List<core::int?>*>{#C13, #C14}
-  #C16 = eval const <dynamic, dynamic>{const core::bool::fromEnvironment(#C1): const core::bool::fromEnvironment(#C2)}
-  #C17 = 0
-  #C18 = 1
-  #C19 = <core::List<core::int?>*, core::int*>{#C13:#C17, #C14:#C18)
-  #C20 = "hello"
-  #C21 = <core::String*>{#C20}
+  #C2 = eval const core::bool::fromEnvironment(#C1)
+  #C3 = eval const <dynamic>[#C2]
+  #C4 = "bar"
+  #C5 = eval const core::bool::fromEnvironment(#C4)
+  #C6 = eval const <dynamic>[#C5]
+  #C7 = true
+  #C8 = <core::bool*>[#C7]
+  #C9 = eval #C3 + #C6 + #C8
+  #C10 = false
+  #C11 = <core::bool*>[#C10]
+  #C12 = eval #C8 + #C9 + #C11
+  #C13 = eval const core::bool::fromEnvironment(#C1)
+  #C14 = eval const <dynamic>{#C13}
+  #C15 = eval const core::bool::fromEnvironment(#C4)
+  #C16 = eval const <dynamic>{#C15}
+  #C17 = <core::bool*>{#C7}
+  #C18 = eval #C14 + #C16 + #C17
+  #C19 = <core::bool*>{#C10}
+  #C20 = eval #C17 + #C18 + #C19
+  #C21 = <core::int*>[]
+  #C22 = <core::int?>[]
+  #C23 = <core::List<core::int?>*>{#C21, #C22}
+  #C24 = eval const core::bool::fromEnvironment(#C1)
+  #C25 = eval const core::bool::fromEnvironment(#C4)
+  #C26 = eval const <dynamic, dynamic>{#C24: #C25}
+  #C27 = eval #C26
+  #C28 = 0
+  #C29 = 1
+  #C30 = <core::List<core::int?>*, core::int*>{#C21:#C28, #C22:#C29)
+  #C31 = "hello"
+  #C32 = <core::String*>{#C31}
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.transformed.expect
index 68271db..a7630c4 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.weak.transformed.expect
@@ -9,55 +9,62 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::bool> listWithUnevaluated = #C5;
-static const field core::List<core::bool> listWithUnevaluatedSpread = #C8;
-static const field core::Set<core::bool> setWithUnevaluated = #C10;
-static const field core::Set<core::bool> setWithUnevaluatedSpread = #C12;
-static const field core::List<core::int> a = #C13;
-static const field core::List<core::int?> b = #C14;
-static const field core::Set<core::List<core::int?>> setNotAgnosticOK = #C15;
-static const field invalid-type MapWithUnevaluated = #C16;
-static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = #C19;
+static const field core::List<core::bool> listWithUnevaluated = #C9;
+static const field core::List<core::bool> listWithUnevaluatedSpread = #C12;
+static const field core::Set<core::bool> setWithUnevaluated = #C18;
+static const field core::Set<core::bool> setWithUnevaluatedSpread = #C20;
+static const field core::List<core::int> a = #C21;
+static const field core::List<core::int?> b = #C22;
+static const field core::Set<core::List<core::int?>> setNotAgnosticOK = #C23;
+static const field invalid-type MapWithUnevaluated = #C27;
+static const field core::Map<core::List<core::int?>, core::int> mapNotAgnosticOK = #C30;
 static method main() → dynamic {
+  core::print(#C9);
+  core::print(#C12);
+  core::print(#C18);
   core::print(#C20);
-  core::print(#C21);
-  core::print(#C22);
-  core::print(#C23);
   core::print(<core::String>{"hello"});
-  core::print(#C25);
+  core::print(#C32);
 }
 
 constants  {
   #C1 = "foo"
-  #C2 = "bar"
-  #C3 = true
-  #C4 = <core::bool*>[#C3]
-  #C5 = eval const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4
-  #C6 = false
-  #C7 = <core::bool*>[#C6]
-  #C8 = eval #C4 + const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4 + #C7
-  #C9 = <core::bool*>{#C3}
-  #C10 = eval const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9
-  #C11 = <core::bool*>{#C6}
-  #C12 = eval #C9 + const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9 + #C11
-  #C13 = <core::int*>[]
-  #C14 = <core::int?>[]
-  #C15 = <core::List<core::int?>*>{#C13, #C14}
-  #C16 = eval const <dynamic, dynamic>{const core::bool::fromEnvironment(#C1): const core::bool::fromEnvironment(#C2)}
-  #C17 = 0
-  #C18 = 1
-  #C19 = <core::List<core::int?>*, core::int*>{#C13:#C17, #C14:#C18)
-  #C20 = eval const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4
-  #C21 = eval #C4 + const <dynamic>[const core::bool::fromEnvironment(#C1)] + const <dynamic>[const core::bool::fromEnvironment(#C2)] + #C4 + #C7
-  #C22 = eval const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9
-  #C23 = eval #C9 + const <dynamic>{const core::bool::fromEnvironment(#C1)} + const <dynamic>{const core::bool::fromEnvironment(#C2)} + #C9 + #C11
-  #C24 = "hello"
-  #C25 = <core::String*>{#C24}
+  #C2 = eval const core::bool::fromEnvironment(#C1)
+  #C3 = eval const <dynamic>[#C2]
+  #C4 = "bar"
+  #C5 = eval const core::bool::fromEnvironment(#C4)
+  #C6 = eval const <dynamic>[#C5]
+  #C7 = true
+  #C8 = <core::bool*>[#C7]
+  #C9 = eval #C3 + #C6 + #C8
+  #C10 = false
+  #C11 = <core::bool*>[#C10]
+  #C12 = eval #C8 + #C9 + #C11
+  #C13 = eval const core::bool::fromEnvironment(#C1)
+  #C14 = eval const <dynamic>{#C13}
+  #C15 = eval const core::bool::fromEnvironment(#C4)
+  #C16 = eval const <dynamic>{#C15}
+  #C17 = <core::bool*>{#C7}
+  #C18 = eval #C14 + #C16 + #C17
+  #C19 = <core::bool*>{#C10}
+  #C20 = eval #C17 + #C18 + #C19
+  #C21 = <core::int*>[]
+  #C22 = <core::int?>[]
+  #C23 = <core::List<core::int?>*>{#C21, #C22}
+  #C24 = eval const core::bool::fromEnvironment(#C1)
+  #C25 = eval const core::bool::fromEnvironment(#C4)
+  #C26 = eval const <dynamic, dynamic>{#C24: #C25}
+  #C27 = eval #C26
+  #C28 = 0
+  #C29 = 1
+  #C30 = <core::List<core::int?>*, core::int*>{#C21:#C28, #C22:#C29)
+  #C31 = "hello"
+  #C32 = <core::String*>{#C31}
 }
 
 Extra constant evaluation status:
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:5:40 -> ListConstant(const <bool*>[false, false, true])
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const <bool*>[true, false, false, true, false])
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:34:9 -> ListConstant(const <bool*>[false, false, true])
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:35:9 -> ListConstant(const <bool*>[true, false, false, true, false])
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:5:40 -> ListConstant(const <bool*>[false, false, true])
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:10:46 -> ListConstant(const <bool*>[true, false, false, true, false])
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///const_collections.dart:27:38 -> MapConstant(const <bool*, bool*>{false: false})
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.expect
index 19a8cfb..6f8ad9e 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.expect
@@ -2,37 +2,53 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::String> listWithUnevaluatedUnevaluatedFirst = #C6;
-static const field core::List<core::String> listWithUnevaluatedUnevaluatedMiddle = #C14;
-static const field core::Set<core::String> setWithUnevaluatedUnevaluatedFirst = #C16;
-static const field core::Set<core::String> setWithUnevaluatedUnevaluatedMiddle = #C19;
-static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedFirst = #C22;
-static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedMiddle = #C25;
+static const field core::List<core::String> listWithUnevaluatedUnevaluatedFirst = #C10;
+static const field core::List<core::String> listWithUnevaluatedUnevaluatedMiddle = #C22;
+static const field core::Set<core::String> setWithUnevaluatedUnevaluatedFirst = #C26;
+static const field core::Set<core::String> setWithUnevaluatedUnevaluatedMiddle = #C31;
+static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedFirst = #C36;
+static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedMiddle = #C41;
 
 constants  {
   #C1 = "foo"
-  #C2 = "bar"
-  #C3 = "hello"
-  #C4 = "world"
-  #C5 = <core::String*>[#C3, #C4]
-  #C6 = eval const <dynamic>[const core::String::fromEnvironment(#C1)] + const <dynamic>[const core::String::fromEnvironment(#C2)] + #C5
-  #C7 = "A"
-  #C8 = "few"
-  #C9 = "strings"
-  #C10 = <core::String*>[#C7, #C8, #C9]
-  #C11 = "and"
-  #C12 = "more"
-  #C13 = <core::String*>[#C3, #C4, #C11, #C12]
-  #C14 = eval #C10 + const <dynamic>[const core::String::fromEnvironment(#C1)] + const <dynamic>[const core::String::fromEnvironment(#C2)] + #C13
-  #C15 = <core::String*>{#C3, #C4}
-  #C16 = eval const <dynamic>{const core::String::fromEnvironment(#C1)} + #C15
-  #C17 = <core::String*>{#C7, #C8, #C9}
-  #C18 = <core::String*>{#C3, #C4, #C11, #C12}
-  #C19 = eval #C17 + const <dynamic>{const core::String::fromEnvironment(#C1)} + #C18
-  #C20 = 42
-  #C21 = <core::String*, core::int*>{#C3:#C20, #C4:#C20)
-  #C22 = eval const <dynamic, dynamic>{const core::String::fromEnvironment(#C1): #C20} + #C21
-  #C23 = <core::String*, core::int*>{#C7:#C20, #C8:#C20, #C9:#C20)
-  #C24 = <core::String*, core::int*>{#C3:#C20, #C4:#C20, #C11:#C20, #C12:#C20)
-  #C25 = eval #C23 + const <dynamic, dynamic>{const core::String::fromEnvironment(#C1): #C20} + #C24
+  #C2 = eval const core::String::fromEnvironment(#C1)
+  #C3 = eval const <dynamic>[#C2]
+  #C4 = "bar"
+  #C5 = eval const core::String::fromEnvironment(#C4)
+  #C6 = eval const <dynamic>[#C5]
+  #C7 = "hello"
+  #C8 = "world"
+  #C9 = <core::String*>[#C7, #C8]
+  #C10 = eval #C3 + #C6 + #C9
+  #C11 = "A"
+  #C12 = "few"
+  #C13 = "strings"
+  #C14 = <core::String*>[#C11, #C12, #C13]
+  #C15 = eval const core::String::fromEnvironment(#C1)
+  #C16 = eval const <dynamic>[#C15]
+  #C17 = eval const core::String::fromEnvironment(#C4)
+  #C18 = eval const <dynamic>[#C17]
+  #C19 = "and"
+  #C20 = "more"
+  #C21 = <core::String*>[#C7, #C8, #C19, #C20]
+  #C22 = eval #C14 + #C16 + #C18 + #C21
+  #C23 = eval const core::String::fromEnvironment(#C1)
+  #C24 = eval const <dynamic>{#C23}
+  #C25 = <core::String*>{#C7, #C8}
+  #C26 = eval #C24 + #C25
+  #C27 = <core::String*>{#C11, #C12, #C13}
+  #C28 = eval const core::String::fromEnvironment(#C1)
+  #C29 = eval const <dynamic>{#C28}
+  #C30 = <core::String*>{#C7, #C8, #C19, #C20}
+  #C31 = eval #C27 + #C29 + #C30
+  #C32 = eval const core::String::fromEnvironment(#C1)
+  #C33 = 42
+  #C34 = eval const <dynamic, dynamic>{#C32: #C33}
+  #C35 = <core::String*, core::int*>{#C7:#C33, #C8:#C33)
+  #C36 = eval #C34 + #C35
+  #C37 = <core::String*, core::int*>{#C11:#C33, #C12:#C33, #C13:#C33)
+  #C38 = eval const core::String::fromEnvironment(#C1)
+  #C39 = eval const <dynamic, dynamic>{#C38: #C33}
+  #C40 = <core::String*, core::int*>{#C7:#C33, #C8:#C33, #C19:#C33, #C20:#C33)
+  #C41 = eval #C37 + #C39 + #C40
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.modular.expect
index 19a8cfb..6f8ad9e 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.modular.expect
@@ -2,37 +2,53 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::String> listWithUnevaluatedUnevaluatedFirst = #C6;
-static const field core::List<core::String> listWithUnevaluatedUnevaluatedMiddle = #C14;
-static const field core::Set<core::String> setWithUnevaluatedUnevaluatedFirst = #C16;
-static const field core::Set<core::String> setWithUnevaluatedUnevaluatedMiddle = #C19;
-static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedFirst = #C22;
-static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedMiddle = #C25;
+static const field core::List<core::String> listWithUnevaluatedUnevaluatedFirst = #C10;
+static const field core::List<core::String> listWithUnevaluatedUnevaluatedMiddle = #C22;
+static const field core::Set<core::String> setWithUnevaluatedUnevaluatedFirst = #C26;
+static const field core::Set<core::String> setWithUnevaluatedUnevaluatedMiddle = #C31;
+static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedFirst = #C36;
+static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedMiddle = #C41;
 
 constants  {
   #C1 = "foo"
-  #C2 = "bar"
-  #C3 = "hello"
-  #C4 = "world"
-  #C5 = <core::String*>[#C3, #C4]
-  #C6 = eval const <dynamic>[const core::String::fromEnvironment(#C1)] + const <dynamic>[const core::String::fromEnvironment(#C2)] + #C5
-  #C7 = "A"
-  #C8 = "few"
-  #C9 = "strings"
-  #C10 = <core::String*>[#C7, #C8, #C9]
-  #C11 = "and"
-  #C12 = "more"
-  #C13 = <core::String*>[#C3, #C4, #C11, #C12]
-  #C14 = eval #C10 + const <dynamic>[const core::String::fromEnvironment(#C1)] + const <dynamic>[const core::String::fromEnvironment(#C2)] + #C13
-  #C15 = <core::String*>{#C3, #C4}
-  #C16 = eval const <dynamic>{const core::String::fromEnvironment(#C1)} + #C15
-  #C17 = <core::String*>{#C7, #C8, #C9}
-  #C18 = <core::String*>{#C3, #C4, #C11, #C12}
-  #C19 = eval #C17 + const <dynamic>{const core::String::fromEnvironment(#C1)} + #C18
-  #C20 = 42
-  #C21 = <core::String*, core::int*>{#C3:#C20, #C4:#C20)
-  #C22 = eval const <dynamic, dynamic>{const core::String::fromEnvironment(#C1): #C20} + #C21
-  #C23 = <core::String*, core::int*>{#C7:#C20, #C8:#C20, #C9:#C20)
-  #C24 = <core::String*, core::int*>{#C3:#C20, #C4:#C20, #C11:#C20, #C12:#C20)
-  #C25 = eval #C23 + const <dynamic, dynamic>{const core::String::fromEnvironment(#C1): #C20} + #C24
+  #C2 = eval const core::String::fromEnvironment(#C1)
+  #C3 = eval const <dynamic>[#C2]
+  #C4 = "bar"
+  #C5 = eval const core::String::fromEnvironment(#C4)
+  #C6 = eval const <dynamic>[#C5]
+  #C7 = "hello"
+  #C8 = "world"
+  #C9 = <core::String*>[#C7, #C8]
+  #C10 = eval #C3 + #C6 + #C9
+  #C11 = "A"
+  #C12 = "few"
+  #C13 = "strings"
+  #C14 = <core::String*>[#C11, #C12, #C13]
+  #C15 = eval const core::String::fromEnvironment(#C1)
+  #C16 = eval const <dynamic>[#C15]
+  #C17 = eval const core::String::fromEnvironment(#C4)
+  #C18 = eval const <dynamic>[#C17]
+  #C19 = "and"
+  #C20 = "more"
+  #C21 = <core::String*>[#C7, #C8, #C19, #C20]
+  #C22 = eval #C14 + #C16 + #C18 + #C21
+  #C23 = eval const core::String::fromEnvironment(#C1)
+  #C24 = eval const <dynamic>{#C23}
+  #C25 = <core::String*>{#C7, #C8}
+  #C26 = eval #C24 + #C25
+  #C27 = <core::String*>{#C11, #C12, #C13}
+  #C28 = eval const core::String::fromEnvironment(#C1)
+  #C29 = eval const <dynamic>{#C28}
+  #C30 = <core::String*>{#C7, #C8, #C19, #C20}
+  #C31 = eval #C27 + #C29 + #C30
+  #C32 = eval const core::String::fromEnvironment(#C1)
+  #C33 = 42
+  #C34 = eval const <dynamic, dynamic>{#C32: #C33}
+  #C35 = <core::String*, core::int*>{#C7:#C33, #C8:#C33)
+  #C36 = eval #C34 + #C35
+  #C37 = <core::String*, core::int*>{#C11:#C33, #C12:#C33, #C13:#C33)
+  #C38 = eval const core::String::fromEnvironment(#C1)
+  #C39 = eval const <dynamic, dynamic>{#C38: #C33}
+  #C40 = <core::String*, core::int*>{#C7:#C33, #C8:#C33, #C19:#C33, #C20:#C33)
+  #C41 = eval #C37 + #C39 + #C40
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.transformed.expect
index 53c1c60..8fdfafe 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections_2.dart.weak.transformed.expect
@@ -2,39 +2,55 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::String> listWithUnevaluatedUnevaluatedFirst = #C6;
-static const field core::List<core::String> listWithUnevaluatedUnevaluatedMiddle = #C14;
-static const field core::Set<core::String> setWithUnevaluatedUnevaluatedFirst = #C16;
-static const field core::Set<core::String> setWithUnevaluatedUnevaluatedMiddle = #C19;
-static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedFirst = #C22;
-static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedMiddle = #C25;
+static const field core::List<core::String> listWithUnevaluatedUnevaluatedFirst = #C10;
+static const field core::List<core::String> listWithUnevaluatedUnevaluatedMiddle = #C22;
+static const field core::Set<core::String> setWithUnevaluatedUnevaluatedFirst = #C26;
+static const field core::Set<core::String> setWithUnevaluatedUnevaluatedMiddle = #C31;
+static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedFirst = #C36;
+static const field core::Map<core::String, core::int> mapWithUnevaluatedUnevaluatedMiddle = #C41;
 
 constants  {
   #C1 = "foo"
-  #C2 = "bar"
-  #C3 = "hello"
-  #C4 = "world"
-  #C5 = <core::String*>[#C3, #C4]
-  #C6 = eval const <dynamic>[const core::String::fromEnvironment(#C1)] + const <dynamic>[const core::String::fromEnvironment(#C2)] + #C5
-  #C7 = "A"
-  #C8 = "few"
-  #C9 = "strings"
-  #C10 = <core::String*>[#C7, #C8, #C9]
-  #C11 = "and"
-  #C12 = "more"
-  #C13 = <core::String*>[#C3, #C4, #C11, #C12]
-  #C14 = eval #C10 + const <dynamic>[const core::String::fromEnvironment(#C1)] + const <dynamic>[const core::String::fromEnvironment(#C2)] + #C13
-  #C15 = <core::String*>{#C3, #C4}
-  #C16 = eval const <dynamic>{const core::String::fromEnvironment(#C1)} + #C15
-  #C17 = <core::String*>{#C7, #C8, #C9}
-  #C18 = <core::String*>{#C3, #C4, #C11, #C12}
-  #C19 = eval #C17 + const <dynamic>{const core::String::fromEnvironment(#C1)} + #C18
-  #C20 = 42
-  #C21 = <core::String*, core::int*>{#C3:#C20, #C4:#C20)
-  #C22 = eval const <dynamic, dynamic>{const core::String::fromEnvironment(#C1): #C20} + #C21
-  #C23 = <core::String*, core::int*>{#C7:#C20, #C8:#C20, #C9:#C20)
-  #C24 = <core::String*, core::int*>{#C3:#C20, #C4:#C20, #C11:#C20, #C12:#C20)
-  #C25 = eval #C23 + const <dynamic, dynamic>{const core::String::fromEnvironment(#C1): #C20} + #C24
+  #C2 = eval const core::String::fromEnvironment(#C1)
+  #C3 = eval const <dynamic>[#C2]
+  #C4 = "bar"
+  #C5 = eval const core::String::fromEnvironment(#C4)
+  #C6 = eval const <dynamic>[#C5]
+  #C7 = "hello"
+  #C8 = "world"
+  #C9 = <core::String*>[#C7, #C8]
+  #C10 = eval #C3 + #C6 + #C9
+  #C11 = "A"
+  #C12 = "few"
+  #C13 = "strings"
+  #C14 = <core::String*>[#C11, #C12, #C13]
+  #C15 = eval const core::String::fromEnvironment(#C1)
+  #C16 = eval const <dynamic>[#C15]
+  #C17 = eval const core::String::fromEnvironment(#C4)
+  #C18 = eval const <dynamic>[#C17]
+  #C19 = "and"
+  #C20 = "more"
+  #C21 = <core::String*>[#C7, #C8, #C19, #C20]
+  #C22 = eval #C14 + #C16 + #C18 + #C21
+  #C23 = eval const core::String::fromEnvironment(#C1)
+  #C24 = eval const <dynamic>{#C23}
+  #C25 = <core::String*>{#C7, #C8}
+  #C26 = eval #C24 + #C25
+  #C27 = <core::String*>{#C11, #C12, #C13}
+  #C28 = eval const core::String::fromEnvironment(#C1)
+  #C29 = eval const <dynamic>{#C28}
+  #C30 = <core::String*>{#C7, #C8, #C19, #C20}
+  #C31 = eval #C27 + #C29 + #C30
+  #C32 = eval const core::String::fromEnvironment(#C1)
+  #C33 = 42
+  #C34 = eval const <dynamic, dynamic>{#C32: #C33}
+  #C35 = <core::String*, core::int*>{#C7:#C33, #C8:#C33)
+  #C36 = eval #C34 + #C35
+  #C37 = <core::String*, core::int*>{#C11:#C33, #C12:#C33, #C13:#C33)
+  #C38 = eval const core::String::fromEnvironment(#C1)
+  #C39 = eval const <dynamic, dynamic>{#C38: #C33}
+  #C40 = <core::String*, core::int*>{#C7:#C33, #C8:#C33, #C19:#C33, #C20:#C33)
+  #C41 = eval #C37 + #C39 + #C40
 }
 
 Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.expect
index 7218dfd..2bbe5db 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.expect
@@ -11,15 +11,20 @@
 static method bar<T extends core::Object? = dynamic>(core::String o) → self::bar::T%
   return o as{ForNonNullableByDefault} self::bar::T%;
 static method main() → void {
-  const self::Foo<core::int> myValue = #C5;
+  const self::Foo<core::int> myValue = #C10;
 }
 
 constants  {
   #C1 = static-tearoff self::bar
   #C2 = "baz"
-  #C3 = static-tearoff core::int::parse
-  #C4 = null
-  #C5 = eval self::Foo<core::int*>{_foo:(const core::bool::fromEnvironment(#C2) ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C3 : #C4) == null ?{(core::String) → core::int*} #C1<core::int*> : const core::bool::fromEnvironment(#C2) ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C3 : #C4}
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = static-tearoff core::int::parse
+  #C5 = null
+  #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C7 = eval #C6 == null
+  #C8 = eval #C1<core::int*>
+  #C9 = eval #C7 ?{(core::String) → core::int*} #C8 : #C6
+  #C10 = eval self::Foo<core::int*>{_foo:#C9}
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.modular.expect
index 7218dfd..2bbe5db 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.modular.expect
@@ -11,15 +11,20 @@
 static method bar<T extends core::Object? = dynamic>(core::String o) → self::bar::T%
   return o as{ForNonNullableByDefault} self::bar::T%;
 static method main() → void {
-  const self::Foo<core::int> myValue = #C5;
+  const self::Foo<core::int> myValue = #C10;
 }
 
 constants  {
   #C1 = static-tearoff self::bar
   #C2 = "baz"
-  #C3 = static-tearoff core::int::parse
-  #C4 = null
-  #C5 = eval self::Foo<core::int*>{_foo:(const core::bool::fromEnvironment(#C2) ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C3 : #C4) == null ?{(core::String) → core::int*} #C1<core::int*> : const core::bool::fromEnvironment(#C2) ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C3 : #C4}
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = static-tearoff core::int::parse
+  #C5 = null
+  #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C7 = eval #C6 == null
+  #C8 = eval #C1<core::int*>
+  #C9 = eval #C7 ?{(core::String) → core::int*} #C8 : #C6
+  #C10 = eval self::Foo<core::int*>{_foo:#C9}
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.transformed.expect
index 5a4f3bf..49f00a5 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245.dart.weak.transformed.expect
@@ -11,15 +11,20 @@
 static method bar<T extends core::Object? = dynamic>(core::String o) → self::bar::T%
   return o as{ForNonNullableByDefault} self::bar::T%;
 static method main() → void {
-  const self::Foo<core::int> myValue = #C5;
+  const self::Foo<core::int> myValue = #C10;
 }
 
 constants  {
   #C1 = static-tearoff self::bar
   #C2 = "baz"
-  #C3 = static-tearoff core::int::parse
-  #C4 = null
-  #C5 = eval self::Foo<core::int*>{_foo:(const core::bool::fromEnvironment(#C2) ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C3 : #C4) == null ?{(core::String) → core::int*} #C1<core::int*> : const core::bool::fromEnvironment(#C2) ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C3 : #C4}
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = static-tearoff core::int::parse
+  #C5 = null
+  #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C7 = eval #C6 == null
+  #C8 = eval #C1<core::int*>
+  #C9 = eval #C7 ?{(core::String) → core::int*} #C8 : #C6
+  #C10 = eval self::Foo<core::int*>{_foo:#C9}
 }
 
 Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart
new file mode 100644
index 0000000..b0fb40c33
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.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.
+
+class Foo<T> {
+  final List<int> foo;
+  const Foo(List x) : foo = x is List<T> ? const [1] : const [2];
+}
+
+main() {
+  const Foo<int> foo = const Foo<int>(bool.fromEnvironment("foo") ? [1] : [2]);
+  print(foo);
+  print(foo);
+}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline.expect
new file mode 100644
index 0000000..5b687d0
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+class Foo<T> {
+  final List<int> foo;
+  const Foo(List x) : foo = x is List<T> ? const [1] : const [2];
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..40cbc00
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+class Foo<T> {
+  const Foo(List x) : foo = x is List<T> ? const [1] : const [2];
+  final List<int> foo;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.expect
new file mode 100644
index 0000000..94f0c4f
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<core::int> foo;
+  const constructor •(core::List<dynamic> x) → self::Foo<self::Foo::T%>
+    : self::Foo::foo = x is{ForNonNullableByDefault} core::List<self::Foo::T%> ?{core::List<core::int>} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  const self::Foo<core::int> foo = #C14;
+  core::print(#C14);
+  core::print(#C14);
+}
+
+constants  {
+  #C1 = 1
+  #C2 = <core::int*>[#C1]
+  #C3 = 2
+  #C4 = <core::int*>[#C3]
+  #C5 = "foo"
+  #C6 = eval const core::bool::fromEnvironment(#C5)
+  #C7 = eval const <dynamic>[#C1]
+  #C8 = eval #C7
+  #C9 = eval const <dynamic>[#C3]
+  #C10 = eval #C9
+  #C11 = eval #C6 ?{core::List<dynamic>} #C8 : #C10
+  #C12 = eval #C11 is{ForNonNullableByDefault} core::List<core::int*>
+  #C13 = eval #C12 ?{core::List<core::int>} #C2 : #C4
+  #C14 = eval self::Foo<core::int*>{foo:#C13}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue_49245_variation_is.dart:
+- Foo. (from org-dartlang-testcase:///issue_49245_variation_is.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.modular.expect
new file mode 100644
index 0000000..94f0c4f
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.modular.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<core::int> foo;
+  const constructor •(core::List<dynamic> x) → self::Foo<self::Foo::T%>
+    : self::Foo::foo = x is{ForNonNullableByDefault} core::List<self::Foo::T%> ?{core::List<core::int>} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  const self::Foo<core::int> foo = #C14;
+  core::print(#C14);
+  core::print(#C14);
+}
+
+constants  {
+  #C1 = 1
+  #C2 = <core::int*>[#C1]
+  #C3 = 2
+  #C4 = <core::int*>[#C3]
+  #C5 = "foo"
+  #C6 = eval const core::bool::fromEnvironment(#C5)
+  #C7 = eval const <dynamic>[#C1]
+  #C8 = eval #C7
+  #C9 = eval const <dynamic>[#C3]
+  #C10 = eval #C9
+  #C11 = eval #C6 ?{core::List<dynamic>} #C8 : #C10
+  #C12 = eval #C11 is{ForNonNullableByDefault} core::List<core::int*>
+  #C13 = eval #C12 ?{core::List<core::int>} #C2 : #C4
+  #C14 = eval self::Foo<core::int*>{foo:#C13}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue_49245_variation_is.dart:
+- Foo. (from org-dartlang-testcase:///issue_49245_variation_is.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.outline.expect
new file mode 100644
index 0000000..dc10831
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<core::int> foo;
+  const constructor •(core::List<dynamic> x) → self::Foo<self::Foo::T%>
+    : self::Foo::foo = x is{ForNonNullableByDefault} core::List<self::Foo::T%> ?{core::List<core::int>} const <core::int>[1] : const <core::int>[2], super core::Object::•()
+    ;
+}
+static method main() → dynamic
+  ;
+
+
+Extra constant evaluation status:
+Evaluated: ListLiteral @ org-dartlang-testcase:///issue_49245_variation_is.dart:7:44 -> ListConstant(const <int*>[1])
+Evaluated: ListLiteral @ org-dartlang-testcase:///issue_49245_variation_is.dart:7:56 -> ListConstant(const <int*>[2])
+Extra constant evaluation: evaluated: 5, effectively constant: 2
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.transformed.expect
new file mode 100644
index 0000000..35c8cc9
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_is.dart.weak.transformed.expect
@@ -0,0 +1,44 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo<T extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
+  final field core::List<core::int> foo;
+  const constructor •(core::List<dynamic> x) → self::Foo<self::Foo::T%>
+    : self::Foo::foo = x is{ForNonNullableByDefault} core::List<self::Foo::T%> ?{core::List<core::int>} #C2 : #C4, super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  const self::Foo<core::int> foo = #C14;
+  core::print(#C14);
+  core::print(#C14);
+}
+
+constants  {
+  #C1 = 1
+  #C2 = <core::int*>[#C1]
+  #C3 = 2
+  #C4 = <core::int*>[#C3]
+  #C5 = "foo"
+  #C6 = eval const core::bool::fromEnvironment(#C5)
+  #C7 = eval const <dynamic>[#C1]
+  #C8 = eval #C7
+  #C9 = eval const <dynamic>[#C3]
+  #C10 = eval #C9
+  #C11 = eval #C6 ?{core::List<dynamic>} #C8 : #C10
+  #C12 = eval #C11 is{ForNonNullableByDefault} core::List<core::int*>
+  #C13 = eval #C12 ?{core::List<core::int>} #C2 : #C4
+  #C14 = eval self::Foo<core::int*>{foo:#C13}
+}
+
+Extra constant evaluation status:
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_is.dart:11:30 -> InstanceConstant(const Foo<int*>{Foo.foo: const <int*>[2]})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_is.dart:12:9 -> InstanceConstant(const Foo<int*>{Foo.foo: const <int*>[2]})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_is.dart:13:9 -> InstanceConstant(const Foo<int*>{Foo.foo: const <int*>[2]})
+Extra constant evaluation: evaluated: 8, effectively constant: 3
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue_49245_variation_is.dart:
+- Foo. (from org-dartlang-testcase:///issue_49245_variation_is.dart:7:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart
new file mode 100644
index 0000000..1a9d689
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart
@@ -0,0 +1,93 @@
+// 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 {
+  const Foo(
+    int Function(String)? a1,
+    int Function(String)? a2,
+    int Function(String)? a3,
+    int Function(String)? a4,
+    int Function(String)? a5,
+    int Function(String)? a6,
+    int Function(String)? a7,
+    int Function(String)? a8,
+    int Function(String)? a9,
+    int Function(String)? a10,
+    int Function(String)? a11,
+    int Function(String)? a12,
+    int Function(String)? a13,
+    int Function(String)? a14,
+    int Function(String)? a15,
+    int Function(String)? a16,
+    int Function(String)? a17,
+    int Function(String)? a18,
+    int Function(String)? a19,
+    int Function(String)? a20,
+    int Function(String)? a21,
+    int Function(String)? a22,
+    int Function(String)? a23,
+    int Function(String)? a24,
+  ) : _foo = a1 ??
+            a2 ??
+            a3 ??
+            a4 ??
+            a5 ??
+            a6 ??
+            a7 ??
+            a8 ??
+            a9 ??
+            a10 ??
+            a11 ??
+            a12 ??
+            a13 ??
+            a14 ??
+            a15 ??
+            a16 ??
+            a17 ??
+            a18 ??
+            a19 ??
+            a20 ??
+            a21 ??
+            a22 ??
+            a23 ??
+            a24 ??
+            bar;
+  final int Function(String) _foo;
+}
+
+int bar(String o) => int.parse(o);
+
+void main() {
+  const Foo myValue = Foo(
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+    bool.fromEnvironment("baz") ? int.parse : null,
+  );
+
+  print(myValue);
+  print(myValue);
+  print(myValue);
+  print(myValue);
+}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline.expect
new file mode 100644
index 0000000..5f28e20
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline.expect
@@ -0,0 +1,56 @@
+class Foo {
+  const Foo(
+    int Function(String)? a1,
+    int Function(String)? a2,
+    int Function(String)? a3,
+    int Function(String)? a4,
+    int Function(String)? a5,
+    int Function(String)? a6,
+    int Function(String)? a7,
+    int Function(String)? a8,
+    int Function(String)? a9,
+    int Function(String)? a10,
+    int Function(String)? a11,
+    int Function(String)? a12,
+    int Function(String)? a13,
+    int Function(String)? a14,
+    int Function(String)? a15,
+    int Function(String)? a16,
+    int Function(String)? a17,
+    int Function(String)? a18,
+    int Function(String)? a19,
+    int Function(String)? a20,
+    int Function(String)? a21,
+    int Function(String)? a22,
+    int Function(String)? a23,
+    int Function(String)? a24,
+  ) : _foo = a1 ??
+            a2 ??
+            a3 ??
+            a4 ??
+            a5 ??
+            a6 ??
+            a7 ??
+            a8 ??
+            a9 ??
+            a10 ??
+            a11 ??
+            a12 ??
+            a13 ??
+            a14 ??
+            a15 ??
+            a16 ??
+            a17 ??
+            a18 ??
+            a19 ??
+            a20 ??
+            a21 ??
+            a22 ??
+            a23 ??
+            a24 ??
+            bar;
+  final int Function(String) _foo;
+}
+
+int bar(String o) => int.parse(o);
+void main() {}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..5f28e20
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.textual_outline_modelled.expect
@@ -0,0 +1,56 @@
+class Foo {
+  const Foo(
+    int Function(String)? a1,
+    int Function(String)? a2,
+    int Function(String)? a3,
+    int Function(String)? a4,
+    int Function(String)? a5,
+    int Function(String)? a6,
+    int Function(String)? a7,
+    int Function(String)? a8,
+    int Function(String)? a9,
+    int Function(String)? a10,
+    int Function(String)? a11,
+    int Function(String)? a12,
+    int Function(String)? a13,
+    int Function(String)? a14,
+    int Function(String)? a15,
+    int Function(String)? a16,
+    int Function(String)? a17,
+    int Function(String)? a18,
+    int Function(String)? a19,
+    int Function(String)? a20,
+    int Function(String)? a21,
+    int Function(String)? a22,
+    int Function(String)? a23,
+    int Function(String)? a24,
+  ) : _foo = a1 ??
+            a2 ??
+            a3 ??
+            a4 ??
+            a5 ??
+            a6 ??
+            a7 ??
+            a8 ??
+            a9 ??
+            a10 ??
+            a11 ??
+            a12 ??
+            a13 ??
+            a14 ??
+            a15 ??
+            a16 ??
+            a17 ??
+            a18 ??
+            a19 ??
+            a20 ??
+            a21 ??
+            a22 ??
+            a23 ??
+            a24 ??
+            bar;
+  final int Function(String) _foo;
+}
+
+int bar(String o) => int.parse(o);
+void main() {}
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.expect
new file mode 100644
index 0000000..33444f1
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object /*hasConstConstructor*/  {
+  final field (core::String) → core::int _foo;
+  const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo
+    : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} #C1 : #t1{(core::String) → core::int}, super core::Object::•()
+    ;
+}
+static method bar(core::String o) → core::int
+  return core::int::parse(o);
+static method main() → void {
+  const self::Foo myValue = #C101;
+  core::print(#C101);
+  core::print(#C101);
+  core::print(#C101);
+  core::print(#C101);
+}
+
+constants  {
+  #C1 = static-tearoff self::bar
+  #C2 = "baz"
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = static-tearoff core::int::parse
+  #C5 = null
+  #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C7 = eval #C6 == null
+  #C8 = eval const core::bool::fromEnvironment(#C2)
+  #C9 = eval #C8 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C10 = eval #C7 ?{(core::String) →? core::int} #C9 : #C6
+  #C11 = eval #C10 == null
+  #C12 = eval const core::bool::fromEnvironment(#C2)
+  #C13 = eval #C12 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C14 = eval #C11 ?{(core::String) →? core::int} #C13 : #C10
+  #C15 = eval #C14 == null
+  #C16 = eval const core::bool::fromEnvironment(#C2)
+  #C17 = eval #C16 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C18 = eval #C15 ?{(core::String) →? core::int} #C17 : #C14
+  #C19 = eval #C18 == null
+  #C20 = eval const core::bool::fromEnvironment(#C2)
+  #C21 = eval #C20 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C22 = eval #C19 ?{(core::String) →? core::int} #C21 : #C18
+  #C23 = eval #C22 == null
+  #C24 = eval const core::bool::fromEnvironment(#C2)
+  #C25 = eval #C24 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C26 = eval #C23 ?{(core::String) →? core::int} #C25 : #C22
+  #C27 = eval #C26 == null
+  #C28 = eval const core::bool::fromEnvironment(#C2)
+  #C29 = eval #C28 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C30 = eval #C27 ?{(core::String) →? core::int} #C29 : #C26
+  #C31 = eval #C30 == null
+  #C32 = eval const core::bool::fromEnvironment(#C2)
+  #C33 = eval #C32 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C34 = eval #C31 ?{(core::String) →? core::int} #C33 : #C30
+  #C35 = eval #C34 == null
+  #C36 = eval const core::bool::fromEnvironment(#C2)
+  #C37 = eval #C36 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C38 = eval #C35 ?{(core::String) →? core::int} #C37 : #C34
+  #C39 = eval #C38 == null
+  #C40 = eval const core::bool::fromEnvironment(#C2)
+  #C41 = eval #C40 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C42 = eval #C39 ?{(core::String) →? core::int} #C41 : #C38
+  #C43 = eval #C42 == null
+  #C44 = eval const core::bool::fromEnvironment(#C2)
+  #C45 = eval #C44 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C46 = eval #C43 ?{(core::String) →? core::int} #C45 : #C42
+  #C47 = eval #C46 == null
+  #C48 = eval const core::bool::fromEnvironment(#C2)
+  #C49 = eval #C48 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C50 = eval #C47 ?{(core::String) →? core::int} #C49 : #C46
+  #C51 = eval #C50 == null
+  #C52 = eval const core::bool::fromEnvironment(#C2)
+  #C53 = eval #C52 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C54 = eval #C51 ?{(core::String) →? core::int} #C53 : #C50
+  #C55 = eval #C54 == null
+  #C56 = eval const core::bool::fromEnvironment(#C2)
+  #C57 = eval #C56 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C58 = eval #C55 ?{(core::String) →? core::int} #C57 : #C54
+  #C59 = eval #C58 == null
+  #C60 = eval const core::bool::fromEnvironment(#C2)
+  #C61 = eval #C60 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C62 = eval #C59 ?{(core::String) →? core::int} #C61 : #C58
+  #C63 = eval #C62 == null
+  #C64 = eval const core::bool::fromEnvironment(#C2)
+  #C65 = eval #C64 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C66 = eval #C63 ?{(core::String) →? core::int} #C65 : #C62
+  #C67 = eval #C66 == null
+  #C68 = eval const core::bool::fromEnvironment(#C2)
+  #C69 = eval #C68 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C70 = eval #C67 ?{(core::String) →? core::int} #C69 : #C66
+  #C71 = eval #C70 == null
+  #C72 = eval const core::bool::fromEnvironment(#C2)
+  #C73 = eval #C72 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C74 = eval #C71 ?{(core::String) →? core::int} #C73 : #C70
+  #C75 = eval #C74 == null
+  #C76 = eval const core::bool::fromEnvironment(#C2)
+  #C77 = eval #C76 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C78 = eval #C75 ?{(core::String) →? core::int} #C77 : #C74
+  #C79 = eval #C78 == null
+  #C80 = eval const core::bool::fromEnvironment(#C2)
+  #C81 = eval #C80 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C82 = eval #C79 ?{(core::String) →? core::int} #C81 : #C78
+  #C83 = eval #C82 == null
+  #C84 = eval const core::bool::fromEnvironment(#C2)
+  #C85 = eval #C84 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C86 = eval #C83 ?{(core::String) →? core::int} #C85 : #C82
+  #C87 = eval #C86 == null
+  #C88 = eval const core::bool::fromEnvironment(#C2)
+  #C89 = eval #C88 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C90 = eval #C87 ?{(core::String) →? core::int} #C89 : #C86
+  #C91 = eval #C90 == null
+  #C92 = eval const core::bool::fromEnvironment(#C2)
+  #C93 = eval #C92 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C94 = eval #C91 ?{(core::String) →? core::int} #C93 : #C90
+  #C95 = eval #C94 == null
+  #C96 = eval const core::bool::fromEnvironment(#C2)
+  #C97 = eval #C96 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C98 = eval #C95 ?{(core::String) →? core::int} #C97 : #C94
+  #C99 = eval #C98 == null
+  #C100 = eval #C99 ?{(core::String) → core::int} #C1 : #C98
+  #C101 = eval self::Foo{_foo:#C100}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:
+- Foo. (from org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:6:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.modular.expect
new file mode 100644
index 0000000..33444f1
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.modular.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object /*hasConstConstructor*/  {
+  final field (core::String) → core::int _foo;
+  const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo
+    : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} #C1 : #t1{(core::String) → core::int}, super core::Object::•()
+    ;
+}
+static method bar(core::String o) → core::int
+  return core::int::parse(o);
+static method main() → void {
+  const self::Foo myValue = #C101;
+  core::print(#C101);
+  core::print(#C101);
+  core::print(#C101);
+  core::print(#C101);
+}
+
+constants  {
+  #C1 = static-tearoff self::bar
+  #C2 = "baz"
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = static-tearoff core::int::parse
+  #C5 = null
+  #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C7 = eval #C6 == null
+  #C8 = eval const core::bool::fromEnvironment(#C2)
+  #C9 = eval #C8 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C10 = eval #C7 ?{(core::String) →? core::int} #C9 : #C6
+  #C11 = eval #C10 == null
+  #C12 = eval const core::bool::fromEnvironment(#C2)
+  #C13 = eval #C12 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C14 = eval #C11 ?{(core::String) →? core::int} #C13 : #C10
+  #C15 = eval #C14 == null
+  #C16 = eval const core::bool::fromEnvironment(#C2)
+  #C17 = eval #C16 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C18 = eval #C15 ?{(core::String) →? core::int} #C17 : #C14
+  #C19 = eval #C18 == null
+  #C20 = eval const core::bool::fromEnvironment(#C2)
+  #C21 = eval #C20 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C22 = eval #C19 ?{(core::String) →? core::int} #C21 : #C18
+  #C23 = eval #C22 == null
+  #C24 = eval const core::bool::fromEnvironment(#C2)
+  #C25 = eval #C24 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C26 = eval #C23 ?{(core::String) →? core::int} #C25 : #C22
+  #C27 = eval #C26 == null
+  #C28 = eval const core::bool::fromEnvironment(#C2)
+  #C29 = eval #C28 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C30 = eval #C27 ?{(core::String) →? core::int} #C29 : #C26
+  #C31 = eval #C30 == null
+  #C32 = eval const core::bool::fromEnvironment(#C2)
+  #C33 = eval #C32 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C34 = eval #C31 ?{(core::String) →? core::int} #C33 : #C30
+  #C35 = eval #C34 == null
+  #C36 = eval const core::bool::fromEnvironment(#C2)
+  #C37 = eval #C36 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C38 = eval #C35 ?{(core::String) →? core::int} #C37 : #C34
+  #C39 = eval #C38 == null
+  #C40 = eval const core::bool::fromEnvironment(#C2)
+  #C41 = eval #C40 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C42 = eval #C39 ?{(core::String) →? core::int} #C41 : #C38
+  #C43 = eval #C42 == null
+  #C44 = eval const core::bool::fromEnvironment(#C2)
+  #C45 = eval #C44 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C46 = eval #C43 ?{(core::String) →? core::int} #C45 : #C42
+  #C47 = eval #C46 == null
+  #C48 = eval const core::bool::fromEnvironment(#C2)
+  #C49 = eval #C48 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C50 = eval #C47 ?{(core::String) →? core::int} #C49 : #C46
+  #C51 = eval #C50 == null
+  #C52 = eval const core::bool::fromEnvironment(#C2)
+  #C53 = eval #C52 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C54 = eval #C51 ?{(core::String) →? core::int} #C53 : #C50
+  #C55 = eval #C54 == null
+  #C56 = eval const core::bool::fromEnvironment(#C2)
+  #C57 = eval #C56 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C58 = eval #C55 ?{(core::String) →? core::int} #C57 : #C54
+  #C59 = eval #C58 == null
+  #C60 = eval const core::bool::fromEnvironment(#C2)
+  #C61 = eval #C60 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C62 = eval #C59 ?{(core::String) →? core::int} #C61 : #C58
+  #C63 = eval #C62 == null
+  #C64 = eval const core::bool::fromEnvironment(#C2)
+  #C65 = eval #C64 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C66 = eval #C63 ?{(core::String) →? core::int} #C65 : #C62
+  #C67 = eval #C66 == null
+  #C68 = eval const core::bool::fromEnvironment(#C2)
+  #C69 = eval #C68 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C70 = eval #C67 ?{(core::String) →? core::int} #C69 : #C66
+  #C71 = eval #C70 == null
+  #C72 = eval const core::bool::fromEnvironment(#C2)
+  #C73 = eval #C72 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C74 = eval #C71 ?{(core::String) →? core::int} #C73 : #C70
+  #C75 = eval #C74 == null
+  #C76 = eval const core::bool::fromEnvironment(#C2)
+  #C77 = eval #C76 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C78 = eval #C75 ?{(core::String) →? core::int} #C77 : #C74
+  #C79 = eval #C78 == null
+  #C80 = eval const core::bool::fromEnvironment(#C2)
+  #C81 = eval #C80 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C82 = eval #C79 ?{(core::String) →? core::int} #C81 : #C78
+  #C83 = eval #C82 == null
+  #C84 = eval const core::bool::fromEnvironment(#C2)
+  #C85 = eval #C84 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C86 = eval #C83 ?{(core::String) →? core::int} #C85 : #C82
+  #C87 = eval #C86 == null
+  #C88 = eval const core::bool::fromEnvironment(#C2)
+  #C89 = eval #C88 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C90 = eval #C87 ?{(core::String) →? core::int} #C89 : #C86
+  #C91 = eval #C90 == null
+  #C92 = eval const core::bool::fromEnvironment(#C2)
+  #C93 = eval #C92 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C94 = eval #C91 ?{(core::String) →? core::int} #C93 : #C90
+  #C95 = eval #C94 == null
+  #C96 = eval const core::bool::fromEnvironment(#C2)
+  #C97 = eval #C96 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C98 = eval #C95 ?{(core::String) →? core::int} #C97 : #C94
+  #C99 = eval #C98 == null
+  #C100 = eval #C99 ?{(core::String) → core::int} #C1 : #C98
+  #C101 = eval self::Foo{_foo:#C100}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:
+- Foo. (from org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:6:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.outline.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.outline.expect
new file mode 100644
index 0000000..5fa732f
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.outline.expect
@@ -0,0 +1,19 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object /*hasConstConstructor*/  {
+  final field (core::String) → core::int _foo;
+  const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo
+    : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} self::bar : #t1{(core::String) → core::int}, super core::Object::•()
+    ;
+}
+static method bar(core::String o) → core::int
+  ;
+static method main() → void
+  ;
+
+
+Extra constant evaluation status:
+Evaluated: StaticTearOff @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:55:13 -> StaticTearOffConstant(bar)
+Extra constant evaluation: evaluated: 145, effectively constant: 1
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.transformed.expect
new file mode 100644
index 0000000..b9d60de
--- /dev/null
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/issue_49245_variation_potential_exponential_blowup.dart.weak.transformed.expect
@@ -0,0 +1,137 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object /*hasConstConstructor*/  {
+  final field (core::String) → core::int _foo;
+  const constructor •((core::String) →? core::int a1, (core::String) →? core::int a2, (core::String) →? core::int a3, (core::String) →? core::int a4, (core::String) →? core::int a5, (core::String) →? core::int a6, (core::String) →? core::int a7, (core::String) →? core::int a8, (core::String) →? core::int a9, (core::String) →? core::int a10, (core::String) →? core::int a11, (core::String) →? core::int a12, (core::String) →? core::int a13, (core::String) →? core::int a14, (core::String) →? core::int a15, (core::String) →? core::int a16, (core::String) →? core::int a17, (core::String) →? core::int a18, (core::String) →? core::int a19, (core::String) →? core::int a20, (core::String) →? core::int a21, (core::String) →? core::int a22, (core::String) →? core::int a23, (core::String) →? core::int a24) → self::Foo
+    : self::Foo::_foo = let final (core::String) →? core::int #t1 = let final (core::String) →? core::int #t2 = let final (core::String) →? core::int #t3 = let final (core::String) →? core::int #t4 = let final (core::String) →? core::int #t5 = let final (core::String) →? core::int #t6 = let final (core::String) →? core::int #t7 = let final (core::String) →? core::int #t8 = let final (core::String) →? core::int #t9 = let final (core::String) →? core::int #t10 = let final (core::String) →? core::int #t11 = let final (core::String) →? core::int #t12 = let final (core::String) →? core::int #t13 = let final (core::String) →? core::int #t14 = let final (core::String) →? core::int #t15 = let final (core::String) →? core::int #t16 = let final (core::String) →? core::int #t17 = let final (core::String) →? core::int #t18 = let final (core::String) →? core::int #t19 = let final (core::String) →? core::int #t20 = let final (core::String) →? core::int #t21 = let final (core::String) →? core::int #t22 = let final (core::String) →? core::int #t23 = let final (core::String) →? core::int #t24 = a1 in #t24 == null ?{(core::String) →? core::int} a2 : #t24{(core::String) → core::int} in #t23 == null ?{(core::String) →? core::int} a3 : #t23{(core::String) → core::int} in #t22 == null ?{(core::String) →? core::int} a4 : #t22{(core::String) → core::int} in #t21 == null ?{(core::String) →? core::int} a5 : #t21{(core::String) → core::int} in #t20 == null ?{(core::String) →? core::int} a6 : #t20{(core::String) → core::int} in #t19 == null ?{(core::String) →? core::int} a7 : #t19{(core::String) → core::int} in #t18 == null ?{(core::String) →? core::int} a8 : #t18{(core::String) → core::int} in #t17 == null ?{(core::String) →? core::int} a9 : #t17{(core::String) → core::int} in #t16 == null ?{(core::String) →? core::int} a10 : #t16{(core::String) → core::int} in #t15 == null ?{(core::String) →? core::int} a11 : #t15{(core::String) → core::int} in #t14 == null ?{(core::String) →? core::int} a12 : #t14{(core::String) → core::int} in #t13 == null ?{(core::String) →? core::int} a13 : #t13{(core::String) → core::int} in #t12 == null ?{(core::String) →? core::int} a14 : #t12{(core::String) → core::int} in #t11 == null ?{(core::String) →? core::int} a15 : #t11{(core::String) → core::int} in #t10 == null ?{(core::String) →? core::int} a16 : #t10{(core::String) → core::int} in #t9 == null ?{(core::String) →? core::int} a17 : #t9{(core::String) → core::int} in #t8 == null ?{(core::String) →? core::int} a18 : #t8{(core::String) → core::int} in #t7 == null ?{(core::String) →? core::int} a19 : #t7{(core::String) → core::int} in #t6 == null ?{(core::String) →? core::int} a20 : #t6{(core::String) → core::int} in #t5 == null ?{(core::String) →? core::int} a21 : #t5{(core::String) → core::int} in #t4 == null ?{(core::String) →? core::int} a22 : #t4{(core::String) → core::int} in #t3 == null ?{(core::String) →? core::int} a23 : #t3{(core::String) → core::int} in #t2 == null ?{(core::String) →? core::int} a24 : #t2{(core::String) → core::int} in #t1 == null ?{(core::String) → core::int} #C1 : #t1{(core::String) → core::int}, super core::Object::•()
+    ;
+}
+static method bar(core::String o) → core::int
+  return core::int::parse(o);
+static method main() → void {
+  const self::Foo myValue = #C101;
+  core::print(#C101);
+  core::print(#C101);
+  core::print(#C101);
+  core::print(#C101);
+}
+
+constants  {
+  #C1 = static-tearoff self::bar
+  #C2 = "baz"
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = static-tearoff core::int::parse
+  #C5 = null
+  #C6 = eval #C3 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C7 = eval #C6 == null
+  #C8 = eval const core::bool::fromEnvironment(#C2)
+  #C9 = eval #C8 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C10 = eval #C7 ?{(core::String) →? core::int} #C9 : #C6
+  #C11 = eval #C10 == null
+  #C12 = eval const core::bool::fromEnvironment(#C2)
+  #C13 = eval #C12 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C14 = eval #C11 ?{(core::String) →? core::int} #C13 : #C10
+  #C15 = eval #C14 == null
+  #C16 = eval const core::bool::fromEnvironment(#C2)
+  #C17 = eval #C16 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C18 = eval #C15 ?{(core::String) →? core::int} #C17 : #C14
+  #C19 = eval #C18 == null
+  #C20 = eval const core::bool::fromEnvironment(#C2)
+  #C21 = eval #C20 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C22 = eval #C19 ?{(core::String) →? core::int} #C21 : #C18
+  #C23 = eval #C22 == null
+  #C24 = eval const core::bool::fromEnvironment(#C2)
+  #C25 = eval #C24 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C26 = eval #C23 ?{(core::String) →? core::int} #C25 : #C22
+  #C27 = eval #C26 == null
+  #C28 = eval const core::bool::fromEnvironment(#C2)
+  #C29 = eval #C28 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C30 = eval #C27 ?{(core::String) →? core::int} #C29 : #C26
+  #C31 = eval #C30 == null
+  #C32 = eval const core::bool::fromEnvironment(#C2)
+  #C33 = eval #C32 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C34 = eval #C31 ?{(core::String) →? core::int} #C33 : #C30
+  #C35 = eval #C34 == null
+  #C36 = eval const core::bool::fromEnvironment(#C2)
+  #C37 = eval #C36 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C38 = eval #C35 ?{(core::String) →? core::int} #C37 : #C34
+  #C39 = eval #C38 == null
+  #C40 = eval const core::bool::fromEnvironment(#C2)
+  #C41 = eval #C40 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C42 = eval #C39 ?{(core::String) →? core::int} #C41 : #C38
+  #C43 = eval #C42 == null
+  #C44 = eval const core::bool::fromEnvironment(#C2)
+  #C45 = eval #C44 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C46 = eval #C43 ?{(core::String) →? core::int} #C45 : #C42
+  #C47 = eval #C46 == null
+  #C48 = eval const core::bool::fromEnvironment(#C2)
+  #C49 = eval #C48 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C50 = eval #C47 ?{(core::String) →? core::int} #C49 : #C46
+  #C51 = eval #C50 == null
+  #C52 = eval const core::bool::fromEnvironment(#C2)
+  #C53 = eval #C52 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C54 = eval #C51 ?{(core::String) →? core::int} #C53 : #C50
+  #C55 = eval #C54 == null
+  #C56 = eval const core::bool::fromEnvironment(#C2)
+  #C57 = eval #C56 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C58 = eval #C55 ?{(core::String) →? core::int} #C57 : #C54
+  #C59 = eval #C58 == null
+  #C60 = eval const core::bool::fromEnvironment(#C2)
+  #C61 = eval #C60 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C62 = eval #C59 ?{(core::String) →? core::int} #C61 : #C58
+  #C63 = eval #C62 == null
+  #C64 = eval const core::bool::fromEnvironment(#C2)
+  #C65 = eval #C64 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C66 = eval #C63 ?{(core::String) →? core::int} #C65 : #C62
+  #C67 = eval #C66 == null
+  #C68 = eval const core::bool::fromEnvironment(#C2)
+  #C69 = eval #C68 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C70 = eval #C67 ?{(core::String) →? core::int} #C69 : #C66
+  #C71 = eval #C70 == null
+  #C72 = eval const core::bool::fromEnvironment(#C2)
+  #C73 = eval #C72 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C74 = eval #C71 ?{(core::String) →? core::int} #C73 : #C70
+  #C75 = eval #C74 == null
+  #C76 = eval const core::bool::fromEnvironment(#C2)
+  #C77 = eval #C76 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C78 = eval #C75 ?{(core::String) →? core::int} #C77 : #C74
+  #C79 = eval #C78 == null
+  #C80 = eval const core::bool::fromEnvironment(#C2)
+  #C81 = eval #C80 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C82 = eval #C79 ?{(core::String) →? core::int} #C81 : #C78
+  #C83 = eval #C82 == null
+  #C84 = eval const core::bool::fromEnvironment(#C2)
+  #C85 = eval #C84 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C86 = eval #C83 ?{(core::String) →? core::int} #C85 : #C82
+  #C87 = eval #C86 == null
+  #C88 = eval const core::bool::fromEnvironment(#C2)
+  #C89 = eval #C88 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C90 = eval #C87 ?{(core::String) →? core::int} #C89 : #C86
+  #C91 = eval #C90 == null
+  #C92 = eval const core::bool::fromEnvironment(#C2)
+  #C93 = eval #C92 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C94 = eval #C91 ?{(core::String) →? core::int} #C93 : #C90
+  #C95 = eval #C94 == null
+  #C96 = eval const core::bool::fromEnvironment(#C2)
+  #C97 = eval #C96 ?{(core::String, {onError: (core::String) →? core::int, radix: core::int?}) →? core::int} #C4 : #C5
+  #C98 = eval #C95 ?{(core::String) →? core::int} #C97 : #C94
+  #C99 = eval #C98 == null
+  #C100 = eval #C99 ?{(core::String) → core::int} #C1 : #C98
+  #C101 = eval self::Foo{_foo:#C100}
+}
+
+Extra constant evaluation status:
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:62:23 -> InstanceConstant(const Foo{Foo._foo: bar})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:89:9 -> InstanceConstant(const Foo{Foo._foo: bar})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:90:9 -> InstanceConstant(const Foo{Foo._foo: bar})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:91:9 -> InstanceConstant(const Foo{Foo._foo: bar})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:92:9 -> InstanceConstant(const Foo{Foo._foo: bar})
+Extra constant evaluation: evaluated: 155, effectively constant: 5
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:
+- Foo. (from org-dartlang-testcase:///issue_49245_variation_potential_exponential_blowup.dart:6:9)
+- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.expect
index 8a84689..308adbd 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.expect
@@ -2,57 +2,57 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::String> original = #C11;
-static const field core::List<core::String> copy1 = #C11;
-static const field core::List<core::String> copy2 = #C11;
-static const field core::List<core::String> copy3 = #C11;
-static const field core::List<core::String> copy4 = #C11;
-static const field core::List<core::String> copy5 = #C11;
-static const field core::List<core::String> copy6 = #C11;
-static const field core::List<core::String> copy7 = #C11;
-static const field core::List<core::String> copy8 = #C11;
-static const field core::List<core::String> copy9 = #C11;
-static const field core::List<core::String> copy10 = #C11;
-static const field core::List<core::String> copy11 = #C11;
-static const field core::List<core::String> copy12 = #C11;
-static const field core::List<core::String> copy13 = #C11;
-static const field core::List<core::String> copy14 = #C11;
-static const field core::List<core::String> copy15 = #C11;
-static const field core::List<core::String> copy16 = #C11;
-static const field core::List<core::String> copy17 = #C11;
-static const field core::List<core::String> copy18 = #C11;
-static const field core::List<core::String> copy19 = #C11;
-static const field core::List<core::String> copy20 = #C11;
-static const field core::List<core::String> copy21 = #C11;
-static const field core::List<core::String> copy22 = #C11;
-static const field core::List<core::String> copy23 = #C11;
-static const field core::List<core::String> copy24 = #C11;
-static const field core::List<core::String> copy25 = #C11;
-static const field core::List<core::String> copy26 = #C11;
-static const field core::List<core::String> copy27 = #C11;
-static const field core::List<core::String> copy28 = #C11;
-static const field core::List<core::String> copy29 = #C11;
-static const field core::List<core::String> copy30 = #C11;
-static const field core::List<core::String> copy31 = #C11;
-static const field core::List<core::String> copy32 = #C11;
-static const field core::List<core::String> copy33 = #C11;
-static const field core::List<core::String> copy34 = #C11;
-static const field core::List<core::String> copy35 = #C11;
-static const field core::List<core::String> copy36 = #C11;
-static const field core::List<core::String> copy37 = #C11;
-static const field core::List<core::String> copy38 = #C11;
-static const field core::List<core::String> copy39 = #C11;
-static const field core::List<core::String> copy40 = #C11;
-static const field core::List<core::String> copy41 = #C11;
-static const field core::List<core::String> copy42 = #C11;
-static const field core::List<core::String> copy43 = #C11;
-static const field core::List<core::String> copy44 = #C11;
-static const field core::List<core::String> copy45 = #C11;
-static const field core::List<core::String> copy46 = #C11;
-static const field core::List<core::String> copy47 = #C11;
-static const field core::List<core::String> copy48 = #C11;
-static const field core::List<core::String> copy49 = #C11;
-static const field core::List<core::String> copy50 = #C11;
+static const field core::List<core::String> original = #C13;
+static const field core::List<core::String> copy1 = #C13;
+static const field core::List<core::String> copy2 = #C13;
+static const field core::List<core::String> copy3 = #C13;
+static const field core::List<core::String> copy4 = #C13;
+static const field core::List<core::String> copy5 = #C13;
+static const field core::List<core::String> copy6 = #C13;
+static const field core::List<core::String> copy7 = #C13;
+static const field core::List<core::String> copy8 = #C13;
+static const field core::List<core::String> copy9 = #C13;
+static const field core::List<core::String> copy10 = #C13;
+static const field core::List<core::String> copy11 = #C13;
+static const field core::List<core::String> copy12 = #C13;
+static const field core::List<core::String> copy13 = #C13;
+static const field core::List<core::String> copy14 = #C13;
+static const field core::List<core::String> copy15 = #C13;
+static const field core::List<core::String> copy16 = #C13;
+static const field core::List<core::String> copy17 = #C13;
+static const field core::List<core::String> copy18 = #C13;
+static const field core::List<core::String> copy19 = #C13;
+static const field core::List<core::String> copy20 = #C13;
+static const field core::List<core::String> copy21 = #C13;
+static const field core::List<core::String> copy22 = #C13;
+static const field core::List<core::String> copy23 = #C13;
+static const field core::List<core::String> copy24 = #C13;
+static const field core::List<core::String> copy25 = #C13;
+static const field core::List<core::String> copy26 = #C13;
+static const field core::List<core::String> copy27 = #C13;
+static const field core::List<core::String> copy28 = #C13;
+static const field core::List<core::String> copy29 = #C13;
+static const field core::List<core::String> copy30 = #C13;
+static const field core::List<core::String> copy31 = #C13;
+static const field core::List<core::String> copy32 = #C13;
+static const field core::List<core::String> copy33 = #C13;
+static const field core::List<core::String> copy34 = #C13;
+static const field core::List<core::String> copy35 = #C13;
+static const field core::List<core::String> copy36 = #C13;
+static const field core::List<core::String> copy37 = #C13;
+static const field core::List<core::String> copy38 = #C13;
+static const field core::List<core::String> copy39 = #C13;
+static const field core::List<core::String> copy40 = #C13;
+static const field core::List<core::String> copy41 = #C13;
+static const field core::List<core::String> copy42 = #C13;
+static const field core::List<core::String> copy43 = #C13;
+static const field core::List<core::String> copy44 = #C13;
+static const field core::List<core::String> copy45 = #C13;
+static const field core::List<core::String> copy46 = #C13;
+static const field core::List<core::String> copy47 = #C13;
+static const field core::List<core::String> copy48 = #C13;
+static const field core::List<core::String> copy49 = #C13;
+static const field core::List<core::String> copy50 = #C13;
 
 constants  {
   #C1 = "lots"
@@ -60,10 +60,12 @@
   #C3 = "strings"
   #C4 = <core::String*>[#C1, #C2, #C3]
   #C5 = "original"
-  #C6 = "that"
-  #C7 = "are"
-  #C8 = "already"
-  #C9 = "constants"
-  #C10 = <core::String*>[#C6, #C7, #C8, #C9]
-  #C11 = eval #C4 + const <dynamic>[const core::String::fromEnvironment(#C5)] + #C10
+  #C6 = eval const core::String::fromEnvironment(#C5)
+  #C7 = eval const <dynamic>[#C6]
+  #C8 = "that"
+  #C9 = "are"
+  #C10 = "already"
+  #C11 = "constants"
+  #C12 = <core::String*>[#C8, #C9, #C10, #C11]
+  #C13 = eval #C4 + #C7 + #C12
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.modular.expect
index 8a84689..308adbd 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.modular.expect
@@ -2,57 +2,57 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::String> original = #C11;
-static const field core::List<core::String> copy1 = #C11;
-static const field core::List<core::String> copy2 = #C11;
-static const field core::List<core::String> copy3 = #C11;
-static const field core::List<core::String> copy4 = #C11;
-static const field core::List<core::String> copy5 = #C11;
-static const field core::List<core::String> copy6 = #C11;
-static const field core::List<core::String> copy7 = #C11;
-static const field core::List<core::String> copy8 = #C11;
-static const field core::List<core::String> copy9 = #C11;
-static const field core::List<core::String> copy10 = #C11;
-static const field core::List<core::String> copy11 = #C11;
-static const field core::List<core::String> copy12 = #C11;
-static const field core::List<core::String> copy13 = #C11;
-static const field core::List<core::String> copy14 = #C11;
-static const field core::List<core::String> copy15 = #C11;
-static const field core::List<core::String> copy16 = #C11;
-static const field core::List<core::String> copy17 = #C11;
-static const field core::List<core::String> copy18 = #C11;
-static const field core::List<core::String> copy19 = #C11;
-static const field core::List<core::String> copy20 = #C11;
-static const field core::List<core::String> copy21 = #C11;
-static const field core::List<core::String> copy22 = #C11;
-static const field core::List<core::String> copy23 = #C11;
-static const field core::List<core::String> copy24 = #C11;
-static const field core::List<core::String> copy25 = #C11;
-static const field core::List<core::String> copy26 = #C11;
-static const field core::List<core::String> copy27 = #C11;
-static const field core::List<core::String> copy28 = #C11;
-static const field core::List<core::String> copy29 = #C11;
-static const field core::List<core::String> copy30 = #C11;
-static const field core::List<core::String> copy31 = #C11;
-static const field core::List<core::String> copy32 = #C11;
-static const field core::List<core::String> copy33 = #C11;
-static const field core::List<core::String> copy34 = #C11;
-static const field core::List<core::String> copy35 = #C11;
-static const field core::List<core::String> copy36 = #C11;
-static const field core::List<core::String> copy37 = #C11;
-static const field core::List<core::String> copy38 = #C11;
-static const field core::List<core::String> copy39 = #C11;
-static const field core::List<core::String> copy40 = #C11;
-static const field core::List<core::String> copy41 = #C11;
-static const field core::List<core::String> copy42 = #C11;
-static const field core::List<core::String> copy43 = #C11;
-static const field core::List<core::String> copy44 = #C11;
-static const field core::List<core::String> copy45 = #C11;
-static const field core::List<core::String> copy46 = #C11;
-static const field core::List<core::String> copy47 = #C11;
-static const field core::List<core::String> copy48 = #C11;
-static const field core::List<core::String> copy49 = #C11;
-static const field core::List<core::String> copy50 = #C11;
+static const field core::List<core::String> original = #C13;
+static const field core::List<core::String> copy1 = #C13;
+static const field core::List<core::String> copy2 = #C13;
+static const field core::List<core::String> copy3 = #C13;
+static const field core::List<core::String> copy4 = #C13;
+static const field core::List<core::String> copy5 = #C13;
+static const field core::List<core::String> copy6 = #C13;
+static const field core::List<core::String> copy7 = #C13;
+static const field core::List<core::String> copy8 = #C13;
+static const field core::List<core::String> copy9 = #C13;
+static const field core::List<core::String> copy10 = #C13;
+static const field core::List<core::String> copy11 = #C13;
+static const field core::List<core::String> copy12 = #C13;
+static const field core::List<core::String> copy13 = #C13;
+static const field core::List<core::String> copy14 = #C13;
+static const field core::List<core::String> copy15 = #C13;
+static const field core::List<core::String> copy16 = #C13;
+static const field core::List<core::String> copy17 = #C13;
+static const field core::List<core::String> copy18 = #C13;
+static const field core::List<core::String> copy19 = #C13;
+static const field core::List<core::String> copy20 = #C13;
+static const field core::List<core::String> copy21 = #C13;
+static const field core::List<core::String> copy22 = #C13;
+static const field core::List<core::String> copy23 = #C13;
+static const field core::List<core::String> copy24 = #C13;
+static const field core::List<core::String> copy25 = #C13;
+static const field core::List<core::String> copy26 = #C13;
+static const field core::List<core::String> copy27 = #C13;
+static const field core::List<core::String> copy28 = #C13;
+static const field core::List<core::String> copy29 = #C13;
+static const field core::List<core::String> copy30 = #C13;
+static const field core::List<core::String> copy31 = #C13;
+static const field core::List<core::String> copy32 = #C13;
+static const field core::List<core::String> copy33 = #C13;
+static const field core::List<core::String> copy34 = #C13;
+static const field core::List<core::String> copy35 = #C13;
+static const field core::List<core::String> copy36 = #C13;
+static const field core::List<core::String> copy37 = #C13;
+static const field core::List<core::String> copy38 = #C13;
+static const field core::List<core::String> copy39 = #C13;
+static const field core::List<core::String> copy40 = #C13;
+static const field core::List<core::String> copy41 = #C13;
+static const field core::List<core::String> copy42 = #C13;
+static const field core::List<core::String> copy43 = #C13;
+static const field core::List<core::String> copy44 = #C13;
+static const field core::List<core::String> copy45 = #C13;
+static const field core::List<core::String> copy46 = #C13;
+static const field core::List<core::String> copy47 = #C13;
+static const field core::List<core::String> copy48 = #C13;
+static const field core::List<core::String> copy49 = #C13;
+static const field core::List<core::String> copy50 = #C13;
 
 constants  {
   #C1 = "lots"
@@ -60,10 +60,12 @@
   #C3 = "strings"
   #C4 = <core::String*>[#C1, #C2, #C3]
   #C5 = "original"
-  #C6 = "that"
-  #C7 = "are"
-  #C8 = "already"
-  #C9 = "constants"
-  #C10 = <core::String*>[#C6, #C7, #C8, #C9]
-  #C11 = eval #C4 + const <dynamic>[const core::String::fromEnvironment(#C5)] + #C10
+  #C6 = eval const core::String::fromEnvironment(#C5)
+  #C7 = eval const <dynamic>[#C6]
+  #C8 = "that"
+  #C9 = "are"
+  #C10 = "already"
+  #C11 = "constants"
+  #C12 = <core::String*>[#C8, #C9, #C10, #C11]
+  #C13 = eval #C4 + #C7 + #C12
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.transformed.expect
index ee64a31..d1633f7 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/many_fields_pointing_to_previous_field.dart.weak.transformed.expect
@@ -2,57 +2,57 @@
 import self as self;
 import "dart:core" as core;
 
-static const field core::List<core::String> original = #C11;
-static const field core::List<core::String> copy1 = #C11;
-static const field core::List<core::String> copy2 = #C11;
-static const field core::List<core::String> copy3 = #C11;
-static const field core::List<core::String> copy4 = #C11;
-static const field core::List<core::String> copy5 = #C11;
-static const field core::List<core::String> copy6 = #C11;
-static const field core::List<core::String> copy7 = #C11;
-static const field core::List<core::String> copy8 = #C11;
-static const field core::List<core::String> copy9 = #C11;
-static const field core::List<core::String> copy10 = #C11;
-static const field core::List<core::String> copy11 = #C11;
-static const field core::List<core::String> copy12 = #C11;
-static const field core::List<core::String> copy13 = #C11;
-static const field core::List<core::String> copy14 = #C11;
-static const field core::List<core::String> copy15 = #C11;
-static const field core::List<core::String> copy16 = #C11;
-static const field core::List<core::String> copy17 = #C11;
-static const field core::List<core::String> copy18 = #C11;
-static const field core::List<core::String> copy19 = #C11;
-static const field core::List<core::String> copy20 = #C11;
-static const field core::List<core::String> copy21 = #C11;
-static const field core::List<core::String> copy22 = #C11;
-static const field core::List<core::String> copy23 = #C11;
-static const field core::List<core::String> copy24 = #C11;
-static const field core::List<core::String> copy25 = #C11;
-static const field core::List<core::String> copy26 = #C11;
-static const field core::List<core::String> copy27 = #C11;
-static const field core::List<core::String> copy28 = #C11;
-static const field core::List<core::String> copy29 = #C11;
-static const field core::List<core::String> copy30 = #C11;
-static const field core::List<core::String> copy31 = #C11;
-static const field core::List<core::String> copy32 = #C11;
-static const field core::List<core::String> copy33 = #C11;
-static const field core::List<core::String> copy34 = #C11;
-static const field core::List<core::String> copy35 = #C11;
-static const field core::List<core::String> copy36 = #C11;
-static const field core::List<core::String> copy37 = #C11;
-static const field core::List<core::String> copy38 = #C11;
-static const field core::List<core::String> copy39 = #C11;
-static const field core::List<core::String> copy40 = #C11;
-static const field core::List<core::String> copy41 = #C11;
-static const field core::List<core::String> copy42 = #C11;
-static const field core::List<core::String> copy43 = #C11;
-static const field core::List<core::String> copy44 = #C11;
-static const field core::List<core::String> copy45 = #C11;
-static const field core::List<core::String> copy46 = #C11;
-static const field core::List<core::String> copy47 = #C11;
-static const field core::List<core::String> copy48 = #C11;
-static const field core::List<core::String> copy49 = #C11;
-static const field core::List<core::String> copy50 = #C11;
+static const field core::List<core::String> original = #C13;
+static const field core::List<core::String> copy1 = #C13;
+static const field core::List<core::String> copy2 = #C13;
+static const field core::List<core::String> copy3 = #C13;
+static const field core::List<core::String> copy4 = #C13;
+static const field core::List<core::String> copy5 = #C13;
+static const field core::List<core::String> copy6 = #C13;
+static const field core::List<core::String> copy7 = #C13;
+static const field core::List<core::String> copy8 = #C13;
+static const field core::List<core::String> copy9 = #C13;
+static const field core::List<core::String> copy10 = #C13;
+static const field core::List<core::String> copy11 = #C13;
+static const field core::List<core::String> copy12 = #C13;
+static const field core::List<core::String> copy13 = #C13;
+static const field core::List<core::String> copy14 = #C13;
+static const field core::List<core::String> copy15 = #C13;
+static const field core::List<core::String> copy16 = #C13;
+static const field core::List<core::String> copy17 = #C13;
+static const field core::List<core::String> copy18 = #C13;
+static const field core::List<core::String> copy19 = #C13;
+static const field core::List<core::String> copy20 = #C13;
+static const field core::List<core::String> copy21 = #C13;
+static const field core::List<core::String> copy22 = #C13;
+static const field core::List<core::String> copy23 = #C13;
+static const field core::List<core::String> copy24 = #C13;
+static const field core::List<core::String> copy25 = #C13;
+static const field core::List<core::String> copy26 = #C13;
+static const field core::List<core::String> copy27 = #C13;
+static const field core::List<core::String> copy28 = #C13;
+static const field core::List<core::String> copy29 = #C13;
+static const field core::List<core::String> copy30 = #C13;
+static const field core::List<core::String> copy31 = #C13;
+static const field core::List<core::String> copy32 = #C13;
+static const field core::List<core::String> copy33 = #C13;
+static const field core::List<core::String> copy34 = #C13;
+static const field core::List<core::String> copy35 = #C13;
+static const field core::List<core::String> copy36 = #C13;
+static const field core::List<core::String> copy37 = #C13;
+static const field core::List<core::String> copy38 = #C13;
+static const field core::List<core::String> copy39 = #C13;
+static const field core::List<core::String> copy40 = #C13;
+static const field core::List<core::String> copy41 = #C13;
+static const field core::List<core::String> copy42 = #C13;
+static const field core::List<core::String> copy43 = #C13;
+static const field core::List<core::String> copy44 = #C13;
+static const field core::List<core::String> copy45 = #C13;
+static const field core::List<core::String> copy46 = #C13;
+static const field core::List<core::String> copy47 = #C13;
+static const field core::List<core::String> copy48 = #C13;
+static const field core::List<core::String> copy49 = #C13;
+static const field core::List<core::String> copy50 = #C13;
 
 constants  {
   #C1 = "lots"
@@ -60,12 +60,14 @@
   #C3 = "strings"
   #C4 = <core::String*>[#C1, #C2, #C3]
   #C5 = "original"
-  #C6 = "that"
-  #C7 = "are"
-  #C8 = "already"
-  #C9 = "constants"
-  #C10 = <core::String*>[#C6, #C7, #C8, #C9]
-  #C11 = eval #C4 + const <dynamic>[const core::String::fromEnvironment(#C5)] + #C10
+  #C6 = eval const core::String::fromEnvironment(#C5)
+  #C7 = eval const <dynamic>[#C6]
+  #C8 = "that"
+  #C9 = "are"
+  #C10 = "already"
+  #C11 = "constants"
+  #C12 = <core::String*>[#C8, #C9, #C10, #C11]
+  #C13 = eval #C4 + #C7 + #C12
 }
 
 Extra constant evaluation status:
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.expect
index 9505b07..57db3b7 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.expect
@@ -3,17 +3,17 @@
 import "dart:core" as core;
 
 static const field core::int foo = #C1;
-static const field core::String bar = #C6;
-static const field core::bool baz = #C7;
-static const field core::Symbol blaSymbol = #C8;
+static const field core::String bar = #C7;
+static const field core::bool baz = #C8;
+static const field core::Symbol blaSymbol = #C9;
 static method main() → dynamic {
   self::_x();
-  #C10;
-  core::print(#C6);
+  #C11;
+  core::print(#C7);
 }
 static method _x() → void {
   core::print(#C1);
-  core::print(#C6);
+  core::print(#C7);
 }
 
 constants  {
@@ -21,10 +21,11 @@
   #C2 = "hello "
   #C3 = "baz"
   #C4 = "world"
-  #C5 = "!"
-  #C6 = eval "${#C2}${const core::String::fromEnvironment(#C3, defaultValue: #C4)}${#C5}"
-  #C7 = true
-  #C8 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x
-  #C9 = "foo"
-  #C10 = eval const core::bool::fromEnvironment(#C9)
+  #C5 = eval const core::String::fromEnvironment(#C3, defaultValue: #C4)
+  #C6 = "!"
+  #C7 = eval "${#C2}${#C5}${#C6}"
+  #C8 = true
+  #C9 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x
+  #C10 = "foo"
+  #C11 = eval const core::bool::fromEnvironment(#C10)
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.modular.expect
index 9505b07..57db3b7 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.modular.expect
@@ -3,17 +3,17 @@
 import "dart:core" as core;
 
 static const field core::int foo = #C1;
-static const field core::String bar = #C6;
-static const field core::bool baz = #C7;
-static const field core::Symbol blaSymbol = #C8;
+static const field core::String bar = #C7;
+static const field core::bool baz = #C8;
+static const field core::Symbol blaSymbol = #C9;
 static method main() → dynamic {
   self::_x();
-  #C10;
-  core::print(#C6);
+  #C11;
+  core::print(#C7);
 }
 static method _x() → void {
   core::print(#C1);
-  core::print(#C6);
+  core::print(#C7);
 }
 
 constants  {
@@ -21,10 +21,11 @@
   #C2 = "hello "
   #C3 = "baz"
   #C4 = "world"
-  #C5 = "!"
-  #C6 = eval "${#C2}${const core::String::fromEnvironment(#C3, defaultValue: #C4)}${#C5}"
-  #C7 = true
-  #C8 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x
-  #C9 = "foo"
-  #C10 = eval const core::bool::fromEnvironment(#C9)
+  #C5 = eval const core::String::fromEnvironment(#C3, defaultValue: #C4)
+  #C6 = "!"
+  #C7 = eval "${#C2}${#C5}${#C6}"
+  #C8 = true
+  #C9 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x
+  #C10 = "foo"
+  #C11 = eval const core::bool::fromEnvironment(#C10)
 }
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.transformed.expect
index 6bce502..c3d31c5 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/rudimentary_test_01.dart.weak.transformed.expect
@@ -3,17 +3,17 @@
 import "dart:core" as core;
 
 static const field core::int foo = #C1;
-static const field core::String bar = #C6;
-static const field core::bool baz = #C7;
-static const field core::Symbol blaSymbol = #C8;
+static const field core::String bar = #C7;
+static const field core::bool baz = #C8;
+static const field core::Symbol blaSymbol = #C9;
 static method main() → dynamic {
   self::_x();
-  #C10;
-  core::print(#C11);
+  #C11;
+  core::print(#C7);
 }
 static method _x() → void {
   core::print(#C1);
-  core::print(#C11);
+  core::print(#C7);
 }
 
 constants  {
@@ -21,18 +21,18 @@
   #C2 = "hello "
   #C3 = "baz"
   #C4 = "world"
-  #C5 = "!"
-  #C6 = eval "${#C2}${const core::String::fromEnvironment(#C3, defaultValue: #C4)}${#C5}"
-  #C7 = true
-  #C8 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x
-  #C9 = "foo"
-  #C10 = eval const core::bool::fromEnvironment(#C9)
-  #C11 = eval "${#C2}${const core::String::fromEnvironment(#C3, defaultValue: #C4)}${#C5}"
+  #C5 = eval const core::String::fromEnvironment(#C3, defaultValue: #C4)
+  #C6 = "!"
+  #C7 = eval "${#C2}${#C5}${#C6}"
+  #C8 = true
+  #C9 = #org-dartlang-testcase:///rudimentary_test_01.dart::_x
+  #C10 = "foo"
+  #C11 = eval const core::bool::fromEnvironment(#C10)
 }
 
 Extra constant evaluation status:
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:13:9 -> BoolConstant(false)
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:6:18 -> StringConstant("hello world!")
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:6:18 -> StringConstant("hello world!")
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:14:9 -> StringConstant("hello world!")
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:19:9 -> StringConstant("hello world!")
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///rudimentary_test_01.dart:6:18 -> StringConstant("hello world!")
 Extra constant evaluation: evaluated: 8, effectively constant: 4
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
index d340989..07abf86 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.expect
@@ -56,9 +56,9 @@
 class Foo<E extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
   final field core::bool saved;
   final field core::bool saved2;
-  field core::bool initialized = #C3;
+  field core::bool initialized = #C4;
   final field self::Foo::E% value;
-  const constructor •(self::Foo::E% value, {core::bool saved2 = #C4, core::bool x = #C5}) → self::Foo<self::Foo::E%>
+  const constructor •(self::Foo::E% value, {core::bool saved2 = #C5, core::bool x = #C6}) → self::Foo<self::Foo::E%>
     : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•()
     ;
 }
@@ -108,136 +108,166 @@
     : self::ConstClassWithF::foo = foo, super core::Object::•()
     ;
 }
-static const field core::bool barFromEnv = #C6;
+static const field core::bool barFromEnv = #C3;
 static const field core::bool hasBarEnv = #C7;
-static const field core::bool? barFromEnvOrNull0 = #C10;
-static const field core::bool barFromEnvOrNull = #C11;
-static const field core::bool notBarFromEnvOrNull = #C12;
-static const field core::bool conditionalOnNull = #C14;
-static const field core::bool nullAwareOnNull = #C15;
-static const field core::bool andOnNull = #C16;
-static const field core::bool andOnNull2 = #C11;
-static const field core::bool orOnNull = #C17;
-static const field core::bool orOnNull2 = #C18;
-static const field core::bool orOnNull3 = #C8;
-static const field core::bool orOnNull4 = #C11;
+static const field core::bool? barFromEnvOrNull0 = #C11;
+static const field core::bool barFromEnvOrNull = #C13;
+static const field core::bool notBarFromEnvOrNull = #C14;
+static const field core::bool conditionalOnNull = #C16;
+static const field core::bool nullAwareOnNull = #C18;
+static const field core::bool andOnNull = #C19;
+static const field core::bool andOnNull2 = #C13;
+static const field core::bool orOnNull = #C20;
+static const field core::bool orOnNull2 = #C21;
+static const field core::bool orOnNull3 = #C9;
+static const field core::bool orOnNull4 = #C13;
 static const field core::int fromDeferredLib = invalid-expression "'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.";
-static const field self::Foo<core::int> x = #C20;
-static const field core::bool? y = #C8;
-static const field core::bool z = #C13;
-static const field core::Object maybeInt = #C21;
-static const field core::bool isItInt = #C22;
-static const field core::Object maybeInt2 = #C8;
-static const field core::bool isItInt2 = #C13;
-static const field core::int? maybeInt3 = #C9;
-static const field core::bool isItInt3 = #C13;
-static const field dynamic listOfNull = #C23;
-static const field core::bool isListOfNull = #C8;
-static const field dynamic listOfInt = #C24;
-static const field core::bool isListOfInt = #C8;
-static const field core::bool isList = #C8;
-static const field dynamic setOfInt = #C25;
-static const field core::bool isSetOfInt = #C8;
-static const field dynamic mapOfInt = #C26;
-static const field core::bool isMapOfInt = #C8;
-static const field dynamic listOfListOfInt = #C27;
-static const field core::bool isListOfListOfInt = #C8;
-static const field dynamic setOfSetOfInt = #C28;
-static const field core::bool isSetOfSetOfInt = #C8;
-static const field dynamic mapOfMapOfInt1 = #C29;
-static const field dynamic mapOfMapOfInt2 = #C30;
-static const field core::bool isMapOfMapOfInt1 = #C8;
-static const field core::bool isMapOfMapOfInt2 = #C8;
-static const field core::Symbol symbolWithUnevaluatedParameter = #C31;
-static const field core::Symbol symbolWithInvalidName = #C32;
-static const field self::Class<self::B>? c0 = #C34;
+static const field self::Foo<core::int> x = #C23;
+static const field core::bool? y = #C9;
+static const field core::bool z = #C15;
+static const field core::Object maybeInt = #C25;
+static const field core::bool isItInt = #C27;
+static const field core::Object maybeInt2 = #C9;
+static const field core::bool isItInt2 = #C15;
+static const field core::int? maybeInt3 = #C10;
+static const field core::bool isItInt3 = #C15;
+static const field dynamic listOfNull = #C28;
+static const field core::bool isListOfNull = #C9;
+static const field dynamic listOfInt = #C29;
+static const field core::bool isListOfInt = #C9;
+static const field core::bool isList = #C9;
+static const field dynamic setOfInt = #C30;
+static const field core::bool isSetOfInt = #C9;
+static const field dynamic mapOfInt = #C31;
+static const field core::bool isMapOfInt = #C9;
+static const field dynamic listOfListOfInt = #C32;
+static const field core::bool isListOfListOfInt = #C9;
+static const field dynamic setOfSetOfInt = #C33;
+static const field core::bool isSetOfSetOfInt = #C9;
+static const field dynamic mapOfMapOfInt1 = #C34;
+static const field dynamic mapOfMapOfInt2 = #C35;
+static const field core::bool isMapOfMapOfInt1 = #C9;
+static const field core::bool isMapOfMapOfInt2 = #C9;
+static const field core::Symbol symbolWithUnevaluatedParameter = #C37;
+static const field core::Symbol symbolWithInvalidName = #C38;
+static const field self::Class<self::B>? c0 = #C44;
 static const field self::Class<self::A>? c1 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:100:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'.
  - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'.
   const Class.method(T t) : this(-t);
                                  ^";
-static const field self::Subclass<self::B>? c2 = #C35;
-static const field self::Class<self::A>? c3 = #C36;
-static const field self::Class<self::B>? c4 = #C37;
-static const field self::Subclass<self::A>? c5 = #C38;
-static const field self::Subclass<self::B>? c6 = #C39;
-static const field core::Type f = #C40;
-static field self::ConstClassWithF constClassWithF1 = #C42;
-static const field self::ConstClassWithF constClassWithF2 = #C42;
-static const field core::bool unevaluatedBool = #C43;
-static const field core::bool notUnevaluatedBool = #C44;
-static const field core::bool? unevaluatedBoolOrNull = #C45;
-static const field core::bool unevaluatedBoolNotNull = #C46;
-static method procedure(core::int i, {core::int named = #C9}) → core::int
+static const field self::Subclass<self::B>? c2 = #C49;
+static const field self::Class<self::A>? c3 = #C53;
+static const field self::Class<self::B>? c4 = #C58;
+static const field self::Subclass<self::A>? c5 = #C63;
+static const field self::Subclass<self::B>? c6 = #C68;
+static const field core::Type f = #C69;
+static field self::ConstClassWithF constClassWithF1 = #C71;
+static const field self::ConstClassWithF constClassWithF2 = #C71;
+static const field core::bool unevaluatedBool = #C72;
+static const field core::bool notUnevaluatedBool = #C73;
+static const field core::bool? unevaluatedBoolOrNull = #C75;
+static const field core::bool unevaluatedBoolNotNull = #C76;
+static method procedure(core::int i, {core::int named = #C10}) → core::int
   return i;
 static method main() → dynamic {
-  core::print(#C34);
+  core::print(#C44);
   core::print(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:100:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'.
  - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'.
   const Class.method(T t) : this(-t);
                                  ^");
-  core::print(#C35);
-  core::print(#C36);
-  core::print(#C37);
-  core::print(#C38);
-  core::print(#C39);
-  core::print(#C20);
-  core::print(#C20.{self::Foo::saved}{core::bool});
-  core::print(#C20.{self::Foo::value}{core::int});
+  core::print(#C49);
+  core::print(#C53);
+  core::print(#C58);
+  core::print(#C63);
+  core::print(#C68);
+  core::print(#C23);
+  core::print(#C23.{self::Foo::saved}{core::bool});
+  core::print(#C23.{self::Foo::value}{core::int});
 }
 
 library /*isNonNullableByDefault*/;
 import self as self2;
 import "dart:core" as core;
 
-static const field core::int x = #C19;
+static const field core::int x = #C22;
 
 constants  {
   #C1 = "foo"
   #C2 = "bar"
-  #C3 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C6 = eval const core::bool::fromEnvironment(#C2)
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
+  #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
+  #C6 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
   #C7 = eval const core::bool::hasEnvironment(#C2)
-  #C8 = true
-  #C9 = null
-  #C10 = eval const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9
-  #C11 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C12 = eval !const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C13 = false
-  #C14 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) ?{core::bool} #C8 : #C13
-  #C15 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) == null ?{core::bool} #C8 : const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && #C8
-  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C8
-  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C13
-  #C19 = 42
-  #C20 = eval self::Foo<core::int*>{saved:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), saved2:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), initialized:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), value:#C19}
-  #C21 = eval const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8
-  #C22 = eval (const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8) is{ForNonNullableByDefault} core::int ?{core::bool} #C8 : #C13
-  #C23 = <Null>[#C9]
-  #C24 = <core::int*>[#C19]
-  #C25 = <core::int*>{#C19}
-  #C26 = <core::int*, core::int*>{#C19:#C19)
-  #C27 = <core::List<core::int*>*>[#C24]
-  #C28 = <core::Set<core::int*>*>{#C25}
-  #C29 = <core::Map<core::int*, core::int*>*, core::int*>{#C26:#C19)
-  #C30 = <core::int*, core::Map<core::int*, core::int*>*>{#C19:#C26)
-  #C31 = eval const _in::Symbol::•(const core::String::fromEnvironment(#C1))
-  #C32 = #42
-  #C33 = "x"
-  #C34 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C35 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C36 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::A>?} #C9 : self::Class<self::A*>{self::A{}}
-  #C37 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C38 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::A>?} #C9 : self::Subclass<self::A*>{(self::A{}) as{ForNonNullableByDefault} self::A*}
-  #C39 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C40 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
-  #C41 = static-tearoff self::procedure
-  #C42 = self::ConstClassWithF {foo:#C41}
-  #C43 = eval const core::bool::fromEnvironment(#C1)
-  #C44 = eval !const core::bool::fromEnvironment(#C1)
-  #C45 = eval const core::bool::fromEnvironment(#C2) ?{core::bool?} const core::bool::fromEnvironment(#C1) : #C9
-  #C46 = eval (const core::bool::fromEnvironment(#C2) ?{core::bool?} const core::bool::fromEnvironment(#C1) : #C9)!
+  #C8 = eval const core::bool::fromEnvironment(#C2)
+  #C9 = true
+  #C10 = null
+  #C11 = eval #C8 ?{core::bool?} #C9 : #C10
+  #C12 = eval #C11!
+  #C13 = eval const core::bool::fromEnvironment(#C2, defaultValue: #C12)
+  #C14 = eval !#C13
+  #C15 = false
+  #C16 = eval #C13 ?{core::bool} #C9 : #C15
+  #C17 = eval #C13 == null
+  #C18 = eval #C17 ?{core::bool} #C9 : #C13
+  #C19 = eval #C13 && #C9
+  #C20 = eval #C13 || #C9
+  #C21 = eval #C13 || #C15
+  #C22 = 42
+  #C23 = eval self::Foo<core::int*>{saved:#C6, saved2:#C5, initialized:#C4, value:#C22}
+  #C24 = eval const core::bool::fromEnvironment(#C1)
+  #C25 = eval #C24 ?{core::Object} #C22 : #C9
+  #C26 = eval #C25 is{ForNonNullableByDefault} core::int
+  #C27 = eval #C26 ?{core::bool} #C9 : #C15
+  #C28 = <Null>[#C10]
+  #C29 = <core::int*>[#C22]
+  #C30 = <core::int*>{#C22}
+  #C31 = <core::int*, core::int*>{#C22:#C22)
+  #C32 = <core::List<core::int*>*>[#C29]
+  #C33 = <core::Set<core::int*>*>{#C30}
+  #C34 = <core::Map<core::int*, core::int*>*, core::int*>{#C31:#C22)
+  #C35 = <core::int*, core::Map<core::int*, core::int*>*>{#C22:#C31)
+  #C36 = eval const core::String::fromEnvironment(#C1)
+  #C37 = eval const _in::Symbol::•(#C36)
+  #C38 = #42
+  #C39 = "x"
+  #C40 = eval const core::bool::fromEnvironment(#C39)
+  #C41 = eval self::C{}
+  #C42 = eval #C41 as{ForNonNullableByDefault} self::B*
+  #C43 = eval self::Class<self::B*>{#C42}
+  #C44 = eval #C40 ?{self::Class<self::B>?} #C10 : #C43
+  #C45 = eval const core::bool::fromEnvironment(#C39)
+  #C46 = eval self::C{}
+  #C47 = eval #C46 as{ForNonNullableByDefault} self::B*
+  #C48 = eval self::Subclass<self::B*>{#C47}
+  #C49 = eval #C45 ?{self::Subclass<self::B>?} #C10 : #C48
+  #C50 = eval const core::bool::fromEnvironment(#C39)
+  #C51 = eval self::A{}
+  #C52 = eval self::Class<self::A*>{#C51}
+  #C53 = eval #C50 ?{self::Class<self::A>?} #C10 : #C52
+  #C54 = eval const core::bool::fromEnvironment(#C39)
+  #C55 = eval self::B{}
+  #C56 = eval #C55 as{ForNonNullableByDefault} self::B*
+  #C57 = eval self::Class<self::B*>{#C56}
+  #C58 = eval #C54 ?{self::Class<self::B>?} #C10 : #C57
+  #C59 = eval const core::bool::fromEnvironment(#C39)
+  #C60 = eval self::A{}
+  #C61 = eval #C60 as{ForNonNullableByDefault} self::A*
+  #C62 = eval self::Subclass<self::A*>{#C61}
+  #C63 = eval #C59 ?{self::Subclass<self::A>?} #C10 : #C62
+  #C64 = eval const core::bool::fromEnvironment(#C39)
+  #C65 = eval self::B{}
+  #C66 = eval #C65 as{ForNonNullableByDefault} self::B*
+  #C67 = eval self::Subclass<self::B*>{#C66}
+  #C68 = eval #C64 ?{self::Subclass<self::B>?} #C10 : #C67
+  #C69 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
+  #C70 = static-tearoff self::procedure
+  #C71 = self::ConstClassWithF {foo:#C70}
+  #C72 = eval const core::bool::fromEnvironment(#C1)
+  #C73 = eval !#C72
+  #C74 = eval const core::bool::fromEnvironment(#C2)
+  #C75 = eval #C74 ?{core::bool?} #C72 : #C10
+  #C76 = eval #C75!
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect
index d340989..07abf86 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.modular.expect
@@ -56,9 +56,9 @@
 class Foo<E extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
   final field core::bool saved;
   final field core::bool saved2;
-  field core::bool initialized = #C3;
+  field core::bool initialized = #C4;
   final field self::Foo::E% value;
-  const constructor •(self::Foo::E% value, {core::bool saved2 = #C4, core::bool x = #C5}) → self::Foo<self::Foo::E%>
+  const constructor •(self::Foo::E% value, {core::bool saved2 = #C5, core::bool x = #C6}) → self::Foo<self::Foo::E%>
     : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•()
     ;
 }
@@ -108,136 +108,166 @@
     : self::ConstClassWithF::foo = foo, super core::Object::•()
     ;
 }
-static const field core::bool barFromEnv = #C6;
+static const field core::bool barFromEnv = #C3;
 static const field core::bool hasBarEnv = #C7;
-static const field core::bool? barFromEnvOrNull0 = #C10;
-static const field core::bool barFromEnvOrNull = #C11;
-static const field core::bool notBarFromEnvOrNull = #C12;
-static const field core::bool conditionalOnNull = #C14;
-static const field core::bool nullAwareOnNull = #C15;
-static const field core::bool andOnNull = #C16;
-static const field core::bool andOnNull2 = #C11;
-static const field core::bool orOnNull = #C17;
-static const field core::bool orOnNull2 = #C18;
-static const field core::bool orOnNull3 = #C8;
-static const field core::bool orOnNull4 = #C11;
+static const field core::bool? barFromEnvOrNull0 = #C11;
+static const field core::bool barFromEnvOrNull = #C13;
+static const field core::bool notBarFromEnvOrNull = #C14;
+static const field core::bool conditionalOnNull = #C16;
+static const field core::bool nullAwareOnNull = #C18;
+static const field core::bool andOnNull = #C19;
+static const field core::bool andOnNull2 = #C13;
+static const field core::bool orOnNull = #C20;
+static const field core::bool orOnNull2 = #C21;
+static const field core::bool orOnNull3 = #C9;
+static const field core::bool orOnNull4 = #C13;
 static const field core::int fromDeferredLib = invalid-expression "'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.";
-static const field self::Foo<core::int> x = #C20;
-static const field core::bool? y = #C8;
-static const field core::bool z = #C13;
-static const field core::Object maybeInt = #C21;
-static const field core::bool isItInt = #C22;
-static const field core::Object maybeInt2 = #C8;
-static const field core::bool isItInt2 = #C13;
-static const field core::int? maybeInt3 = #C9;
-static const field core::bool isItInt3 = #C13;
-static const field dynamic listOfNull = #C23;
-static const field core::bool isListOfNull = #C8;
-static const field dynamic listOfInt = #C24;
-static const field core::bool isListOfInt = #C8;
-static const field core::bool isList = #C8;
-static const field dynamic setOfInt = #C25;
-static const field core::bool isSetOfInt = #C8;
-static const field dynamic mapOfInt = #C26;
-static const field core::bool isMapOfInt = #C8;
-static const field dynamic listOfListOfInt = #C27;
-static const field core::bool isListOfListOfInt = #C8;
-static const field dynamic setOfSetOfInt = #C28;
-static const field core::bool isSetOfSetOfInt = #C8;
-static const field dynamic mapOfMapOfInt1 = #C29;
-static const field dynamic mapOfMapOfInt2 = #C30;
-static const field core::bool isMapOfMapOfInt1 = #C8;
-static const field core::bool isMapOfMapOfInt2 = #C8;
-static const field core::Symbol symbolWithUnevaluatedParameter = #C31;
-static const field core::Symbol symbolWithInvalidName = #C32;
-static const field self::Class<self::B>? c0 = #C34;
+static const field self::Foo<core::int> x = #C23;
+static const field core::bool? y = #C9;
+static const field core::bool z = #C15;
+static const field core::Object maybeInt = #C25;
+static const field core::bool isItInt = #C27;
+static const field core::Object maybeInt2 = #C9;
+static const field core::bool isItInt2 = #C15;
+static const field core::int? maybeInt3 = #C10;
+static const field core::bool isItInt3 = #C15;
+static const field dynamic listOfNull = #C28;
+static const field core::bool isListOfNull = #C9;
+static const field dynamic listOfInt = #C29;
+static const field core::bool isListOfInt = #C9;
+static const field core::bool isList = #C9;
+static const field dynamic setOfInt = #C30;
+static const field core::bool isSetOfInt = #C9;
+static const field dynamic mapOfInt = #C31;
+static const field core::bool isMapOfInt = #C9;
+static const field dynamic listOfListOfInt = #C32;
+static const field core::bool isListOfListOfInt = #C9;
+static const field dynamic setOfSetOfInt = #C33;
+static const field core::bool isSetOfSetOfInt = #C9;
+static const field dynamic mapOfMapOfInt1 = #C34;
+static const field dynamic mapOfMapOfInt2 = #C35;
+static const field core::bool isMapOfMapOfInt1 = #C9;
+static const field core::bool isMapOfMapOfInt2 = #C9;
+static const field core::Symbol symbolWithUnevaluatedParameter = #C37;
+static const field core::Symbol symbolWithInvalidName = #C38;
+static const field self::Class<self::B>? c0 = #C44;
 static const field self::Class<self::A>? c1 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:100:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'.
  - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'.
   const Class.method(T t) : this(-t);
                                  ^";
-static const field self::Subclass<self::B>? c2 = #C35;
-static const field self::Class<self::A>? c3 = #C36;
-static const field self::Class<self::B>? c4 = #C37;
-static const field self::Subclass<self::A>? c5 = #C38;
-static const field self::Subclass<self::B>? c6 = #C39;
-static const field core::Type f = #C40;
-static field self::ConstClassWithF constClassWithF1 = #C42;
-static const field self::ConstClassWithF constClassWithF2 = #C42;
-static const field core::bool unevaluatedBool = #C43;
-static const field core::bool notUnevaluatedBool = #C44;
-static const field core::bool? unevaluatedBoolOrNull = #C45;
-static const field core::bool unevaluatedBoolNotNull = #C46;
-static method procedure(core::int i, {core::int named = #C9}) → core::int
+static const field self::Subclass<self::B>? c2 = #C49;
+static const field self::Class<self::A>? c3 = #C53;
+static const field self::Class<self::B>? c4 = #C58;
+static const field self::Subclass<self::A>? c5 = #C63;
+static const field self::Subclass<self::B>? c6 = #C68;
+static const field core::Type f = #C69;
+static field self::ConstClassWithF constClassWithF1 = #C71;
+static const field self::ConstClassWithF constClassWithF2 = #C71;
+static const field core::bool unevaluatedBool = #C72;
+static const field core::bool notUnevaluatedBool = #C73;
+static const field core::bool? unevaluatedBoolOrNull = #C75;
+static const field core::bool unevaluatedBoolNotNull = #C76;
+static method procedure(core::int i, {core::int named = #C10}) → core::int
   return i;
 static method main() → dynamic {
-  core::print(#C34);
+  core::print(#C44);
   core::print(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:100:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'.
  - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'.
   const Class.method(T t) : this(-t);
                                  ^");
-  core::print(#C35);
-  core::print(#C36);
-  core::print(#C37);
-  core::print(#C38);
-  core::print(#C39);
-  core::print(#C20);
-  core::print(#C20.{self::Foo::saved}{core::bool});
-  core::print(#C20.{self::Foo::value}{core::int});
+  core::print(#C49);
+  core::print(#C53);
+  core::print(#C58);
+  core::print(#C63);
+  core::print(#C68);
+  core::print(#C23);
+  core::print(#C23.{self::Foo::saved}{core::bool});
+  core::print(#C23.{self::Foo::value}{core::int});
 }
 
 library /*isNonNullableByDefault*/;
 import self as self2;
 import "dart:core" as core;
 
-static const field core::int x = #C19;
+static const field core::int x = #C22;
 
 constants  {
   #C1 = "foo"
   #C2 = "bar"
-  #C3 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C6 = eval const core::bool::fromEnvironment(#C2)
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
+  #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
+  #C6 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
   #C7 = eval const core::bool::hasEnvironment(#C2)
-  #C8 = true
-  #C9 = null
-  #C10 = eval const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9
-  #C11 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C12 = eval !const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C13 = false
-  #C14 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) ?{core::bool} #C8 : #C13
-  #C15 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) == null ?{core::bool} #C8 : const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && #C8
-  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C8
-  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C13
-  #C19 = 42
-  #C20 = eval self::Foo<core::int*>{saved:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), saved2:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), initialized:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), value:#C19}
-  #C21 = eval const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8
-  #C22 = eval (const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8) is{ForNonNullableByDefault} core::int ?{core::bool} #C8 : #C13
-  #C23 = <Null>[#C9]
-  #C24 = <core::int*>[#C19]
-  #C25 = <core::int*>{#C19}
-  #C26 = <core::int*, core::int*>{#C19:#C19)
-  #C27 = <core::List<core::int*>*>[#C24]
-  #C28 = <core::Set<core::int*>*>{#C25}
-  #C29 = <core::Map<core::int*, core::int*>*, core::int*>{#C26:#C19)
-  #C30 = <core::int*, core::Map<core::int*, core::int*>*>{#C19:#C26)
-  #C31 = eval const _in::Symbol::•(const core::String::fromEnvironment(#C1))
-  #C32 = #42
-  #C33 = "x"
-  #C34 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C35 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C36 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::A>?} #C9 : self::Class<self::A*>{self::A{}}
-  #C37 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C38 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::A>?} #C9 : self::Subclass<self::A*>{(self::A{}) as{ForNonNullableByDefault} self::A*}
-  #C39 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C40 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
-  #C41 = static-tearoff self::procedure
-  #C42 = self::ConstClassWithF {foo:#C41}
-  #C43 = eval const core::bool::fromEnvironment(#C1)
-  #C44 = eval !const core::bool::fromEnvironment(#C1)
-  #C45 = eval const core::bool::fromEnvironment(#C2) ?{core::bool?} const core::bool::fromEnvironment(#C1) : #C9
-  #C46 = eval (const core::bool::fromEnvironment(#C2) ?{core::bool?} const core::bool::fromEnvironment(#C1) : #C9)!
+  #C8 = eval const core::bool::fromEnvironment(#C2)
+  #C9 = true
+  #C10 = null
+  #C11 = eval #C8 ?{core::bool?} #C9 : #C10
+  #C12 = eval #C11!
+  #C13 = eval const core::bool::fromEnvironment(#C2, defaultValue: #C12)
+  #C14 = eval !#C13
+  #C15 = false
+  #C16 = eval #C13 ?{core::bool} #C9 : #C15
+  #C17 = eval #C13 == null
+  #C18 = eval #C17 ?{core::bool} #C9 : #C13
+  #C19 = eval #C13 && #C9
+  #C20 = eval #C13 || #C9
+  #C21 = eval #C13 || #C15
+  #C22 = 42
+  #C23 = eval self::Foo<core::int*>{saved:#C6, saved2:#C5, initialized:#C4, value:#C22}
+  #C24 = eval const core::bool::fromEnvironment(#C1)
+  #C25 = eval #C24 ?{core::Object} #C22 : #C9
+  #C26 = eval #C25 is{ForNonNullableByDefault} core::int
+  #C27 = eval #C26 ?{core::bool} #C9 : #C15
+  #C28 = <Null>[#C10]
+  #C29 = <core::int*>[#C22]
+  #C30 = <core::int*>{#C22}
+  #C31 = <core::int*, core::int*>{#C22:#C22)
+  #C32 = <core::List<core::int*>*>[#C29]
+  #C33 = <core::Set<core::int*>*>{#C30}
+  #C34 = <core::Map<core::int*, core::int*>*, core::int*>{#C31:#C22)
+  #C35 = <core::int*, core::Map<core::int*, core::int*>*>{#C22:#C31)
+  #C36 = eval const core::String::fromEnvironment(#C1)
+  #C37 = eval const _in::Symbol::•(#C36)
+  #C38 = #42
+  #C39 = "x"
+  #C40 = eval const core::bool::fromEnvironment(#C39)
+  #C41 = eval self::C{}
+  #C42 = eval #C41 as{ForNonNullableByDefault} self::B*
+  #C43 = eval self::Class<self::B*>{#C42}
+  #C44 = eval #C40 ?{self::Class<self::B>?} #C10 : #C43
+  #C45 = eval const core::bool::fromEnvironment(#C39)
+  #C46 = eval self::C{}
+  #C47 = eval #C46 as{ForNonNullableByDefault} self::B*
+  #C48 = eval self::Subclass<self::B*>{#C47}
+  #C49 = eval #C45 ?{self::Subclass<self::B>?} #C10 : #C48
+  #C50 = eval const core::bool::fromEnvironment(#C39)
+  #C51 = eval self::A{}
+  #C52 = eval self::Class<self::A*>{#C51}
+  #C53 = eval #C50 ?{self::Class<self::A>?} #C10 : #C52
+  #C54 = eval const core::bool::fromEnvironment(#C39)
+  #C55 = eval self::B{}
+  #C56 = eval #C55 as{ForNonNullableByDefault} self::B*
+  #C57 = eval self::Class<self::B*>{#C56}
+  #C58 = eval #C54 ?{self::Class<self::B>?} #C10 : #C57
+  #C59 = eval const core::bool::fromEnvironment(#C39)
+  #C60 = eval self::A{}
+  #C61 = eval #C60 as{ForNonNullableByDefault} self::A*
+  #C62 = eval self::Subclass<self::A*>{#C61}
+  #C63 = eval #C59 ?{self::Subclass<self::A>?} #C10 : #C62
+  #C64 = eval const core::bool::fromEnvironment(#C39)
+  #C65 = eval self::B{}
+  #C66 = eval #C65 as{ForNonNullableByDefault} self::B*
+  #C67 = eval self::Subclass<self::B*>{#C66}
+  #C68 = eval #C64 ?{self::Subclass<self::B>?} #C10 : #C67
+  #C69 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
+  #C70 = static-tearoff self::procedure
+  #C71 = self::ConstClassWithF {foo:#C70}
+  #C72 = eval const core::bool::fromEnvironment(#C1)
+  #C73 = eval !#C72
+  #C74 = eval const core::bool::fromEnvironment(#C2)
+  #C75 = eval #C74 ?{core::bool?} #C72 : #C10
+  #C76 = eval #C75!
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
index 78c9eb6..d52e896 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.weak.transformed.expect
@@ -56,9 +56,9 @@
 class Foo<E extends core::Object? = dynamic> extends core::Object /*hasConstConstructor*/  {
   final field core::bool saved;
   final field core::bool saved2;
-  field core::bool initialized = #C3;
+  field core::bool initialized = #C4;
   final field self::Foo::E% value;
-  const constructor •(self::Foo::E% value, {core::bool saved2 = #C4, core::bool x = #C5}) → self::Foo<self::Foo::E%>
+  const constructor •(self::Foo::E% value, {core::bool saved2 = #C5, core::bool x = #C6}) → self::Foo<self::Foo::E%>
     : self::Foo::value = value, self::Foo::saved2 = saved2, self::Foo::saved = x, super core::Object::•()
     ;
 }
@@ -108,156 +108,179 @@
     : self::ConstClassWithF::foo = foo, super core::Object::•()
     ;
 }
-static const field core::bool barFromEnv = #C6;
+static const field core::bool barFromEnv = #C3;
 static const field core::bool hasBarEnv = #C7;
-static const field core::bool? barFromEnvOrNull0 = #C10;
-static const field core::bool barFromEnvOrNull = #C11;
-static const field core::bool notBarFromEnvOrNull = #C12;
-static const field core::bool conditionalOnNull = #C14;
-static const field core::bool nullAwareOnNull = #C15;
-static const field core::bool andOnNull = #C16;
-static const field core::bool andOnNull2 = #C11;
-static const field core::bool orOnNull = #C17;
-static const field core::bool orOnNull2 = #C18;
-static const field core::bool orOnNull3 = #C8;
-static const field core::bool orOnNull4 = #C11;
+static const field core::bool? barFromEnvOrNull0 = #C11;
+static const field core::bool barFromEnvOrNull = #C13;
+static const field core::bool notBarFromEnvOrNull = #C14;
+static const field core::bool conditionalOnNull = #C16;
+static const field core::bool nullAwareOnNull = #C18;
+static const field core::bool andOnNull = #C19;
+static const field core::bool andOnNull2 = #C13;
+static const field core::bool orOnNull = #C20;
+static const field core::bool orOnNull2 = #C21;
+static const field core::bool orOnNull3 = #C9;
+static const field core::bool orOnNull4 = #C13;
 static const field core::int fromDeferredLib = invalid-expression "'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.";
-static const field self::Foo<core::int> x = #C20;
-static const field core::bool? y = #C8;
-static const field core::bool z = #C13;
-static const field core::Object maybeInt = #C21;
-static const field core::bool isItInt = #C22;
-static const field core::Object maybeInt2 = #C8;
-static const field core::bool isItInt2 = #C13;
-static const field core::int? maybeInt3 = #C9;
-static const field core::bool isItInt3 = #C13;
-static const field dynamic listOfNull = #C23;
-static const field core::bool isListOfNull = #C8;
-static const field dynamic listOfInt = #C24;
-static const field core::bool isListOfInt = #C8;
-static const field core::bool isList = #C8;
-static const field dynamic setOfInt = #C25;
-static const field core::bool isSetOfInt = #C8;
-static const field dynamic mapOfInt = #C26;
-static const field core::bool isMapOfInt = #C8;
-static const field dynamic listOfListOfInt = #C27;
-static const field core::bool isListOfListOfInt = #C8;
-static const field dynamic setOfSetOfInt = #C28;
-static const field core::bool isSetOfSetOfInt = #C8;
-static const field dynamic mapOfMapOfInt1 = #C29;
-static const field dynamic mapOfMapOfInt2 = #C30;
-static const field core::bool isMapOfMapOfInt1 = #C8;
-static const field core::bool isMapOfMapOfInt2 = #C8;
-static const field core::Symbol symbolWithUnevaluatedParameter = #C31;
-static const field core::Symbol symbolWithInvalidName = #C32;
-static const field self::Class<self::B>? c0 = #C34;
+static const field self::Foo<core::int> x = #C23;
+static const field core::bool? y = #C9;
+static const field core::bool z = #C15;
+static const field core::Object maybeInt = #C25;
+static const field core::bool isItInt = #C27;
+static const field core::Object maybeInt2 = #C9;
+static const field core::bool isItInt2 = #C15;
+static const field core::int? maybeInt3 = #C10;
+static const field core::bool isItInt3 = #C15;
+static const field dynamic listOfNull = #C28;
+static const field core::bool isListOfNull = #C9;
+static const field dynamic listOfInt = #C29;
+static const field core::bool isListOfInt = #C9;
+static const field core::bool isList = #C9;
+static const field dynamic setOfInt = #C30;
+static const field core::bool isSetOfInt = #C9;
+static const field dynamic mapOfInt = #C31;
+static const field core::bool isMapOfInt = #C9;
+static const field dynamic listOfListOfInt = #C32;
+static const field core::bool isListOfListOfInt = #C9;
+static const field dynamic setOfSetOfInt = #C33;
+static const field core::bool isSetOfSetOfInt = #C9;
+static const field dynamic mapOfMapOfInt1 = #C34;
+static const field dynamic mapOfMapOfInt2 = #C35;
+static const field core::bool isMapOfMapOfInt1 = #C9;
+static const field core::bool isMapOfMapOfInt2 = #C9;
+static const field core::Symbol symbolWithUnevaluatedParameter = #C37;
+static const field core::Symbol symbolWithInvalidName = #C38;
+static const field self::Class<self::B>? c0 = #C44;
 static const field self::Class<self::A>? c1 = invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:100:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'.
  - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'.
   const Class.method(T t) : this(-t);
                                  ^";
-static const field self::Subclass<self::B>? c2 = #C35;
-static const field self::Class<self::A>? c3 = #C36;
-static const field self::Class<self::B>? c4 = #C37;
-static const field self::Subclass<self::A>? c5 = #C38;
-static const field self::Subclass<self::B>? c6 = #C39;
-static const field core::Type f = #C40;
-static field self::ConstClassWithF constClassWithF1 = #C42;
-static const field self::ConstClassWithF constClassWithF2 = #C42;
-static const field core::bool unevaluatedBool = #C43;
-static const field core::bool notUnevaluatedBool = #C44;
-static const field core::bool? unevaluatedBoolOrNull = #C45;
-static const field core::bool unevaluatedBoolNotNull = #C46;
-static method procedure(core::int i, {core::int named = #C9}) → core::int
+static const field self::Subclass<self::B>? c2 = #C49;
+static const field self::Class<self::A>? c3 = #C53;
+static const field self::Class<self::B>? c4 = #C58;
+static const field self::Subclass<self::A>? c5 = #C63;
+static const field self::Subclass<self::B>? c6 = #C68;
+static const field core::Type f = #C69;
+static field self::ConstClassWithF constClassWithF1 = #C71;
+static const field self::ConstClassWithF constClassWithF2 = #C71;
+static const field core::bool unevaluatedBool = #C72;
+static const field core::bool notUnevaluatedBool = #C73;
+static const field core::bool? unevaluatedBoolOrNull = #C75;
+static const field core::bool unevaluatedBoolNotNull = #C76;
+static method procedure(core::int i, {core::int named = #C10}) → core::int
   return i;
 static method main() → dynamic {
-  core::print(#C47);
+  core::print(#C44);
   core::print(invalid-expression "pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:100:34: Error: The argument type 'A' can't be assigned to the parameter type 'T'.
  - 'A' is from 'pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart'.
   const Class.method(T t) : this(-t);
                                  ^");
-  core::print(#C48);
   core::print(#C49);
-  core::print(#C50);
-  core::print(#C51);
-  core::print(#C52);
   core::print(#C53);
-  core::print(#C53.{self::Foo::saved}{core::bool});
-  core::print(#C53.{self::Foo::value}{core::int});
+  core::print(#C58);
+  core::print(#C63);
+  core::print(#C68);
+  core::print(#C23);
+  core::print(#C23.{self::Foo::saved}{core::bool});
+  core::print(#C23.{self::Foo::value}{core::int});
 }
 
 library /*isNonNullableByDefault*/;
 import self as self2;
 import "dart:core" as core;
 
-static const field core::int x = #C19;
+static const field core::int x = #C22;
 
 constants  {
   #C1 = "foo"
   #C2 = "bar"
-  #C3 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2))
-  #C6 = eval const core::bool::fromEnvironment(#C2)
+  #C3 = eval const core::bool::fromEnvironment(#C2)
+  #C4 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
+  #C5 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
+  #C6 = eval const core::bool::fromEnvironment(#C1, defaultValue: #C3)
   #C7 = eval const core::bool::hasEnvironment(#C2)
-  #C8 = true
-  #C9 = null
-  #C10 = eval const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9
-  #C11 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C12 = eval !const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C13 = false
-  #C14 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) ?{core::bool} #C8 : #C13
-  #C15 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) == null ?{core::bool} #C8 : const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!)
-  #C16 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) && #C8
-  #C17 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C8
-  #C18 = eval const core::bool::fromEnvironment(#C2, defaultValue: (const core::bool::fromEnvironment(#C2) ?{core::bool?} #C8 : #C9)!) || #C13
-  #C19 = 42
-  #C20 = eval self::Foo<core::int*>{saved:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), saved2:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), initialized:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), value:#C19}
-  #C21 = eval const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8
-  #C22 = eval (const core::bool::fromEnvironment(#C1) ?{core::Object} #C19 : #C8) is{ForNonNullableByDefault} core::int ?{core::bool} #C8 : #C13
-  #C23 = <Null>[#C9]
-  #C24 = <core::int*>[#C19]
-  #C25 = <core::int*>{#C19}
-  #C26 = <core::int*, core::int*>{#C19:#C19)
-  #C27 = <core::List<core::int*>*>[#C24]
-  #C28 = <core::Set<core::int*>*>{#C25}
-  #C29 = <core::Map<core::int*, core::int*>*, core::int*>{#C26:#C19)
-  #C30 = <core::int*, core::Map<core::int*, core::int*>*>{#C19:#C26)
-  #C31 = eval const _in::Symbol::•(const core::String::fromEnvironment(#C1))
-  #C32 = #42
-  #C33 = "x"
-  #C34 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C35 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C36 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::A>?} #C9 : self::Class<self::A*>{self::A{}}
-  #C37 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C38 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::A>?} #C9 : self::Subclass<self::A*>{(self::A{}) as{ForNonNullableByDefault} self::A*}
-  #C39 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C40 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
-  #C41 = static-tearoff self::procedure
-  #C42 = self::ConstClassWithF {foo:#C41}
-  #C43 = eval const core::bool::fromEnvironment(#C1)
-  #C44 = eval !const core::bool::fromEnvironment(#C1)
-  #C45 = eval const core::bool::fromEnvironment(#C2) ?{core::bool?} const core::bool::fromEnvironment(#C1) : #C9
-  #C46 = eval (const core::bool::fromEnvironment(#C2) ?{core::bool?} const core::bool::fromEnvironment(#C1) : #C9)!
-  #C47 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C48 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::C{}) as{ForNonNullableByDefault} self::B*}
-  #C49 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::A>?} #C9 : self::Class<self::A*>{self::A{}}
-  #C50 = eval const core::bool::fromEnvironment(#C33) ?{self::Class<self::B>?} #C9 : self::Class<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C51 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::A>?} #C9 : self::Subclass<self::A*>{(self::A{}) as{ForNonNullableByDefault} self::A*}
-  #C52 = eval const core::bool::fromEnvironment(#C33) ?{self::Subclass<self::B>?} #C9 : self::Subclass<self::B*>{(self::B{}) as{ForNonNullableByDefault} self::B*}
-  #C53 = eval self::Foo<core::int*>{saved:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), saved2:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), initialized:const core::bool::fromEnvironment(#C1, defaultValue: const core::bool::fromEnvironment(#C2)), value:#C19}
+  #C8 = eval const core::bool::fromEnvironment(#C2)
+  #C9 = true
+  #C10 = null
+  #C11 = eval #C8 ?{core::bool?} #C9 : #C10
+  #C12 = eval #C11!
+  #C13 = eval const core::bool::fromEnvironment(#C2, defaultValue: #C12)
+  #C14 = eval !#C13
+  #C15 = false
+  #C16 = eval #C13 ?{core::bool} #C9 : #C15
+  #C17 = eval #C13 == null
+  #C18 = eval #C17 ?{core::bool} #C9 : #C13
+  #C19 = eval #C13 && #C9
+  #C20 = eval #C13 || #C9
+  #C21 = eval #C13 || #C15
+  #C22 = 42
+  #C23 = eval self::Foo<core::int*>{saved:#C6, saved2:#C5, initialized:#C4, value:#C22}
+  #C24 = eval const core::bool::fromEnvironment(#C1)
+  #C25 = eval #C24 ?{core::Object} #C22 : #C9
+  #C26 = eval #C25 is{ForNonNullableByDefault} core::int
+  #C27 = eval #C26 ?{core::bool} #C9 : #C15
+  #C28 = <Null>[#C10]
+  #C29 = <core::int*>[#C22]
+  #C30 = <core::int*>{#C22}
+  #C31 = <core::int*, core::int*>{#C22:#C22)
+  #C32 = <core::List<core::int*>*>[#C29]
+  #C33 = <core::Set<core::int*>*>{#C30}
+  #C34 = <core::Map<core::int*, core::int*>*, core::int*>{#C31:#C22)
+  #C35 = <core::int*, core::Map<core::int*, core::int*>*>{#C22:#C31)
+  #C36 = eval const core::String::fromEnvironment(#C1)
+  #C37 = eval const _in::Symbol::•(#C36)
+  #C38 = #42
+  #C39 = "x"
+  #C40 = eval const core::bool::fromEnvironment(#C39)
+  #C41 = eval self::C{}
+  #C42 = eval #C41 as{ForNonNullableByDefault} self::B*
+  #C43 = eval self::Class<self::B*>{#C42}
+  #C44 = eval #C40 ?{self::Class<self::B>?} #C10 : #C43
+  #C45 = eval const core::bool::fromEnvironment(#C39)
+  #C46 = eval self::C{}
+  #C47 = eval #C46 as{ForNonNullableByDefault} self::B*
+  #C48 = eval self::Subclass<self::B*>{#C47}
+  #C49 = eval #C45 ?{self::Subclass<self::B>?} #C10 : #C48
+  #C50 = eval const core::bool::fromEnvironment(#C39)
+  #C51 = eval self::A{}
+  #C52 = eval self::Class<self::A*>{#C51}
+  #C53 = eval #C50 ?{self::Class<self::A>?} #C10 : #C52
+  #C54 = eval const core::bool::fromEnvironment(#C39)
+  #C55 = eval self::B{}
+  #C56 = eval #C55 as{ForNonNullableByDefault} self::B*
+  #C57 = eval self::Class<self::B*>{#C56}
+  #C58 = eval #C54 ?{self::Class<self::B>?} #C10 : #C57
+  #C59 = eval const core::bool::fromEnvironment(#C39)
+  #C60 = eval self::A{}
+  #C61 = eval #C60 as{ForNonNullableByDefault} self::A*
+  #C62 = eval self::Subclass<self::A*>{#C61}
+  #C63 = eval #C59 ?{self::Subclass<self::A>?} #C10 : #C62
+  #C64 = eval const core::bool::fromEnvironment(#C39)
+  #C65 = eval self::B{}
+  #C66 = eval #C65 as{ForNonNullableByDefault} self::B*
+  #C67 = eval self::Subclass<self::B*>{#C66}
+  #C68 = eval #C64 ?{self::Subclass<self::B>?} #C10 : #C67
+  #C69 = TypeLiteralConstant((core::int*, {named: core::int*}) →* core::int*)
+  #C70 = static-tearoff self::procedure
+  #C71 = self::ConstClassWithF {foo:#C70}
+  #C72 = eval const core::bool::fromEnvironment(#C1)
+  #C73 = eval !#C72
+  #C74 = eval const core::bool::fromEnvironment(#C2)
+  #C75 = eval #C74 ?{core::bool?} #C72 : #C10
+  #C76 = eval #C75!
 }
 
 Extra constant evaluation status:
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:32:27 -> BoolConstant(false)
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:33:21 -> BoolConstant(false)
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:28:13 -> BoolConstant(false)
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:110:38 -> InstanceConstant(const Class<A*>{})
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:111:38 -> InstanceConstant(const Class<B*>{})
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:112:38 -> InstanceConstant(const Subclass<A*>{})
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:113:38 -> InstanceConstant(const Subclass<B*>{})
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:37:17 -> InstanceConstant(const Foo<int*>{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42})
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:37:17 -> InstanceConstant(const Foo<int*>{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42})
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:37:17 -> InstanceConstant(const Foo<int*>{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:137:9 -> InstanceConstant(const Class<A*>{})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:138:9 -> InstanceConstant(const Class<B*>{})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:139:9 -> InstanceConstant(const Subclass<A*>{})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:140:9 -> InstanceConstant(const Subclass<B*>{})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:141:9 -> InstanceConstant(const Foo<int*>{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:142:9 -> InstanceConstant(const Foo<int*>{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42})
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:143:9 -> InstanceConstant(const Foo<int*>{Foo.saved: false, Foo.saved2: false, Foo.initialized: false, Foo.value: 42})
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:7:31 -> BoolConstant(false)
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:8:30 -> BoolConstant(false)
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various.dart:9:67 -> NullConstant(null)
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect
index d4686ed..31bfc1b 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.expect
@@ -23,7 +23,7 @@
 static const field core::Set<core::int> setConcatenation = #C13;
 static const field core::Map<core::int, core::String> mapConcatenation = #C16;
 static const field core::bool objectTypeLiteralIdentical = #C19;
-static const field core::bool partialInstantiationIdentical = #C21;
+static const field core::bool partialInstantiationIdentical = #C25;
 static const field core::bool instanceIdentical = #C19;
 static const field core::bool instance2Identical = #C19;
 static const field core::bool functionTypeLiteralIdentical = #C19;
@@ -39,7 +39,7 @@
 static const field core::bool mapConcatenationIdentical = #C19;
 static method main() → dynamic {
   self::test(#C1, #C1);
-  self::test(#C3, #C22);
+  self::test(#C3, #C24);
   self::test(#C5, #C5);
   self::test(#C9, #C9);
   self::test(#C10, #C10);
@@ -50,7 +50,7 @@
   self::test(#C13, #C13);
   self::test(#C16, #C16);
   self::test(true, #C19);
-  self::test(true, #C21);
+  self::test(true, #C25);
   self::test(true, #C19);
   self::test(true, #C19);
   self::test(true, #C19);
@@ -81,8 +81,8 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C23;
-static const field (core::int) → core::int partialInstantiation = #C22;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C26;
+static const field (core::int) → core::int partialInstantiation = #C24;
 static const field var::Class<core::int> instance = #C5;
 static const field var::Class<dynamic> instance2 = #C8;
 static const field core::Type functionTypeLiteral = #C9;
@@ -121,10 +121,13 @@
   #C17 = null
   #C18 = <dynamic, dynamic>{#C7:#C15, #C17:#C7)
   #C19 = true
-  #C20 = static-tearoff var::id2
-  #C21 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
-  #C22 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
-  #C23 = static-tearoff core::identical
+  #C20 = eval const core::bool::fromEnvironment(#C15)
+  #C21 = eval #C2<core::int>
+  #C22 = static-tearoff var::id2
+  #C23 = eval #C22<core::int>
+  #C24 = eval #C20 ?{(core::int) → core::int} #C21 : #C23
+  #C25 = eval const core::identical(#C3, #C24)
+  #C26 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.modular.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.modular.expect
index d4686ed..31bfc1b 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.modular.expect
@@ -23,7 +23,7 @@
 static const field core::Set<core::int> setConcatenation = #C13;
 static const field core::Map<core::int, core::String> mapConcatenation = #C16;
 static const field core::bool objectTypeLiteralIdentical = #C19;
-static const field core::bool partialInstantiationIdentical = #C21;
+static const field core::bool partialInstantiationIdentical = #C25;
 static const field core::bool instanceIdentical = #C19;
 static const field core::bool instance2Identical = #C19;
 static const field core::bool functionTypeLiteralIdentical = #C19;
@@ -39,7 +39,7 @@
 static const field core::bool mapConcatenationIdentical = #C19;
 static method main() → dynamic {
   self::test(#C1, #C1);
-  self::test(#C3, #C22);
+  self::test(#C3, #C24);
   self::test(#C5, #C5);
   self::test(#C9, #C9);
   self::test(#C10, #C10);
@@ -50,7 +50,7 @@
   self::test(#C13, #C13);
   self::test(#C16, #C16);
   self::test(true, #C19);
-  self::test(true, #C21);
+  self::test(true, #C25);
   self::test(true, #C19);
   self::test(true, #C19);
   self::test(true, #C19);
@@ -81,8 +81,8 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C23;
-static const field (core::int) → core::int partialInstantiation = #C22;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C26;
+static const field (core::int) → core::int partialInstantiation = #C24;
 static const field var::Class<core::int> instance = #C5;
 static const field var::Class<dynamic> instance2 = #C8;
 static const field core::Type functionTypeLiteral = #C9;
@@ -121,10 +121,13 @@
   #C17 = null
   #C18 = <dynamic, dynamic>{#C7:#C15, #C17:#C7)
   #C19 = true
-  #C20 = static-tearoff var::id2
-  #C21 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
-  #C22 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
-  #C23 = static-tearoff core::identical
+  #C20 = eval const core::bool::fromEnvironment(#C15)
+  #C21 = eval #C2<core::int>
+  #C22 = static-tearoff var::id2
+  #C23 = eval #C22<core::int>
+  #C24 = eval #C20 ?{(core::int) → core::int} #C21 : #C23
+  #C25 = eval const core::identical(#C3, #C24)
+  #C26 = static-tearoff core::identical
 }
 
 
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect
index 43ae6e3..3aec2ef 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various_2.dart.weak.transformed.expect
@@ -23,7 +23,7 @@
 static const field core::Set<core::int> setConcatenation = #C13;
 static const field core::Map<core::int, core::String> mapConcatenation = #C16;
 static const field core::bool objectTypeLiteralIdentical = #C19;
-static const field core::bool partialInstantiationIdentical = #C21;
+static const field core::bool partialInstantiationIdentical = #C25;
 static const field core::bool instanceIdentical = #C19;
 static const field core::bool instance2Identical = #C19;
 static const field core::bool functionTypeLiteralIdentical = #C19;
@@ -39,7 +39,7 @@
 static const field core::bool mapConcatenationIdentical = #C19;
 static method main() → dynamic {
   self::test(#C1, #C1);
-  self::test(#C3, #C22);
+  self::test(#C3, #C24);
   self::test(#C5, #C5);
   self::test(#C9, #C9);
   self::test(#C10, #C10);
@@ -50,7 +50,7 @@
   self::test(#C13, #C13);
   self::test(#C16, #C16);
   self::test(true, #C19);
-  self::test(true, #C23);
+  self::test(true, #C25);
   self::test(true, #C19);
   self::test(true, #C19);
   self::test(true, #C19);
@@ -81,8 +81,8 @@
     ;
 }
 static const field core::Type objectTypeLiteral = #C1;
-static const field (core::Object?, core::Object?) → core::bool c2 = #C24;
-static const field (core::int) → core::int partialInstantiation = #C25;
+static const field (core::Object?, core::Object?) → core::bool c2 = #C26;
+static const field (core::int) → core::int partialInstantiation = #C24;
 static const field var::Class<core::int> instance = #C5;
 static const field var::Class<dynamic> instance2 = #C8;
 static const field core::Type functionTypeLiteral = #C9;
@@ -121,17 +121,18 @@
   #C17 = null
   #C18 = <dynamic, dynamic>{#C7:#C15, #C17:#C7)
   #C19 = true
-  #C20 = static-tearoff var::id2
-  #C21 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
-  #C22 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
-  #C23 = eval const core::identical(#C3, const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>)
-  #C24 = static-tearoff core::identical
-  #C25 = eval const core::bool::fromEnvironment(#C15) ?{(core::int) → core::int} #C2<core::int> : #C20<core::int>
+  #C20 = eval const core::bool::fromEnvironment(#C15)
+  #C21 = eval #C2<core::int>
+  #C22 = static-tearoff var::id2
+  #C23 = eval #C22<core::int>
+  #C24 = eval #C20 ?{(core::int) → core::int} #C21 : #C23
+  #C25 = eval const core::identical(#C3, #C24)
+  #C26 = static-tearoff core::identical
 }
 
 Extra constant evaluation status:
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:15:28 -> InstantiationConstant(id2<int*>)
-Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:37:5 -> BoolConstant(false)
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:59:34 -> InstantiationConstant(id2<int*>)
+Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:71:14 -> BoolConstant(false)
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2.dart:37:5 -> BoolConstant(false)
 Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///various_2_lib.dart:20:39 -> InstantiationConstant(id2<int*>)
 Extra constant evaluation: evaluated: 41, effectively constant: 4
diff --git a/pkg/front_end/testcases/incremental/changing_modules.yaml b/pkg/front_end/testcases/incremental/changing_modules.yaml
index 534a0f4..e6638ae 100644
--- a/pkg/front_end/testcases/incremental/changing_modules.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules.yaml
@@ -22,8 +22,16 @@
       b() {
         a();
       }
-    example_0.1.0/.packages: |
-      example:.
+    example_0.1.0/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "example",
+            "rootUri": ".."
+          }
+        ]
+      }
   example_0.1.1:
     example_0.1.1/b.dart: |
       // @dart=2.9
@@ -31,8 +39,16 @@
         print("Hello from v0.1.1");
       }
       bool example011 = true;
-    example_0.1.1/.packages: |
-      example:.
+    example_0.1.1/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "example",
+            "rootUri": ".."
+          }
+        ]
+      }
   foo_1:
     foo_1/foo.dart: |
       // @dart=2.9
@@ -42,9 +58,20 @@
         b();
       }
       bool foo1 = true;
-    foo_1/.packages: |
-      foo:.
-      example:../example_0.1.0
+    foo_1/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "foo",
+            "rootUri": ".."
+          },
+          {
+            "name": "example",
+            "rootUri": "../../example_0.1.0"
+          }
+        ]
+      }
   foo_2:
     foo_2/foo.dart: |
       // @dart=2.9
@@ -68,9 +95,20 @@
       baz() {
         print("hello from baz");
       }
-    foo_2/.packages: |
-      foo:.
-      example:../example_0.1.1
+    foo_2/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "foo",
+            "rootUri": ".."
+          },
+          {
+            "name": "example",
+            "rootUri": "../../example_0.1.1"
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -82,7 +120,16 @@
           print("hello");
           b();
         }
-      .packages: example:example_0.1.0
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../example_0.1.0"
+            }
+          ]
+        }
     modules:
       - example_0.1.0
     expectedLibraryCount: 3
@@ -108,9 +155,20 @@
           print("hello");
           foo();
         }
-      .packages: |
-        example:example_0.1.0
-        foo:foo_1
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../example_0.1.0"
+            },
+            {
+              "name": "foo",
+              "rootUri": "../foo_1"
+            }
+          ]
+        }
     modules:
       - example_0.1.0
       - foo_1
@@ -139,9 +197,20 @@
           print("hello");
           foo();
         }
-      .packages: |
-        example:example_0.1.1
-        foo:foo_2
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../example_0.1.1"
+            },
+            {
+              "name": "foo",
+              "rootUri": "../foo_2"
+            }
+          ]
+        }
     modules:
       - example_0.1.1
       - foo_2
diff --git a/pkg/front_end/testcases/incremental/changing_modules_10.yaml b/pkg/front_end/testcases/incremental/changing_modules_10.yaml
index 1cdaafd..e81be38 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_10.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_10.yaml
@@ -18,8 +18,16 @@
     module/b.dart: |
       // @dart=2.9
       class B { }
-    module/.packages: |
-      module:.
+    module/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "module",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -28,8 +36,16 @@
         // @dart=2.9
         import 'package:module/a.dart';
         class Foo extends A {}
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 3
diff --git a/pkg/front_end/testcases/incremental/changing_modules_11.yaml b/pkg/front_end/testcases/incremental/changing_modules_11.yaml
index aedd5d0..e433d98 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_11.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_11.yaml
@@ -18,8 +18,16 @@
     module/b.dart: |
       // @dart=2.9
       class B { }
-    module/.packages: |
-      module:.
+    module/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "module",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -28,8 +36,16 @@
         // @dart=2.9
         import 'package:module/a.dart';
         class Foo extends A {}
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 3
diff --git a/pkg/front_end/testcases/incremental/changing_modules_12.yaml b/pkg/front_end/testcases/incremental/changing_modules_12.yaml
index c8f1cae..082cc0a 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_12.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_12.yaml
@@ -24,8 +24,16 @@
       // @dart=2.9
       import 'package:module/c.dart';
       class D { }
-    module/.packages: |
-      module:.
+    module/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "module",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -33,8 +41,16 @@
       main.dart: |
         // @dart=2.9
         class Foo {}
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental/changing_modules_13.yaml b/pkg/front_end/testcases/incremental/changing_modules_13.yaml
index 5d042e9..d92b7ca 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_13.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_13.yaml
@@ -14,8 +14,16 @@
       class B { }
       class C { }
       class AB = A with B;
-    module/.packages: |
-      module:.
+    module/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "module",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -24,8 +32,16 @@
         // @dart=2.9
         import "package:module/a.dart";
         class ABC = AB with C;
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/changing_modules_14.yaml b/pkg/front_end/testcases/incremental/changing_modules_14.yaml
index 641accf..77d4395 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_14.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_14.yaml
@@ -12,16 +12,37 @@
 modules:
   moduleC:
     moduleC/lib.dart: |
+      // @dart=2.9
       const constC = ['value_c'];
-    moduleC/.packages: |
-      moduleC:.
+    moduleC/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleC",
+            "rootUri": ".."
+          }
+        ]
+      }
   moduleB:
     moduleB/lib.dart: |
+      // @dart=2.9
       import "package:moduleC/lib.dart";
       const constB = ['value_b', constC];
-    moduleB/.packages: |
-      moduleB:.
-      moduleC:../moduleC
+    moduleB/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleB",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleC",
+            "rootUri": "../../moduleC"
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -33,9 +54,20 @@
         const constLib = constFromLib;
       lib.dart: |
         const constFromLib = 42;
-      .packages: |
-        moduleB:moduleB
-        moduleC:moduleC
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "moduleB",
+              "rootUri": "../moduleB"
+            },
+            {
+              "name": "moduleC",
+              "rootUri": "../moduleC"
+            }
+          ]
+        }
     modules:
       - moduleB
       - moduleC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_15.yaml b/pkg/front_end/testcases/incremental/changing_modules_15.yaml
index d0753b8..f1c4102 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_15.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_15.yaml
@@ -12,16 +12,37 @@
 modules:
   moduleC:
     moduleC/lib.dart: |
+      // @dart=2.9
       const constC = true;
-    moduleC/.packages: |
-      moduleC:.
+    moduleC/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleC",
+            "rootUri": ".."
+          }
+        ]
+      }
   moduleB:
     moduleB/lib.dart: |
+      // @dart=2.9
       import "package:moduleC/lib.dart";
       const constB = false || constC;
-    moduleB/.packages: |
-      moduleB:.
-      moduleC:../moduleC
+    moduleB/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleB",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleC",
+            "rootUri": "../../moduleC"
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -29,9 +50,20 @@
       main.dart: |
         import 'package:moduleB/lib.dart';
         const constA = true && constB;
-      .packages: |
-        moduleB:moduleB
-        moduleC:moduleC
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "moduleB",
+              "rootUri": "../moduleB"
+            },
+            {
+              "name": "moduleC",
+              "rootUri": "../moduleC"
+            }
+          ]
+        }
     modules:
       - moduleB
       - moduleC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_2.yaml b/pkg/front_end/testcases/incremental/changing_modules_2.yaml
index b8db340..a73afd8 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_2.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_2.yaml
@@ -12,22 +12,50 @@
       // @dart=2.9
       a() {}
       var example = true;
-    example_1/.packages: |
-      example:.
+    example_1/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "example",
+            "rootUri": ".."
+          }
+        ]
+      }
   example_2:
     example_2/a.dart: |
       // @dart=2.9
       a() {}
       var example = true;
-    example_2/.packages: |
-      example:.
+    example_2/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "example",
+            "rootUri": ".."
+          }
+        ]
+      }
   foo:
     foo/foo.dart: |
+      // @dart=2.9
       export "package:example/a.dart";
       var foo = true;
-    foo/.packages: |
-      foo:.
-      example:../example_1
+    foo/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "foo",
+            "rootUri": ".."
+          },
+          {
+            "name": "example",
+            "rootUri": "../../example_1"
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -38,9 +66,20 @@
           print("hello");
           a();
         }
-      .packages: |
-        foo:foo
-        example:example_1
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": "../foo"
+            },
+            {
+              "name": "example",
+              "rootUri": "../../example_1"
+            }
+          ]
+        }
     modules:
       - foo
       - example_1
@@ -60,9 +99,20 @@
     worldType: updated
     expectInitializeFromDill: false
     sources:
-      .packages: |
-        foo:foo
-        example:example_2
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": "../foo"
+            },
+            {
+              "name": "example",
+              "rootUri": "../../example_2"
+            }
+          ]
+        }
     modules:
       - foo
       - example_2
diff --git a/pkg/front_end/testcases/incremental/changing_modules_3.yaml b/pkg/front_end/testcases/incremental/changing_modules_3.yaml
index fdfb2a6..b8e864b 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_3.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_3.yaml
@@ -11,14 +11,30 @@
     foo/foo.dart: |
       // @dart=2.9
       var foo = true;
-    foo/.packages: |
-      foo:.
+    foo/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "foo",
+            "rootUri": ".."
+          }
+        ]
+      }
   foo2:
     foo2/foo.dart: |
       // @dart=2.9
       var foo2 = true;
-    foo2/.packages: |
-      foo:.
+    foo2/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "foo",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -30,8 +46,16 @@
         main() {
           print(foo);
         }
-      .packages: |
-        foo:foo
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": "../foo"
+            }
+          ]
+        }
     modules:
       - foo
     expectedLibraryCount: 2
@@ -55,8 +79,16 @@
         main() {
           print(foo2);
         }
-      .packages: |
-        foo:foo2
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": "../foo2"
+            }
+          ]
+        }
     modules:
       - foo2
     expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/changing_modules_4.yaml b/pkg/front_end/testcases/incremental/changing_modules_4.yaml
index 98ba2fa..3e155a2 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_4.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_4.yaml
@@ -19,10 +19,24 @@
       class A2 extends A3 {
         int bar = 42;
       }
-    moduleB/.packages: |
-      moduleB:.
-      moduleC:../moduleC
-      moduleD:../moduleD
+    moduleB/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleB",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleC",
+            "rootUri": "../../moduleC"
+          },
+          {
+            "name": "moduleD",
+            "rootUri": "../../moduleD"
+          }
+        ]
+      }
   moduleC:
     moduleC/c.dart: |
       // @dart=2.9
@@ -34,15 +48,34 @@
       class A3 {
         int foo = 42;
       }
-    moduleC/.packages: |
-      moduleC:.
-      moduleD:../moduleD
+    moduleC/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleC",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleD",
+            "rootUri": "../../moduleD"
+          }
+        ]
+      }
   moduleD:
     moduleD/d.dart: |
       // @dart=2.9
       String baz3 = "baz3";
-    moduleD/.packages: |
-      moduleD:.
+    moduleD/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleD",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: a.dart
     fromComponent: true
@@ -53,10 +86,24 @@
 
         String foo = baz;
         var x = mya2.bar;
-      .packages: |
-        moduleB:moduleB
-        moduleC:moduleC
-        moduleD:moduleD
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "moduleB",
+              "rootUri": "../moduleB"
+            },
+            {
+              "name": "moduleC",
+              "rootUri": "../moduleC"
+            },
+            {
+              "name": "moduleD",
+              "rootUri": "../moduleD"
+            }
+          ]
+        }
     modules:
       - moduleB
       - moduleC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_5.yaml b/pkg/front_end/testcases/incremental/changing_modules_5.yaml
index b044f03..4cd4a5f 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_5.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_5.yaml
@@ -20,10 +20,24 @@
       class A2 extends A3 {
         int bar = 42;
       }
-    moduleB/.packages: |
-      moduleB:.
-      moduleC:../moduleC
-      moduleD:../moduleD
+    moduleB/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleB",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleC",
+            "rootUri": "../../moduleC"
+          },
+          {
+            "name": "moduleD",
+            "rootUri": "../../moduleD"
+          }
+        ]
+      }
   moduleC:
     moduleC/c.dart: |
       // @dart=2.9
@@ -35,15 +49,34 @@
       class A3 {
         int foo = 42;
       }
-    moduleC/.packages: |
-      moduleC:.
-      moduleD:../moduleD
+    moduleC/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleC",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleD",
+            "rootUri": "../../moduleD"
+          }
+        ]
+      }
   moduleD:
     moduleD/d.dart: |
       // @dart=2.9
       String baz3 = "baz3";
-    moduleD/.packages: |
-      moduleD:.
+    moduleD/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleD",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: a.dart
     fromComponent: true
@@ -54,10 +87,24 @@
 
         var foo = bVar;
         var foo2 = bVarFromC;
-      .packages: |
-        moduleB:moduleB
-        moduleC:moduleC
-        moduleD:moduleD
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "moduleB",
+              "rootUri": "../moduleB"
+            },
+            {
+              "name": "moduleC",
+              "rootUri": "../moduleC"
+            },
+            {
+              "name": "moduleD",
+              "rootUri": "../moduleD"
+            }
+          ]
+        }
     modules:
       - moduleB
       - moduleC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_6.yaml b/pkg/front_end/testcases/incremental/changing_modules_6.yaml
index c66ca3b..ee9094b 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_6.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_6.yaml
@@ -20,10 +20,24 @@
       class A2 extends A3 {
         int bar = 42;
       }
-    moduleB/.packages: |
-      moduleB:.
-      moduleC:../moduleC
-      moduleD:../moduleD
+    moduleB/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleB",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleC",
+            "rootUri": "../../moduleC"
+          },
+          {
+            "name": "moduleD",
+            "rootUri": "../../moduleD"
+          }
+        ]
+      }
   moduleC:
     moduleC/c.dart: |
       // @dart=2.9
@@ -35,15 +49,34 @@
       class A3 {
         int foo = 42;
       }
-    moduleC/.packages: |
-      moduleC:.
-      moduleD:../moduleD
+    moduleC/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleC",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleD",
+            "rootUri": "../../moduleD"
+          }
+        ]
+      }
   moduleD:
     moduleD/d.dart: |
       // @dart=2.9
       String baz3 = "baz3";
-    moduleD/.packages: |
-      moduleD:.
+    moduleD/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleD",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: a.dart
     fromComponent: true
@@ -58,10 +91,24 @@
         class A1 extends A2 {
           String fooMethod() => "42!";
         }
-      .packages: |
-        moduleB:moduleB
-        moduleC:moduleC
-        moduleD:moduleD
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "moduleB",
+              "rootUri": "../moduleB"
+            },
+            {
+              "name": "moduleC",
+              "rootUri": "../moduleC"
+            },
+            {
+              "name": "moduleD",
+              "rootUri": "../moduleD"
+            }
+          ]
+        }
     modules:
       - moduleB
       - moduleC
diff --git a/pkg/front_end/testcases/incremental/changing_modules_7.yaml b/pkg/front_end/testcases/incremental/changing_modules_7.yaml
index f718f14..28632d3 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_7.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_7.yaml
@@ -36,9 +36,18 @@
         String str() {}
       }
     module/lib4.dart: |
+      // @dart=2.9
       class Class4 {}
-    module/.packages: |
-      module:.
+    module/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "module",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: compileme.dart
     fromComponent: true
@@ -60,8 +69,16 @@
             return class1;
           }
         }
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 5
@@ -105,8 +122,16 @@
             return class1;
           }
         }
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 5
diff --git a/pkg/front_end/testcases/incremental/changing_modules_8.yaml b/pkg/front_end/testcases/incremental/changing_modules_8.yaml
index 42de9b4..118080c 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_8.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_8.yaml
@@ -31,8 +31,16 @@
       class XIdentityHashSet implements XLinkedHashSet {
         XIdentityHashSet();
       }
-    module/.packages: |
-      module:.
+    module/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "module",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: compileme.dart
     fromComponent: true
@@ -44,8 +52,16 @@
         main() {
           XSet history = new XSet.identity();
         }
-      .packages: |
-        module:module
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "module",
+              "rootUri": "../module"
+            }
+          ]
+        }
     modules:
       - module
     expectedLibraryCount: 4
diff --git a/pkg/front_end/testcases/incremental/changing_modules_9.yaml b/pkg/front_end/testcases/incremental/changing_modules_9.yaml
index 85ef80a..e267a81 100644
--- a/pkg/front_end/testcases/incremental/changing_modules_9.yaml
+++ b/pkg/front_end/testcases/incremental/changing_modules_9.yaml
@@ -14,17 +14,36 @@
       export 'package:moduleB/b.dart';
 
       class A { }
-    moduleA/.packages: |
-      moduleA:.
-      moduleB:../moduleB
+    moduleA/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleA",
+            "rootUri": ".."
+          },
+          {
+            "name": "moduleB",
+            "rootUri": "../../moduleB"
+          }
+        ]
+      }
   moduleB:
     moduleB/b.dart: |
       // @dart=2.9
       class B {
         int foo = 42;
       }
-    moduleB/.packages: |
-      moduleB:.
+    moduleB/.dart_tool/package_config.json: |
+      {
+        "configVersion": 2,
+        "packages": [
+          {
+            "name": "moduleB",
+            "rootUri": ".."
+          }
+        ]
+      }
 worlds:
   - entry: main.dart
     fromComponent: true
@@ -36,9 +55,20 @@
         main() {
           A a = new A();
         }
-      .packages: |
-        moduleA:moduleA
-        moduleB:moduleB
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "moduleA",
+              "rootUri": "../moduleA"
+            },
+            {
+              "name": "moduleB",
+              "rootUri": "../moduleB"
+            }
+          ]
+        }
     modules:
       - moduleA
       - moduleB
diff --git a/pkg/front_end/testcases/incremental/cleans_up_uritosource_unreferenced_package_library.yaml b/pkg/front_end/testcases/incremental/cleans_up_uritosource_unreferenced_package_library.yaml
index 4e07d25..ea47771 100644
--- a/pkg/front_end/testcases/incremental/cleans_up_uritosource_unreferenced_package_library.yaml
+++ b/pkg/front_end/testcases/incremental/cleans_up_uritosource_unreferenced_package_library.yaml
@@ -2,16 +2,25 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE.md file.
 
-# Compile an application with a package. Update the world so that the .packages
-# no longer reference the package (and the source no longe ruse it) and
-# recompile. The now no longer referenced package library should also have been
-# removed from the uri to sources.
+# Compile an application with a package. Update the world so that the
+# .dart_tool/package_config.json no longer reference the package (and the source
+# no longer use it) and recompile. The now no longer referenced package library
+# should also have been removed from the uri to sources.
 
 type: newworld
 worlds:
   - entry: main.dart
     sources:
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         import "package:example/b.dart";
@@ -24,10 +33,14 @@
     worldType: updated
     invalidate:
       - main.dart
-      - .packages
+      - .dart_tool/package_config.json
     expectInitializeFromDill: false
     sources:
-      .packages: 
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": []
+        }
       main.dart: |
         // @dart=2.9
         main() {}
diff --git a/pkg/front_end/testcases/incremental/disappearing_package.yaml b/pkg/front_end/testcases/incremental/disappearing_package.yaml
index fe8d157..5349d99 100644
--- a/pkg/front_end/testcases/incremental/disappearing_package.yaml
+++ b/pkg/front_end/testcases/incremental/disappearing_package.yaml
@@ -3,8 +3,8 @@
 # BSD-style license that can be found in the LICENSE.md file.
 
 # Compile an application with a package and use it.
-# Then remove the package from .packages and remove any use of it.
-# The package is still included in the dill file we initialize from,
+# Then remove the package from .dart_tool/package_config.json and remove any use
+# of it. The package is still included in the dill file we initialize from,
 # but shouldn't cause trouble, nor be included in the output.
 
 type: newworld
@@ -23,7 +23,16 @@
         b() {
           print("b");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 2
   - entry: main.dart
     # TODO(jensj): For now we don't initialize from dill when a package was
@@ -37,5 +46,9 @@
         main() {
           print("hello");
         }
-      .packages:
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": []
+        }
     expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental/entry_not_package_url_main.yaml b/pkg/front_end/testcases/incremental/entry_not_package_url_main.yaml
index 4260828..1f881a7 100644
--- a/pkg/front_end/testcases/incremental/entry_not_package_url_main.yaml
+++ b/pkg/front_end/testcases/incremental/entry_not_package_url_main.yaml
@@ -13,7 +13,16 @@
         // @dart=2.9
         main() {
         }
-      .packages: untitled:/
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "untitled",
+              "rootUri": "/"
+            }
+          ]
+        }
     expectedLibraryCount: 1
     errors: false
     warnings: false
diff --git a/pkg/front_end/testcases/incremental/entry_not_package_url_main_with_errors.yaml b/pkg/front_end/testcases/incremental/entry_not_package_url_main_with_errors.yaml
index e7b80f2..4c8beb6 100644
--- a/pkg/front_end/testcases/incremental/entry_not_package_url_main_with_errors.yaml
+++ b/pkg/front_end/testcases/incremental/entry_not_package_url_main_with_errors.yaml
@@ -15,7 +15,16 @@
         main() {
           asdf;
         }
-      .packages: untitled:/
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "untitled",
+              "rootUri": "/"
+            }
+          ]
+        }
     expectedLibraryCount: 1
     errors: true
     warnings: false
diff --git a/pkg/front_end/testcases/incremental/entry_not_package_url_no_main.yaml b/pkg/front_end/testcases/incremental/entry_not_package_url_no_main.yaml
index 72eac40..a070cbb 100644
--- a/pkg/front_end/testcases/incremental/entry_not_package_url_no_main.yaml
+++ b/pkg/front_end/testcases/incremental/entry_not_package_url_no_main.yaml
@@ -12,7 +12,16 @@
       main.dart: |
         // @dart=2.9
         notMain() {}
-      .packages: untitled:/
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "untitled",
+              "rootUri": "/"
+            }
+          ]
+        }
     expectedLibraryCount: 1
     errors: false
     warnings: false
diff --git a/pkg/front_end/testcases/incremental/flutter_widget_transform.yaml b/pkg/front_end/testcases/incremental/flutter_widget_transform.yaml
index 0072fcb..01cc15f 100644
--- a/pkg/front_end/testcases/incremental/flutter_widget_transform.yaml
+++ b/pkg/front_end/testcases/incremental/flutter_widget_transform.yaml
@@ -51,8 +51,16 @@
           /// Optional locations of the parameters of the member at this location.
           final List<_Location> parameterLocations;
         }
-      .packages: |
-        flutter:flutter/lib
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "flutter",
+              "rootUri": "../flutter/lib"
+            }
+          ]
+        }
     expectedLibraryCount: 3
   - entry: main.dart
     worldType: updated
diff --git a/pkg/front_end/testcases/incremental/incremental_serialization_1.yaml b/pkg/front_end/testcases/incremental/incremental_serialization_1.yaml
index fa1166f..3e63911 100644
--- a/pkg/front_end/testcases/incremental/incremental_serialization_1.yaml
+++ b/pkg/front_end/testcases/incremental/incremental_serialization_1.yaml
@@ -34,9 +34,20 @@
         lib3() {
           return lib1();
         }
-      .packages: |
-        package1:package1
-        package2:package2
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "package1",
+              "rootUri": "../package1"
+            },
+            {
+              "name": "package2",
+              "rootUri": "../package2"
+            }
+          ]
+        }
     expectedLibraryCount: 4
     incrementalSerializationDoesWork: true
   - entry: main.dart
diff --git a/pkg/front_end/testcases/incremental/incremental_serialization_2.yaml b/pkg/front_end/testcases/incremental/incremental_serialization_2.yaml
index 997b737..15fb17a 100644
--- a/pkg/front_end/testcases/incremental/incremental_serialization_2.yaml
+++ b/pkg/front_end/testcases/incremental/incremental_serialization_2.yaml
@@ -36,8 +36,16 @@
         lib3() {
           return lib1();
         }
-      .packages: |
-        package1:package1
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "package1",
+              "rootUri": "../package1"
+            }
+          ]
+        }
     expectedLibraryCount: 4
     incrementalSerializationDoesWork: true
   - entry: main.dart
diff --git a/pkg/front_end/testcases/incremental/incremental_serialization_3.yaml b/pkg/front_end/testcases/incremental/incremental_serialization_3.yaml
index 775b322..e3664d7 100644
--- a/pkg/front_end/testcases/incremental/incremental_serialization_3.yaml
+++ b/pkg/front_end/testcases/incremental/incremental_serialization_3.yaml
@@ -46,10 +46,24 @@
         lib3() {
           print("lib3");
         }
-      .packages: |
-        package1:package1
-        package2:package2
-        package3:package3
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "package1",
+              "rootUri": "../package1"
+            },
+            {
+              "name": "package2",
+              "rootUri": "../package2"
+            },
+            {
+              "name": "package3",
+              "rootUri": "../package3"
+            }
+          ]
+        }
     expectedLibraryCount: 5
     incrementalSerializationDoesWork: true
   - entry: main.dart
@@ -89,9 +103,23 @@
         lib3() {
           print("lib3");
         }
-      .packages: |
-        package1:package1
-        package2:package2
-        package3:package3
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "package1",
+              "rootUri": "../package1"
+            },
+            {
+              "name": "package2",
+              "rootUri": "../package2"
+            },
+            {
+              "name": "package3",
+              "rootUri": "../package3"
+            }
+          ]
+        }
     expectedLibraryCount: 5
     incrementalSerializationDoesWork: true
diff --git a/pkg/front_end/testcases/incremental/incremental_serialization_4.yaml b/pkg/front_end/testcases/incremental/incremental_serialization_4.yaml
index a9c75d5..144fc2c 100644
--- a/pkg/front_end/testcases/incremental/incremental_serialization_4.yaml
+++ b/pkg/front_end/testcases/incremental/incremental_serialization_4.yaml
@@ -45,9 +45,20 @@
           p1();
           print("Package 2");
         }
-      .packages: |
-        package1:package1
-        package2:package2
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "package1",
+              "rootUri": "../package1"
+            },
+            {
+              "name": "package2",
+              "rootUri": "../package2"
+            }
+          ]
+        }
     expectedLibraryCount: 3
     incrementalSerializationDoesWork: true
   - entry: main.dart
@@ -86,8 +97,19 @@
           p1();
           print("Package 2");
         }
-      .packages: |
-        package1:package1v2
-        package2:package2
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "package1",
+              "rootUri": "../package1v2"
+            },
+            {
+              "name": "package2",
+              "rootUri": "../package2"
+            }
+          ]
+        }
     expectedLibraryCount: 3
     incrementalSerializationDoesWork: true
diff --git a/pkg/front_end/testcases/incremental/initialize_with_unused_package_then_use_type.yaml b/pkg/front_end/testcases/incremental/initialize_with_unused_package_then_use_type.yaml
index 6460d79..dd9cc98 100644
--- a/pkg/front_end/testcases/incremental/initialize_with_unused_package_then_use_type.yaml
+++ b/pkg/front_end/testcases/incremental/initialize_with_unused_package_then_use_type.yaml
@@ -27,7 +27,16 @@
             print("Foo!");
           }
         }
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
     expectedLibraryCount: 2
   - entry: main.dart
     invalidate:
@@ -45,7 +54,16 @@
             print("Foo!");
           }
         }
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
     expectedLibraryCount: 1
     expectInitializeFromDill: true
   - entry: main.dart
diff --git a/pkg/front_end/testcases/incremental/invalidate_package_part.yaml b/pkg/front_end/testcases/incremental/invalidate_package_part.yaml
index 7fee6d0..224d615 100644
--- a/pkg/front_end/testcases/incremental/invalidate_package_part.yaml
+++ b/pkg/front_end/testcases/incremental/invalidate_package_part.yaml
@@ -22,7 +22,16 @@
         b() {
           print("b1");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 1
   - entry: "package:example/main.dart"
     invalidate:
@@ -43,7 +52,16 @@
         b() {
           print("b2");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 1
   - entry: "package:example/main.dart"
     invalidate:
@@ -64,5 +82,14 @@
         b() {
           print("b3");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental/invalidate_package_part_2.yaml b/pkg/front_end/testcases/incremental/invalidate_package_part_2.yaml
index 2e63311..c8635e8 100644
--- a/pkg/front_end/testcases/incremental/invalidate_package_part_2.yaml
+++ b/pkg/front_end/testcases/incremental/invalidate_package_part_2.yaml
@@ -21,7 +21,16 @@
         b() {
           print("b1");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 1
   - entry: "package:example/main.dart"
     worldType: updated
@@ -37,7 +46,16 @@
         b() {
           print("b2");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 1
   - entry: "package:example/main.dart"
     worldType: updated
@@ -53,5 +71,14 @@
         b() {
           print("b3");
         }
-      .packages: example:pkg/example
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../pkg/example"
+            }
+          ]
+        }
     expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental/invalidate_package_part_as_file.yaml b/pkg/front_end/testcases/incremental/invalidate_package_part_as_file.yaml
index 4e2cd4d..b6fc99f 100644
--- a/pkg/front_end/testcases/incremental/invalidate_package_part_as_file.yaml
+++ b/pkg/front_end/testcases/incremental/invalidate_package_part_as_file.yaml
@@ -22,4 +22,13 @@
     b() {
       print("b1");
     }
-  .packages: example:pkg/example
+  .dart_tool/package_config.json: |
+    {
+      "configVersion": 2,
+      "packages": [
+        {
+          "name": "example",
+          "rootUri": "../pkg/example"
+        }
+      ]
+    }
diff --git a/pkg/front_end/testcases/incremental/invalidate_package_part_as_package.yaml b/pkg/front_end/testcases/incremental/invalidate_package_part_as_package.yaml
index 68e2d37..6519fd4 100644
--- a/pkg/front_end/testcases/incremental/invalidate_package_part_as_package.yaml
+++ b/pkg/front_end/testcases/incremental/invalidate_package_part_as_package.yaml
@@ -22,4 +22,13 @@
     b() {
       print("b1");
     }
-  .packages: example:pkg/example
+  .dart_tool/package_config.json: |
+    {
+      "configVersion": 2,
+      "packages": [
+        {
+          "name": "example",
+          "rootUri": "../pkg/example"
+        }
+      ]
+    }
diff --git a/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_file.yaml b/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_file.yaml
index ee36914..17c374a 100644
--- a/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_file.yaml
+++ b/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_file.yaml
@@ -23,4 +23,13 @@
     b() {
       print("b1");
     }
-  .packages: example:pkg/example
+  .dart_tool/package_config.json: |
+    {
+      "configVersion": 2,
+      "packages": [
+        {
+          "name": "example",
+          "rootUri": "../pkg/example"
+        }
+      ]
+    }
diff --git a/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_package.yaml b/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_package.yaml
index 5af601b..d79692e 100644
--- a/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_package.yaml
+++ b/pkg/front_end/testcases/incremental/invalidate_package_part_from_package_url_as_package.yaml
@@ -23,4 +23,13 @@
     b() {
       print("b1");
     }
-  .packages: example:pkg/example
+  .dart_tool/package_config.json: |
+    {
+      "configVersion": 2,
+      "packages": [
+        {
+          "name": "example",
+          "rootUri": "../pkg/example"
+        }
+      ]
+    }
diff --git a/pkg/front_end/testcases/incremental/no_outline_change_27.yaml b/pkg/front_end/testcases/incremental/no_outline_change_27.yaml
index 8f4c25d..380c552 100644
--- a/pkg/front_end/testcases/incremental/no_outline_change_27.yaml
+++ b/pkg/front_end/testcases/incremental/no_outline_change_27.yaml
@@ -22,8 +22,16 @@
         libMethod() {
           print("Hello from lib!");
         }
-      .packages: |
-        foo:.
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": ".."
+            }
+          ]
+        }
     expectedLibraryCount: 2
   - entry: main.dart
     warnings: false
diff --git a/pkg/front_end/testcases/incremental/part_as_package_entry.yaml b/pkg/front_end/testcases/incremental/part_as_package_entry.yaml
index 9aed0c2..9810036 100644
--- a/pkg/front_end/testcases/incremental/part_as_package_entry.yaml
+++ b/pkg/front_end/testcases/incremental/part_as_package_entry.yaml
@@ -7,8 +7,16 @@
   - entry: package:foo/main.dart
     checkEntries: false
     sources:
-      .packages: |
-        foo:.
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": ".."
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         part of 'lib.dart';
diff --git a/pkg/front_end/testcases/incremental/part_as_package_entry_2.yaml b/pkg/front_end/testcases/incremental/part_as_package_entry_2.yaml
index 27bb66c..2ac3ec6 100644
--- a/pkg/front_end/testcases/incremental/part_as_package_entry_2.yaml
+++ b/pkg/front_end/testcases/incremental/part_as_package_entry_2.yaml
@@ -8,8 +8,16 @@
     warnings: false
     checkEntries: false
     sources:
-      .packages: |
-        foo:.
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": ".."
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         part of 'lib.dart';
diff --git a/pkg/front_end/testcases/incremental/part_not_part_of_as_package.yaml b/pkg/front_end/testcases/incremental/part_not_part_of_as_package.yaml
index 9110606..a3c62ed 100644
--- a/pkg/front_end/testcases/incremental/part_not_part_of_as_package.yaml
+++ b/pkg/front_end/testcases/incremental/part_not_part_of_as_package.yaml
@@ -7,8 +7,16 @@
   - entry: package:foo/main.dart
     errors: true
     sources:
-      .packages: |
-        foo:.
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "foo",
+              "rootUri": ".."
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         part 'lib.dart';
diff --git a/pkg/front_end/testcases/incremental/reissue_errors_3.yaml b/pkg/front_end/testcases/incremental/reissue_errors_3.yaml
index b93e15d..fc0ac60 100644
--- a/pkg/front_end/testcases/incremental/reissue_errors_3.yaml
+++ b/pkg/front_end/testcases/incremental/reissue_errors_3.yaml
@@ -10,7 +10,16 @@
 worlds:
   - entry: main.dart
     sources:
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         import "package:mypackage/a.dart";
@@ -34,7 +43,16 @@
     expectedLibraryCount: 3
   - entry: main.dart
     sources:
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         import "package:mypackage/a.dart";
diff --git a/pkg/front_end/testcases/incremental/reissue_errors_4.yaml b/pkg/front_end/testcases/incremental/reissue_errors_4.yaml
index 47f9788..b53906c 100644
--- a/pkg/front_end/testcases/incremental/reissue_errors_4.yaml
+++ b/pkg/front_end/testcases/incremental/reissue_errors_4.yaml
@@ -10,7 +10,16 @@
 worlds:
   - entry: main.dart
     sources:
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         import "package:mypackage/a.dart";
@@ -38,7 +47,16 @@
     expectedLibraryCount: 3
   - entry: main.dart
     sources:
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         import "package:mypackage/a.dart";
diff --git a/pkg/front_end/testcases/incremental/reissue_errors_5.yaml b/pkg/front_end/testcases/incremental/reissue_errors_5.yaml
index 36e8361..861b204 100644
--- a/pkg/front_end/testcases/incremental/reissue_errors_5.yaml
+++ b/pkg/front_end/testcases/incremental/reissue_errors_5.yaml
@@ -10,7 +10,16 @@
 worlds:
   - entry: main.dart
     sources:
-      .packages: mypackage:mypackage
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "mypackage",
+              "rootUri": "../mypackage"
+            }
+          ]
+        }
       main.dart: |
         // @dart=2.9
         import "package:mypackage/a.dart" as a;
diff --git a/pkg/front_end/testcases/incremental/updated_package_1.yaml b/pkg/front_end/testcases/incremental/updated_package_1.yaml
index 6950f98..67c83b0 100644
--- a/pkg/front_end/testcases/incremental/updated_package_1.yaml
+++ b/pkg/front_end/testcases/incremental/updated_package_1.yaml
@@ -3,7 +3,7 @@
 # BSD-style license that can be found in the LICENSE.md file.
 
 # Compile an application with a package and use it.
-# Then update the package from .packages.
+# Then update the package from .dart_tool/package_config.json.
 # The old package is still included in the dill file we initialize from,
 # but shouldn't cause trouble, nor be included in the output.
 
@@ -32,7 +32,16 @@
         b() {
           a();
         }
-      .packages: example:package_0.1.0
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.0"
+            }
+          ]
+        }
     expectedLibraryCount: 3
   - entry: main.dart
     # TODO(jensj): For now we don't initialize from dill when a package was
@@ -67,5 +76,14 @@
         b() {
           print("hello from v0.1.1");
         }
-      .packages: example:package_0.1.1
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.1"
+            }
+          ]
+        }
     expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/updated_package_2.yaml b/pkg/front_end/testcases/incremental/updated_package_2.yaml
index 34110ba..6e7ae11 100644
--- a/pkg/front_end/testcases/incremental/updated_package_2.yaml
+++ b/pkg/front_end/testcases/incremental/updated_package_2.yaml
@@ -3,7 +3,7 @@
 # BSD-style license that can be found in the LICENSE.md file.
 
 # Compile an application with a package and use it.
-# Then update the package from .packages.
+# Then update the package from .dart_tool/package_config.json.
 # The old package is still included in the dill file we initialize from,
 # but shouldn't cause trouble, nor be included in the output.
 
@@ -32,7 +32,16 @@
         b() {
           a();
         }
-      .packages: example:package_0.1.0
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.0"
+            }
+          ]
+        }
     expectedLibraryCount: 3
   - entry: main.dart
     invalidate:
@@ -66,5 +75,14 @@
         b() {
           print("hello from v0.1.1");
         }
-      .packages: example:package_0.1.1
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.1"
+            }
+          ]
+        }
     expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/updated_package_3.yaml b/pkg/front_end/testcases/incremental/updated_package_3.yaml
index faf431e..e3b97b7 100644
--- a/pkg/front_end/testcases/incremental/updated_package_3.yaml
+++ b/pkg/front_end/testcases/incremental/updated_package_3.yaml
@@ -3,8 +3,8 @@
 # BSD-style license that can be found in the LICENSE.md file.
 
 # Compile an application with a package and use it.
-# Then update the package from .packages but change nothing else and call
-# computeDelta on the same compiler.
+# Then update the package from .dart_tool/package_config.json but change nothing
+# else and call computeDelta on the same compiler.
 # The output should not include the old package.
 
 type: newworld
@@ -32,7 +32,16 @@
         b() {
           a();
         }
-      .packages: example:package_0.1.0
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.0"
+            }
+          ]
+        }
     expectedLibraryCount: 3
   - entry: main.dart
     worldType: updated
@@ -46,5 +55,14 @@
         b() {
           print("hello from v0.1.1");
         }
-      .packages: example:package_0.1.1
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.1"
+            }
+          ]
+        }
     expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/updated_package_4.yaml b/pkg/front_end/testcases/incremental/updated_package_4.yaml
index 4d2fd14..e5d21b3 100644
--- a/pkg/front_end/testcases/incremental/updated_package_4.yaml
+++ b/pkg/front_end/testcases/incremental/updated_package_4.yaml
@@ -2,9 +2,9 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE.md file.
 
-# Compile an application with a .packages.
-# Then delete the content of .packages, still using the package in code.
-# This should be an error.
+# Compile an application with a .dart_tool/package_config.json.
+# Then delete the content of .dart_tool/package_config.json, still using the
+# package in code. This should be an error.
 
 type: newworld
 worlds:
@@ -22,15 +22,28 @@
         b() {
           print("hello from package");
         }
-      .packages: example:package
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package"
+            }
+          ]
+        }
     expectedLibraryCount: 2
   - entry: main.dart
     worldType: updated
     expectInitializeFromDill: false
     checkInvalidatedFiles: false
     invalidate:
-      - .packages
+      - .dart_tool/package_config.json
     sources:
-      .packages:
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": []
+        }
     errors: true
     expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental/updated_package_uri.yaml b/pkg/front_end/testcases/incremental/updated_package_uri.yaml
index f8e7ad9..53d1725 100644
--- a/pkg/front_end/testcases/incremental/updated_package_uri.yaml
+++ b/pkg/front_end/testcases/incremental/updated_package_uri.yaml
@@ -2,9 +2,10 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE.md file.
 
-# Compile an application with a .packages file.
-# Then change which file should be the .packages file to use, and everything
-# should now be relative to the new .packages file.
+# Compile an application with a .dart_tool/package_config.json file.
+# Then change which file should be the package_config.json file to
+# use, and everything should now be relative to the new
+# package_config.json file.
 
 type: newworld
 worlds:
@@ -31,7 +32,16 @@
         b() {
           a();
         }
-      .packages: example:package_0.1.0
+      .dart_tool/package_config.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.0"
+            }
+          ]
+        }
     expectedLibraryCount: 3
   - entry: main.dart
     worldType: updated
@@ -42,6 +52,15 @@
         b() {
           print("hello from v0.1.1");
         }
-      .packages2: example:package_0.1.1
-    dotPackagesFile: .packages2
+      .dart_tool/package_config2.json: |
+        {
+          "configVersion": 2,
+          "packages": [
+            {
+              "name": "example",
+              "rootUri": "../package_0.1.1"
+            }
+          ]
+        }
+    packageConfigFile: .dart_tool/package_config2.json
     expectedLibraryCount: 2
diff --git a/pkg/front_end/tool/fasta_perf.dart b/pkg/front_end/tool/fasta_perf.dart
index 6c5a003..ba61cb1 100644
--- a/pkg/front_end/tool/fasta_perf.dart
+++ b/pkg/front_end/tool/fasta_perf.dart
@@ -90,7 +90,7 @@
     // allowlisting of error messages in the error handler.
     ..onDiagnostic = onDiagnosticMessageHandler()
     ..compileSdk = true
-    ..packagesFileUri = Uri.base.resolve('.packages')
+    ..packagesFileUri = Uri.base.resolve('.dart_tool/package_config.json')
     ..target = createTarget(isFlutter: false);
   uriResolver = await new ProcessedOptions(options: options).getUriTranslator();
 }
@@ -231,7 +231,7 @@
     ..sdkRoot = sdkRoot
     ..onDiagnostic = onDiagnosticMessageHandler()
     ..target = createTarget(isFlutter: false)
-    ..packagesFileUri = Uri.base.resolve('.packages')
+    ..packagesFileUri = Uri.base.resolve('.dart_tool/package_config.json')
     ..compileSdk = compileSdk
     ..environmentDefines = const {};
   if (!compileSdk) {
diff --git a/pkg/front_end/tool/incremental_perf.dart b/pkg/front_end/tool/incremental_perf.dart
index 0a1186d..dc1c3bb 100644
--- a/pkg/front_end/tool/incremental_perf.dart
+++ b/pkg/front_end/tool/incremental_perf.dart
@@ -215,9 +215,9 @@
     if (uri.isScheme('org-dartlang-overlay')) {
       return new OverlayFileSystemEntity(uri, this);
     } else if (uri.isScheme('file')) {
-      // The IKG compiler reads ".packages" which might contain absolute file
-      // URIs (which it will then try to use on the FS).  We therefore replace
-      // them with overlay-fs URIs as usual.
+      // The IKG compiler reads ".dart_tool/package_config.json" which might
+      // contain absolute file URIs (which it will then try to use on the FS).
+      // We therefore replace them with overlay-fs URIs as usual.
       return new OverlayFileSystemEntity(_resolveOverlayUri('$uri'), this);
     } else {
       throw "Unsupported scheme: ${uri.scheme}."
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 4c79f85..0e63341 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -12939,10 +12939,6 @@
 
   /// Gets the type of this constant.
   DartType getType(StaticTypeContext context);
-
-  Expression asExpression() {
-    return new ConstantExpression(this);
-  }
 }
 
 abstract class PrimitiveConstant<T> extends Constant {
@@ -13887,9 +13883,6 @@
       expression.getStaticType(context);
 
   @override
-  Expression asExpression() => expression;
-
-  @override
   void toTextInternal(AstPrinter printer) {
     printer.write('unevaluated{');
     printer.writeExpression(expression);
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index a9a37d0..a02eb0b 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -834,9 +834,6 @@
 
   @override
   void visitUnevaluatedConstant(UnevaluatedConstant constant) {
-    if (inUnevaluatedConstant) {
-      problem(currentParent, "UnevaluatedConstant in UnevaluatedConstant.");
-    }
     bool savedInUnevaluatedConstant = inUnevaluatedConstant;
     inUnevaluatedConstant = true;
     TreeNode? oldParent = currentParent;
diff --git a/pkg/testing/lib/src/chain.dart b/pkg/testing/lib/src/chain.dart
index 8ab797b..ad570dd 100644
--- a/pkg/testing/lib/src/chain.dart
+++ b/pkg/testing/lib/src/chain.dart
@@ -25,7 +25,7 @@
 
 import 'multitest.dart' show MultitestTransformer, isError;
 
-import 'expectation.dart' show Expectation, ExpectationSet;
+import 'expectation.dart' show Expectation, ExpectationGroup, ExpectationSet;
 
 typedef Future<ChainContext> CreateContext(
     Chain suite, Map<String, String> environment);
@@ -148,6 +148,14 @@
       }
       final Set<Expectation> expectedOutcomes = processExpectedOutcomes(
           expectations.expectations(description.shortName), description);
+      bool shouldSkip = false;
+      for (Expectation expectation in expectedOutcomes) {
+        if (expectation.group == ExpectationGroup.Skip) {
+          shouldSkip = true;
+          break;
+        }
+      }
+      if (shouldSkip) continue;
       final StringBuffer sb = new StringBuffer();
       final Step? lastStep = steps.isNotEmpty ? steps.last : null;
       final Iterator<Step> iterator = steps.iterator;
diff --git a/runtime/tests/vm/dart/causal_stacks/utils.dart b/runtime/tests/vm/dart/causal_stacks/utils.dart
index 2269e31..4356953 100644
--- a/runtime/tests/vm/dart/causal_stacks/utils.dart
+++ b/runtime/tests/vm/dart/causal_stacks/utils.dart
@@ -205,21 +205,26 @@
 
   // Use the DWARF stack decoder if we're running in --dwarf-stack-traces mode
   // and in precompiled mode (otherwise --dwarf-stack-traces has no effect).
-  final decodeTrace = frames.first.startsWith('Warning:');
-  if (decodeTrace) {
-    Expect.isNotNull(debugInfoFilename);
-    final dwarf = Dwarf.fromFile(debugInfoFilename!)!;
-    frames = await Stream.fromIterable(original)
-        .transform(DwarfStackTraceDecoder(dwarf))
-        .where(_lineRE.hasMatch)
-        .toList();
+  bool usingDwarf = false;
+  if (debugInfoFilename != null) {
+    try {
+      final dwarf = Dwarf.fromFile(debugInfoFilename)!;
+      usingDwarf = true;
+      frames = await Stream.fromIterable(original)
+          .transform(DwarfStackTraceDecoder(dwarf))
+          .where(_lineRE.hasMatch)
+          .toList();
+    } on FileSystemException {
+      // We're not running in precompiled mode, so the file doesn't exist and
+      // we can continue normally.
+    }
   }
 
   void printFrameInformation() {
     print('RegExps for expected stack:');
     expects.forEach((s) => print('"${s}"'));
     print('');
-    if (decodeTrace) {
+    if (usingDwarf) {
       print('Non-symbolic actual stack:');
       original.forEach(print);
       print('');
diff --git a/runtime/tests/vm/dart_2/causal_stacks/utils.dart b/runtime/tests/vm/dart_2/causal_stacks/utils.dart
index d7c80d1..ec673b5 100644
--- a/runtime/tests/vm/dart_2/causal_stacks/utils.dart
+++ b/runtime/tests/vm/dart_2/causal_stacks/utils.dart
@@ -207,21 +207,26 @@
 
   // Use the DWARF stack decoder if we're running in --dwarf-stack-traces mode
   // and in precompiled mode (otherwise --dwarf-stack-traces has no effect).
-  final decodeTrace = frames.first.startsWith('Warning:');
-  if (decodeTrace) {
-    Expect.isNotNull(debugInfoFilename);
-    final dwarf = Dwarf.fromFile(debugInfoFilename);
-    frames = await Stream.fromIterable(original)
-        .transform(DwarfStackTraceDecoder(dwarf))
-        .where(_lineRE.hasMatch)
-        .toList();
+  bool usingDwarf = false;
+  if (debugInfoFilename != null) {
+    try {
+      final dwarf = Dwarf.fromFile(debugInfoFilename);
+      usingDwarf = true;
+      frames = await Stream.fromIterable(original)
+          .transform(DwarfStackTraceDecoder(dwarf))
+          .where(_lineRE.hasMatch)
+          .toList();
+    } on FileSystemException {
+      // We're not running in precompiled mode, so the file doesn't exist and
+      // we can continue normally.
+    }
   }
 
   void printFrameInformation() {
     print('RegExps for expected stack:');
     expects.forEach((s) => print('"${s}"'));
     print('');
-    if (decodeTrace) {
+    if (usingDwarf) {
       print('Non-symbolic actual stack:');
       original.forEach(print);
       print('');
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index d20cf54..84694a6 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1739,13 +1739,6 @@
   // how the vm_tag (kEmbedderTagId) can be set, these tags need to
   // move to the OSThread structure.
   set_user_tag(UserTags::kDefaultUserTag);
-
-  if (group()->obfuscate()) {
-    OS::PrintErr(
-        "Warning: This VM has been configured to obfuscate symbol information "
-        "which violates the Dart standard.\n"
-        "         See dartbug.com/30524 for more information.\n");
-  }
 }
 
 #undef REUSABLE_HANDLE_SCOPE_INIT
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 47633fe..8814320 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -25878,12 +25878,6 @@
         isolate_instructions_image.instructions_relocated_address();
     auto const vm_relocated_address =
         vm_instructions_image.instructions_relocated_address();
-    // The Dart standard requires the output of StackTrace.toString to include
-    // all pending activations with precise source locations (i.e., to expand
-    // inlined frames and provide line and column numbers).
-    buffer.Printf(
-        "Warning: This VM has been configured to produce stack traces "
-        "that violate the Dart standard.\n");
     // This prologue imitates Android's debuggerd to make it possible to paste
     // the stack trace into ndk-stack.
     buffer.Printf(
diff --git a/tools/VERSION b/tools/VERSION
index 43b8d36..644cb13 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 18
 PATCH 0
-PRERELEASE 216
+PRERELEASE 217
 PRERELEASE_PATCH 0
\ No newline at end of file