Commit graph

101834 commits

Author SHA1 Message Date
Ben Konyi bcaf745a9b [ package:vm_service ] Add missing code to code generator
Was added originally in https://dart-review.googlesource.com/c/sdk/+/367821

Change-Id: I7873e960319c10e995e24b1bb2514ede0c3299d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371360
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-13 15:03:49 +00:00
Sigurd Meldgaard d055df0383 Bump pub to 9ab905a24e36ef339c99f73bfb6683874feed8ce
Changes:
```
> git log --format="%C(auto) %h %s" df3664d..9ab905a
 https://dart.googlesource.com/pub.git/+/9ab905a2 Fix handling of directories in archives  (4306)

```

Diff: https://dart.googlesource.com/pub.git/+/df3664d17fd146ccd19b32820a022404da91f6d3..9ab905a24e36ef339c99f73bfb6683874feed8ce/
Change-Id: Ib95f00a8bf1306d5f43f37c80e2d5d92f7a427ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371125
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Sigurd Meldgaard <sigurdm@google.com>
2024-06-13 14:24:08 +00:00
Jake Macdonald 57fc55d934 rev the macros version, preps for a new release once publishing the package is fixed, see https://github.com/dart-lang/pub/issues/4305 for context
Change-Id: I8fe93ce7895fc6bb1b2ba896d8256366ae698ce0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371142
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-06-13 14:03:08 +00:00
Martin Kustermann 68229c4e58 [dart2wasm] Make is/as-checker helpers be used even if operand type is not InterfaceType
Right now the optimized is/as-checkers are only used when the operand
type is an [InterfaceType]. That means they don't get used for e.g.

   dynamic obj;
   T obj2;
   obj is String
   obj2 is List<dynamic>;

But we can use the is/as-checkers on any operand type as long as the
type we test against is an [InterfaceType] without arguments or where
the type arguments are equivalent to defaults-to-bounds (i.e. require
no checking).

Issue https://github.com/dart-lang/sdk/issues/55516

