Commit graph

97879 commits

Author SHA1 Message Date
Stephen Adams
718f9076bd [tests] Make corelib/compare_to2_test work for web numbers
Change-Id: I98d13d92c486851630aa00f42ed981c1acf0ba53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333043
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-31 22:52:40 +00:00
Kenzie Schmoll
182b7e753c Update DevTools rev to f73b42303c9715f5659130f8f1b6dc91fa12d82f
Change-Id: I0da570dc7f984da53c1226c28c783ae1bab7dc7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333045
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-10-31 22:43:26 +00:00
Johnni Winther
72f1591f29 [cfe] Use getTypeAsInstanceOf instead of getInterfaceTypeAsInstanceOfClass
The changes calls to getInterfaceTypeAsInstanceOfClass (et al.) to
getTypeAsInstanceOf to ensure that we take extension types into account.

Change-Id: I7d732cdae8494002b44561cb02c49d58dd0ba67b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332920
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-31 22:30:50 +00:00
Ben Konyi
8b3d93234d [ package:vm_service ] Migrate Observatory HTTP service invocation tests
Also adds READMEs to some test sub-directories.

Change-Id: Ibf48654bcb43d7d52bd3bc0d2ab6afabc1ea3df6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333100
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-10-31 19:54:28 +00:00
Ben Konyi
94f8809607 [ package:vm_service ] Migrate more Observatory tests
Change-Id: I2d653fcc98087feaff79fa1adb2e4293085e959c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332642
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-10-31 19:49:42 +00:00
Tess Strickland
b44987450e [platform] Fix Utils::IsInt on unsigned values.
Also add unsigned value tests for IsUint and MagnitudeIsUint to
verify they don't have similar issues.

TEST=vm/cc/IsInt, vm/cc/IsUint, vm/cc/MagnitudeIsUint

Change-Id: I3c8dcb93b9d019117948bb5c3dac0d1d619931b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333083
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-10-31 19:39:51 +00:00
Ryan Macnak
4b08a81c7d Update clang to 00396e6a1a0b79fda008cb4e86b616d7952b33c8.
Update gn to e4702d7409069c4f12d45ea7b7f0890717ca3f4b.

Change-Id: Id78149a128eb8e60997788abd641d937477c4be6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332741
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-10-31 18:19:20 +00:00
Danny Tuppeny
939e081d43 [analysis_server] Include inlay hints for type arguments in "if case"
Previously we only added the type args in constructor invocations, this changes to any named type without explicit type args.

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

Change-Id: I11a6a96bf34c7e4acff93607a922401d2f0eed83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332960
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-31 17:46:58 +00:00
Ryan Macnak
573fad4ff0 [test] Cleanup building Fuchsia packages/components.
Build one package with three elf_test_runner components: one for each of the binaries that the test harness invokes on the target. (Though currently only tests that use "dart" are setup.)

Create includable CML shards for the capabilites required by the AOT and JIT VMs.

Fold test_runner's fuchsia_cfv2.dart back into fuchsia.dart.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: I7bd8d43d184cbcb11903c7aed77ce31fb30cb894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332451
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zijie He <zijiehe@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-31 17:11:51 +00:00
eliasyishak
f3bc7d1311 Bumping version for unified_analytics
R=derekx@google.com

Change-Id: I899af54bc9808af56858f8a27d097031df2e6cbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333061
Reviewed-by: Devon Carew <devoncarew@google.com>
Auto-Submit: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Elias Yishak <eliasyishak@google.com>
2023-10-31 16:39:33 +00:00
Alexander Aprelev
daaa8f495c [vm/isolates] Allow typed data types in aruments for spawnUri isolates
Fixes https://github.com/dart-lang/sdk/issues/53890
TEST=isolates/send_list_typed_data_spawn_uri_test

Change-Id: Iaf1c2757897c61d0d0da2463bfea398cdcb67959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332743
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-10-31 16:32:59 +00:00
pq
2e723075b8 + analysis options map
A simple (if provisional) implementation of an analysis options map.

🚧 Datastructure, API and implementation all subject to change.

