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

Unified Diff: pkg/kernel/lib/target/targets.dart

Issue 2671653003: Split the Kernel transformations into modular and global ones (Closed)
Patch Set: Revert inadvertent change Created 3 years, 11 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/kernel/lib/target/targets.dart
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 1c0627311f60c3836db170bf356d1d6c181cd927..fd5dafb3f23aee861c633ec0a638e1bd5ec189c9 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -52,7 +52,18 @@ abstract class Target {
/// If true, the SDK should be loaded in strong mode.
bool get strongModeSdk => strongMode;
- void transformProgram(Program program);
+ /// Perform target-specific modular transformations.
+ ///
+ /// These transformations should not be whole-program transformations. They
+ /// should expect that the program will contain external libraries.
+ void performModularTransformations(Program program);
+
+ /// Perform target-specific whole-program transformations.
+ ///
+ /// These transformations should be optimizations and not required for
+ /// correctness. Everything should work if a simple and fast linker chooses
+ /// not to apply these transformations.
+ void performGlobalTransformations(Program program);
String toString() => 'Target($name)';
}
@@ -65,5 +76,6 @@ class NoneTarget extends Target {
bool get strongMode => flags.strongMode;
String get name => 'none';
List<String> get extraRequiredLibraries => <String>[];
- void transformProgram(Program program) {}
+ void performModularTransformations(Program program) {}
+ void performGlobalTransformations(Program program) {}
}

Powered by Google App Engine
This is Rietveld 408576698