Commit Graph

102773 Commits

Author SHA1 Message Date
Alexander Markov 71efc19cc7 [vm/aot,tfa] Remove support for legacy types from TFA
In addition, with sound null safety there is no difference in subtyping
semantic between 'is' and 'as' type checks, so SubtypeTestKind is also
removed.

TEST=ci

Change-Id: Id75ef6a93b115c44b844ef0a32dc8dca5cc61861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382900
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-30 13:55:34 +00:00
Martin Kustermann 98cf417f4d [dart2wasm] Align -O4 flag in dart2wasm with dart2js behavior
Change-Id: I3a122639258570d7abbbd4f727760533f658b090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382564
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-30 13:25:39 +00:00
Martin Kustermann d769a9105b [dart2wasm] Adjustments to inliner
* Inline small `get iterator` & `get current` iterator methods
* Inline bodies that are small compared to arguments
* Make AST node counter more precise
* Manually mark ListIterator methods as prefer inline

CoreLibraryReviewExempt: Only adds annotation to existing functions
Change-Id: Ib6379e73713cd47a88e5cc67cecd4b5c8344adcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382882
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-08-30 13:14:56 +00:00
Chloe Stefantsova 0dded3682f [cfe] Remove handling of legacy types from constraint generation
Part of https://github.com/dart-lang/sdk/issues/54902

Change-Id: I48555c46e62a90552b8fb3fdc21fb6cabe7fc70a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-08-30 11:52:23 +00:00
Johnni Winther 7e5b8031ec [cfe] Add NominalParameterNameSpace
Change-Id: Ia48158f11080368fe7b8c42170d45ef27e81701f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382581
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-08-30 11:45:57 +00:00
Vyacheslav Egorov ea500b450a [vm/aot] Fix crash in AddConstObject
It used `ObjectVisitor` to peak into constant objects. The visitor
called `AddConstObject` directly while keeping raw pointers around.
This is unsafe because `AddConstObject` can cause GC for several
different reasons - which would potentially invalidate those raw
pointers.

I have added `NoSafepointScope` around `VisitPointers` but this
does not actually easily reveal the bug because allocations are
really sporadic and often require to be running in PRODUCT mode
to trigger corresponding code path. Unfortunately we don't have
any existing infrastructure to catch "allocation from unsafe
place" which works across all build modes and catches even
situations where allocation can _potentially_ happen.

Fixes https://github.com/flutter/flutter/issues/153358

TEST=manually with a reproduction provided by internal user.
R=kustermann@google.com

Change-Id: I0c9e14a137b1f8ac749443d80f6904f1e9b20ed7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382883
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-08-30 09:41:28 +00:00
Chloe Stefantsova 59cb100195 [analyzer][cfe] Share constraint generation for declaration types
Part of https://github.com/dart-lang/sdk/issues/54902

Change-Id: Id83077113319031b3e11061110ce0b1beb45918a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382562
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-08-30 08:58:22 +00:00
Daco Harkes eff0ece338 [deps] Roll dart-lang/native
Change-Id: Ib55edabd7d128e76b84685f581977be7f53d532a
Cq-Include-Trybots: luci.dart.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
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382862
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
2024-08-30 06:23:47 +00:00
Martin Kustermann 36f23ed8cb [dart2wasm] Remove makeListFixedLength/makeFixedListUnmodifiable
This removes usages of makeListFixedLength/makeFixedListUnmodifiable
in wasm core library implementation.

Furthermore we establish a guarantee that the backing store of
fixed length lists (modifiable or unmodifiable) always has the same
size as the actual list (and not larger).

This in return allows the fixed length iterators to not need a separate
length to track, as the backing WasmArray<Object?>'s length is
sufficient.

Change-Id: I1fe44781c6044187a3a129615a5065f08dfc53a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382860
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-08-30 06:23:19 +00:00
Ben Konyi 230c7ed90c [ VM ] Exit with error if --disable-dart-dev is provided after a Dart CLI command
Fixes https://github.com/dart-lang/sdk/issues/56592

Fixed: 56592
TEST=regress_56592_test.dart
Change-Id: I3363a27c6a4221a3c5388b3472cee978649c1e39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382700
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-08-29 20:40:06 +00:00
Ben Konyi 1bf48b070c [ DDS ] Prepare for 4.2.6 release
Change-Id: Ibd9f120837f7fba997a08fef009459f21bbd9e4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382940
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2024-08-29 18:53:10 +00:00
Danny Tuppeny a0411ae244 [analysis_server] Prevent duplicate completions for extensions for libraries that import them
Fixes https://github.com/dart-lang/sdk/issues/56320

