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' show PhysicalFileSystem; | 9 import 'package:front_end/physical_file_system.dart' show PhysicalFileSystem; |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 class FastaCompile | 92 class FastaCompile |
93 extends Step<TestDescription, Program, ClosureConversionContext> { | 93 extends Step<TestDescription, Program, ClosureConversionContext> { |
94 const FastaCompile(); | 94 const FastaCompile(); |
95 | 95 |
96 String get name => "fasta compilation"; | 96 String get name => "fasta compilation"; |
97 | 97 |
98 Future<Result<Program>> run( | 98 Future<Result<Program>> run( |
99 TestDescription description, ClosureConversionContext context) async { | 99 TestDescription description, ClosureConversionContext context) async { |
100 Program platform = await context.loadPlatform(); | 100 Program platform = await context.loadPlatform(); |
101 Ticker ticker = new Ticker(); | 101 Ticker ticker = new Ticker(); |
102 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, "vm"); | 102 DillTarget dillTarget = |
| 103 new DillTarget(ticker, context.uriTranslator, "vm_fasta"); |
103 platform.unbindCanonicalNames(); | 104 platform.unbindCanonicalNames(); |
104 dillTarget.loader.appendLibraries(platform); | 105 dillTarget.loader.appendLibraries(platform); |
105 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, | 106 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, |
106 dillTarget, context.uriTranslator, context.strongMode); | 107 dillTarget, context.uriTranslator, context.strongMode); |
107 | 108 |
108 Program p; | 109 Program p; |
109 try { | 110 try { |
110 sourceTarget.read(description.uri); | 111 sourceTarget.read(description.uri); |
111 await dillTarget.buildOutlines(); | 112 await dillTarget.buildOutlines(); |
112 await sourceTarget.buildOutlines(); | 113 await sourceTarget.buildOutlines(); |
(...skipping 17 matching lines...) Expand all Loading... |
130 CoreTypes coreTypes = new CoreTypes(program); | 131 CoreTypes coreTypes = new CoreTypes(program); |
131 program = closure_conversion.transformProgram(coreTypes, program); | 132 program = closure_conversion.transformProgram(coreTypes, program); |
132 return pass(program); | 133 return pass(program); |
133 } catch (e, s) { | 134 } catch (e, s) { |
134 return crash(e, s); | 135 return crash(e, s); |
135 } | 136 } |
136 } | 137 } |
137 } | 138 } |
138 | 139 |
139 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 140 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
OLD | NEW |