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

Unified Diff: pkg/front_end/lib/kernel_generator.dart

Issue 2924833002: Pass a Target instance to DillTarget instead of its name (Closed)
Patch Set: 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
Index: pkg/front_end/lib/kernel_generator.dart
diff --git a/pkg/front_end/lib/kernel_generator.dart b/pkg/front_end/lib/kernel_generator.dart
index 248d13d447de9e5ec40a29f6af52f7b16fd4db33..e0ba4c782e326b5dcb2b06f745b1e2e2acdbd823 100644
--- a/pkg/front_end/lib/kernel_generator.dart
+++ b/pkg/front_end/lib/kernel_generator.dart
@@ -14,6 +14,7 @@ import 'src/fasta/errors.dart' show InputError;
import 'src/fasta/kernel/kernel_target.dart' show KernelTarget;
import 'package:kernel/kernel.dart' show Program;
import 'package:kernel/target/targets.dart' show TargetFlags;
+import 'package:kernel/target/vm_fasta.dart' show VmFastaTarget;
import 'src/fasta/ticker.dart' show Ticker;
import 'src/fasta/translate_uri.dart' show TranslateUri;
import 'src/simple_error.dart';
@@ -53,9 +54,8 @@ Future<Program> kernelForProgram(Uri source, CompilerOptions options) async {
try {
TranslateUri uriTranslator = await pOptions.getUriTranslator();
- var dillTarget = new DillTarget(
- new Ticker(isVerbose: false), uriTranslator, "vm_fasta",
- flags: new TargetFlags(strongMode: options.strongMode));
+ var dillTarget = new DillTarget(new Ticker(isVerbose: false), uriTranslator,
+ new VmFastaTarget(new TargetFlags(strongMode: options.strongMode)));
var summary = await pOptions.sdkSummaryProgram;
if (summary != null) {
dillTarget.loader.appendLibraries(summary);
@@ -150,9 +150,8 @@ Future<Program> kernelForBuildUnit(
try {
TranslateUri uriTranslator = await pOptions.getUriTranslator();
- var dillTarget = new DillTarget(
- new Ticker(isVerbose: false), uriTranslator, "vm_fasta",
- flags: new TargetFlags(strongMode: options.strongMode));
+ var dillTarget = new DillTarget(new Ticker(isVerbose: false), uriTranslator,
+ new VmFastaTarget(new TargetFlags(strongMode: options.strongMode)));
var summary = await pOptions.sdkSummaryProgram;
if (summary != null) {
dillTarget.loader.appendLibraries(summary);

Powered by Google App Engine
This is Rietveld 408576698