Change-Id: I4645165857c082cb26ac09eb12df3106769fb25a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-29 17:11:33 +00:00
Alexander Markov ce571036e1 [vm] Cleanup legacy AssertBoolean checks
With sound null safety front-end guarantees that all logical
expressions have a non-nullable bool type, so legacy AssertBoolean
checks are no longer needed and can be removed.

TEST=ci

Change-Id: If952da7bd0ac83c43de3e5d98845c5e5d8d29f6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382744
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-29 16:45:00 +00:00
Alexander Thomas e89e3fb00a [release] Merge changelog from stable back to main
Change-Id: I162f669500e5b37a2876eaf3cb5f6f9e9222dc25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382820
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
2024-08-29 16:30:12 +00:00
Konstantin Shcheglov 49c6679e4a Parts. Track used imports while resolving library files.
Change-Id: Ic23ec9ca49d93382449bfe2650089eb43099c3e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-08-29 16:19:11 +00:00
Sam Rawlins 895093e9f9 Initial PluginServer implementation
This is the core implementation of the "plugin server" that will support the API described at https://docs.google.com/document/d/1T8P323DJxsc3YPzveNIaSKWFkrJp9ydTR4jp_XFb7XQ/edit?resourcekey=0-f8Ue29KMUizqXNGhATp1tg#heading=h.23fjh5hfm2is

This is heavily curbed from the ServerPlugin class at
`package:analyzer_plugin/plugin/plugin.dart`, but does not depend on it.
It depends on two concepts from the analyzer_plugin package: (1) the
protocol used for de/serializing requests, responses, etc. And (2) the
`PluginCommunicationChannel` class. This is also just a utility for
communicating between the analysis server and the plugin server.

This plugin server is capable of "registering" individual "plugins",
which allows plugins to register individual (maybe multiple) lint rules,
and individual (maybe multiple) quick fixes.

The plugin server for now only responds essentially to three requests:

* `ANALYSIS_REQUEST_SET_CONTEXT_ROOTS`
* `EDIT_REQUEST_GET_FIXES`
* `PLUGIN_REQUEST_VERSION_CHECK`

All files are analyzed during `handleAnalysisSetContextRoots`, and
quick fixes are calculated during `handleEditGetFixes`.

There are many TODOs, but the included test shows that this plugin
server can notify the analysis server of lint diagnostics to be
reported, and can respond to a query for quick fixes.

Change-Id: Ibc93332319220a2caf49d20ab480940041a15049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-08-29 16:03:42 +00:00
Derek Xu 162a35f654 Skip pkg/vm_service/test/id_zones_test on AOT configurations
This test makes use of `debugger()`, which isn't supported on AOT.

Change-Id: I88b6e21c5b3121873c753becb86a03add0234f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382660
Commit-Queue: Derek Xu <derekx@google.com>
Auto-Submit: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-29 14:49:07 +00:00
Derek Xu 46d02f42a4 [VM/Service] Fix service/bad_reload_test and service/get_object_rpc_test
service/get_object_rpc_test was failing because one ID in it hadn't been
updated to the new format.

service/bad_reload_test was failing because `ServiceEvent::PrintJSON`
was attempting to populate the `reloadError` property of every `Event`
of kind `IsolateReload` with an `@Error`, but it was not possible to
allocate IDs for these `@Error`s because `ReloadSources` runs for an
isolate group, not for an individual isolate. I fixed this by removing
the `reloadError` property and adding a `reloadFailureReason` property
with type `string`.

TEST=confirmed that service/bad_reload_test and
service/get_object_rpc_test complete successfully on a local build of
the linux-debug-x64 SDK, vm-linux-debug-x64 tryjob

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: Ibf507aa0e475a6b9bed42b055e9d19b54aa81844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382661
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-08-29 14:48:58 +00:00
Danny Tuppeny d8376f191e [analysis_server] Include color hex codes in LSP completions to get color previews
VS Code will show color previews in code completion if there's a hex value at the start or end of the documentation (or a few other fields, but documentation seems lease intrusive here).

This change will compute and include the hex color if the client indicates it supports the Color completion kind.

