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 = | 102 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, "vm"); |
103 new DillTarget(ticker, context.uriTranslator, "vm_fasta"); | |
104 platform.unbindCanonicalNames(); | 103 platform.unbindCanonicalNames(); |
105 dillTarget.loader.appendLibraries(platform); | 104 dillTarget.loader.appendLibraries(platform); |
106 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, | 105 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, |
107 dillTarget, context.uriTranslator, context.strongMode); | 106 dillTarget, context.uriTranslator, context.strongMode); |
108 | 107 |
109 Program p; | 108 Program p; |
110 try { | 109 try { |
111 sourceTarget.read(description.uri); | 110 sourceTarget.read(description.uri); |
112 await dillTarget.buildOutlines(); | 111 await dillTarget.buildOutlines(); |
113 await sourceTarget.buildOutlines(); | 112 await sourceTarget.buildOutlines(); |
(...skipping 17 matching lines...) Expand all Loading... |
131 CoreTypes coreTypes = new CoreTypes(program); | 130 CoreTypes coreTypes = new CoreTypes(program); |
132 program = closure_conversion.transformProgram(coreTypes, program); | 131 program = closure_conversion.transformProgram(coreTypes, program); |
133 return pass(program); | 132 return pass(program); |
134 } catch (e, s) { | 133 } catch (e, s) { |
135 return crash(e, s); | 134 return crash(e, s); |
136 } | 135 } |
137 } | 136 } |
138 } | 137 } |
139 | 138 |
140 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 139 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
OLD | NEW |