Chromium Code Reviews| Index: pkg/compiler/lib/src/dart2js.dart |
| diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart |
| index 2ea3faa4eafa377924535e6531a9eb11e1c748ff..4cfbf00cf78796e17893de4f02e6f24a3b01aa83 100644 |
| --- a/pkg/compiler/lib/src/dart2js.dart |
| +++ b/pkg/compiler/lib/src/dart2js.dart |
| @@ -114,6 +114,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| bool stripArgumentSet = false; |
| bool analyzeOnly = false; |
| bool analyzeAll = false; |
| + bool dumpInfo = false; |
| bool allowNativeExtensions = false; |
| bool trustTypeAnnotations = false; |
| bool trustPrimitives = false; |
| @@ -206,6 +207,11 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| passThrough(argument); |
| } |
| + setDumpInfo(String argument) { |
| + implyCompilation(argument); |
| + dumpInfo = true; |
| + } |
| + |
| setTrustTypeAnnotations(String argument) { |
| trustTypeAnnotations = true; |
| implyCompilation(argument); |
| @@ -328,7 +334,7 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| new OptionHandler('--disable-type-inference', implyCompilation), |
| new OptionHandler('--terse', passThrough), |
| new OptionHandler('--deferred-map=.+', implyCompilation), |
| - new OptionHandler('--dump-info', implyCompilation), |
| + new OptionHandler('--dump-info', setDumpInfo), |
| new OptionHandler('--disallow-unsafe-eval', |
| (_) => hasDisallowUnsafeEval = true), |
| new OptionHandler('--show-package-warnings', passThrough), |
| @@ -414,6 +420,10 @@ Future<api.CompilationResult> compile(List<String> argv) { |
| "combination with the '--analyze-only' option."); |
| } |
| } |
| + if (dumpInfo && outputLanguage == OUTPUT_LANGUAGE_DART) { |
| + helpAndFail("Option '--dump-info' is not supported in " |
| + "combination with the '--output-type=dart' option."); |
| + } |
| diagnosticHandler.info('Package root is $packageRoot'); |
| @@ -605,7 +615,9 @@ be removed in a future version: |
| --dump-info |
| Generates an out.info.json file with information about the generated code. |
| You can inspect the generated file with the viewer at: |
| - https://dart-lang.github.io/dump-info-visualizer/ |
| + https://dart-lang.github.io/dump-info-visualizer/ |
| + This is features is currently not supported in combination with the |
|
floitsch
2015/03/09 15:06:21
s/This is/This/
Johnni Winther
2015/03/11 13:08:44
Done.
|
| + '--output-type=dart' option. |
| --generate-code-with-compile-time-errors |
| Generates output even if the program contains compile-time errors. Use the |