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

Unified Diff: pkg/front_end/test/fasta/testing/suite.dart

Issue 2894273002: Revert "First step for modular output in fasta." (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
« no previous file with comments | « pkg/front_end/test/fasta/testing.json ('k') | pkg/front_end/test/src/base/processed_options_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/fasta/testing/suite.dart
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index d9a1c09c2d05871bfa9e0420f213f1815fe9c748..50f369bd2f1556a38b35d7df36d5c79ecbaa5a1a 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -44,7 +44,7 @@ import 'package:front_end/src/fasta/kernel/kernel_target.dart'
import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
-import 'package:kernel/kernel.dart' show loadProgramFromBytes;
+import 'package:kernel/kernel.dart' show loadProgramFromBinary;
export 'package:testing/testing.dart' show Chain, runMe;
@@ -85,11 +85,12 @@ class FastaContext extends ChainContext {
Uri sdk;
Uri platformUri;
Uri outlineUri;
- List<int> outlineBytes;
final ExpectationSet expectationSet =
new ExpectationSet.fromJsonList(JSON.decode(EXPECTATIONS));
+ Future<Program> outline;
+
FastaContext(
this.vm,
bool strongMode,
@@ -124,16 +125,11 @@ class FastaContext extends ChainContext {
}
}
- Future<Program> loadPlatformOutline() async {
- if (outlineBytes == null) {
+ Future<Program> loadPlatformOutline() {
+ return outline ??= new Future<Program>(() async {
await ensurePlatformUris();
- outlineBytes = new File.fromUri(outlineUri).readAsBytesSync();
- }
- // Note: we rebuild the platform outline on every test because the compiler
- // currently mutates the in-memory representation of the program without
- // cloning it.
- // TODO(sigmund): investigate alternatives to this approach.
- return loadProgramFromBytes(outlineBytes);
+ return loadProgramFromBinary(outlineUri.toFilePath());
+ });
}
static Future<FastaContext> create(
@@ -229,7 +225,7 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
}
p = await sourceTarget.buildOutlines();
if (fullCompile) {
- p = await sourceTarget.buildProgram(trimDependencies: true);
+ p = await sourceTarget.buildProgram();
instrumentation?.finish();
if (instrumentation != null && instrumentation.hasProblems) {
if (updateComments) {
« no previous file with comments | « pkg/front_end/test/fasta/testing.json ('k') | pkg/front_end/test/src/base/processed_options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698