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

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

Issue 2931773003: Add flutter mode to patched_sdk (Closed)
Patch Set: address cl comments and merge conflicts Created 3 years, 6 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/targets.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/target/flutter_fasta.dart
diff --git a/pkg/kernel/lib/target/flutter_fasta.dart b/pkg/kernel/lib/target/flutter_fasta.dart
new file mode 100644
index 0000000000000000000000000000000000000000..884d56b66f89feeee26e8ad1e802b2bc3154f035
--- /dev/null
+++ b/pkg/kernel/lib/target/flutter_fasta.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+library kernel.target.vm_fasta;
+
+import '../ast.dart' show Program, Library;
+import '../core_types.dart' show CoreTypes;
+import '../class_hierarchy.dart' show ClassHierarchy;
+
+import '../transformations/mixin_full_resolution.dart' as transformMixins
+ show transformLibraries;
+import '../transformations/continuation.dart' as transformAsync
+ show transformLibraries;
+import '../transformations/erasure.dart' as tranformErasure
+ show transformLibraries;
+
+import 'targets.dart' show TargetFlags;
+import 'flutter.dart' as flutter_target;
+
+class FlutterFastaTarget extends flutter_target.FlutterTarget {
+ FlutterFastaTarget(TargetFlags flags) : super(flags);
+
+ String get name => "flutter_fasta";
+
+ void performModularTransformationsOnLibraries(
+ CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries,
+ {void logger(String msg)}) {
+ transformMixins.transformLibraries(this, coreTypes, hierarchy, libraries);
+ logger?.call("Transformed mixin applications");
+
+ // TODO(ahe): Don't generate type variables in the first place.
+ if (!strongMode) {
+ tranformErasure.transformLibraries(coreTypes, libraries);
+ logger?.call("Erased type variables in generic methods");
+ }
+
+ // TODO(kmillikin): Make this run on a per-method basis.
+ transformAsync.transformLibraries(coreTypes, libraries);
+ logger?.call("Transformed async methods");
+ }
+
+ void performGlobalTransformations(CoreTypes coreTypes, Program program,
+ {void logger(String msg)}) {}
+}
« no previous file with comments | « pkg/kernel/lib/target/flutter.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698