| 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:io' show File; | 7 import 'dart:io' show File; |
| 8 | 8 |
| 9 import 'dart:async' show Future; | 9 import 'dart:async' show Future; |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 class Run extends Step<Uri, int, ClosureConversionContext> { | 96 class Run extends Step<Uri, int, ClosureConversionContext> { |
| 97 const Run(); | 97 const Run(); |
| 98 | 98 |
| 99 String get name => "run"; | 99 String get name => "run"; |
| 100 | 100 |
| 101 Future<Result<int>> run(Uri uri, ClosureConversionContext context) async { | 101 Future<Result<int>> run(Uri uri, ClosureConversionContext context) async { |
| 102 final File generated = new File.fromUri(uri); | 102 final File generated = new File.fromUri(uri); |
| 103 try { | 103 try { |
| 104 Uri sdk = await computePatchedSdk(); | 104 Uri sdk = await computePatchedSdk(); |
| 105 Uri vm = computeDartVm(sdk); | 105 Uri vm = computeDartVm(sdk); |
| 106 final StdioProcess process = await StdioProcess | 106 final StdioProcess process = await StdioProcess.run(vm.toFilePath(), [ |
| 107 .run(vm.toFilePath(), [generated.path, "Hello, World!"]); | 107 "--reify", |
| 108 "--reify_generic_functions", |
| 109 generated.path, |
| 110 "Hello, World!" |
| 111 ]); |
| 108 print(process.output); | 112 print(process.output); |
| 109 return process.toResult(); | 113 return process.toResult(); |
| 110 } finally { | 114 } finally { |
| 111 generated.parent.delete(recursive: true); | 115 generated.parent.delete(recursive: true); |
| 112 } | 116 } |
| 113 } | 117 } |
| 114 } | 118 } |
| 115 | 119 |
| 116 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 120 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
| OLD | NEW |