| 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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 problems. | 731 problems. |
| 732 | 732 |
| 733 --show-package-warnings | 733 --show-package-warnings |
| 734 Show warnings and hints generated from packages. | 734 Show warnings and hints generated from packages. |
| 735 | 735 |
| 736 --preserve-uris | 736 --preserve-uris |
| 737 Preserve the source URIs in the reflection data. Without this flag the | 737 Preserve the source URIs in the reflection data. Without this flag the |
| 738 `uri` getter for `LibraryMirror`s is mangled in minified mode. | 738 `uri` getter for `LibraryMirror`s is mangled in minified mode. |
| 739 | 739 |
| 740 --csp | 740 --csp |
| 741 Disables dynamic generation of code in the generated output. This is | 741 Disable dynamic generation of code in the generated output. This is |
| 742 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). | 742 necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/). |
| 743 | 743 |
| 744 --no-source-maps | 744 --no-source-maps |
| 745 Do not generate a source map file. | 745 Do not generate a source map file. |
| 746 | 746 |
| 747 --fast-startup |
| 748 Produce JavaScript that can be parsed more quickly by VMs. This option |
| 749 usually results in larger JavaScript files with faster startup. |
| 750 Note: the dart:mirrors library is not supported with this option. |
| 751 |
| 752 The following advanced options can help reduce the size of the generated code, |
| 753 but they may cause programs to behave unexpectedly if assumptions are not met. |
| 754 Only turn on these flags if you have enough test coverage to ensure they are |
| 755 safe to use: |
| 756 |
| 757 --trust-type-annotations |
| 758 Assume that all types are correct. This option allows the compiler to drop |
| 759 type checks and to rely on local type information for optimizations. Use |
| 760 this option only if you have enough testing to ensure that your program |
| 761 works in strong mode or checked mode. |
| 762 |
| 763 --trust-primitives |
| 764 Assume that operations on numbers, strings, and lists have valid inputs. |
| 765 This option allows the compiler to drop runtime checks for those operations. |
| 766 Note: a well-typed program is not guaranteed to have valid inputs. For |
| 767 example, an int index argument may be null or out of range. |
| 768 |
| 747 The following options are only used for compiler development and may | 769 The following options are only used for compiler development and may |
| 748 be removed in a future version: | 770 be removed in a future version: |
| 749 | 771 |
| 750 --throw-on-error | 772 --throw-on-error |
| 751 Throw an exception if a compile-time error is detected. | 773 Throw an exception if a compile-time error is detected. |
| 752 | 774 |
| 753 --library-root=<directory> | 775 --library-root=<directory> |
| 754 Where to find the Dart platform libraries. | 776 Where to find the Dart platform libraries. |
| 755 | 777 |
| 756 --allow-mock-compilation | 778 --allow-mock-compilation |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 @override | 1112 @override |
| 1091 void add(String event) { | 1113 void add(String event) { |
| 1092 sb.write(event); | 1114 sb.write(event); |
| 1093 } | 1115 } |
| 1094 | 1116 |
| 1095 @override | 1117 @override |
| 1096 void close() { | 1118 void close() { |
| 1097 // Do nothing. | 1119 // Do nothing. |
| 1098 } | 1120 } |
| 1099 } | 1121 } |
| OLD | NEW |