Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/dart2js.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart |
| index e30543a8ea85a4bd8db1d64dd710c1a3115c2991..4b02fc6a23144ab4d5ae4f0598c204b7cdce7e5c 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/dart2js.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart |
| @@ -6,7 +6,7 @@ library dart2js.cmdline; |
| import 'dart:async'; |
| import 'dart:io' |
| - show exit, File, FileMode, Options, Platform, RandomAccessFile; |
| + show exit, File, FileMode, Platform, RandomAccessFile; |
| import 'dart:math' as math; |
| import '../compiler.dart' as api; |
| @@ -452,11 +452,10 @@ void fail(String message) { |
| exit(1); |
| } |
| -Future compilerMain(Options options) { |
| +Future compilerMain(List<String> args) { |
|
ahe
2013/10/29 16:10:09
Please don't abbreviate: args -> arguments.
|
| var root = uriPathToNative("/$LIBRARY_ROOT"); |
| - List<String> argv = ['--library-root=${options.script}$root']; |
| - argv.addAll(options.arguments); |
| - return compile(argv); |
| + args = <String>['--library-root=${Platform.script}$root']..addAll(args); |
| + return compile(args); |
| } |
| void help() { |
| @@ -589,8 +588,8 @@ void helpAndFail(String message) { |
| fail(message); |
| } |
| -void mainWithErrorHandler(Options options) { |
| - runZoned(() => compilerMain(options), onError: (exception) { |
| +void main(List<String> args) { |
|
ahe
2013/10/29 16:10:09
args -> arguments.
|
| + runZoned(() => compilerMain(args), onError: (exception) { |
| try { |
| print('Internal error: $exception'); |
| } catch (ignored) { |
| @@ -607,7 +606,3 @@ void mainWithErrorHandler(Options options) { |
| } |
| }); |
| } |
| - |
| -void main() { |
| - mainWithErrorHandler(new Options()); |
| -} |