@@ -47,14 +47,12 @@ import 'inferrer/types.dart'
47
47
show GlobalTypeInferenceResults, GlobalTypeInferenceTask;
48
48
import 'inferrer/wrapped.dart' show WrappedAbstractValueStrategy;
49
49
import 'io/source_information.dart' ;
50
- import 'ir/annotations.dart' ;
51
50
import 'js_backend/codegen_inputs.dart' show CodegenInputs;
52
51
import 'js_backend/enqueuer.dart' ;
53
52
import 'js_backend/inferred_data.dart' ;
54
53
import 'js_model/js_strategy.dart' ;
55
54
import 'js_model/js_world.dart' ;
56
55
import 'js_model/locals.dart' ;
57
- import 'kernel/dart2js_target.dart' ;
58
56
import 'kernel/front_end_adapter.dart' show CompilerFileSystem;
59
57
import 'kernel/kernel_strategy.dart' ;
60
58
import 'kernel/kernel_world.dart' ;
@@ -437,34 +435,6 @@ class Compiler {
437
435
bool shouldStopAfterLoadKernel (load_kernel.Output ? output) =>
438
436
output == null || compilationFailed || stage.shouldOnlyComputeDill;
439
437
440
- void simplifyConstConditionals (ir.Component component) {
441
- void reportMessage (
442
- fe.LocatedMessage message, List <fe.LocatedMessage >? context) {
443
- reportLocatedMessage (reporter, message, context);
444
- }
445
-
446
- bool shouldNotInline (ir.TreeNode node) {
447
- if (node is ! ir.Annotatable ) {
448
- return false ;
449
- }
450
- return computePragmaAnnotationDataFromIr (node).any ((pragma) =>
451
- pragma == const PragmaAnnotationData ('noInline' ) ||
452
- pragma == const PragmaAnnotationData ('never-inline' ));
453
- }
454
-
455
- fe.ConstConditionalSimplifier (
456
- const Dart2jsDartLibrarySupport (),
457
- const Dart2jsConstantsBackend (supportsUnevaluatedConstants: false ),
458
- component,
459
- reportMessage,
460
- environmentDefines: environment.definitions,
461
- evaluationMode: options.useLegacySubtyping
462
- ? fe.EvaluationMode .weak
463
- : fe.EvaluationMode .strong,
464
- shouldNotInline: shouldNotInline)
465
- .run ();
466
- }
467
-
468
438
GlobalTypeInferenceResults performGlobalTypeInference (
469
439
JClosedWorld closedWorld) {
470
440
FunctionEntity mainFunction = closedWorld.elementEnvironment.mainFunction! ;
@@ -551,11 +521,6 @@ class Compiler {
551
521
ir.Component component = output.component;
552
522
JClosedWorld ? closedWorld;
553
523
if (! stage.shouldReadClosedWorld) {
554
- // If we're deserializing the closed world, the input .dill already
555
- // contains the modified AST, so the transformer only needs to run if
556
- // the closed world is being computed from scratch.
557
- simplifyConstConditionals (component);
558
-
559
524
Uri rootLibraryUri = output.rootLibraryUri! ;
560
525
List <Uri > libraries = output.libraries! ;
561
526
closedWorld = computeClosedWorld (component, rootLibraryUri, libraries);
0 commit comments