Revisions updated by `dart tools/rev_sdk_deps.dart`.
mockito (28e8eda..f851e17):
f851e17 2023-04-26 Ilya Yanok Run CI with Dart 2.19 and dev
test (7fab079..c9a3138):
c9a31388 2023-04-24 Nate Bosch Remove ignores for undeprecated libraries (#2000)
webdev (8b42c95..12f2285):
12f22857 2023-04-25 Elliott Brooks Run `chrome_proxy_service_test.dart` everyday at 8 AM PST (#2098)
Change-Id: I1c90351b7cde4ead84bb410fa76807b33fdae1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298740
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
If the sender is not `null`, then we can send.
No need for a flag, and assert() in the sending method.
If the sender is `null`, then the sending code will not able to invoke it.
Types FTW :-)
Change-Id: I7d153ba014c578a73dce2eab28aceedbb8814711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Prior to this change the metrics modified here are all printed during every run of the compiler, even when the compiler is running in phase mode on a phase that cannot modify these metrics.
This will make collection of these metrics easier and ensure the collected data is cleaner.
Change-Id: I62a081d9dbae71256882f24156faf246f4076e61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297440
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Currently, dart:_js_types types are all typedefs in the web backends.
This leads to inconsistent semantics, since you can statically pass
Strings to JSString, for example. You cannot do this in dart2wasm.
In order to ensure consistent semantics, we reify these types using
a custom @staticInterop lowering. They all get erased to their
respective Dart type. When we have inline classes, these types
should be implemented using inline classes.
Note that Interceptor will not work for this use case. The reified
type of JS primitives are Dart types e.g. String, bool, and therefore
can not be casted to Interceptor.
In order to do this, the eraser is refactored and the JS backends use
shared erasure code to either erase/emit types.
Tests are added to make sure you need to go through a conversion or
cast to pass Dart objects to JS types.
CoreLibraryReviewExempt: Backend-specific internal library changes.
Change-Id: I5942be628102919ec167f094cfe10fced606363c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295105
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This merges the front_end and kernel verifiers into one Target based
kernel verifier. The RedirectingFactoryBody work-around is moved to
package:kernel to support its verification.
TEST=existing
Change-Id: I0adf4d2c22c4009cf439b3b23fa14192253a2846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280161
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
When compiling compile.dart:
148,192 FunctionType are created via `computeThisFunctionType`.
133,085 of them have no named parameters; 141,507 of them have no type
parameters; 128,357 of them have neither.
This CL makes it not create new lists when not needed
(or create empty iterators and sort empty lists), and makes the lists
it do create not growable.
Change-Id: Ibd5fef458b8a1254aa2f1fab80d0449a2f0bfd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298541
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
For instance running like this:
out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --count
out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart
will now also print how often Constructors are executed, e.g. it contains
stuff like thid:
529,397: ast.dart|DartType.constructor:
715,197: ast.dart|Expression.constructor:
1,177,700: ast.dart|TreeNode.constructor:
2,001,460: ast.dart|Node.constructor:
Change-Id: I26ff69f8ad8a1453d6004e97952ce3b39bfff687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
These tests have been broken (and disabled) for a while. This pull-request fixes the tests and re-enables them.
Bug: #47052
Change-Id: Ib8c83959e5f00a2a5dc29959f87adbaa963385fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296863
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
A sweeper helper thread may be exiting while the scavenge is visiting thread roots. GC helpers have no reusable handle state to clear, so the race is an uninteresting one between null and null.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/52125
Change-Id: Iae68f8a3a938ae20e540b11c172fbc4a50a90a9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298262
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
current library which itself extends a base declaration from another
library.
Change-Id: I3caf125de528d5c082c825c02055a114f732f385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298040
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
We have merged the experimental inferrer back into the main inferrer branch and therefore can clean this up.
Change-Id: I66481c51276b0ffbf79b4b41b21a3ee5c2ca9cf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298360
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
This test was inadvertently broken when automatically migrated from a
multitest to a static error test.
The original intent of the test was to ensure that web compilers
reported compile-time errors on integer literals that couldn't be
represented as JS doubles. The migrated static error test doesn't have
any web expectations and thus doesn't get run on web compilers at all.
Instead, all it does is validate that the one non-web error in there is
reported.
This turns the test into a proper *web* static error test with the
web-specific test expectations in there. That ensures the test is run
on web compilers and validates that the web compilers produce those
expected errors.
Also removed the corresponding runtime test since it doesn't do
anything. There's no runtime behavior to test, and the static error
test also correctly validates that the *valid* integer literals do *not*
produce compile errors.
Removed the status file entries because they're no longer needed. Since
this is a static error test, the runtime platforms already skip it
implicitly.
Change-Id: I2776847e1acb88b1f761efb43e7bb528b27d0eee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297840
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
There is a quite complicated logic in resolving directives and walking
augmentations and parts. And we don't expect users write a lot of code
in directives, so there is less need for optimizations than when typing
in method bodies.
Change-Id: Id38e90f09eb5c1e84be8fc28ed4211d03762d2e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The fix is to enable type inference.
The old `List(n)` constructor was replaced by `List.filled`. `List(n)`
could be recognized as fixed-length purely by syntax. The test failed
after the replacement because `List.filled` is not recognized to be
fixed-length purely syntactically in the SSA builder, but rather by
type inference.
With type inference enabled, `List.filled` is recognized, but other
parts of the test need to be more realistic, as type inference also
detects the element type and length.
Bug: #52139
Change-Id: Icfaeb3e341b448bbc263efe43f48a2b76d05bf5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298020
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Class used to be abstract, but lost it when made `final`.
There is no reason to allow instantiation, it's all static members.
Restablishing the `abstract` before we release 3.0, so we don't have to go through any extra steps.
The class is public, exported by `dart:io`. (Should probably also be documented.)
Change-Id: Ic1a3e1a777ecbdcf535b92dbcdd88f55a65e9cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297463
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
- change forEachIndexed to `.indexed`
- remove `package:collection` imports for files only using `.firstOrNull`, `.singleOrNull`, `.lastOrNull` that is now available in `dart:core`
- switch from `Pair` to records
- use switch expressions
Change-Id: Id1ae22db427b4cd955f26e0d6c852944a540a05f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This is a reland of commit ccb02fa8fc
Original change's description:
> [analysis_server] Use fixDataYamlFolder constant instead of string literals
>
> Follow-up from https://dart-review.googlesource.com/c/sdk/+/296801.
>
> Change-Id: I72ea8a42ec64c4bd6c6cee021a1464167ec368e6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296862
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I202392de3444556dc2baa9ed9e1b82c3a1ede4aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Moving the class name of the allocated object to the allocation callback
gives more flexibility to the embedder, which may decide to track all
sampled allocations, not just those that are still alive.
TEST=Updated DartAPI_HeapSampling_*
Change-Id: Iaae290e15b67ca3e47d72e1896fa6e32b2d4b081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297761
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Previously this step happened during `buildOutlineNodes`, but since
`buildOutlineNodes` happens in source order, this means that anonymous
mixins would only get their sealed and final attributes properly
inferred if they appeared *after* their immediate supertypes in source
order. By moving this step to `checkSupertypes`, we ensure that the
computation is correct regardless of source order, because
`checkSupertypes` happens in class hierarchy order.
Fixes#52048.
Bug: https://github.com/dart-lang/sdk/issues/52048
Change-Id: Ib9f1f3dafded88681a26f09e4d21dfd44e70dfd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297901
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This CL splits up `Reference.node` in to the most-often fast-case and the
has-to-load case, making the procedure smaller which makes the VM inline
it. This was "verified" by looking at the VMs optimized flow graph for
`Reference.asClass`.
This CL furthermore reduces the number of "calls" to `Reference.node`
by almost half (a reduction of over 3 mio calls when compiling
`compile.dart`) by "caching" the `.node` call in the `as*` methods.
Change-Id: I7b5497397a11f05fdeaf05d6cc420072d98dc030
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298101
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
When instrumenting one can use "--count" to instrument counting method
calls instead of instrumenting to create a flame graph.
From that I can for instance see that `Reference.node` is called 6+ mio
times when compiling compile.dart.
Example run:
out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --count
out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill pkg/front_end/tool/_fasta/compile.dart
Change-Id: I583f4b53a474c3777bb059ea89d932607b7c23ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298100
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Could for instance be run like this:
out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart
out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart
out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --candidates=cfe_compile_trace_candidates.txt
out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart
out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --candidates=cfe_compile_trace_candidates_subsequent.txt
out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart
* The first command compiles and instruments "compile.dart" to record
all procedure calls.
* The second command runs the instrumented compiler on "compile.dart"
(but it could have compiled anything). Because every procedure is
instrumented this will take a lot longer than a usual run.
This produces a trace "cfe_compile_trace.txt" with every call taking
at least 1000 microseconds. This can be displayed via Chromes
about://tracing tool.
It also produces a file "cfe_compile_trace_candidates.txt" with a map
of the procedures that on average took at least 500 microseconds.
* The third command compiles and instruments "compile.dart", this time
only instrumenting the procedures mentioned in the map
"cfe_compile_trace_candidates.txt".
* The forth command runs the instrumented compiler on "compile.dart".
This run shouldn't take significantly longer than a non-instrumented
run. It produces a new "cfe_compile_trace.txt" which this time is
not filtered. It also produces a file
"cfe_compile_trace_candidates_subsequent.txt" of recorded procedures
that on average took at least 50 microseconds.
* The fifth and sixth commands repeats the third and forth but
instrumenting only the procedures mention in
"cfe_compile_trace_candidates_subsequent.txt".
The third iteration might not be needed, but if the first run was on a
smaller input (which it isn't in this example) there might be some calls
that on average took long enough to be included in the candidate list
because the first call was slow and there were only very few of them,
making the second trace very big because there are now a lot of - as it
turns out - very quick calls recorded. Adding the third iteration will
filter (at least some of) those out.
Change-Id: I702c5c9142e525502b02f37744fcdc9d2b0f9b20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296902
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This is a reland of commit bbacf39e9c
Original change's description:
> [analysis_server] Analyze fix data in fix_data folder
>
> Fixes part of https://github.com/dart-lang/sdk/issues/52126.
>
> Change-Id: Ib4bd7830a2f644eacedccd375c7c8dc60f040d33
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296801
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I571c1e4f87fdf0095d003d496f3c5d88e5cf0ff8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>