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

Unified Diff: pkg/front_end/test/fasta/shaker_test.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/test/fasta/shaker_test.dart
diff --git a/pkg/front_end/test/fasta/shaker_test.dart b/pkg/front_end/test/fasta/shaker_test.dart
index 658d3b75dda9069f41ff0f2121cb26de6a1b12f9..f948b3876b80e6126ce2a5d48612ede7b82dba5d 100644
--- a/pkg/front_end/test/fasta/shaker_test.dart
+++ b/pkg/front_end/test/fasta/shaker_test.dart
@@ -33,6 +33,7 @@ import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri;
import 'package:front_end/src/fasta/util/relativize.dart' show relativizeUri;
import 'package:kernel/ast.dart' show Program;
import 'package:kernel/kernel.dart' show loadProgramFromBytes;
+import 'package:kernel/target/targets.dart' show TargetFlags;
import 'package:testing/testing.dart'
show Chain, ChainContext, ExpectationSet, Result, Step, TestDescription;
import 'testing/suite.dart';
@@ -95,10 +96,11 @@ class BuildProgram
var platformOutline = context.loadPlatformOutline();
platformOutline.unbindCanonicalNames();
var dillTarget = new DillTarget(
- new Ticker(isVerbose: false), context.uriTranslator, "vm");
+ new Ticker(isVerbose: false), context.uriTranslator, "vm_fasta",
+ flags: new TargetFlags(strongMode: false));
dillTarget.loader.appendLibraries(platformOutline);
- var sourceTarget = new KernelTarget(PhysicalFileSystem.instance,
- dillTarget, context.uriTranslator, false);
+ var sourceTarget = new KernelTarget(
+ PhysicalFileSystem.instance, dillTarget, context.uriTranslator);
await dillTarget.buildOutlines();
var inputUri = description.uri;
@@ -113,8 +115,8 @@ class BuildProgram
/// This new KernelTarget contains only sources from the test without
/// lib.dart.
- sourceTarget = new KernelTarget(PhysicalFileSystem.instance, dillTarget,
- context.uriTranslator, false);
+ sourceTarget = new KernelTarget(
+ PhysicalFileSystem.instance, dillTarget, context.uriTranslator);
await dillTarget.buildOutlines();
sourceTarget.read(inputUri);

Powered by Google App Engine
This is Rietveld 408576698