| Index: pkg/compiler/lib/src/dart2js.dart
|
| diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
|
| index d034f3df1b4900d708641e003bad3c8e6500edde..e5a8f5cb99bf47975db0a521344d4391058286f5 100644
|
| --- a/pkg/compiler/lib/src/dart2js.dart
|
| +++ b/pkg/compiler/lib/src/dart2js.dart
|
| @@ -116,6 +116,7 @@ Future compile(List<String> argv) {
|
| bool analyzeAll = false;
|
| bool enableAsyncAwait = false;
|
| bool trustTypeAnnotations = false;
|
| + bool trustPrimitives = false;
|
| bool checkedMode = false;
|
| // List of provided options that imply that output is expected.
|
| List<String> optionsImplyCompilation = <String>[];
|
| @@ -210,6 +211,11 @@ Future compile(List<String> argv) {
|
| implyCompilation(argument);
|
| }
|
|
|
| + setTrustPrimitives(String argument) {
|
| + trustPrimitives = true;
|
| + implyCompilation(argument);
|
| + }
|
| +
|
| setCheckedMode(String argument) {
|
| checkedMode = true;
|
| passThrough(argument);
|
| @@ -309,6 +315,9 @@ Future compile(List<String> argv) {
|
| new OptionHandler('--trust-type-annotations',
|
| (_) => setTrustTypeAnnotations(
|
| '--trust-type-annotations')),
|
| + new OptionHandler('--trust-primitives',
|
| + (_) => setTrustPrimitives(
|
| + '--trust-primitives')),
|
| new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
|
| new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
|
| new OptionHandler('--analyze-all', setAnalyzeAll),
|
|
|