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

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

Issue 2918623004: Use backend targets to run Kernel transformations in Fasta (Closed)
Patch Set: Adjust to the recent changes in master 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
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 b4e3eee32c465142118f3323edb6cc66e165fdad..90d1da8151afb7673ff616e580ad1220ab33fb16 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -655,27 +655,11 @@ class KernelTarget extends TargetImplementation {
/// Run all transformations that are needed when building a program for the
/// first time.
void runBuildTransformations() {
- transformMixinApplications();
- otherTransformations();
- }
-
- void transformMixinApplications() {
- mix.transformLibraries(
- backendTarget, loader.coreTypes, loader.hierarchy, loader.libraries);
- ticker.logMs("Transformed mixin applications");
- }
-
- void otherTransformations() {
- if (!strongMode) {
- // TODO(ahe): Don't generate type variables in the first place.
- program.accept(new Erasure());
- ticker.logMs("Erased type variables in generic methods");
- }
- if (errors.isEmpty && loader.collectCompileTimeErrors().isEmpty) {
- // TODO(kmillikin): Make this run on a per-method basis.
- transformAsync.transformLibraries(loader.coreTypes, loader.libraries);
- }
- ticker.logMs("Transformed async methods");
+ backendTarget.performModularTransformationsOnLibraries(
+ loader.coreTypes, loader.hierarchy, loader.libraries,
+ logger: (String msg) => ticker.logMs(msg));
+ backendTarget.performGlobalTransformations(loader.coreTypes, program,
+ logger: (String msg) => ticker.logMs(msg));
}
void verify() {
« no previous file with comments | « pkg/front_end/lib/src/fasta/fasta.dart ('k') | pkg/front_end/lib/src/incremental_kernel_generator_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698