Change-Id: I94d311d17df3f60b6e36437d37df84ce5091e0fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332369
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-31 16:30:41 +00:00
Tess Strickland
ee89886bde Revert "[vm/compiler] Unify methods for UnboxIntegerOpInstr subc..."
Revert submission 332340

Reason for revert: Failures on SIMARM (not SIMARM_X64 though).

Reverted changes: /q/submissionid:332340

Change-Id: Ie87adb065b8dd61896392bffee3b2f4bcd397b3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333081
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-31 16:18:42 +00:00
Tess Strickland
cbe6cb8e2c Revert "Reland "[vm/compiler] Consistently use PointerBase.data ..."
Revert submission 332340

Reason for revert: Failures on SIMARM (not SIMARM_X64 though).

Reverted changes: /q/submissionid:332340

Change-Id: I71399598b5efda7ade5ca1346bd25840c1cf0418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333080
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-10-31 16:18:42 +00:00
Jorge Gorbe Moya
93c1d54de1 Add missing #include <cstdlib>
Closes https://github.com/dart-lang/sdk/pull/53908

GitOrigin-RevId: f25ea09a900c15a8289858c9824c30c17afdb225
Change-Id: I1f1565a3bcb7a785e910d917579725ca15e24056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332452
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-10-31 16:13:19 +00:00
Jake Macdonald
26d4251bff handle org-dartlang-augmentation uris
Bug: https://github.com/dart-lang/sdk/issues/53913
Change-Id: I40a1bba7a303977ddb6b47c2c7725895858e69b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333060
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-10-31 16:10:38 +00:00
Konstantin Shcheglov
3e7f464778 Macro. Test some of the required application order rules.
Change-Id: Iab1e9b8769d2f95a1e06926f86e95d2735fc6837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-31 15:54:30 +00:00
Ben Konyi
290a675add [ package:vm_service ] Migrate service extension tests
Change-Id: If589d96d7d9549456f43fc9ed96a692737a711fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332501
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-10-31 15:53:44 +00:00
Alexander Markov
f54ecbdf31 [vm,dart2wasm] Fix tree shaking of extension types used only in type literals
TEST=pkg/vm/testcases/transformations/type_flow/transformer/extension_type.dart
TEST=co19/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02

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

Issue: https://github.com/dart-lang/sdk/issues/49737
Change-Id: I80237a1240905a52805f5b3e7bd857ed96773609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332450
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-10-31 14:59:29 +00:00
Tess Strickland
60d1a40462 Reland "[vm/compiler] Consistently use PointerBase.data values as FFiIntPtr."
This is a reland of commit 5c4fd50667

The range analysis change was replaced with a different change,
on which this CL is based. In addition, another preceding CL
unified a few methods on subclasses of UnboxIntegerOpInstr, because
the inconsistencies between UnboxInt32OpInstr and UnboxUint32OpInstr
and how unboxed int32 vs. uint32 constants were handled caused the
issue seen after landing the original CL.

Thus, this CL is purely changes of kUnboxedIntPtr to kUnboxedFfiIntPtr
when appropriate plus test changes.

TEST=vm/dart/regress_306327173_il_test
     vm/dart/address_local_pointer_il_test

Original change's description:
> [vm/compiler] Consistently use PointerBase.data values as FFiIntPtr.
>
> Also if converting an unboxed int with only non-negative values
> that fit in 32 bits to a uint32, then keep the range from the value.
>
> TEST=regress_306327173_il_test
>
> Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try
> Change-Id: Id9e7c2d5f477e560822a02574739c57d77b5a6d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332202
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Change-Id: I1f66bc9d1ca7569c913f02b611b4a27f189605ac
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332340
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2023-10-31 14:19:41 +00:00
Tess Strickland
baa18e6d29 [vm/compiler] Unify methods for UnboxIntegerOpInstr subclasses.
Unify the Canonicalize() methods on subclasses of UnboxIntegerOp
so that there aren't subtle differences between canonicalizing
UnboxInt32 and UnboxUint32 instructions. Also unify the
ComputeCanDeoptimize() methods for similar reasons.

