| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 final bool updateComments; | 225 final bool updateComments; |
| 226 | 226 |
| 227 String get name { | 227 String get name { |
| 228 return fullCompile ? "${astKind} compile" : "outline"; | 228 return fullCompile ? "${astKind} compile" : "outline"; |
| 229 } | 229 } |
| 230 | 230 |
| 231 bool get isCompiler => fullCompile; | 231 bool get isCompiler => fullCompile; |
| 232 | 232 |
| 233 Future<Result<Program>> run( | 233 Future<Result<Program>> run( |
| 234 TestDescription description, FastaContext context) async { | 234 TestDescription description, FastaContext context) async { |
| 235 var options = | 235 var options = new ProcessedOptions(new CompilerOptions()); |
| 236 new ProcessedOptions(new CompilerOptions()..throwOnErrors = false); | |
| 237 return await CompilerContext.runWithOptions(options, (_) async { | 236 return await CompilerContext.runWithOptions(options, (_) async { |
| 238 // Disable colors to ensure that expectation files are the same across | 237 // Disable colors to ensure that expectation files are the same across |
| 239 // platforms and independent of stdin/stderr. | 238 // platforms and independent of stdin/stderr. |
| 240 CompilerContext.current.disableColors(); | 239 CompilerContext.current.disableColors(); |
| 241 Program platformOutline = await context.loadPlatformOutline(); | 240 Program platformOutline = await context.loadPlatformOutline(); |
| 242 Ticker ticker = new Ticker(); | 241 Ticker ticker = new Ticker(); |
| 243 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, | 242 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, |
| 244 new TestVmFastaTarget(new TargetFlags(strongMode: strongMode))); | 243 new TestVmFastaTarget(new TargetFlags(strongMode: strongMode))); |
| 245 platformOutline.unbindCanonicalNames(); | 244 platformOutline.unbindCanonicalNames(); |
| 246 dillTarget.loader.appendLibraries(platformOutline); | 245 dillTarget.loader.appendLibraries(platformOutline); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 } | 323 } |
| 325 } | 324 } |
| 326 | 325 |
| 327 void performGlobalTransformations(CoreTypes coreTypes, Program program, | 326 void performGlobalTransformations(CoreTypes coreTypes, Program program, |
| 328 {void logger(String msg)}) { | 327 {void logger(String msg)}) { |
| 329 if (enabled) { | 328 if (enabled) { |
| 330 super.performGlobalTransformations(coreTypes, program, logger: logger); | 329 super.performGlobalTransformations(coreTypes, program, logger: logger); |
| 331 } | 330 } |
| 332 } | 331 } |
| 333 } | 332 } |
| OLD | NEW |