OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. |
| 5 |
| 6 import 'package:kernel/kernel.dart'; |
| 7 import 'package:kernel/interpreter/interpreter.dart'; |
| 8 import 'dart:io'; |
| 9 |
| 10 fail(String message) { |
| 11 stderr.writeln(message); |
| 12 exit(1); |
| 13 } |
| 14 |
| 15 main(List<String> args) { |
| 16 if (args.length == 1 && args[0].endsWith('.dill')) { |
| 17 var program = loadProgramFromBinary(args[0]); |
| 18 new Interpreter(program).evalProgram(); |
| 19 } else { |
| 20 return fail('One input binary file should be specified.'); |
| 21 } |
| 22 } |
OLD | NEW |