If canonicalizing a truncating unbox of a constant, then create an
unboxed constant of the truncated value instead of an unboxed
constant of the original untruncated value.

Previously, a subclass of Definition that didn't override InferRange
got a default range solely based on its type. Now, if the representation
of the definition is an unboxed integer, the default range is the
intersection of the range inferred from its type with the range
inferred from its representation.

TEST=ci

Change-Id: Ib022c366904ee6f8a81995bd4c16b87bd876176d
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-win-release-x64-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332400
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-10-31 14:19:41 +00:00
Chloe Stefantsova
c688bc8e6d [cfe] Implement relaxed rule on representation/implemented types
Closes https://github.com/dart-lang/sdk/issues/53867
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I1a286a8f507e92f85a79acb18d124d3322e1daa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332961
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-10-31 13:17:58 +00:00
Ömer Sinan Ağacan
9ed368c2e1 [dart2wasm] Use only JS strings in JSCM
Refactor libraries so that JSCM will only use `JSStringImpl` class for
strings.

The goal is to disentangle the native string classes and `JSStringImpl`
and start testing `JSStringImpl` in isolation.

Changes:

- `dart:_string` is no longer available in JSCM.

- Make `int.toString` external to allow patching it differently in JSCM
  and normal modes.

  `toString` implementations are in `boxed_int_to_string.dart` patch
  files.

- `int.parse` now uses JS `parseInt`. However `parseInt` is not
  compatible with Dart's `int.parse` so this will cause some more test
  failures in JSCM for now.

- Any dependencies to `dart:_string` from JSCM `dart:convert` are
  removed. The library implementation now uses JS `TextDecoder` for
  UTF-8 decoding.

  Note: `TextDecoder` is not available on d8, so text decoding tests
  will fail on d8.

  JSON encoding and decoding in `dart:convert` will be updated in a
  follow-up CL.

- Compiler (translator, constant generator, code generator etc.) is
  updated to allocate the `JSStringImpl`s in JSCM.

Initially this will make some JSCM test fail as `int` parsing is not
quite right, those will be fixed in follow-up CLs.

