The literal_only_boolean_expressions analyzer hint flags this code:
while (true) {
...
if (cond) break;
...
}
=> This is very common code.
The unnecessary_await_in_return analyzer hint flags this code:
Future foo() async {
...
return await foo();
}
=> Addressing this hint by removing the `await` changes semantics,
performance characteristics and async stack traces.
Change-Id: I3c126123bfba7386b01033084e954267af21ba13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152001
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Port the service tests and Observatory to Dart 3.
Changes from the original landing:
- The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
- The test harness is taught about 'service_2'
- Observatory's package is added to front end's opt-in list
- Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots
The ported tests themselves are not changed.
Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This is the first step to removing all of the the sdks precompiled
to JS modules from the sdk download.
Enables build_runner to produce a JS file on demand from a .dill
file bundled in the sdk download. At this time, only the SDK can
be compiled from a .dill file.
Update build targets to run bin/dartdevc.dart instead of
tool/compile_dartdevc_sdk.dart.
Will delete tool/compile_dartdevc_sdk.dart after we cleanup all
of the uses outside of the SDK.
Change-Id: Id6002675419e8e502912cb3f5b626a0d13461df5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151025
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Text is now white on a light-blue background.
Change-Id: Iac613c49fc8db6241ba013341fb29045f89048e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152042
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: John Ryan <ryjohn@google.com>
It now supports filtering by name and displaying additional
histogram bucketed by object type.
Issue https://github.com/dart-lang/sdk/issues/41249
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I5b0dcdbea0fc0b4af36ac5a6331057406087a409
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151385
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
We reconstruct ProgramInfo tree structure from the snapshot
by applying a simple graph algorithm, which takes parts of the
snapshot with clear ownership (e.g. library, class, function objects)
and then attempts to attribute the rest of the snapshot to these
clearly owned objects based on reachability.
Issue https://github.com/dart-lang/sdk/issues/41249
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I17c0f8323ee9092a2214b18bd948ff51fa2ccc49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151384
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit cb1105af48.
Reason for revert: Broke flutter-engine-linux bot https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/11048?
Original change's description:
> Update fixnum to the migrated version and add it to the allowed experiments file
>
> This package is used in benchmarking and we need a migrated version in order
> to run benchmarks with null safety enabled.
>
> Change-Id: I916331a03006d6b5d3f0d0bb590012376e410c24
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150170
> Commit-Queue: Jake Macdonald <jakemac@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
TBR=sortie@google.com,jakemac@google.com,sra@google.com
Change-Id: I4536f395a877c245140d53f7a9463f2ed156d012
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151926
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
- Update header text and buttons
- Add Roboto font
- Add Roboto Mono font
- Add Material icons font
- Update color scheme
- Move help button to header
- Change "Report a problem" button to "Send Feedback"
- Update button colors
Change-Id: Ia4d8b71ae8ec7a7c04ab8c238ffb0499becc9620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151663
Commit-Queue: John Ryan <ryjohn@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This package is used in benchmarking and we need a migrated version in order
to run benchmarks with null safety enabled.
Change-Id: I916331a03006d6b5d3f0d0bb590012376e410c24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150170
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Fixing the test that's causing the Windows bot to fail required updating
the MockSdk, which cause a lot of other changes. I would have done this
in two separate CLs if I'd known how big this was going to get, but I'm
hoping it isn't too big.
Change-Id: Idee56bab5e73a78ab7857e81177090493aa08b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151874
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The inliner code is called from AOT/JIT call specializer on functions
where it knows the target. The callsite might be dynamic, in which case
the target function is a dyn:* forwarder (for calls which have one or
more non-implicit arguments).
The dyn:* forwarders inherit the recognized kind from their target. That
means the inliner has to take special care when trying to inline
functions: It can only rely on the static type safety for interface
calls, not for dynamic calls.
This CL fixes an existing bug where the call specializer knows the
target is a list and method recognizer builds custom graph for the list
indexing operator without ensuring that the index is actually an
integer.
The existing test will start failing on a dependent CL:
tests/language_2/list/double_index_in_loop2_test.dart
Issue https://github.com/dart-lang/sdk/issues/37737
Change-Id: Ic107fe736c1b6151562880919c39d1c650c119fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151849
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This reverts commit 038e981f89.
Reason for revert: Breaks some tests; visible changes to some web UIs.
Original change's description:
> Fix duration.toString() to conform the description
>
> Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
> But when `hours` is less than 10, toString() doesn't have the leading
> zero, which is "H:MM:SS.mmmmmm".
>
> The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733
>
> Bug: https://github.com/dart-lang/sdk/issues/41737
> Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=lrn@google.com,zichangguo@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I4d7ef5de9807e8e2b2a77c2171d1693b7527f671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151848
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Since CodeSourceMaps are not serialized when non-symbolic stack traces
are enabled, use a different CSM encoding in this mode. Here, we write
out the line number as before and then the column as a separately
written integer.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: If9aec2f52551d04eb45626744957e625bcc17d3d
Bug: https://github.com/dart-lang/sdk/issues/42397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151824
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Hoist 'one' in all versions of benchmark for uniformity.
Change-Id: Id2aaa9b18903ff33e3057c01e13ff332fc8979ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151180
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
A 'final' local can be assigned via definite assignment or via a
'late' initializer.
Fixed: 42422
Change-Id: I5e03ca534fb18fcb928db99daa6654c8942c9bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151867
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Set global null safety flag based on the snapshot instead of trying to
detect it per isolate (was causing issues with the vm isolate loading).
Should fix https://github.com/dart-lang/sdk/issues/42421
Bug:42421
Change-Id: I9143560b76fedcb991e96522cbf5d820fde99f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151866
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
- created class representing module metadata, added metadata to JsCode
class
- added module information to metadata, such as module name, load
function name
- added import and file uris for libraries
- added experimental-emit-debug-metadata flag to frontend_server
- added frontend server tests to check for saved metadata
Related: https://github.com/dart-lang/sdk/issues/41852
Closes: https://github.com/dart-lang/sdk/issues/40774
Change-Id: Iecbbf1e4eea1919e01f002f45363d30707cb1590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150181
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
In generic function types when a type parameter T's bound is Never in
the current environment T should be normalized to Never where it
appears in the function type signature.
For example when S is never in:
`T Function<T extends S>()` --> `Never Function<T extends Never>()`
Passes the new generic_function_type_object_normalization_test.
Change-Id: I6ce2328bc81cd0df7bbc69fd8e59a45f707e9318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150290
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
If "CONNECT" is used in HttpClientRequest, it is supposed to create a
tunnel and reuse the socket. The socket should remain open instead of
being closed.
Bug: https://github.com/dart-lang/sdk/issues/37808
Change-Id: Ic765bdc6fe4d3e21b3117e882b38e3abae15ceda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148684
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>