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

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

Issue 2918923003: Revert "Use backend targets to run Kernel transformations in Fasta" (Closed)
Patch Set: 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/kernel/lib/target/flutter.dart ('k') | pkg/kernel/lib/target/vm.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/target/targets.dart
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index a9c96f252b1821d7c5a95c0406811d871e89349c..a6ea8ae1d3b4626a0a4f0f839c98890c6068c531 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -7,11 +7,10 @@ import '../ast.dart';
import '../class_hierarchy.dart';
import '../core_types.dart';
import '../transformations/treeshaker.dart' show ProgramRoot;
-import 'flutter.dart' show FlutterTarget;
-import 'vm.dart' show VmTarget;
-import 'vm_fasta.dart' show VmFastaTarget;
-import 'vmcc.dart' show VmClosureConvertedTarget;
-import 'vmreify.dart' show VmGenericTypesReifiedTarget;
+import 'flutter.dart';
+import 'vm.dart';
+import 'vmcc.dart';
+import 'vmreify.dart';
final List<String> targetNames = targets.keys.toList();
@@ -33,7 +32,6 @@ typedef Target _TargetBuilder(TargetFlags flags);
final Map<String, _TargetBuilder> targets = <String, _TargetBuilder>{
'none': (TargetFlags flags) => new NoneTarget(flags),
'vm': (TargetFlags flags) => new VmTarget(flags),
- 'vm_fasta': (TargetFlags flags) => new VmFastaTarget(flags),
'vmcc': (TargetFlags flags) => new VmClosureConvertedTarget(flags),
'vmreify': (TargetFlags flags) => new VmGenericTypesReifiedTarget(flags),
'flutter': (TargetFlags flags) => new FlutterTarget(flags),
@@ -70,47 +68,19 @@ abstract class Target {
/// If true, the SDK should be loaded in strong mode.
bool get strongModeSdk => strongMode;
- /// Perform target-specific modular transformations on the given 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 performModularTransformationsOnProgram(
- CoreTypes coreTypes, ClassHierarchy hierarchy, Program program,
- {void logger(String msg)}) {
- performModularTransformationsOnLibraries(
- coreTypes, hierarchy, program.libraries,
- logger: logger);
- }
-
- /// Perform target-specific modular transformations on the given libraries.
- ///
- /// The intent of this method is to perform the transformations only on some
- /// subset of the program libraries and avoid packing them into a temporary
- /// [Program] instance to pass into [performModularTransformationsOnProgram].
- ///
- /// Note that the following should be equivalent:
- ///
- /// target.performModularTransformationsOnProgram(coreTypes, program);
- ///
- /// and
- ///
- /// target.performModularTransformationsOnLibraries(
- /// coreTypes, program.libraries);
- void performModularTransformationsOnLibraries(
- CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries,
- {void logger(String msg)});
+ void performModularTransformations(
+ CoreTypes coreTypes, ClassHierarchy hierarchy, 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.
- ///
- /// Note that [performGlobalTransformations] doesn't have -OnProgram and
- /// -OnLibraries alternatives, because the global knowledge required by the
- /// transformations is assumed to be retrieved from a [Program] instance.
- void performGlobalTransformations(CoreTypes coreTypes, Program program,
- {void logger(String msg)});
+ void performGlobalTransformations(CoreTypes coreTypes, Program program);
/// Builds an expression that instantiates an [Invocation] that can be passed
/// to [noSuchMethod].
@@ -128,11 +98,9 @@ class NoneTarget extends Target {
bool get strongMode => flags.strongMode;
String get name => 'none';
List<String> get extraRequiredLibraries => <String>[];
- void performModularTransformationsOnLibraries(
- CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries,
- {void logger(String msg)}) {}
- void performGlobalTransformations(CoreTypes coreTypes, Program program,
- {void logger(String msg)}) {}
+ void performModularTransformations(
+ CoreTypes coreTypes, ClassHierarchy hierarchy, Program program) {}
+ void performGlobalTransformations(CoreTypes coreTypes, Program program) {}
@override
Expression instantiateInvocation(Member target, Expression receiver,
« no previous file with comments | « pkg/kernel/lib/target/flutter.dart ('k') | pkg/kernel/lib/target/vm.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698