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

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

Issue 2825063002: Move kernel baseline tests to front_end. (Closed)
Patch Set: Created 3 years, 8 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/fasta.dart
diff --git a/pkg/front_end/lib/src/fasta/fasta.dart b/pkg/front_end/lib/src/fasta/fasta.dart
index ba3161808eb2e597fe0d894f5833f0ad0903d740..0e4140c33daf55dcd1463828d88ae0df0a53a390 100644
--- a/pkg/front_end/lib/src/fasta/fasta.dart
+++ b/pkg/front_end/lib/src/fasta/fasta.dart
@@ -110,8 +110,9 @@ class CompileTask {
CompileTask(this.c, this.ticker);
KernelTarget createKernelTarget(
- DillTarget dillTarget, TranslateUri uriTranslator) {
- return new KernelTarget(dillTarget, uriTranslator, c.uriToSource);
+ DillTarget dillTarget, TranslateUri uriTranslator, bool strongMode) {
+ return new KernelTarget(
+ dillTarget, uriTranslator, strongMode, c.uriToSource);
}
Future<KernelTarget> buildOutline([Uri output]) async {
@@ -119,7 +120,11 @@ class CompileTask {
await TranslateUri.parse(c.options.sdk, c.options.packages);
ticker.logMs("Read packages file");
DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
- KernelTarget kernelTarget = createKernelTarget(dillTarget, uriTranslator);
+ KernelTarget kernelTarget =
+ createKernelTarget(dillTarget, uriTranslator, c.options.strongMode);
+ if (c.options.strongMode) {
+ print("Note: strong mode support is preliminary and may not work.");
+ }
Uri platform = c.options.platform;
if (platform != null) {
dillTarget.read(platform);
@@ -151,7 +156,8 @@ class CompileTask {
}
Future<CompilationResult> parseScript(
- Uri fileName, Uri packages, Uri patchedSdk, bool verbose) async {
+ Uri fileName, Uri packages, Uri patchedSdk,
+ {bool verbose: false, bool strongMode: false}) async {
try {
if (!await new File.fromUri(fileName).exists()) {
return new CompilationResult.error(
@@ -171,7 +177,7 @@ Future<CompilationResult> parseScript(
final DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
dillTarget.read(patchedSdk.resolve('platform.dill'));
final KernelTarget kernelTarget =
- new KernelTarget(dillTarget, uriTranslator);
+ new KernelTarget(dillTarget, uriTranslator, strongMode);
kernelTarget.read(fileName);
await dillTarget.writeOutline(null);
program = await kernelTarget.writeOutline(null);
@@ -229,7 +235,7 @@ Future writeDepsFile(Uri script, Uri depsFile, Uri output,
DillTarget dillTarget = new DillTarget(ticker, uriTranslator)
..read(platform);
KernelTarget kernelTarget =
- new KernelTarget(dillTarget, uriTranslator, c.uriToSource);
+ new KernelTarget(dillTarget, uriTranslator, false, c.uriToSource);
kernelTarget.read(script);
await dillTarget.writeOutline(null);
« no previous file with comments | « pkg/front_end/lib/src/fasta/compiler_command_line.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698