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

Unified Diff: pkg/front_end/lib/src/fasta/compile_platform.dart

Issue 2919003003: Reapply "Use backend targets to run Kernel transformations in Fasta" (Closed)
Patch Set: Follow dartanalyzer suggestions 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/compile_platform.dart
diff --git a/pkg/front_end/lib/src/fasta/compile_platform.dart b/pkg/front_end/lib/src/fasta/compile_platform.dart
index 1752fa6b3af27403477098e4e1b609568829ec78..a9863e198e78ac2c0692872e05bfc80bb49221b6 100644
--- a/pkg/front_end/lib/src/fasta/compile_platform.dart
+++ b/pkg/front_end/lib/src/fasta/compile_platform.dart
@@ -24,6 +24,8 @@ import 'ticker.dart' show Ticker;
import 'translate_uri.dart' show TranslateUri;
+import 'package:kernel/target/targets.dart' show TargetFlags;
+
const int iterations = const int.fromEnvironment("iterations", defaultValue: 1);
Future mainEntryPoint(List<String> arguments) async {
@@ -71,10 +73,11 @@ Future compilePlatformInternal(CompilerContext c, Ticker ticker, Uri patchedSdk,
.parse(c.fileSystem, patchedSdk, packages: c.options.packages);
ticker.logMs("Read packages file");
- DillTarget dillTarget =
- new DillTarget(ticker, uriTranslator, c.options.target);
- KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget,
- uriTranslator, c.options.strongMode, c.uriToSource);
+ DillTarget dillTarget = new DillTarget(
+ ticker, uriTranslator, c.options.target,
+ flags: new TargetFlags(strongMode: c.options.strongMode));
+ KernelTarget kernelTarget =
+ new KernelTarget(c.fileSystem, dillTarget, uriTranslator, c.uriToSource);
kernelTarget.read(Uri.parse("dart:core"));
await dillTarget.buildOutlines();

Powered by Google App Engine
This is Rietveld 408576698