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

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

Issue 2832353002: Add support for building patched_sdk and platform.dill for dart2js: (Closed)
Patch Set: fix .gn circularity by removing use of rebase_path Created 3 years, 8 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 c273be8460159720aecda58386bcd5956d73a098..937c4e16d79076fcd7548b3758f420878fa07500 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -270,10 +270,8 @@ class KernelTarget extends TargetImplementation {
loader.finishStaticInvocations();
finishAllConstructors();
loader.finishNativeMethods();
- transformMixinApplications();
- // TODO(ahe): Don't call this from two different places.
- setup_builtin_library.transformProgram(program);
- otherTransformations();
+ runBuildTransformations();
+
if (dumpIr) this.dumpIr();
if (verify) this.verify();
errors.addAll(loader.collectCompileTimeErrors().map((e) => e.format()));
@@ -389,7 +387,7 @@ class KernelTarget extends TargetImplementation {
}
}
if (errors.isEmpty || dillTarget.isLoaded) {
- setup_builtin_library.transformProgram(program);
+ runLinkTransformations(program);
}
ticker.logMs("Linked program");
return program;
@@ -677,6 +675,20 @@ class KernelTarget extends TargetImplementation {
});
}
+ /// Run all transformations that are needed when building a program for the
+ /// first time.
+ void runBuildTransformations() {
+ transformMixinApplications();
+ // TODO(ahe): Don't call this from two different places.
+ setup_builtin_library.transformProgram(program);
+ otherTransformations();
+ }
+
+ /// Run all transformations that are needed when linking a program.
+ void runLinkTransformations(Program program) {
+ setup_builtin_library.transformProgram(program);
+ }
+
void transformMixinApplications() {
new MixinFullResolution().transform(program);
ticker.logMs("Transformed mixin applications");
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/parser/dart_vm_native.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698