Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.run; | 5 library fasta.run; |
|
ahe
2017/04/20 09:37:14
We can probably remove this and use kernel-service
Siggi Cherem (dart-lang)
2017/04/21 04:29:23
good to know - I'll tackle this on a separate CL
| |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:io' show stdout, exit, exitCode; | 9 import 'dart:io' show stdout, exit, exitCode; |
| 10 | 10 |
| 11 import 'package:testing/testing.dart' show StdioProcess; | 11 import 'package:testing/testing.dart' show StdioProcess; |
| 12 | 12 |
| 13 import 'testing/kernel_chain.dart' show computeDartVm, computePatchedSdk; | 13 import 'patched_sdk_location.dart' show computeDartVm, computePatchedSdk; |
| 14 | 14 |
| 15 import 'compiler_context.dart' show CompilerContext; | 15 import 'compiler_context.dart' show CompilerContext; |
| 16 | 16 |
| 17 import 'compiler_command_line.dart' show CompilerCommandLine; | 17 import 'compiler_command_line.dart' show CompilerCommandLine; |
| 18 | 18 |
| 19 import 'fasta.dart' show CompileTask; | 19 import 'fasta.dart' show CompileTask; |
| 20 | 20 |
| 21 import 'errors.dart' show InputError; | 21 import 'errors.dart' show InputError; |
| 22 | 22 |
| 23 import 'ticker.dart' show Ticker; | 23 import 'ticker.dart' show Ticker; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 53 Uri dartVm = computeDartVm(sdk); | 53 Uri dartVm = computeDartVm(sdk); |
| 54 List<String> arguments = <String>["${uri.toFilePath()}"] | 54 List<String> arguments = <String>["${uri.toFilePath()}"] |
| 55 ..addAll(c.options.arguments.skip(1)); | 55 ..addAll(c.options.arguments.skip(1)); |
| 56 if (c.options.verbose) { | 56 if (c.options.verbose) { |
| 57 print("Running ${dartVm.toFilePath()} ${arguments.join(' ')}"); | 57 print("Running ${dartVm.toFilePath()} ${arguments.join(' ')}"); |
| 58 } | 58 } |
| 59 StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments); | 59 StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments); |
| 60 stdout.write(result.output); | 60 stdout.write(result.output); |
| 61 return result.exitCode; | 61 return result.exitCode; |
| 62 } | 62 } |
| OLD | NEW |