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

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

Issue 2897683002: Move code for instantiating Invocation to Target. (Closed)
Patch Set: Rename vmTarget to targetInfo. 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 String get name { 202 String get name {
203 return fullCompile ? "${astKind} compile" : "outline"; 203 return fullCompile ? "${astKind} compile" : "outline";
204 } 204 }
205 205
206 bool get isCompiler => fullCompile; 206 bool get isCompiler => fullCompile;
207 207
208 Future<Result<Program>> run( 208 Future<Result<Program>> run(
209 TestDescription description, FastaContext context) async { 209 TestDescription description, FastaContext context) async {
210 Program platformOutline = await context.loadPlatformOutline(); 210 Program platformOutline = await context.loadPlatformOutline();
211 Ticker ticker = new Ticker(); 211 Ticker ticker = new Ticker();
212 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); 212 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, "vm");
213 platformOutline.unbindCanonicalNames(); 213 platformOutline.unbindCanonicalNames();
214 dillTarget.loader.appendLibraries(platformOutline); 214 dillTarget.loader.appendLibraries(platformOutline);
215 KernelTarget sourceTarget = astKind == AstKind.Analyzer 215 KernelTarget sourceTarget = astKind == AstKind.Analyzer
216 ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode) 216 ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode)
217 : new KernelTarget(PhysicalFileSystem.instance, dillTarget, 217 : new KernelTarget(PhysicalFileSystem.instance, dillTarget,
218 context.uriTranslator, strongMode); 218 context.uriTranslator, strongMode);
219 219
220 Program p; 220 Program p;
221 try { 221 try {
222 sourceTarget.read(description.uri); 222 sourceTarget.read(description.uri);
(...skipping 15 matching lines...) Expand all
238 return fail(null, instrumentation.problemsAsString); 238 return fail(null, instrumentation.problemsAsString);
239 } 239 }
240 } 240 }
241 } 241 }
242 } on InputError catch (e, s) { 242 } on InputError catch (e, s) {
243 return fail(null, e.error, s); 243 return fail(null, e.error, s);
244 } 244 }
245 return pass(p); 245 return pass(p);
246 } 246 }
247 } 247 }
OLDNEW
« no previous file with comments | « pkg/front_end/test/fasta/shaker_test.dart ('k') | pkg/front_end/testcases/super_rasta_copy.dart.direct.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698