| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 test.kernel.closures.suite; | 5 library test.kernel.closures.suite; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:front_end/physical_file_system.dart'; | 9 import 'package:front_end/physical_file_system.dart'; |
| 10 import 'package:testing/testing.dart' | 10 import 'package:testing/testing.dart' |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 extends Step<TestDescription, Program, ClosureConversionContext> { | 86 extends Step<TestDescription, Program, ClosureConversionContext> { |
| 87 const FastaCompile(); | 87 const FastaCompile(); |
| 88 | 88 |
| 89 String get name => "fasta compilation"; | 89 String get name => "fasta compilation"; |
| 90 | 90 |
| 91 Future<Result<Program>> run( | 91 Future<Result<Program>> run( |
| 92 TestDescription description, ClosureConversionContext context) async { | 92 TestDescription description, ClosureConversionContext context) async { |
| 93 Program platform = await context.loadPlatform(); | 93 Program platform = await context.loadPlatform(); |
| 94 Ticker ticker = new Ticker(); | 94 Ticker ticker = new Ticker(); |
| 95 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); | 95 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); |
| 96 platform.unbindCanonicalNames(); |
| 96 dillTarget.loader.appendLibraries(platform); | 97 dillTarget.loader.appendLibraries(platform); |
| 97 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, | 98 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, |
| 98 dillTarget, context.uriTranslator, context.strongMode); | 99 dillTarget, context.uriTranslator, context.strongMode); |
| 99 | 100 |
| 100 Program p; | 101 Program p; |
| 101 try { | 102 try { |
| 102 sourceTarget.read(description.uri); | 103 sourceTarget.read(description.uri); |
| 103 await dillTarget.writeOutline(null); | 104 await dillTarget.writeOutline(null); |
| 104 await sourceTarget.writeOutline(null); | 105 await sourceTarget.writeOutline(null); |
| 105 p = await sourceTarget.writeProgram(null); | 106 p = await sourceTarget.writeProgram(null); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 121 try { | 122 try { |
| 122 program = closure_conversion.transformProgram(program); | 123 program = closure_conversion.transformProgram(program); |
| 123 return pass(program); | 124 return pass(program); |
| 124 } catch (e, s) { | 125 } catch (e, s) { |
| 125 return crash(e, s); | 126 return crash(e, s); |
| 126 } | 127 } |
| 127 } | 128 } |
| 128 } | 129 } |
| 129 | 130 |
| 130 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 131 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
| OLD | NEW |