| 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 'dart:io' show File; | 9 import 'dart:io' show File; |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 class FastaCompile extends Step<TestDescription, Program, InterpreterContext> { | 69 class FastaCompile extends Step<TestDescription, Program, InterpreterContext> { |
| 70 const FastaCompile(); | 70 const FastaCompile(); |
| 71 | 71 |
| 72 String get name => "fasta compile"; | 72 String get name => "fasta compile"; |
| 73 | 73 |
| 74 Future<Result<Program>> run( | 74 Future<Result<Program>> run( |
| 75 TestDescription description, InterpreterContext context) async { | 75 TestDescription description, InterpreterContext context) async { |
| 76 Program platform = await context.loadPlatform(); | 76 Program platform = await context.loadPlatform(); |
| 77 Ticker ticker = new Ticker(); | 77 Ticker ticker = new Ticker(); |
| 78 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); | 78 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); |
| 79 platform.unbindCanonicalNames(); |
| 79 dillTarget.loader.appendLibraries(platform); | 80 dillTarget.loader.appendLibraries(platform); |
| 80 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, | 81 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, |
| 81 dillTarget, context.uriTranslator, context.strongMode); | 82 dillTarget, context.uriTranslator, context.strongMode); |
| 82 | 83 |
| 83 Program p; | 84 Program p; |
| 84 try { | 85 try { |
| 85 sourceTarget.read(description.uri); | 86 sourceTarget.read(description.uri); |
| 86 await dillTarget.writeOutline(null); | 87 await dillTarget.writeOutline(null); |
| 87 await sourceTarget.writeOutline(null); | 88 await sourceTarget.writeOutline(null); |
| 88 p = await sourceTarget.writeProgram(null); | 89 p = await sourceTarget.writeProgram(null); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 final Uri uri; | 148 final Uri uri; |
| 148 | 149 |
| 149 /// Evaluated program log. | 150 /// Evaluated program log. |
| 150 final String log; | 151 final String log; |
| 151 | 152 |
| 152 EvaluationLog(this.uri, this.log); | 153 EvaluationLog(this.uri, this.log); |
| 153 } | 154 } |
| 154 | 155 |
| 155 main(List<String> arguments) => | 156 main(List<String> arguments) => |
| 156 runMe(arguments, InterpreterContext.create, "testing.json"); | 157 runMe(arguments, InterpreterContext.create, "testing.json"); |
| OLD | NEW |