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

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

Issue 2976543002: Reapply "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service."" (Closed)
Patch Set: fix Created 3 years, 5 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/testing/suite.dart
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index ed6c64dc864660be9d018792e5d60b3cbbe53569..37acdba90a8109556f30caa3d5c75fe25581a0f3 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -98,7 +98,7 @@ class FastaContext extends ChainContext {
Uri sdk;
Uri platformUri;
Uri outlineUri;
- List<int> outlineBytes;
+ Program outline;
final ExpectationSet expectationSet =
new ExpectationSet.fromJsonList(JSON.decode(EXPECTATIONS));
@@ -139,15 +139,12 @@ class FastaContext extends ChainContext {
}
Future<Program> loadPlatformOutline() async {
- if (outlineBytes == null) {
+ if (outline == null) {
await ensurePlatformUris();
- outlineBytes = new File.fromUri(outlineUri).readAsBytesSync();
+ outline =
+ loadProgramFromBytes(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 outline;
}
static Future<FastaContext> create(
@@ -259,7 +256,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) {

Powered by Google App Engine
This is Rietveld 408576698