Fixes https://github.com/Dart-Code/Dart-Code/issues/3941

Change-Id: I94a81993ce5ad95d8cdce2fd61dc7b139710a659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382604
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-08-29 14:36:42 +00:00
Alexander Markov 0ec691222d [dart2bytecode, vm/interpreter] Constructor tear-offs and more fixes
* Make dynamic module entry point fully compatible to script main
  function (allow taking optional parameters and up to 2 arguments).

* Fix reading of function types within generic members.

* Add crashing tests to status files to avoid generation of
  core dumps on the bots.

TEST=ci (vm-aot-dyn-linux-debug-x64)

Change-Id: Ibe8651ca13734101f2df2c8634f70ebf421dccef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382640
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-29 14:30:38 +00:00
Alexander Markov a3b7c9fb5a [dart2bytecode, vm/interpreter] Small fixes
* Use AllocateClosure instruction for closure instantiations in order
  to initialize closure entry point.

* Fix null handling in operator== to be before argument type checks.

* Add _InvocationMirror._withType to dynamic interface as it is
  implicitly used by noSuchMethod forwarders.

* Fix AssertAssignable for null objects.

TEST=language tests in vm-aot-dyn-linux-debug-x64 configuration

Change-Id: I7b1a037d4fde4d22ed32969e0f099b31ea4432ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382500
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-29 14:28:40 +00:00
Brian Wilkerson dd47ff74cc Remove MultiplyInheritedExecutableElement2
Also removes the only reference to the old model equivalent.

Change-Id: I9dd30f4d7864eca6190df7ae5ebb419ea61e1f9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-08-29 14:06:51 +00:00
Johnni Winther 876b46de21 [cfe] Delay adding builders to declarations
This is a step towards creating fragments instead of builders during outline building.

Change-Id: I8616c8d0fa751693af820ee4fa9078e7ac5d7f40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382800
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-08-29 13:11:55 +00:00
Tess Strickland 4aa25330d9 [gardening] Fix LoadIndexed native code gen on X64/IA32.
Assembler::AddressCanHoldConstantIndex, which is used by
MakeLocationSummary to determine whether to keep the index constant or
to allocate a register for it, performs the check:

  const int64_t disp =
      index * index_scale +
      (is_external ? 0 : target::Instance::DataOffsetFor(cid) - kHeapObjectTag);
  return Utils::IsInt(32, disp);

However, in Assembler::ElementAddressForIntIndex, used by EmitNativeCode to
produce an appropriate Address for the constant index, the code performs
a slightly different check:

  const int64_t disp = static_cast<int64_t>(index) * index_scale +
                       target::Instance::DataOffsetFor(cid);
  ASSERT(Utils::IsInt(32, disp));
  return FieldAddress(array, static_cast<int32_t>(disp));

Thus, if a constant index produces the displacement kMaxInt32 + 1,
MakeLocationSummary will appropriately keep the index as a constant, but
the ASSERT in ElementAddressForIntIndex will trigger.

Modify ElementAddressForIntIndex in the X64 and IA32 assemblers so that
the same displacement is checked in both places.

TEST=vm/cc/IRTest_Regress_56588

Fixes: https://github.com/dart-lang/sdk/issues/56588

Change-Id: I504d6f92230540d74409a99b64b444acdb9c85f7
Cq-Include-Trybots: luci.dart.try:vm-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382801
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-08-29 12:47:28 +00:00
Johnni Winther acfcf784ae [cfe] Add TypeScope
This adds a TypeScope stack to the SourceBuilderFactory to associate each NamedTypeBuilder with the LookupScope in which it should be resolved.

Change-Id: I15a171b8570fed3d5134e16347c437f13baa5b94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382602
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-08-29 10:06:25 +00:00
dependabot[bot] 6f87ecd91c Bump github/codeql-action from 3.26.0 to 3.26.5
Closes https://github.com/dart-lang/sdk/pull/56571

GitOrigin-RevId: 3bbe50a8b15d622c22172dacdcacec409835ba19
Change-Id: Ic4472561a9b3daee1cda7cf477278e2b266488df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382140
Reviewed-by: Alexander Thomas <athom@google.com>
2024-08-29 09:12:58 +00:00
Martin Kustermann 8bbccbee66 [dart2wasm] Move is/as checker generation from [Types] into their own [IsCheckers]/[AsCheckers] classes
This is analogous how we do it for [PolymorphicDispatchers]