Change-Id: I1adff52b3d880c37c344edb0c42ffd454d7b1164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371124
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-13 13:18:59 +00:00
Martin Kustermann 6d185d2003 [dart2wasm] Make pkg/dart2wasm/tool/compile_benchmark more similar to dart compile wasm
This allows copy&past'ing commands from `flutter build web --wasm
--verbose` and replacing `dart compile wasm` with
`pkg/dart2wasm/tool/compile_benchmark`.

* We make the shell script recognize `-o` flag.
* We make the shell script recognize different platform being passed.

Change-Id: Iabecc7c87b35d35f073ced5e111a9ca5ea0d9298
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371341
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-13 13:18:19 +00:00
Martin Kustermann d150ad8a81 [dart2wasm] Move local constant variable to top-level
The flutter platform file is compiled slightly differently from the way
we compile the normal SDK platform file. This slight difference -
somehow related to how -D environments are used in CFE - results in a
constant `VariableDeclaration` to stay in the kernel in flutter's case
but not in the Dart SDK's case.

(All usages of constant variables / fields will be
`ConstantExpression(<const>)` instead of
`VariableGet(<constant-variable>)`)

That in itself causes the kernel verifier AST visitor (which we call
from `pkg/dart2wasm/lib/compile.dart` in assertion mode enabled) to
report an error.

=> To work around this issue we hoist the only variable affected by this
to top-level.

=> That will allow us to run the dart2wasm compiler in assertions mode
on flutter apps without hitting the verifier problem.

(This has very likely to do with the fact that in flutter's case the
variable must result in an `UnevaluatedConstant` which then at a later
stage gets evaluated whereas in Dart's case we do that eagerly).

There's no easy way to write a test for this, as normal test files will
have an environment and therefore don't result in unevaluated constants
afaik.

Change-Id: I883b91bdc37ede8b45e35a15d0dddc296d9da9ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371340
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-13 13:10:50 +00:00
Sarah Zakarias d289a725a3 Add topics to pubspec.yaml
Closes https://github.com/dart-lang/sdk/pull/55922

GitOrigin-RevId: 5729941116885da445296f09c5de5d097154c53f
Change-Id: I2c4076506ae8d1411550320f12dba4ae2a6dc559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369510
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2024-06-13 13:02:54 +00:00
pq 70f4e89ddf quick fix for EMPTY_RECORD_LITERAL_WITH_COMMA
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: Ifee29c7623f3322d4a35534e1c2a00d1cd6b0b03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-13 13:02:45 +00:00
pq 5cc92cf696 quick fix for STATIC_SETTER_WITHOUT_BODY
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: Id3b704915c03b61d9ba778b96c6e6fc55e1ef3dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-13 12:12:39 +00:00
Ömer Sinan Ağacan 633e7c4b15 [vm_service] Decode incoming JSON in one step instead of two
Currently we decode incoming data as a string, then parse the string as
JSON.

We can do it in one step by fusing a `Utf8Decoder` with a `JsonDecoder`,
which will be faster.

A difference between `jsonDecode` and the fused version is that
`jsonDecode` returns `dynamic`, the fused version returns `Object?`.

To keep changes as small as possible we cast the return value of the
fused verison to `dynamic` in this CL.

However using `dynamic` values is often slower than type casting it to
the right type and then using it. So it might make sense to cast it to
something like `Map<String, dynamic>` in a separate CL.

Change-Id: I76de535a72ae5532db5a27e543929519c48c701c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371080
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-13 11:53:40 +00:00
asiva e23e032406 [test] Fix isolate concurrency test to not pass in sound-null-safety flag
Change-Id: I57f252e427e35fcf4ad5e96465f3ad4e88ababea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371203
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-12 22:26:35 +00:00
asiva 7a068fae7d [pkg/kernel-service] Fix invalid index used in expression
TEST=ci
Bug: 55951
Change-Id: I58d3bd361666324f33a0e4b25f5b1e85ffa71440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371182
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-12 22:13:29 +00:00
Konstantin Shcheglov 78a0c7a5e1 DevX. Issue 54567. Support for joined cases in 'Convert to switch expression'.
Bug: https://github.com/dart-lang/sdk/issues/54567
Change-Id: Idb6cc7ecd88e1e9e3b14c6a54176c958bac36afa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-12 22:10:47 +00:00
Mayank Patke ca3e67a3b6 [dart2js] Add --interop-null-assertions.
This CL adds a new --interop-null-assertions flag (cf.
--native-null-assertions) with the goal of validating that JS interop
APIs with non-nullable static return types do not return null values.
This flag is currently disabled by default but is intended to assist in
sound null safety migrations.

In general, we don't guarantee type soundness of package:js interop
since users can write incorrect static types which are not backed by
any runtime checks. However, it is likely that during the null safety
migration, some interop APIs which should have been made nullable
weren't. Therefore, we want to offer some additional (but limited)
checking for this case.

For static invocations of functions with non-nullable return types, we
can simply perform a null check on the result of the call.
For instance methods (which could be invoked virtually/dynamically), we
want to perform a null check on the return value in the callee (the
interceptor method) itself when possible.

It's possible for multiple interop bindings to share the same
interceptor method. We produce a null check in the interceptor method
body if all the methods have non-nullable return types. Otherwise, we
insert checks at callsites when appropriate.

Change-Id: Ifd155d7f8326152b6d57d61199e0b7973c4a1211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369784
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-06-12 21:28:23 +00:00
Konstantin Shcheglov bb66bd92c8 DevX. Issue 53744. Remove 'const' that starts implicit constant context, add sibling 'const's.
Bug: https://github.com/dart-lang/sdk/issues/53744
Change-Id: Ie0dbfa420d247be47405f014f5b089bc59dde9f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-12 21:11:55 +00:00
Jake Macdonald f4899aa62e skip failing macro test
Bug: https://github.com/dart-lang/sdk/issues/55992
Change-Id: Ib2bfaf980d0edc7ac8a0e2a891983a3294ee1588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371220
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-06-12 20:59:34 +00:00
Ryan Macnak 0713bce1fe [vm, gc] Check for pause requests when marking large arrays.
This was sometimes responsible for the largest GC pause in IsolateSendExitLatency, with a scavenge waiting for a concurrent marker to finish a whole array and pause.

TEST=ci
Change-Id: Ib2d8417ffe6cee3e8436a8c382d2db660e1eef41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371180
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-12 20:53:18 +00:00
asiva 418858b725 [VM/Runtime] - Remove unused sound_null_safety command line option.
TEST=ci
Change-Id: I9c471e809b2c218e75be5e938479ee8b6a76908b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365621
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-12 20:51:31 +00:00
Ryan Macnak f3cc30ab41 [vm, profiler] Fix sample representation to account for the change to 20-bit class ids.
TEST=ci
Change-Id: I6ba060d250069d71dcf38e4f7ab1a1ca240ce23d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371200
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-12 20:22:41 +00:00
Kallen Tu 0b31d88594 [test][wildcard-variables] Fix typedef record type.
This switch would've failed regardless. This CL switches the types of the typedef R so that this test would pass.

Bug: https://github.com/dart-lang/sdk/issues/55652
Change-Id: Ic36863a38e3197bd9012907caa9f445faf4945b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371021
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-06-12 18:43:39 +00:00
Devon Carew bbc9cb6d06 [triage] enable triage automation
Change-Id: Iab7628d9f058449659b4d0c4ed2de7f26f3cea7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371160
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-12 17:36:00 +00:00
Ryan Macnak 622afbfbe7 [vm, gc] Prefer the incremental compactor over the full compactor during idle GC.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/52513
Change-Id: I85d861b2eb2ab4b461ae981bf094596af02d4df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370702
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2024-06-12 17:23:02 +00:00
Daco Harkes 9588927faf [vm] Native asset relative path resolution with symlinks
This CL moves native assets resolution to the embedder.

The Dart VM looks up the asset path (for example
`['relative', 'foo.so']`) with the asset id. The embedder defines
callbacks for asset loading, and returns a handle to the dylib.
Then the VM calls the embedder again with `dlsym` to lookup the symbol.

The Dart VM & kernel compiler are responsible for the asset id to
asset path mapping. The kernel compiler compiles it into the snapshot
and the VM looks it up in the snapshot.

Relative paths are resolved relative to the isolate script uri (kernel
snapshot, jit snapshot, aot snapshot, or `dart compile exe` result).
The embedder is responsible for remembering the script uri it set when
spawning the isolate group.

This CL does not add `dlclose` or `dladdr` embedder callbacks yet.
Bug: https://github.com/dart-lang/sdk/issues/55521
Bug: https://github.com/dart-lang/sdk/issues/55966

TEST=pkg/dartdev/test/native_assets/build_test.dart
TEST=tests/ffi/native_assets/asset_relative_test.dart

Bug: https://github.com/dart-lang/sdk/issues/55410
Bug: https://github.com/dart-lang/sdk/issues/55523
Bug: https://github.com/dart-lang/sdk/issues/55207
Change-Id: I75ec4a368c5fb3d2f76b03771e796ff56bcac941
Cq-Include-Trybots: dart/try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-win-release-arm64-try,vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-msan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/361881
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-06-12 16:45:19 +00:00
Daco Harkes 4b2906cdc1 [vm] Move ResolveUri to platform
This will enable the standalone embedder to resolve uris in a follow
up CL:
https://dart-review.googlesource.com/c/sdk/+/361881

The implementation was using zones for allocation, this CL switches
that to using `malloc`. The caller is responsible for freeing the
memory if resolving succeeds.

This CL removes `Dart_DefaultCanonicalizeUrl`.

We don't have a run_platform_tests, so this CL keeps the tests in
run_vm_tests.

TEST=vm/cc/ParseUri
TEST=vm/cc/ResolveUri
TEST=tests/ffi/native_assets/asset_relative_test.dart

Bug: https://github.com/dart-lang/sdk/issues/55523
Change-Id: Ifb300d8164eb50506f22ce619fad0811f74ef34c
Cq-Include-Trybots: luci.dart.try:vm-aot-asan-linux-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-asan-linux-release-arm64-try,vm-asan-linux-release-x64-try,vm-msan-linux-release-arm64-try,vm-msan-linux-release-x64-try,pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-win-release-try,vm-aot-linux-debug-x64-try,vm-linux-debug-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-aot-win-debug-x64-try,vm-win-debug-arm64-try,vm-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368423
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-12 16:45:19 +00:00
Ben Konyi 6b788d2a77 [ Service / DDS ] Re-introduce explicit cast to remove dynamic invocation of operator[]
Fixes failures in type flow analysis tests introduced by https://dart.googlesource.com/sdk/+/cf9623f3d9520bc58b7d3cba146934b69dba1d8f

TEST=pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart

Change-Id: I401d12d42a64c64537722ef346dd86b1eff78f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371140
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-06-12 16:34:17 +00:00
Kallen Tu 8095cb32c6 [cfe] Formal parameter wildcards are non-binding.
This CL changes the following:
- Formal parameter wildcards can have duplicate declarations.
- Formal parameter wildcards will produce an error when used.

Most of this CL is still needed even if we want to keep these parameters in scope. I'm working on that so I'll put this out in the meantime. The tech debt is small compared to getting a move forward on the functionality of wildcards.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I5a8b6a8081ea6deb4cfd4bf2626280c6e8c98989
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370761
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-12 14:42:51 +00:00
Kallen Tu 2ec0ca25a8 [cfe] isWildcard set only with experiment on.
Only set `isWildcard` on variables when the experiment for wildcards is enabled.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I54a1f0ba1b9192df6c86e44e92d5ff4bebc9a232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371020
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-06-12 14:25:59 +00:00
Johnni Winther 726f9f1a68 [analyzer] Generate multiple cases in missing cases fix
This pipes multiple witnesses from a non-exhaustive switch expression
or statement to the ADD_MISSING_SWITCH_CASES fix, such that multiple
cases can now be inserted in a single fix.

Change-Id: I5625bbb81c72917f10f4388cfe96d1bd1536c269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371062
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-12 12:45:09 +00:00
Ömer Sinan Ağacan 75f9312a50 [dart2wasm] Small optimization in JSON number parsing
Use `WasmArray<WasmI8>` for number buffer when decoding numbers.

This saves one allocation when growing the number buffer and on initial
allocation of the buffer, and eliminates one layer of indirection when
writing to the buffer.

Change-Id: Ic210bc13072f0dd34918361a1bee8c7b29ce61cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371064
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-12 10:50:27 +00:00
Johnni Winther 5986f91820 [cfe] Split CompilationUnit and LibraryBuilder
This moves CompilationUnit from being a supertype of LibraryBuilder
to only being implemented by DillLibraryBuilder and SourceLibraryBuilder.
This is done in preparation for fully separating CompilationUnit from
LibraryBuilder.

Change-Id: Id2e9488d5f35ab108d5067583541dec433b90cf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371081
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-12 10:46:18 +00:00
Martin Kustermann dd92e9a0b4 [dart2wasm] Faster search in RTT supers data structure
If the transitive supers graph contains many classes we use a binary
search instead of a linear search.

Issue https://github.com/dart-lang/sdk/issues/55516

Change-Id: I1018082e8d27090293b67a2239abfaf279270b9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370860
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-06-12 10:42:22 +00:00
Jens Johansen c15466034e [status_files] Cleanup status files
Make tool (by default) give error when test entry specified in status
file does not exist. Make -w (by default) remove such entries.

Cleanup most status files, fixing a few entries containing `.dart` and
removing obsolete entries (i.e. entries pointing to nonexisting tests).

This should for instance have given an error in
https://dart-review.googlesource.com/c/sdk/+/370600 saying that the file
I specified didn't exist (in that I shouldn't have specified the `.dart`
part).

TEST=No tests, this is status file maintenance.

Change-Id: Ie977bf15dea2e3dad8d771fd3e99917317e975f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370886
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-06-12 10:21:23 +00:00
pq 86b43dc50c update status of unreported COVARIANT_CONSTRUCTOR
`COVARIANT_CONSTRUCTOR` is not reported by the parser (today) and constructors are treated the same as other members. This change updates fix status bookkeeping making it clear that the diagnostic isn't reported and so is not fixable.

Change-Id: I4944beef64e4c9ee42757430383291a54ae75f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371061
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-12 09:29:39 +00:00
Sam Rawlins 21829623da linter: move avoid_js_rounded_ints tests
Change-Id: Ie569dba08fa0bf6fc25447b39015be381e79fe7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370461
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-12 08:38:35 +00:00
pq a5cacf80b6 quick fix for STATIC_GETTER_WITHOUT_BODY
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I4a212bc638cc2a36d805af9eedd319fd3dc9c00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-12 08:17:57 +00:00
pq f1cf8c22d1 quick fix for LITERAL_WITH_NEW
See: https://github.com/dart-lang/sdk/issues/55917

Change-Id: I43629f21645ed330b6a4732ae7f3e9ea616b3a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370840
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-12 07:48:59 +00:00
Konstantin Shcheglov d0998d6996 DevX. Issue 29106. Don't NON_ABSTRACT_CLASS_XYZ if the concrete extended class also has this problem.
Bug: https://github.com/dart-lang/sdk/issues/29106
Change-Id: Ie676295f104fcbb8458fbb27f3f01ed52e99fef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-06-12 00:31:59 +00:00
Brian Wilkerson 2c97c6949e Include an empty body when suggesting a name for a top-level declaration that does not have a body
Change-Id: I92875fdb80b0541eaa5505b507e822915181ee52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370980
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-12 00:26:59 +00:00
Konstantin Shcheglov 73cd7c6439 CQ. Deprecate exports from package:analyzer/src/source/source.dart
Change-Id: I6256ad2a8472636fd39a9db7e0360f8d7104da0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369560
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-11 22:49:51 +00:00
Jake Macdonald fac11694b4 Track async microtasks scheduled by macros, and ensure they have all completed before a macro returns.
Does not track certain events such as async I/O, but will refuse to execute the scheduled callbacks when those do complete.

Bug: https://github.com/dart-lang/sdk/issues/55426
Change-Id: Ie81100e9e4dbe49d050bad875cc9b6a65969863d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-11 21:02:29 +00:00
Kallen Tu 549a1b1987 [wildcard-variables] More language tests on declarations - classes, enums, extension types.
Bug: https://github.com/dart-lang/sdk/issues/55652
Change-Id: Id1c48c3f6345d13c9c5f88224085a863e30f5aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367985
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-06-11 19:44:41 +00:00
Ben Konyi cf9623f3d9 [ DDS ] Update DDS launch sites to assume DDS process closes stderr
Removes risk of DDS connection information being split across two stream
events, causing JSON decoding to fail.

Also updates DDS to close stderr, even in the error case.

TEST=Existing service and dartdev tests

Change-Id: I5cceab899aac1fa63bd7578dd658b34096722bd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371000
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-11 18:41:01 +00:00
Devon Carew b640dffb0a [third_party] misc updates for the gitignore files
Change-Id: Ie3b816725128b27f3b48f9cb11e2c78ff3977652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370981
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
2024-06-11 18:09:59 +00:00
Ryan Macnak 4242ff536f [vm, compiler] Fix clobbered register on strex failure path when dirtying cards.
Add spurious store-conditional failures to the simulators.

TEST=golem
Change-Id: Ice3d18145cbb883cf868ad4ee077a2d1e56b15ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370962
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-11 18:00:35 +00:00
Devon Carew f97004f639 Bump collection to c90b19f07b48391f3b1b4c39dd06ef0177f8e07c
Changes:
```
> git log --format="%C(auto) %h %s" 141d83a..c90b19f
 https://dart.googlesource.com/collection.git/+/c90b19f blast_repo fixes (348)
 https://dart.googlesource.com/collection.git/+/a1d2507 Add flattenedToList and flattenedToSet (328)
 https://dart.googlesource.com/collection.git/+/e9219c7 Deprecate whereNotNull from IterableNullableExtensions (332)
 https://dart.googlesource.com/collection.git/+/9e441f1 Deprecate transitiveClosure (336)

