[analyzer] Stable analysis tool
Tool the - in my testing at least - is very stable in terms of
instruction counts used as reported by `perf stat`.
Only requires small changes to the analyzer and doesn't affect the part
that's covered by api.txt.
Running it on an extracted dill (with an aot-compiled tool) I get numbers like
this:
```
perf stat -e task-clock:u,cycles:u,instructions:u,branch-misses:u -r3 out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/analyzer/tool/stable_analysis.aot /tmp/extracted_compile_dart_compile
```
```
[...]
50,853,198,745 instructions:u # 1.18 insn per cycle ( +- 0.00% )
[...]
```
Running it 10 times (without `-r3`) I get this:
```
50,853,237,614 instructions:u # 1.18 insn per cycle
50,853,477,778 instructions:u # 1.19 insn per cycle
50,852,534,741 instructions:u # 1.17 insn per cycle
50,852,728,437 instructions:u # 1.18 insn per cycle
50,853,298,284 instructions:u # 1.18 insn per cycle
50,853,151,431 instructions:u # 1.17 insn per cycle
50,853,754,852 instructions:u # 1.18 insn per cycle
50,852,509,185 instructions:u # 1.17 insn per cycle
50,853,878,495 instructions:u # 1.18 insn per cycle
50,853,437,912 instructions:u # 1.18 insn per cycle
```
where the difference between the smallest and the largest number is <0.0027%
Change-Id: I84d616201520a50904854cac06958faf6330468b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449760
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents in our repo at docs.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
Future plans for Dart are included in the combined Dart and Flutter roadmap on the Flutter wiki.