OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library dart2js.cmdline; | 5 library dart2js.cmdline; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 import 'dart:convert' show UTF8, LineSplitter; | 8 import 'dart:convert' show UTF8, LineSplitter; |
9 import 'dart:io' show exit, File, FileMode, Platform, stdin, stderr; | 9 import 'dart:io' show exit, File, FileMode, Platform, stdin, stderr; |
10 | 10 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 showHints = false; | 321 showHints = false; |
322 }), | 322 }), |
323 // TODO(sigmund): remove entirely after Dart 1.20 | 323 // TODO(sigmund): remove entirely after Dart 1.20 |
324 new OptionHandler( | 324 new OptionHandler( |
325 '--output-type=dart|--output-type=dart-multi|--output-type=js', | 325 '--output-type=dart|--output-type=dart-multi|--output-type=js', |
326 setOutputType), | 326 setOutputType), |
327 // TODO(efortuna): Remove this once kernel global inference is fully | 327 // TODO(efortuna): Remove this once kernel global inference is fully |
328 // implemented. | 328 // implemented. |
329 new OptionHandler(Flags.kernelGlobalInference, passThrough), | 329 new OptionHandler(Flags.kernelGlobalInference, passThrough), |
330 new OptionHandler(Flags.useKernel, passThrough), | 330 new OptionHandler(Flags.useKernel, passThrough), |
331 new OptionHandler(Flags.loadFromDill, passThrough), | |
332 new OptionHandler(Flags.noFrequencyBasedMinification, passThrough), | 331 new OptionHandler(Flags.noFrequencyBasedMinification, passThrough), |
333 new OptionHandler(Flags.verbose, setVerbose), | 332 new OptionHandler(Flags.verbose, setVerbose), |
334 new OptionHandler(Flags.version, (_) => wantVersion = true), | 333 new OptionHandler(Flags.version, (_) => wantVersion = true), |
335 new OptionHandler('--library-root=.+', setLibraryRoot), | 334 new OptionHandler('--library-root=.+', setLibraryRoot), |
336 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), | 335 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), |
337 new OptionHandler(Flags.allowMockCompilation, passThrough), | 336 new OptionHandler(Flags.allowMockCompilation, passThrough), |
338 new OptionHandler(Flags.fastStartup, passThrough), | 337 new OptionHandler(Flags.fastStartup, passThrough), |
339 new OptionHandler(Flags.genericMethodSyntax, ignoreOption), | 338 new OptionHandler(Flags.genericMethodSyntax, ignoreOption), |
340 new OptionHandler(Flags.initializingFormalAccess, ignoreOption), | 339 new OptionHandler(Flags.initializingFormalAccess, ignoreOption), |
341 new OptionHandler('${Flags.minify}|-m', implyCompilation), | 340 new OptionHandler('${Flags.minify}|-m', implyCompilation), |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 @override | 1037 @override |
1039 void add(String event) { | 1038 void add(String event) { |
1040 sb.write(event); | 1039 sb.write(event); |
1041 } | 1040 } |
1042 | 1041 |
1043 @override | 1042 @override |
1044 void close() { | 1043 void close() { |
1045 // Do nothing. | 1044 // Do nothing. |
1046 } | 1045 } |
1047 } | 1046 } |
OLD | NEW |