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

Unified Diff: pkg/compiler/lib/src/kernel/fasta_support.dart

Issue 2885233003: Move writeOutline() and writeProgram() out of KernelTarget. (Closed)
Patch Set: 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/compiler/lib/src/kernel/fasta_support.dart
diff --git a/pkg/compiler/lib/src/kernel/fasta_support.dart b/pkg/compiler/lib/src/kernel/fasta_support.dart
index 0c496f9a4c3367a6bcdffb3235246b4079279f2b..2e9e1200f4692a69d0cabd108b37c430fd9bc92b 100644
--- a/pkg/compiler/lib/src/kernel/fasta_support.dart
+++ b/pkg/compiler/lib/src/kernel/fasta_support.dart
@@ -19,6 +19,7 @@ import 'dart:async' show Future;
import 'dart:io' show exitCode;
import 'package:front_end/physical_file_system.dart';
+import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:kernel/ast.dart' show Source;
import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
@@ -46,12 +47,15 @@ Future compilePlatform(Uri patchedSdk, Uri fullOutput,
kernelTarget.read(Uri.parse("dart:core"));
await dillTarget.buildOutlines();
- await kernelTarget.buildOutlines();
- await kernelTarget.writeOutline(outlineOutput);
+ var outline = await kernelTarget.buildOutlines();
+ if (outlineOutput != null) {
Siggi Cherem (dart-lang) 2017/05/17 22:01:34 I'd remove this extra check, you don't seem to hav
scheglov 2017/05/17 22:16:04 Thanks. I was not sure that it is called in dart2j
+ await writeProgramToFileUri(ticker, outlineOutput, outline,
+ isFullProgram: false);
+ }
if (exitCode != 0) return null;
- await kernelTarget.buildProgram();
- await kernelTarget.writeProgram(fullOutput);
+ var program = await kernelTarget.buildProgram();
+ await writeProgramToFileUri(ticker, fullOutput, program, isFullProgram: true);
await kernelTarget.writeDepsFile(fullOutput, deps);
}
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/compile_platform.dart » ('j') | pkg/front_end/lib/src/fasta/kernel/utils.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698