| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 class FastaCompile extends Step<TestDescription, Program, InterpreterContext> { | 74 class FastaCompile extends Step<TestDescription, Program, InterpreterContext> { |
| 75 const FastaCompile(); | 75 const FastaCompile(); |
| 76 | 76 |
| 77 String get name => "fasta compile"; | 77 String get name => "fasta compile"; |
| 78 | 78 |
| 79 Future<Result<Program>> run( | 79 Future<Result<Program>> run( |
| 80 TestDescription description, InterpreterContext context) async { | 80 TestDescription description, InterpreterContext context) async { |
| 81 Program platform = await context.loadPlatform(); | 81 Program platform = await context.loadPlatform(); |
| 82 Ticker ticker = new Ticker(); | 82 Ticker ticker = new Ticker(); |
| 83 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, "vm"); | 83 DillTarget dillTarget = |
| 84 new DillTarget(ticker, context.uriTranslator, "vm_fasta"); |
| 84 platform.unbindCanonicalNames(); | 85 platform.unbindCanonicalNames(); |
| 85 dillTarget.loader.appendLibraries(platform); | 86 dillTarget.loader.appendLibraries(platform); |
| 86 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, | 87 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, |
| 87 dillTarget, context.uriTranslator, context.strongMode); | 88 dillTarget, context.uriTranslator, context.strongMode); |
| 88 | 89 |
| 89 Program p; | 90 Program p; |
| 90 try { | 91 try { |
| 91 sourceTarget.read(description.uri); | 92 sourceTarget.read(description.uri); |
| 92 await dillTarget.buildOutlines(); | 93 await dillTarget.buildOutlines(); |
| 93 await sourceTarget.buildOutlines(); | 94 await sourceTarget.buildOutlines(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 final Uri uri; | 154 final Uri uri; |
| 154 | 155 |
| 155 /// Evaluated program log. | 156 /// Evaluated program log. |
| 156 final String log; | 157 final String log; |
| 157 | 158 |
| 158 EvaluationLog(this.uri, this.log); | 159 EvaluationLog(this.uri, this.log); |
| 159 } | 160 } |
| 160 | 161 |
| 161 main(List<String> arguments) => | 162 main(List<String> arguments) => |
| 162 runMe(arguments, InterpreterContext.create, "testing.json"); | 163 runMe(arguments, InterpreterContext.create, "testing.json"); |
| OLD | NEW |