Adds `--report-metrics` and `--report-all-metrics`.
These options print all the Metrics objects exposed by CompilerTask.
This CL has counts and durations and adds metrics to two tasks to
demonstrate the 'framework'. More task metrics will be implemented
as needed. As we do so, we will experiment to see if it is possible
to make it easier and more efficient collect metrics.
```
$ dart2js ... --report-metrics
Info: Metrics:
type_inference.time: 1.429s
deferred_load.time: 0.424s
...
$ dart2js ... --report-all-metrics
Info: Metrics:
type_inference.time: 1.300s
type_inference.time.analyze: 0.695s
type_inference.time.refine1: 0.361s
type_inference.time.refine2: 0.175s
type_inference.count.exceededMaxChange: 5
type_inference.count.overallRefines: 90827
deferred_load.time: 0.270s
deferred_load.hunkListElements: 1
```
Change-Id: I2ba66f65af604758b0cbd71a688133cb562e32ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156842
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This makes it easier to follow class hierarchies and understand where a
class is changing the interface. I hit this when I found a class that
had the annotation on some methods it was overriding, but not all, which
made it confusing.
Prepares for adding the lint rule and enforcing it.
40% of overridden methods were annotated - add annotations to the remaining 60%.
Change-Id: I02472f4b6c5026a820cf9ff1a7ada663a60f1868
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96666
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Since we switched to the CFE we no longer use this, the CFE recomputes the package-configuration internally.
Change-Id: Icdc2a3eeff1aa75e560157ecf0d5320208096d21
Reviewed-on: https://dart-review.googlesource.com/c/84362
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.
Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
* preserve-comments: unused, only used for source-mirrors & dartdoc long long ago
* preserve-uris: ignored, mirrors-only flag
* allow-native-extensions: error, was only used for analyze-only with the old FE
Change-Id: Ic93c31edf188cdab3aa658c13018a432baf14742
Reviewed-on: https://dart-review.googlesource.com/48457
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This also:
- replaces --use-kernel with --use-kernel-in-ssa
- replaces --load-dill with --use-kernel
- makes --use-kernel support both: compiling from .dill or from .dart
- change the default of other options that are currently disabled when --use-kernel is on.
- adds .status lines for all tests in language/corelib/dart2js_extra/dart2js_native
R=efortuna@google.com
Note: this CL is built on top of another change
(https://codereview.chromium.org/2981403002/) that adds preview_dart_2 to
test.dart
Review-Url: https://codereview.chromium.org/2989453002 .
When landed, CL 1789553003 turned out to cause bot failures because
some libraries outside the compiler are importing compiler libraries
which have been updated. For instance, the tests in 'compiler/dart2js'
depend on several internal elements of the 'dart2js' compiler.
This CL updates these external dependents to work with the modified
library structure and class APIs of the compiler. A small adjustment
was applied to 'dart2js_incremental' as well.
No further dependents are believed to exist: Grepping in sdk for
relevant imports does not reveal any further imports of any of the
libraries in the compiler where the "interface" has changed, and
external clients are not supported (that is, imports in arbitrary
github repositories may or may not break if they use the compiler
internals, but we do not support this type of dependency so we won't
do anything to protect them against that type of breakage).
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/1864433004 .
In preparation for support for generic methods (with an associated
command line option), this CL introduces a `ParserOptions` class and
uses that to pass the existing option `enableConditionalDirectives` to
all parsers. With that, the addition of an `enableGenericMethodSyntax`
option will be concise and well localized.
It is necessary to keep a `ParserOptions` object in `Parsing`, because
that's the only convenient channel for providing the options to the new
`Parser` and `ClassElementParser` created from the top-level function
`parse` in 'partial_elements.dart', and a from
`PartialClassElement.parseNode`, respectively.
The `ParserOptions` class is located in 'parser.dart'; from the current
import structure the most natural choice might be to put it in
'element_listener.dart', but considering the nature of that file it
seems less natural: What does `ParserOptions` have to do with element
listeners? So I put it in 'parser.dart', even though this causes a few
additional import statements.
R=johnniwinther@google.com, sigmund@google.com
Review URL: https://codereview.chromium.org/1789553003 .