```

Diff: https://dart.googlesource.com/collection.git/+/141d83af3d7586ae9d27de610fd426071c98e5d3..c90b19f07b48391f3b1b4c39dd06ef0177f8e07c/
Change-Id: I9ed24345c132ad92ae65c5e70ab37647fad0ec00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370960
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-06-11 17:27:21 +00:00
Brian Wilkerson 45835b0933 Use the max number of suggestions to limit the number of candidate suggestions being retained
Change-Id: I4a60569fb4efe4af576b9adbb375c6e2e0b1727c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370720
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-06-11 17:03:05 +00:00
Elliott Brooks 22ae1db27f Update third_party gitignore so that package:dap is not gitignored during publishing.
Bug: https://github.com/dart-lang/pub/issues/4300
Change-Id: I0679d5425b90d454e6f2bd7e0de9d0aac9e84581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370700
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2024-06-11 16:30:26 +00:00
Ömer Sinan Ağacan 455d85f528 [dart2wasm] Port VM JSON parsing improvements
This ports https://dart-review.googlesource.com/c/sdk/+/365803 to dart2wasm.

Benchmarks: https://golem.corp.goog/Revision?repository=dart&revision=110551&patch=19222

Change-Id: Id4a8e0f44abcde3552c50605d9b329443d43d1d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370821
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-11 16:10:23 +00:00
Ben Konyi d96ff605e2 [ CLI / DDS ] Close stderr for dart development-service after connection details have been printed
This will simplify logic in clients parsing this information by
providing a clear signal that all connection data has been sent over the
stream and is ready to be decoded.

Change-Id: Iae3779fe13662bf15187e9fa41febba94af4f2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370940
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-06-11 16:06:47 +00:00
Ömer Sinan Ağacan efc59ee300 [vm/libs][dart2wasm] Add some missing type arguments to convert_patch List types
Tested: existing tests
Change-Id: Ib19748e947ef9a80852ef80f7726b5d1c987a26e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370920
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-11 15:03:49 +00:00