| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 new OptionHandler('--enable-enum', (_) { | 396 new OptionHandler('--enable-enum', (_) { |
| 397 hints.add("Option '--enable-enum' is no longer needed. " | 397 hints.add("Option '--enable-enum' is no longer needed. " |
| 398 "Enums are supported by default."); | 398 "Enums are supported by default."); |
| 399 }), | 399 }), |
| 400 new OptionHandler(Flags.allowNativeExtensions, setAllowNativeExtensions), | 400 new OptionHandler(Flags.allowNativeExtensions, setAllowNativeExtensions), |
| 401 new OptionHandler(Flags.generateCodeWithCompileTimeErrors, passThrough), | 401 new OptionHandler(Flags.generateCodeWithCompileTimeErrors, passThrough), |
| 402 new OptionHandler(Flags.useMultiSourceInfo, passThrough), | 402 new OptionHandler(Flags.useMultiSourceInfo, passThrough), |
| 403 new OptionHandler(Flags.useNewSourceInfo, passThrough), | 403 new OptionHandler(Flags.useNewSourceInfo, passThrough), |
| 404 new OptionHandler(Flags.testMode, passThrough), | 404 new OptionHandler(Flags.testMode, passThrough), |
| 405 | 405 |
| 406 // Experimental features. |
| 407 // We don't provide documentation for these yet. |
| 408 // TODO(29574): provide documentation when this feature is supported. |
| 409 // TODO(29574): provide a warning/hint/error, when profile-based data is |
| 410 // used without `--fast-startup`. |
| 411 new OptionHandler(Flags.experimentalTrackAllocations, passThrough), |
| 412 new OptionHandler("${Flags.experimentalAllocationsPath}=.+", passThrough), |
| 413 |
| 406 // The following three options must come last. | 414 // The following three options must come last. |
| 407 new OptionHandler('-D.+=.*', addInEnvironment), | 415 new OptionHandler('-D.+=.*', addInEnvironment), |
| 408 new OptionHandler('-.*', (String argument) { | 416 new OptionHandler('-.*', (String argument) { |
| 409 helpAndFail("Unknown option '$argument'."); | 417 helpAndFail("Unknown option '$argument'."); |
| 410 }), | 418 }), |
| 411 new OptionHandler('.*', (String argument) { | 419 new OptionHandler('.*', (String argument) { |
| 412 arguments.add(nativeToUriPath(argument)); | 420 arguments.add(nativeToUriPath(argument)); |
| 413 }) | 421 }) |
| 414 ]; | 422 ]; |
| 415 | 423 |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 @override | 1046 @override |
| 1039 void add(String event) { | 1047 void add(String event) { |
| 1040 sb.write(event); | 1048 sb.write(event); |
| 1041 } | 1049 } |
| 1042 | 1050 |
| 1043 @override | 1051 @override |
| 1044 void close() { | 1052 void close() { |
| 1045 // Do nothing. | 1053 // Do nothing. |
| 1046 } | 1054 } |
| 1047 } | 1055 } |
| OLD | NEW |