This CL moves many of the files from
pkg/front_end/lib/src/fasta/analyzer/ to pkg/analyzer/lib/src/fasta/.
It also moves two files from pkg/kernel/lib/analyzer/ to
pkg/analyzer/lib/src/kernel/.
This reduces the amount of circularity between analyzer and
front_end/kernel so that there are no files in front_end or kernel
which are both dependend upon by analyzer and depend upon analyzer. I
will clean up the remaining circularities in future CLs.
There should be no functional change.
R=ahe@google.com, asgerf@google.com, kmillikin@google.com, scheglov@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2756593004 .
* Update harness to show 99.9% best and worst case
* Moved compile summary functionality
from pkg/front_end/tool/fasta/compile.dart
into pkg/front_end/lib/src/fasta/outline.dart
* Modified outline.dart to output a JSON summary
containing elapse execution times if -Dsummary=true
* Moved all statistical calculations into abcompile.dart
* Adjusted pkg/front_end/tool/fasta/abcompile.dart so that
--verbose is not needed to capture numbers and progress
* Updated the A/B summary section to paste more easily
into Google Sheets
* Address comments in
https://codereview.chromium.org/2734863003/R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2739963002 .
Given two separate Dart SDK repo clones, A and B,
this pkg/front_end/tool/fasta/abcompile.dart harness
alternately runs
<A>/pkg/front_end/tool/fasta/compile.dart
then
<B>/pkg/front_end/tool/fasta/compile.dart
so that a performance comparison can be made of the difference
between fasta in A vs B.
For example, from the <A> root directory:
xcodebuild/ReleaseX64/dart
-DbRoot=/path/to/2nd/dart/sdk/repo
-Diterations=15
pkg/front_end/tool/fasta/abcompile.dart
--compile-sdk=xcodebuild/ReleaseX64/patched_sdk/
pkg/compiler/lib/src/dart2js.dart
--verbose
The output contains the raw data along with a summary
of the average difference, and is formatted in a way
that can be easily pasted into Google Sheets
for further analysis.
Future improvements to this include:
* Add JSON output to pkg/front_end/tool/fasta/compile.dart
so that abcompile.dart is not text scraping the numbers
* Adjust pkg/front_end/tool/fasta/compile.dart so that --verbose
is not needed to capture the needed numbers and progress
* tweak the A/B summary section to paste more easily
into Google Sheets
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2731703003 .
This also makes perf_test.dart do something useful. It now executes perf.dart on
a small file from pkg/front_end. This may help to detect early when the
peformance bots will see a failure. I've only tested this in linux, but given
that's the OS of the perf bots, I'm ok skipping this in other OSs.
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2677423002 .
This carries a number of benefits:
- It allows the front end to trivially support schemes other than
"file:" (e.g. "http:") by allowing the client to supply a FileSystem
implementation that handles them.
- It is more consistent with the functionality of the ".packages" file
(which allows packages to map to any kind of URI).
- It allows the "bazel root" feature to be rewritten to use a magic
scheme rather than a magic path. (This eliminates concerns about
the magic path overlapping with a user's use case). Note that this
feature has been renamed to "multi root" since it is sufficiently
generic to be applicable to build systems other than Bazel.
- It reduces the risk of forgetting to use the front end's FileSystem
abstraction to access the file system, since the native file system
interfaces do not accept URIs.
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2614063007 .
I'm happy to split the style/refactorings as separate CLs if you prefer. Here is a summary of the changes:
- update the reported strings to match the names expected by our benchmark runners ("unlinked summaize + parse" => "unlinked_summarize")
- invert the benchmark results (like Paul did in 2551533003)
- stop counting input-size while scanning, count that separately once
- combine the multiple summarization steps into a single function
- clean up the logic that dispatches into each benchmark
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2602003002 .
This CL adds support for using sdk summaries when building kernel using the
front_end entrypoint. I didn't expose this functionality in the dartk binary,
I'm hoping we can delay doing so until we integrate dartk and front_end.
I also switched front_end/tool/perf.dart to use kernel_generator directly.
This makes some observable difference for small scripts, but not so much with large apps like dart2js. Makes sense considering that the sdk is about 2Mb, and dart2js is 6Mb of sources.
The most interesting number I got is building the a library kernel file (not the whole program) for a small hello-world script on a warmed up vm:
no summaries: 500ms
with summaries: 30ms
R=asgerf@google.com, paulberry@google.com
Review-Url: https://codereview.chromium.org/2562923002 .
In kernel, library import URIs now support an "app" scheme as an
alternative to the "file" scheme, representing a path relative to
the application root.
dartk takes an --app-root flag giving the application root. If none
is given, file URIs are used instead.
The intention is that kernel binaries should not carry irrelevant
path information, such as the path to the home directory of the
user who compiled a given file.
It is not the intention that end-users should see an app URI.
Import paths are currently not shown to users at all, and if we need
to do this, they should be translated to file paths first.
In theory we could stick to file URIs with relative paths, but the Uri
class from dart:core makes this difficult, as certain operations on it
assume that file paths should be absolute.
Source mapping URIs are not yet affected by this change.
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/60adb852ad706ecf9424c77d47fa05583d543def
Review URL: https://codereview.chromium.org/2532053005 .
Reverted: https://github.com/dart-lang/sdk/commit/bb540416f27c39d75ee7f243899939fc37a2cd03