Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(870)

Unified Diff: pkg/compiler/lib/src/dart2js.dart

Issue 2974133002: Document dart2js flags in dartjs -h (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 55d21e2e9acddedc8fd94310ba083c489f2144f9..8f6742ab3b25242d0dfe0d53245d801809034b86 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -744,6 +744,31 @@ Supported options:
--no-source-maps
Do not generate a source map file.
+ --fast-startup
+ Produce JavaScript that can be parsed more quickly by VMs. This option
+ usually results in larger JavaScript files with faster startup.
+ Note: the dart:mirrors library is not supported with this option.
+
+The following advanced options can help reduce the size of the generated code,
+but they may cause programs to behave unexpectedly if assumptions are not met.
+Only turn on these flags if you have enough test coverage to ensure they are
+safe to use:
+
+ --trust-type-annotations
+ Assume that all types are correct. This option allows the compiler to drop
+ type checks and to rely on local type information for optimizations. Use
+ this option only if you have enough testing to ensure that your program
+ works in strong mode or checked mode.
+
+ --trust-primitives
+ Assume that operations on numbers, strings, and lists have valid inputs.
+ This option allows the compiler to drop runtime checks for those operations.
+ Note: a well-typed program is not guaranteed to have valid inputs. For
+ example, an int index argument may be null or out of range.
+
+ Use this option only if you have enough testing to ensure that those checks
Kathy Walrath 2017/07/10 19:55:06 Delete this paragraph? If not, then delete the sec
Siggi Cherem (dart-lang) 2017/07/10 19:57:54 Done.
+ are not needed; otherwise the program will behave unexpectedly.
+
The following options are only used for compiler development and may
be removed in a future version:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698