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

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

Issue 2974133002: Document dart2js flags in dartjs -h (Closed)
Patch Set: cl comments 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..bf3f3f9d750360425ffc958d3c69870ba81fe97f 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -738,12 +738,34 @@ Supported options:
`uri` getter for `LibraryMirror`s is mangled in minified mode.
--csp
- Disables dynamic generation of code in the generated output. This is
+ Disable dynamic generation of code in the generated output. This is
necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).
--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.
+
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