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

Side by Side Diff: pkg/front_end/test/fasta/testing/suite.dart

Issue 2893563003: Rename buildOutline() and separate 'build' and 'writeProgram()'. (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library fasta.testing.suite; 5 library fasta.testing.suite;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:io' show File; 9 import 'dart:io' show File;
10 10
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 platformOutline.unbindCanonicalNames(); 209 platformOutline.unbindCanonicalNames();
210 dillTarget.loader.appendLibraries(platformOutline); 210 dillTarget.loader.appendLibraries(platformOutline);
211 KernelTarget sourceTarget = astKind == AstKind.Analyzer 211 KernelTarget sourceTarget = astKind == AstKind.Analyzer
212 ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode) 212 ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode)
213 : new KernelTarget(PhysicalFileSystem.instance, dillTarget, 213 : new KernelTarget(PhysicalFileSystem.instance, dillTarget,
214 context.uriTranslator, strongMode); 214 context.uriTranslator, strongMode);
215 215
216 Program p; 216 Program p;
217 try { 217 try {
218 sourceTarget.read(description.uri); 218 sourceTarget.read(description.uri);
219 await dillTarget.computeOutline(); 219 await dillTarget.buildOutlines();
220 ValidatingInstrumentation instrumentation; 220 ValidatingInstrumentation instrumentation;
221 if (strongMode) { 221 if (strongMode) {
222 instrumentation = new ValidatingInstrumentation(); 222 instrumentation = new ValidatingInstrumentation();
223 await instrumentation.loadExpectations(description.uri); 223 await instrumentation.loadExpectations(description.uri);
224 sourceTarget.loader.instrumentation = instrumentation; 224 sourceTarget.loader.instrumentation = instrumentation;
225 } 225 }
226 await sourceTarget.computeOutline(); 226 p = await sourceTarget.buildOutlines();
227 p = sourceTarget.program;
228 if (fullCompile) { 227 if (fullCompile) {
229 p = await sourceTarget.writeProgram(null); 228 p = await sourceTarget.buildProgram();
230 instrumentation?.finish(); 229 instrumentation?.finish();
231 if (instrumentation != null && instrumentation.hasProblems) { 230 if (instrumentation != null && instrumentation.hasProblems) {
232 if (updateComments) { 231 if (updateComments) {
233 await instrumentation.fixSource(description.uri); 232 await instrumentation.fixSource(description.uri);
234 } else { 233 } else {
235 return fail(null, instrumentation.problemsAsString); 234 return fail(null, instrumentation.problemsAsString);
236 } 235 }
237 } 236 }
238 } 237 }
239 } on InputError catch (e, s) { 238 } on InputError catch (e, s) {
240 return fail(null, e.error, s); 239 return fail(null, e.error, s);
241 } 240 }
242 return pass(p); 241 return pass(p);
243 } 242 }
244 } 243 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/incremental_kernel_generator_impl.dart ('k') | pkg/front_end/tool/fasta_perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698