Change-Id: I3b3187ebe11f50659cd89ed01d9fb4b29ab207c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382580
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-29 07:39:39 +00:00
Fedor Shcheglov ed53041597 Converted library augmentations into parts in analyzer/ tests.
Change-Id: I91ad3b6fb5fd4c785a1eb99e182c4e16525dd0b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-08-29 04:29:27 +00:00
Nate Biggs 04f3e7a740 [dart2wasm] Use brand types for wasm minimal recursion groups.
Brand types encode an integer as a struct type and allow us to break the equivalence relation between similar types in different rec groups.

We now compute equivalence classes at the rec group level reducing the number of brand types we have to assign.

We also improves the equivalence class computation by exiting earlier when a group/type is found to be part of an equivalence class. This is enough information to tell us which brand type it needs so we can exit the inner loop early.

Change-Id: I8c5e1cfc679f1fcb6b7f0e79bd71719f345784d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381960
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-08-28 23:44:04 +00:00
Martin Kustermann dba63c0ab1 [dart2wasm] Prefer inlining list iterator abstractions
This is analogous to how the Dart VM does it.

Change-Id: I0b7658b6bdcdbf72004a7dd85b85f0cad28c6f52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382603
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-28 23:00:32 +00:00
Danny Tuppeny bbe6f2340a [analyzer] Don't crash on certain types of invalid data in analysis_options linter config
Fixes https://github.com/dart-lang/sdk/issues/56577
Fixes https://github.com/dart-lang/sdk/issues/55594

Change-Id: I1e69937cd104e8101a7f87b7c9b8ce26b914b3a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382605
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-08-28 22:21:27 +00:00
Danny Tuppeny ddab694633 [analysis_server] Add failing test for auto-import extensions
See https://github.com/dart-lang/sdk/issues/56320

Change-Id: I6a21ef528d6d67a34e7f845c6cb279f246fe2762
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-08-28 21:39:47 +00:00
Martin Kustermann 6addfa0acb [dart2wasm] Loosen the recursive inlining guard
We can allow inlining constructor initializer & body calls
while compiling a constructor

Change-Id: I992de6c42c638ff6b8e78e8a3108900ff8206ad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382601
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-28 21:21:01 +00:00
Keerti Parthasarathy c78b8a5cc2 [Code completion] Move suggesting field from SuggestionBuilder to DeclarationHelper.
Also deleted unused class MemberSuggestionBuilder.

Change-Id: Ibe64963e342e4b0be822fbd25826159276a3d41e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-08-28 21:11:16 +00:00
Derek Xu 8fa0f56f45 [VM/Service] Add private _deleteIdZone RPC
TEST=pkg/vm_service/test/id_zones_test.dart, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I0b951505edd98364373d5913b7a01f6d4775998e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380360
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Derek Xu daa8cbb29e [VM/Service] Add private _invalidateIdZone RPC
TEST=pkg/vm_service/test/id_zones_test.dart, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I02fcb2502b698066885b3f090435e43a34ed6fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379820
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Derek Xu 6b978a8339 [VM/Service] Add secret _idZoneId parameters to all Service methods
TEST=pkg/vm_service/test/id_zones_test.dart, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes in
sdk/lib/vmservice/running_isolates.dart.
Change-Id: Ib8af3f073f6db9172df90a5ea221269411f72156
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379545
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Derek Xu 8b9be74d23 [VM/Service] Add private _createIdZone RPC
TEST=pkg/vm_service/test/id_zones_test.dart,
runtime/vm/object_id_ring_test.cc, CI

Issue: https://github.com/dart-lang/sdk/issues/55869
Change-Id: I6b092ea6ba4c7787635671af26e09af496ad9a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379544
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-08-28 16:41:50 +00:00
Danny Tuppeny 516b6b23a6 [dtd] Fix permission checks to handle differences in file URI escaping
Fixes https://github.com/Dart-Code/Dart-Code/issues/5210
Fixes https://github.com/dart-lang/sdk/issues/54917
Fixes https://github.com/dart-lang/sdk/issues/55476

