| Index: sdk/lib/_internal/compiler/implementation/dart2js.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
|
| index f5acd283306f73b1fd1d34fd6095bf72b6998b7c..dbe89b3a327185b655cd26b5d98cecec61159e3d 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
|
| @@ -79,6 +79,7 @@ void compile(List<String> argv) {
|
| bool wantHelp = false;
|
| String outputLanguage = 'JavaScript';
|
| bool stripArgumentSet = false;
|
| + bool analyzeOnly = false;
|
| SourceFileProvider inputProvider = new SourceFileProvider();
|
| FormattingDiagnosticHandler diagnosticHandler =
|
| new FormattingDiagnosticHandler(inputProvider);
|
| @@ -121,6 +122,11 @@ void compile(List<String> argv) {
|
| passThrough(argument);
|
| }
|
|
|
| + setAnalyzeOnly(String argument) {
|
| + analyzeOnly = true;
|
| + passThrough(argument);
|
| + }
|
| +
|
| handleShortOptions(String argument) {
|
| var shortOptions = argument.substring(1).splitChars();
|
| for (var shortOption in shortOptions) {
|
| @@ -168,6 +174,7 @@ void compile(List<String> argv) {
|
| new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
|
| new OptionHandler('--disallow-unsafe-eval', passThrough),
|
| new OptionHandler('--analyze-all', passThrough),
|
| + new OptionHandler('--analyze-only', setAnalyzeOnly),
|
| new OptionHandler('--disable-native-live-type-analysis', passThrough),
|
| new OptionHandler('--enable-native-live-type-analysis', passThrough),
|
| new OptionHandler('--reject-deprecated-language-features', passThrough),
|
| @@ -223,6 +230,8 @@ void compile(List<String> argv) {
|
| inputProvider.readStringFromUri,
|
| handler,
|
| options));
|
| + if (analyzeOnly) return;
|
| +
|
| if (code == null) {
|
| fail('Error: Compilation failed.');
|
| }
|
| @@ -315,6 +324,9 @@ Supported options:
|
| finding errors in libraries, but using it can result in bigger and
|
| slower output.
|
|
|
| + --analyze-only
|
| + Analyze but do not generate code.
|
| +
|
| --minify
|
| Generate minified output.
|
|
|
|
|