| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 passThrough(Flags.suppressWarnings); | 328 passThrough(Flags.suppressWarnings); |
| 329 }), | 329 }), |
| 330 new OptionHandler(Flags.fatalWarnings, passThrough), | 330 new OptionHandler(Flags.fatalWarnings, passThrough), |
| 331 new OptionHandler(Flags.suppressHints, (_) { | 331 new OptionHandler(Flags.suppressHints, (_) { |
| 332 showHints = false; | 332 showHints = false; |
| 333 }), | 333 }), |
| 334 // TODO(sigmund): remove entirely after Dart 1.20 | 334 // TODO(sigmund): remove entirely after Dart 1.20 |
| 335 new OptionHandler( | 335 new OptionHandler( |
| 336 '--output-type=dart|--output-type=dart-multi|--output-type=js', | 336 '--output-type=dart|--output-type=dart-multi|--output-type=js', |
| 337 setOutputType), | 337 setOutputType), |
| 338 // TODO(efortuna): Remove this once kernel global inference is fully | |
| 339 // implemented. | |
| 340 new OptionHandler(Flags.kernelGlobalInference, passThrough), | |
| 341 new OptionHandler(Flags.useKernelInSsa, passThrough), | 338 new OptionHandler(Flags.useKernelInSsa, passThrough), |
| 342 new OptionHandler(Flags.useKernel, setPreviewDart2), | 339 new OptionHandler(Flags.useKernel, setPreviewDart2), |
| 343 new OptionHandler(Flags.noFrequencyBasedMinification, passThrough), | 340 new OptionHandler(Flags.noFrequencyBasedMinification, passThrough), |
| 344 new OptionHandler(Flags.verbose, setVerbose), | 341 new OptionHandler(Flags.verbose, setVerbose), |
| 345 new OptionHandler(Flags.version, (_) => wantVersion = true), | 342 new OptionHandler(Flags.version, (_) => wantVersion = true), |
| 346 new OptionHandler('--library-root=.+', setLibraryRoot), | 343 new OptionHandler('--library-root=.+', setLibraryRoot), |
| 347 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), | 344 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), |
| 348 new OptionHandler(Flags.allowMockCompilation, passThrough), | 345 new OptionHandler(Flags.allowMockCompilation, passThrough), |
| 349 new OptionHandler(Flags.fastStartup, passThrough), | 346 new OptionHandler(Flags.fastStartup, passThrough), |
| 350 new OptionHandler(Flags.genericMethodSyntax, ignoreOption), | 347 new OptionHandler(Flags.genericMethodSyntax, ignoreOption), |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 @override | 1113 @override |
| 1117 void add(String event) { | 1114 void add(String event) { |
| 1118 sb.write(event); | 1115 sb.write(event); |
| 1119 } | 1116 } |
| 1120 | 1117 |
| 1121 @override | 1118 @override |
| 1122 void close() { | 1119 void close() { |
| 1123 // Do nothing. | 1120 // Do nothing. |
| 1124 } | 1121 } |
| 1125 } | 1122 } |
| OLD | NEW |