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' | 7 import 'dart:async' |
8 show Future, EventSink; | 8 show Future, EventSink; |
9 import 'dart:convert' show UTF8, LineSplitter; | 9 import 'dart:convert' show UTF8, LineSplitter; |
10 import 'dart:io' | 10 import 'dart:io' |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 setOutputType), | 311 setOutputType), |
312 new OptionHandler(Flags.useCpsIr, passThrough), | 312 new OptionHandler(Flags.useCpsIr, passThrough), |
313 new OptionHandler(Flags.noFrequencyBasedMinification, passThrough), | 313 new OptionHandler(Flags.noFrequencyBasedMinification, passThrough), |
314 new OptionHandler(Flags.verbose, setVerbose), | 314 new OptionHandler(Flags.verbose, setVerbose), |
315 new OptionHandler(Flags.version, (_) => wantVersion = true), | 315 new OptionHandler(Flags.version, (_) => wantVersion = true), |
316 new OptionHandler('--library-root=.+', setLibraryRoot), | 316 new OptionHandler('--library-root=.+', setLibraryRoot), |
317 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), | 317 new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true), |
318 new OptionHandler(Flags.allowMockCompilation, passThrough), | 318 new OptionHandler(Flags.allowMockCompilation, passThrough), |
319 new OptionHandler(Flags.fastStartup, passThrough), | 319 new OptionHandler(Flags.fastStartup, passThrough), |
320 new OptionHandler(Flags.conditionalDirectives, passThrough), | 320 new OptionHandler(Flags.conditionalDirectives, passThrough), |
| 321 new OptionHandler(Flags.genericMethods, passThrough), |
321 new OptionHandler('${Flags.minify}|-m', implyCompilation), | 322 new OptionHandler('${Flags.minify}|-m', implyCompilation), |
322 new OptionHandler(Flags.preserveUris, passThrough), | 323 new OptionHandler(Flags.preserveUris, passThrough), |
323 new OptionHandler('--force-strip=.*', setStrip), | 324 new OptionHandler('--force-strip=.*', setStrip), |
324 new OptionHandler(Flags.disableDiagnosticColors, | 325 new OptionHandler(Flags.disableDiagnosticColors, |
325 (_) => diagnosticHandler.enableColors = false), | 326 (_) => diagnosticHandler.enableColors = false), |
326 new OptionHandler(Flags.enableDiagnosticColors, | 327 new OptionHandler(Flags.enableDiagnosticColors, |
327 (_) => diagnosticHandler.enableColors = true), | 328 (_) => diagnosticHandler.enableColors = true), |
328 new OptionHandler('--enable[_-]checked[_-]mode|--checked', | 329 new OptionHandler('--enable[_-]checked[_-]mode|--checked', |
329 (_) => setCheckedMode(Flags.enableCheckedMode)), | 330 (_) => setCheckedMode(Flags.enableCheckedMode)), |
330 new OptionHandler(Flags.trustTypeAnnotations, | 331 new OptionHandler(Flags.trustTypeAnnotations, |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 } else if (exitCode == 253) { | 768 } else if (exitCode == 253) { |
768 print(">>> TEST CRASH"); | 769 print(">>> TEST CRASH"); |
769 } else { | 770 } else { |
770 print(">>> TEST FAIL"); | 771 print(">>> TEST FAIL"); |
771 } | 772 } |
772 stderr.writeln(">>> EOF STDERR"); | 773 stderr.writeln(">>> EOF STDERR"); |
773 subscription.resume(); | 774 subscription.resume(); |
774 }); | 775 }); |
775 }); | 776 }); |
776 } | 777 } |
OLD | NEW |