OLD | NEW |
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 dillTarget.loader.appendLibraries(platformOutline); | 233 dillTarget.loader.appendLibraries(platformOutline); |
234 // We create a new URI translator to avoid reading platform libraries from | 234 // We create a new URI translator to avoid reading platform libraries from |
235 // file system. | 235 // file system. |
236 UriTranslatorImpl uriTranslator = new UriTranslatorImpl( | 236 UriTranslatorImpl uriTranslator = new UriTranslatorImpl( |
237 const <String, Uri>{}, | 237 const <String, Uri>{}, |
238 const <String, List<Uri>>{}, | 238 const <String, List<Uri>>{}, |
239 context.uriTranslator.packages); | 239 context.uriTranslator.packages); |
240 KernelTarget sourceTarget = astKind == AstKind.Analyzer | 240 KernelTarget sourceTarget = astKind == AstKind.Analyzer |
241 ? new AnalyzerTarget(dillTarget, uriTranslator, strongMode) | 241 ? new AnalyzerTarget(dillTarget, uriTranslator, strongMode) |
242 : new KernelTarget( | 242 : new KernelTarget( |
243 PhysicalFileSystem.instance, dillTarget, uriTranslator); | 243 PhysicalFileSystem.instance, false, dillTarget, uriTranslator); |
244 | 244 |
245 Program p; | 245 Program p; |
246 try { | 246 try { |
247 sourceTarget.read(description.uri); | 247 sourceTarget.read(description.uri); |
248 await dillTarget.buildOutlines(); | 248 await dillTarget.buildOutlines(); |
249 ValidatingInstrumentation instrumentation; | 249 ValidatingInstrumentation instrumentation; |
250 if (strongMode) { | 250 if (strongMode) { |
251 instrumentation = new ValidatingInstrumentation(); | 251 instrumentation = new ValidatingInstrumentation(); |
252 await instrumentation.loadExpectations(description.uri); | 252 await instrumentation.loadExpectations(description.uri); |
253 sourceTarget.loader.instrumentation = instrumentation; | 253 sourceTarget.loader.instrumentation = instrumentation; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 void performGlobalTransformations(CoreTypes coreTypes, Program program, | 314 void performGlobalTransformations(CoreTypes coreTypes, Program program, |
315 {void logger(String msg)}) { | 315 {void logger(String msg)}) { |
316 if (enabled) { | 316 if (enabled) { |
317 super.performGlobalTransformations(coreTypes, program, logger: logger); | 317 super.performGlobalTransformations(coreTypes, program, logger: logger); |
318 } | 318 } |
319 } | 319 } |
320 } | 320 } |
OLD | NEW |