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

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

Issue 2828693003: Add local type inference logic for integer literals. (Closed)
Patch Set: Sort declarations 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/testing/suite.dart
diff --git a/pkg/front_end/lib/src/fasta/testing/suite.dart b/pkg/front_end/lib/src/fasta/testing/suite.dart
index d8137f9ae38877ff5d84ff568fce6a5ec4367b30..1ee8161b1376f72911c8105452f7c8e3f35e4f62 100644
--- a/pkg/front_end/lib/src/fasta/testing/suite.dart
+++ b/pkg/front_end/lib/src/fasta/testing/suite.dart
@@ -180,7 +180,8 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
TestDescription description, FastaContext context) async {
Program platform = await context.createPlatform();
Ticker ticker = new Ticker();
- DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator);
+ DillTarget dillTarget =
+ new DillTarget(ticker, context.uriTranslator, strongMode);
dillTarget.loader
..input = Uri.parse("org.dartlang:platform") // Make up a name.
..setProgram(platform);
@@ -192,14 +193,17 @@ class Outline extends Step<TestDescription, Program, FastaContext> {
try {
sourceTarget.read(description.uri);
await dillTarget.writeOutline(null);
- var instrumentation = new ValidatingInstrumentation();
- await instrumentation.loadExpectations(description.uri);
- sourceTarget.loader.instrumentation = instrumentation;
+ ValidatingInstrumentation instrumentation;
+ if (strongMode) {
+ instrumentation = new ValidatingInstrumentation();
+ await instrumentation.loadExpectations(description.uri);
+ sourceTarget.loader.instrumentation = instrumentation;
+ }
p = await sourceTarget.writeOutline(null);
if (fullCompile) {
p = await sourceTarget.writeProgram(null);
- instrumentation.finish();
- if (instrumentation.hasProblems) {
+ instrumentation?.finish();
+ if (instrumentation != null && instrumentation.hasProblems) {
if (updateExpectations) {
await instrumentation.fixSource(description.uri);
} else {

Powered by Google App Engine
This is Rietveld 408576698