Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1027)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: Don't create CoreTypes in createOutlines() on InputError. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart ('k') | pkg/kernel/bin/transform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 52e264f660f745a646e839a09cd4f0a311c19075..88cea4b0b140dcd2ade6ba3506206afe400f63ec 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -40,7 +40,6 @@ import 'package:kernel/ast.dart'
VariableGet,
VoidType;
-import 'package:kernel/core_types.dart' show CoreTypes;
import 'package:kernel/transformations/erasure.dart' show Erasure;
import 'package:kernel/transformations/continuation.dart' as transformAsync;
@@ -660,7 +659,7 @@ class KernelTarget extends TargetImplementation {
}
void transformMixinApplications() {
- mix.transformLibraries(backendTarget, loader.libraries);
+ mix.transformLibraries(backendTarget, loader.coreTypes, loader.libraries);
ticker.logMs("Transformed mixin applications");
}
@@ -670,9 +669,8 @@ class KernelTarget extends TargetImplementation {
_program.accept(new Erasure());
ticker.logMs("Erased type variables in generic methods");
}
- var coreTypes = new CoreTypes(_program);
// TODO(kmillikin): Make this run on a per-method basis.
- transformAsync.transformLibraries(coreTypes, loader.libraries);
+ transformAsync.transformLibraries(loader.coreTypes, loader.libraries);
ticker.logMs("Transformed async methods");
}
@@ -699,7 +697,7 @@ class KernelTarget extends TargetImplementation {
// TODO(sigmund): replace this step with data that is directly computed from
// the builders: we should know the tree-shaking roots without having to do
// a second visit over the tree.
- new RootsMarker(data).run(_program, isIncluded);
+ new RootsMarker(loader.coreTypes, data).run(_program, isIncluded);
trimProgram(_program, data, isIncluded);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_outline_shaker.dart ('k') | pkg/kernel/bin/transform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698