| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.run(vm.toFilePath(), [ | 106 final StdioProcess process = await StdioProcess.run(vm.toFilePath(), [ |
| 107 "--reify", | 107 "--reify", |
| 108 "--reify_generic_functions", | 108 "--reify_generic_functions", |
| 109 "-c", |
| 109 generated.path, | 110 generated.path, |
| 110 "Hello, World!" | 111 "Hello, World!" |
| 111 ]); | 112 ]); |
| 112 print(process.output); | 113 print(process.output); |
| 113 return process.toResult(); | 114 return process.toResult(); |
| 114 } finally { | 115 } finally { |
| 115 generated.parent.delete(recursive: true); | 116 generated.parent.delete(recursive: true); |
| 116 } | 117 } |
| 117 } | 118 } |
| 118 } | 119 } |
| 119 | 120 |
| 120 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 121 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
| OLD | NEW |