The new implementation is based on suspend/resume stubs and doesn't
use desugaring of async functions on kernel AST.
Previously, new implementation of async/async* was only supported in
AOT mode. This change adds all necessary bits for the JIT mode:
* Suspending variable-length frames (for unoptimized code).
* Handling of Code and pool pointers in Dart stack frames.
* OSR.
* Deoptimization.
* Hot reload.
* Debugger.
The new implementation is not enabled in JIT mode yet.
Design doc: go/compact-async-await.
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I477d6684bdce7cbc1edb179ae2271ff598b7dcc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246081
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This is dead code, the field 'isFixedArrayCheckedForGrowable' is never read. Also drop code used to set this field.
The check suggested in the TODO in ssa/builder.dart doesn't reduce code size for cm_shell at all so it seems like all arrays that go through there end up getting "marked" anyway.
Change-Id: Ia4bf3eec3757fc7eadb503a7ccc58b8f60f86b6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244482
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
There is no good mechanism to release these bytes from the shared
cache, we would have to either keep them forever, or release immediately
after we put them (so useless). So, as a compromise, we cache them
space-restrictedly locally.
Change-Id: Iae6227bda31b40374390a6a6bb02501222be4e92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
This takes running the weak suite - on my machine - from
```
[ 07:14 | 100.0% | + 2268 | - 0 ]: weak/variance/unconstrained_inference
check errors: 0:00:00.517818 ms
stress constant evaluator: 0:00:00.748959 ms
print: 0:00:01.357741 ms
typeCheck: 0:00:09.610927 ms
verify: 0:00:17.063594 ms
match expectations: 0:00:17.186629 ms
compile: 0:00:56.952218 ms
transform component: 0:01:23.143726 ms
run: 0:02:24.114175 ms
write .dill: 0:04:07.470467 ms
real 7m19.983s
user 10m43.053s
sys 1m29.653s
```
to
```
[ 03:07 | 100.0% | + 2268 | - 0 ]: weak/variance/unconstrained_inference
check errors: 0:00:00.521563 ms
stress constant evaluator: 0:00:00.760032 ms
print: 0:00:01.358365 ms
write .dill: 0:00:02.451508 ms
typeCheck: 0:00:09.750399 ms
verify: 0:00:17.081690 ms
match expectations: 0:00:17.723327 ms
compile: 0:00:55.593688 ms
run: 0:01:11.893074 ms
transform component: 0:01:21.368430 ms
real 3m12.619s
user 4m20.531s
sys 0m41.589s
```
Change-Id: I9d235e84d10df06737789e8765f3b55521697e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246961
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Previously only target=vm test files had their dill file deleted.
This made 40-50 dill files stay behind after a weak suite test run for
instance.
Now all of them are deleted and no files should be left behind.
Change-Id: I9c94b9cfa05eb5ccf9ca62e5b6bae5be39dd26f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246960
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This CL changes the way inferred types are updated in the AST. Instead
of updating the AST directly, builders register a listener with the
OmittedTypeBuilder, that will be called when the inferred type has been
computed. This prepares for propagating inferred types to macro types
that are references to omitted types.
Change-Id: Ica5e1ed259b552d5de24000235f114ab1b9eb682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246642
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This CL fixes a crash in the CFE discovered in
https://dart-review.googlesource.com/c/sdk/+/243901.
It happens because in the case of super parameters not all of the
arguments are listed in the original order of the arguments of the
super-constructor invocation. It breaks some assumptions down the
pipeline. This CL inserts the super-parameters into the list of the
arguments in the original order.
Change-Id: I0862e65624ac32f2a1cf24b6dd2534ca405b93ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244403
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This reverts commit 1598182907.
Reason for revert: The snapshot for the DAS needs to have the default set before this change can land. Will work with Analyzer folks in the morning to put together a new PR.
Original change's description:
> Modify dartdev language-server to call the server snapshot
>
> Change-Id: I6fc7b2c1e55089fa0bf88633733c51ff768e699b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246059
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Jaime Wren <jwren@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I848f4ad08405fee5aeb0d2eb166f95390e81bb3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246840
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This is a reland of commit a091ff7b27
TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
Original change's description:
> [ Service / DDS ] Add method that can return local paths
>
> TEST=Check that a supplied URL conversion function is correctly applied when the `local` param is true.
>
> Change-Id: Ibe80b6229c574c976379a519baca5d1904b684b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245040
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I87433a410715393f853a6538dbfe67391e0c773b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246621
Commit-Queue: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
- Greatly reduces the size of the root set, thus reducing pauses for scavenges or marking that occur during a copy.
- Reduces the memory overhead of the from_to table from 6 words per object to 2 words per object.
TEST=ci
Change-Id: Icf81f4b25adff22590a9c84c40068e35dd4d502b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246305
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
+ add test for fields declared as doubles where the client may pass numbers without decimals.
Change-Id: I6b709a4620a2688d948faae1103193ab6ff5ceea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246647
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This measures latency induced by one isolate send-and-exiting on concurrently running isolates.
The benchmark report format mimics EventLoopLatency benchmark, in a way it reports "runtime" as a latency.
TEST=manual run of benchmarks
Bug: https://github.com/dart-lang/sdk/issues/49050
Change-Id: I20642fd75bd24870658d553b0775f62083544bdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246620
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This replaces the use of `null` as the lack of type annotation with
a OmittedTypeBuilder. This is a step towards handling omitted types
in macros.
Change-Id: I71619228ec3363221b06834f110b9317ed0ae196
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246580
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
These will replace eventually FileState.exported/importedFiles,
because only libraries or augmentation can have them. Also, we will
build Export/ImportElement(s) from them, when google3 switches to
using AnalysisDriver.buildPackageBundle(), so we are free to make
changes to the way linker works.
Change-Id: I66674dc7720aa704cfc36d16fc78e17dd05a8b93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246681
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 6de162e014.
Reason for revert: Local testing of a large Flutter app with this change causes the app to crash on startup
Original change's description:
> [vm, compiler] Prune dictionaries to only contain elements needed at runtime.
>
> flutter_gallery
> Isolate(CodeSize): 2116400 -> 1981238 (-6.28%)
> Total(CodeSize): 7217938 -> 7082600 (-1.87%)
>
> TEST=ci
> Bug: https://github.com/dart-lang/sdk/issues/48910
> Change-Id: I8cd285ddab3a611cd7a2a91d50414be402f8543a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244303
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/48910
Change-Id: Ie51f004e84970907fa1233e8e7c3ed63e2da1c4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246683
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>