Co-authored-by: Joshua Litt <joshualitt@google.com>
Change-Id: I366e06f44cdc369d28fe47b24015234260304399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332680
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-10-31 12:58:26 +00:00
Daco Harkes
acad65713c [vm] Mark NativeFieldWrapperClasses as base
TEST=build SDK (modified patch files)
TEST=tests/ffi/*
TEST=runtime/vm/*_test.cc
TEST=runtime/tests/vm/dart/*

Closes: https://github.com/dart-lang/sdk/issues/51896
CoreLibraryReviewExempt: VM only.
Change-Id: I349849001adf8f3a62f3d4f94d4bdd295c36ef4d
Cq-Include-Trybots: luci.dart.try:flutter-linux-try,vm-aot-linux-debug-x64c-try,vm-ffi-android-debug-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291761
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-31 10:23:12 +00:00
Johnni Winther
9732bcab6a [cfe] Add ClassMember.memberKind and .getTearOff
This adds the functionality to ClassMember that enables us to
fully compute the ExtensionTypeAccessTarget.

Change-Id: I62dd5e24f664c2edd70c2fe794f66595cc017173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332427
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-31 10:07:57 +00:00
Daco Harkes
b1525cef56 [ffi/test] Expect crash in status file
Enables running tools/test.py ffi again.

Bug: https://github.com/dart-lang/sdk/issues/53829
Change-Id: I155bcd9a106ea7c48700dd6fb9d4fd97815837d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332762
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-10-31 09:39:25 +00:00
Aske Simon Christensen
a212a47c82 Mark FutureOr toString test as requiring nnbd-strong
Closes https://github.com/dart-lang/sdk/issues/53738

Change-Id: I87849051ec2324eb03dbe86673dfa68402320454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332424
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-10-31 08:26:45 +00:00
Sigmund Cherem
e52de71408 [web] adjust transition test.
It is unclear if this will help reduce flakiness and timeouts. Until now
the test was setting the listener and making the transition on the same
microtask. If the transition were to complete before the listener is
fully set up, then that would explain the timeout: the transition event
is never fired at that point.  Honestly, I find this scenario hard to
believe, but regardless it is worth a try.

This small refactor changes the order to ensure the listener is set up
upfront, and only later we initiate the transition.

Change-Id: I3ae2bfae210ef307935c3d7f2aec9af82df1ddd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332625
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-10-31 00:50:11 +00:00
Devon Carew
4eede8584d [deps] rev lints, mockito, native, protobuf, tools, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

lints (2cf8403..5c60f48):
  5c60f48  2023-10-30  Michael Goderbauer  Update README.md to use new syntax for adding dev dependencies (#167)

mockito (4edf86f..b7d752e):
  b7d752e  2023-10-26  Ilya Yanok  Use Dart SDK 3.1.0 for format check
  ca537db  2023-10-26  Ilya Yanok  Remove unneeded deprecation warning disable comment
  1a0d0e7  2023-10-26  Ilya Yanok  Remove deprecated `returnNullOnMissingStub` and `OnMissingStub.returnNull`

native (757f503..279094d):
  279094d  2023-10-30  Pierrick Bouvier  [native_toolchain_c] Support MSVC arm64 toolchain (#167)
  9629a55  2023-10-27  Parker Lougheed  Allow modification of a BuildOutput's raw dependencies (#169)
  762b4da  2023-10-27  Ryan Macnak  [native_assets_cli] Add Android RISCV64 target. (#166)
  18bff8c  2023-10-25  Ryan Macnak  [native_toolchain_c] Setup Linux X64 toolchain for non-X64 hosts. (#164)
  d79a7cd  2023-10-25  Ryan Macnak  [native_toolchain_c] Setup Linux RISCV64 toolchain. (#163)
  ce26f75  2023-10-25  Parker Lougheed  Update all lints and dart_flutter_team_lints dependencies (#161)

protobuf (3528fad..3f567b2):
  3f567b2  2023-10-27  Ömer Sinan Ağacan  Remove the dynamic call in `CodedBufferWriter` (#895)
  42436cd  2023-10-26  Ömer Sinan Ağacan  Keep a `ByteData` around in `CodedBufferReader` to avoid repeated `ByteData` allocs (#890)
  9a73936  2023-10-26  Ömer Sinan Ağacan  Avoid adding empty splices in `CodedBufferWriter` (#886)
  23dffde  2023-10-26  Ömer Sinan Ağacan  Update a bug link in a comment (#892)
  19903f0  2023-10-26  Ömer Sinan Ağacan  Make `CodedBufferWriter.writeRawByte` argument type more accurate (#891)
  2ce3e14  2023-10-26  Ömer Sinan Ağacan  Update `FieldInfo._ensureRepeatedField` return type (#893)
  e146515  2023-10-25  Ömer Sinan Ağacan  Avoid redundant ByteData allocation when decoding sfixed64 (#889)
  1b1d549  2023-10-25  Ömer Sinan Ağacan  Avoid allocating temporary views in when decoding strings in `CodedBufferReader` (#888)

tools (da6bb18..e828d45):
  e828d45  2023-10-27  Elias Yishak  Create tests for each event constructor (#186)

webdev (25f17cd..50534a1):
  50534a12  2023-10-30  Elliott Brooks  Cider passes an app ID instead of a workspace name to connect to the Dart Debug Extension (#2272)
  b3d6ef14  2023-10-27  Elliott Brooks  Expose a keyboard shortcut to copy the Dart app ID (#2271)
  c26b4e5f  2023-10-27  Elliott Brooks  Reset Webdev to 3.3.0-wip after release (#2269)
  982b955b  2023-10-26  Elliott Brooks  Prepare webdev for 3.2.0  (#2268)
  62361fbf  2023-10-26  Elliott Brooks  Reset DWDS after release (#2267)
  50b8ae86  2023-10-26  Elliott Brooks  Prepare DWDS for release to version 22.1.0 (#2266)

Change-Id: Ia02db3bc66bac55b637ed5e173fe5c5d50bcca52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332748
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-31 00:05:59 +00:00
Sigmund Cherem
c5baec83a5 [web] Skip mediadevices_test on firefox.
This test appears to flake 88% of the time in FF. One
potential reason could be that FF requires user interaction
(similar to the notification_permissions test), however
I don't have an explanation why it doesn't consistently time-out.

One potential theory is whether this behavior is different depending on
which FF browser version is used, but I don't have the data at the
moment to confirm.

Change-Id: Ib5b2759e0d289e44ff06ab11345c597af6cab0f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332626
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-10-31 00:05:26 +00:00
Ryan Macnak
5ca9437f36 [test] Use an explicit guard page for function_struct_by_value_out_of_bounds_test.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/53829
Change-Id: I6bf32ea3e82a2ae25260931c5b0ce1814b6d9e56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332742
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-30 22:51:24 +00:00
Nate Biggs
171c1334cc [dart2js] Add 'main-only' option to dump info diff tool.
Change-Id: Ibabfd4eb9de5820365772c4b75d5ed0624b148a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-30 22:49:09 +00:00
Mayank Patke
b034a909a6 [dart2js] Avoid discarding type tests during SSA with
--experiment-null-safety-checks

Change-Id: If3e2465103494d4772b1f8b71e7c57ae83b3e036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332371
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-10-30 22:08:47 +00:00
Parker Lougheed
9615958211 Use https license link in api.dart.dev footer
Change-Id: I0ef748f1489512644c2c1e17b6f27272ae6bb09a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332181
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
2023-10-30 22:06:55 +00:00
Paul Berry
d8732e9820 When field promotion fails, report all reasons via context messages.
Previously, if field promotion failed both because the language
version was less than 3.2, *and* for some other reason(s), the
analyzer and CFE only reported the other reason(s). The rationale was
that this was better than reporting just that the language version was
less than 3.2, because if a user upgraded their language version to
3.2 in an attempt to get field promotion to work, and *then* found out
that the property in question was unpromotable for some other reason,
that could be quite frustrating.

With this change, if field promotion fails both because the language
version is less than 3.2 and for some other reason, the analyzer and
CFE report *all* the reasons.

Change-Id: Ib5d3a4621273c1e80d66b66b456119f9053e18b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332485
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-30 21:31:51 +00:00
Konstantin Shcheglov
8d51998088 Issue 53839. Clear cached priority results during _clearLibraryContextAfterException().
Bug: https://github.com/dart-lang/sdk/issues/53839
Change-Id: I7de4e5b518b51239d4bd0251286960e619e6bc6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332747
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-30 20:13:20 +00:00
Ryan Macnak
4fa5cadb36 [test] Switch Fuchsia testing to CFv2.
Bug: https://github.com/dart-lang/sdk/issues/38752
Change-Id: Id6519937cfa8430249d576c99aeb6bdb9f97dbb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332481
Reviewed-by: Zijie He <zijiehe@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-30 20:03:40 +00:00
Keerti Parthasarathy
25002f0f01 MissingDependencyValidator: Do not generate error for package self import.
Change-Id: I40f248698d2348492fc3def783d0fbb26e84119f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-30 19:04:39 +00:00
Daco Harkes
14d0c0e7c5 [cfe/ffi] Test _nativeEffect for @Natives
In a follow up, we will remove the transform from `@Native` to
`_asFunctionInternal`. However, we need to ensure that we keep
emitting `_nativeEffect` for struct return values classes if
`@Native`s are the only place instances are created.

The follow up CL will change the expect files.

TEST=pkg/vm/test/transformations/ffi_test

Bug: https://github.com/dart-lang/sdk/issues/47625
Change-Id: I1685683f48f1d16d6d10606f541f13e17d8583fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332800
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-10-30 18:51:21 +00:00
Daco Harkes
ea32a6ad48 [vm] Support loading unboxed float consts to stack
Split off https://dart-review.googlesource.com/c/sdk/+/284300.

Doubles are always loaded to DoubleStackSlots, and should already
be covered.

TEST=tested in dependent CL.
If the code was moved to the assemblers, and the assemblers were given
access to `Location`, this could be unit tested in an assembler test.
See issue for discussion.

Closes: https://github.com/dart-lang/sdk/issues/53900
Change-Id: Iaed2cf1fadebebd1857709cb5d7cc3b41a3d9747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332761
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-30 18:51:00 +00:00
Daco Harkes
f5983e4214 [ffi] Update some FfiNative docs to Native
The old FfiNatives have been deprecated for a while.

TEST=Only comments updated.

Change-Id: Ideb6e904841e5162d30df479e83b463b94682afe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332780
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-30 18:43:14 +00:00
Konstantin Shcheglov
2cc328db0b Increment DATA_VERSION after https://dart-review.googlesource.com/c/sdk/+/332370
Bug: https://github.com/flutter/flutter/issues/137540
Change-Id: I1a32c36fb492325ae35445c0d4fee889c4a90db9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332446
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-30 17:55:55 +00:00
Brian Quinlan
942e897bf5 [doc/io] Add a RawSocketEvent example.
Bug: https://github.com/dart-lang/sdk/issues/33721
Change-Id: I4e8f35cec8d3e689469a63826d118cfa2fe42218
CoreLibraryReviewExempt: Documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277701
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-10-30 16:53:17 +00:00
Daco Harkes
3cab7a2ce5 [vm] Canonicalize unboxed int constants
Constants should be canonicalized.

Split off https://dart-review.googlesource.com/c/sdk/+/284300.

TEST=Apparently not triggered by any current tests.
TEST=Triggered by CL mentioned above.

Change-Id: Icfa0728303d53dd61607addeab2d09552f30a296
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332686
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-30 16:42:37 +00:00
Nate Biggs
991f1aa248 [cfe] Add offset serialization to remaining Expression nodes without them.
Expressions missing offsets were:
- LogicalExpression
- ConditionalExpression
- Not
- BlockExpression
- Instantiation
- TypedefTearOff*

* I'm not sure how TypedefTearOff is actually being used, I don't see reference to it in the VM runtime. Unless the CFE lowers it before the VM gets it.

I also added a test on `binary.md` that ensures all expressions include a file offset in their serialized format. This can be expanded to statements if offsets are added to the remaining statement nodes without offsets.

TEST=Added binary_md_git_test.dart to ensure all expressions contain offset data going forward.


Change-Id: Ieaf80545f388b209f76be44db86ef07e80c8ad66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331540
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-30 16:05:27 +00:00
Daco Harkes
59eb00e00d [test/ffi] Fix tests on Fuchsia
TEST=ffi/external_typed_data_finalizer_test
and others

Change-Id: Ic82e051ad5f551ceeecc0ff41efaa2bb9ee4914a
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/+/332429
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-30 15:28:20 +00:00
Daco Harkes
df70dbbf8b [vm/ffi] Improve backend error messages
TEST=test/ffi

Change-Id: Ie2b855fa76709d77706b4f0d5d8d5ebb11f267f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332685
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-10-30 15:27:47 +00:00
Daco Harkes
3283d4e2cb [test] Delete merge conflict files
Introduced in https://dart-review.googlesource.com/c/sdk/+/290760.

Change-Id: Ibea3d1147e30d040cbf828c20ffe3bee69380a05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332682
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-10-30 12:36:38 +00:00
Daco Harkes
7aace2b6da [tests/ffi] Remove unused import
Change-Id: I0772d0146dd7faaed3e51ef4357fac096d23cce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332681
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-10-30 11:25:51 +00:00
Ilya Yanok
8c55f3eb0b Revert "[analyzer] simplify the libraries.dart file"
This reverts commit 29979649bd.

Reason for revert: makes `promiseToFuture` not exported from `dart:html`, see b/295129286

Original change's description:
> [analyzer] simplify the libraries.dart file
>
> Cleanup and re-landing of https://dart-review.googlesource.com/c/sdk/+/317803.
>
> Change-Id: I9fd679fdb111895ce662ecbe6d0fc5844909c3bc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332441
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

Change-Id: Id93b4a1d4bdea706ae10cfb089319514a0238a7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332683
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-10-30 11:22:27 +00:00