So, I can see the performance statistics during tests, but in the
future it could be possible to connect it to the analysis operations
tree.
Change-Id: I56ee80e92427f53471e062824467f8572341a851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
As part of the implementation of
https://github.com/dart-lang/language/issues/731 (improved inference
for fold etc.), I expanded the front end's type inference logic so
that instead of just having a downward phase and an upward phase, it
could have 3 or more phases. The function that previously did
downward inference became repurposed to do "partial inference" (which
could either be the first, downward stage, or a later, horizontal
stage). However, I failed to generalize the logic that prevents types
assigned by one inference stage from being refined by later
stages--previously this logic was only needed for upward inference,
but now it's needed for horizontal inference stages as well. (This
logic is needed because of Dart's "runtime checked covariance"
behavior--it means that we want to stick with the type from downward
inference, even if a later horizontal inference stage is able to find
a more precise type, because that more precise type may lead to
runtime failures).
As part of this change I've re-architected the inference methods so
that they are responsible for creating and returning the list of
inferred types. This makes the inference logic more similar between
the front end and analyzer, and is easier to read IMHO. The total
number of list allocations is the same as before.
Change-Id: I19bfcede9c2968e50f110b571164549f16495217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243707
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The front end desugars extension methods by inserting a synthetic
`this` argument before all other arguments. But this synthetic
argument isn't included in the `formalTypes` and `actualTypes` arrays.
So when recording a value into
`_DeferredParamInfo.evaluationOrderIndex` we may need to subtract 1 in
order to ensure that later logic will find the correct argument.
Fixes a corner case of https://github.com/dart-lang/language/issues/731.
Change-Id: Idbf136195e40555199f7c5b61a575a430f6ec6bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243854
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
.dart_tool/package_config.json is already present in each fileset.
Bug: https://github.com/dart-lang/sdk/issues/48275
Change-Id: Ib75fd91060f0b9eaeb1446cf65cb8678b2ddc63c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240842
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This adds a --platform= option to dart2wasm to read the SDK libraries
from that dill file instead of compiling them from source every time.
If the option is not given, the SDK libraries are compiled, like before.
Also adds a "dart2wasm" build target, which will build the dart2wasm
platform dill and compile dart2wasm to two AOT snapshots (with and
without asserts). The dart2wasm scripts in sdk/bin are updated to run
via these snapshots and use this platform dill.
This speeds up test runs for the dart2wasm-hostasserts-linux-x64-d8
configuration by approximately 45x.
Change-Id: If2c7750a6eb39725310745f887792784d0dfc583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243624
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
This reverts commit 072603d40a.
Reason for revert: Causing issues with rolling into flutter engine.
Original change's description:
> Sync packages from shelf mono repo
>
> Drop the DEPS entries for the repositories which will be archived. Each
> of the packages has been merged into the `shelf` repository.
>
> Add the `shelf` repository to the specially handled directories with
> nested packages in `generate_package_config`.
>
> Update path dependencies in pubspecs to the new location.
>
> R=devoncarew@google.com
>
> Change-Id: Iefca4fdb2abb6bafa273b9b6b1b4f25d6c91b005
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243929
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Commit-Queue: Nate Bosch <nbosch@google.com>
> Auto-Submit: Nate Bosch <nbosch@google.com>
TBR=devoncarew@google.com,athom@google.com,nbosch@google.com
Change-Id: Ic610d47a3294a7dac9503e8a7b160173e0009056
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244140
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
PackageMapUriResolver is still based on Map.
Change-Id: I7d68f9dbc7d970b22c8e1a01d8e816b3e5723f34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244047
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Drop the DEPS entries for the repositories which will be archived. Each
of the packages has been merged into the `shelf` repository.
Add the `shelf` repository to the specially handled directories with
nested packages in `generate_package_config`.
Update path dependencies in pubspecs to the new location.
R=devoncarew@google.com
Change-Id: Iefca4fdb2abb6bafa273b9b6b1b4f25d6c91b005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243929
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
As we intend to remove the '.packages' file in the SDK, the test runner
should no longer use it as a default value for the '--packages' flag.
Change-Id: Iaaa16a974f8fc137e6f779494903859a242d7f9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243643
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
This option traces in which steps time is spent when running a suite.
On my machine for instance I get these results on a run ofstrong and
weak suites:
$ out/ReleaseX64/dart --enable-asserts pkg/front_end/test/fasta/strong_suite.dart -DsemiFuzz=true --traceStepTiming
Running suite strong...
[ 02:58 | 100.0% | + 571 | - 0 ]: strong/value_class/value_mixin_error
check errors: 0:00:00.156828 ms
stress constant evaluator: 0:00:00.269382 ms
print: 0:00:00.439196 ms
typeCheck: 0:00:02.575744 ms
match expectations: 0:00:04.869435 ms
verify: 0:00:04.951524 ms
compile: 0:00:18.307246 ms
transform component: 0:00:22.121665 ms
semifuzz: 0:00:59.717862 ms
write .dill: 0:01:05.066461 ms
run: 0:01:15.028423 ms
$ out/ReleaseX64/dart --enable-asserts pkg/front_end/test/fasta/weak_suite.dart -DsemiFuzz=true --traceStepTiming
Running suite weak...
[ 10:11 | 100.0% | + 2225 | - 0 ]: weak/variance/unconstrained_inference
check errors: 0:00:00.506722 ms
stress constant evaluator: 0:00:00.759073 ms
print: 0:00:01.293962 ms
typeCheck: 0:00:09.974299 ms
match expectations: 0:00:16.386842 ms
verify: 0:00:17.585821 ms
compile: 0:01:01.966016 ms
transform component: 0:01:23.560216 ms
semifuzz: 0:02:50.969460 ms
write .dill: 0:04:08.087519 ms
run: 0:05:17.911549 ms
In both cases writing dill and running takes quite a while, and
interesting writing the dill is almost as slow as running it.
Change-Id: Ie528e8f7e8a493e17e40a7235b456cc75381ca61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242874
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
The browser_controller now checks if the file exists, but that check
fails for the default Linux paths. We use absolute paths on all other
platforms.
Change-Id: Ifde383cc680047f103abbb79d3bb2ce8502a91e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243906
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This is the last set of changes in the analysis_server package.
Change-Id: I0cffd41118ba985fc1d90cc3ae25447abb62a212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243934
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Most of the change is changing `foo.isInt` to `foo is IntConstantValue` to get promotion and avoid downcasts.
Change-Id: Ie38bc5500dcb22ed9e194e6b810702dd94f2f79e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243926
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Make a private field typed to avoid an unnecessary dynamic call in the error handler for a stream. Also remove an unused private member found in passing.
Change-Id: I29ebba5a3818a4c24df436e504d159731fd6531e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241243
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>