Change-Id: I492a4f876ea75972e9971f61d67d2ecf84e7b4c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378461
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-08-28 15:30:07 +00:00
Kallen Tu 1243b9d2b2 [cfe] Lower all late wildcard variables to EmptyExpressions.
Late (wildcard) variables don't get evaluated until they're read, so when we lower them, we should be lowering all of them to EmptyExpressions regardless of if they have an initializer expression.

Bug: https://github.com/dart-lang/co19/issues/2833
Change-Id: Id89035a4e73c2395e7cf19e85bb98e7dbfe2d2a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382422
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-08-28 15:27:36 +00:00
Nate Biggs f00e9b1b29 [dart2wasm] Add --minimize-rec-groups to binaryen flags
This new flag uses a new algorithm to generate the module's type section. The new algorithm is able to produce smaller type sections reducing the overall size of the wasm binary.

For flute.complex at -O4 using this flag produced a wasm file 2.5% smaller.

Change-Id: Iaa7905174c496d637dc3d8d4533df6fd6f056597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382462
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 15:14:39 +00:00
Nate Biggs c50ce78283 [dart2wasm] Roll binaryen to g3 version
This version includes support for the new '--minimize-rec-groups' flag.

Change-Id: Ic1c6125cc65d32aa9f76bda215e8e9101f84829e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382461
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 15:14:39 +00:00
Daco Harkes 3f17f334f0 [deps] Roll dart-lang/native
Change-Id: I1e6ccb249353f1be9a5ec764eb71fc8b9e0299d1
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381984
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2024-08-28 15:10:59 +00:00
Daco Harkes 1f6151d11d [test] Make more newer tool versions available for tests
Unsharded tests have access to the buildtools/ directory, but cannot
find it. This is used in the dart-lang/native tests which are rolled
in to the Dart SDK.

Before this CL we already had the c compiler, linker, and archiver
available in environment vars. This CL extends that pattern to also
provide the paths to common utilities that come with the c compiler.

Change-Id: Ie254da729211865e7a7e5c3c9c8a7e147fe71553
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382560
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-08-28 13:37:29 +00:00
Alexander Markov 2e63d3135a [dart2bytecode, vm/interpreter] Records
TEST=language tests in vm-aot-dyn-linux-debug-x64 configuration

Change-Id: I6dd7d5617f5c076c722304ab2a753159f22c0bf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382421
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-08-28 13:12:48 +00:00
Daco Harkes e65551b7ea [vm/ffi][test] Fix test on Fuchsia
Change-Id: I4db7ecda7196c4023ad7b2ee91d552edb5f6a114
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382541
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-08-28 10:40:21 +00:00
Daco Harkes 1b125fb337 [gardening] Fix concurrency_stress_sanity_test
Closes: https://github.com/dart-lang/sdk/issues/56585
Change-Id: Ib0cfb9772ac04f73c57ab0f5bbc10786c6db740d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382561
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-08-28 10:27:24 +00:00
Jens Johansen 0329ebfd99 [CFE et al] Lint for fields with StackTrace.current
This CL primarily adds a lint for fields with `StackTrace.current`
which is often useful for debugging, but shouldn't be left in.

* Add an ast visitor after the "explicit creation test",
  finding - for now - `StackTrace.current` calls in fields.
  This should have caught the left-in debug such in
  https://dart-review.googlesource.com/c/sdk/+/379281.
* Renamed explicit_creation to compile_and_lint
* Remove (for some time) unused "smoke_test_quick" files.
* Add kernel to the compile_and_lint suite, but ignore it for explicit
  creation (i.e. kernel will also be checked for fields
  with `StackTrace.current`).

Change-Id: Ib886d23a8945e7063dc673a7f99cbb3a6adc1139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382361
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-08-28 09:46:08 +00:00
Martin Kustermann b327dae387 [dart2wasm] Make class id range normalization merge consecutive ranges
Lasse spotted this in [0]

[0] https://dart-review.googlesource.com/c/sdk/+/380780/

Change-Id: Ia66225f3e78a9714d4f9c9984ba3791d7595ae1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382402
Auto-Submit: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-08-28 09:18:36 +00:00
Tess Strickland 27e15ae053 [vm] Cleanup other BitField uses.
Also add a SignedBitField alias so that sign extended BitFields can
be declared with default positions and/or sizes.

TEST=ci

Change-Id: I46bf7f9e378e0f20e7f2e4b4e7ed3e242946d9bb
Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-win-release-arm64-try,vm-aot-win-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382404
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-08-28 08:52:19 +00:00