Commit graph

97856 commits

Author SHA1 Message Date
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
Johnni Winther f900eb95b7 Enable extension types in package:web and dart:js_interop
This uses the allowed_experiments.json to opt package:web and
dart:js_interop in to the inline-class experiment (the extension
types feature) for early access and development.

Change-Id: Ieb828b654f2320b147a3c48bbb4a142da1c18380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332421
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-30 10:58:45 +00:00
Nate Biggs 5403dc4927 [dart2js] Remove unused NonConstantValue.
The only constructor invocation of `NonConstantValue` is in the deserializer. Which means we're never creating any of these objects to serialize.

Also remove unused `handleClosureCall` method in `pkg/compiler/lib/src/inferrer/builder.dart`

Change-Id: I04e492bc4824795dd8fc109ee7464be56b27cb93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332500
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-28 04:17:16 +00:00
Konstantin Shcheglov 4cf31f03b3 Macro. Use TreeStringSink similar to the one in the analyzer.
But not the identical, because introspection is async.

Change-Id: I245db88449379cd5eeb563f37fa022461b94ad81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332624
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-10-28 01:40:27 +00:00
Konstantin Shcheglov 289302b270 Macro. Execute applications in order.
For now only during the types phase, but I think this is extendable
to the declarations phase, in a follow-up CLs.

Change-Id: Ib436cba3e821e84bea498b40703f40533e545f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332166
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-10-27 22:41:22 +00:00
Keerti Parthasarathy ed56ca29a6 Add a test to move top level to file for Extension Types
Change-Id: Ie21a2d5f47a612d519480fe17bb2d25aba69f2dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-10-27 20:43:09 +00:00
Konstantin Shcheglov 03e0e6d18a Extension type. Issue 53865. Don't consider combined signatures to be extension type members.
Bug: https://github.com/dart-lang/sdk/issues/53865
Change-Id: I7db856c4760f40479f2b8471730d7dc8a58fa492
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332370
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-27 19:47:28 +00:00
Kallen Tu 7a248040c8 [analyzer] Issue 53793: Resolve enum arguments even if the constant is non-serializable.
The analyzer used to crash when there's a non-serializable constant enum.
The issue was that we would not resolve any of its arguments if we find that it's non-serializable.

This change resolves the enum arguments, regardless.

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

Bug: https://github.com/dart-lang/sdk/issues/53793
Change-Id: I67508a9d76cce385533c963dabf7a20d9559d9ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331747
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-27 19:18:58 +00:00
Stephen Adams 0a2141b134 [tests] Make language/operators/left_shift_test work for web numbers
Change-Id: I6911a4b6e9d253c94257ccfed3d5d7451e812521
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332491
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-10-27 18:42:28 +00:00
Stephen Adams 68af0bb004 [tests] Fix language/double/int_to_string_test for web numbers
Change-Id: I69413abbeaabe2888d23fa7a37988931b95d59ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332488
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 18:07:51 +00:00
Stephen Adams 5e8e6aaefe [tests] Fix web-number edge cases in language/operator/modulo_test
Change-Id: Ia2b919afa3fca7f78c50a3ea089abe4da8dca8c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332372
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 18:00:42 +00:00
Stephen Adams 2f52ffa9f1 [test] Make language/number/int2_test parse on web compilers
Change-Id: I5cb78bac3d903d5f78cef4a45bda7a16bdc7c09e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332492
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 17:59:49 +00:00
Paul Berry e7c88f127d Flow analysis: fix capitalization convention.
Both letters of `OK` should be capitalized, in accordance with
https://dart.dev/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words.

Change-Id: I920436d373d1a597244e5592e568a19d0f22fa86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332065
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-10-27 17:52:39 +00:00
Paul Berry d42390d7c1 Clean up enable/disable logic for flow analysis and type inference tests.
Previously, the logic for enabling and disabling language features in
flow analysis and type inference tests relied on setters in the
`Harness` class that (a) were mostly unmatched with getters, and (b)
were almost exclusively used in just a single one direction
(e.g. `Harness.legacy` defaulted to `true`, so it was only ever set to
`false`).

Cleaned up so that there are explicit `enable` and `disable` methods
in the `Harness` class to cover all the use cases.

Change-Id: I5ccc8585f803fec634cad1472395ea0d135c87c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332064
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-10-27 17:51:44 +00:00
Brian Quinlan c31b4c0ef5 [doc/io] Minor Link.create documentation fixes.
Change-Id: I50932e9cd0c26b2070dd2930866f3fb18bc80763
CoreLibraryReviewExempt: documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332483
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-10-27 17:25:40 +00:00
Stephen Adams 5239a7836e [benchmarks] Update TypedDataPoly benchmark
Update TypedDataPoly benchmark to use `asUnmodifiableView()` instead
of the deprecated typed data view constructors.

Bug: #53785
Change-Id: I02381e3db37f44b01da25d7cbd728b525ff4899e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332161
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 16:56:03 +00:00
Alexander Aprelev 6a464c9dee Revert "Expire 3.0.0 experiment flags."
This reverts commit 6f29e7fce4.

Reason for revert: broke g3 bot

Original change's description:
> Expire 3.0.0 experiment flags.
>
> TEST=Existing tests covers.
> Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
> Commit-Queue: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: Ied6f612dc922824ffdadc4660898f3b859922ff5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332582
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-10-27 16:50:09 +00:00
Stephen Adams ca67a27edd [tests] Don't minify language/unsorted/cyclic_type_test for dart2js
Change-Id: I9295c0b04db8334d6526679c78cf30b1e062e321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332490
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-10-27 16:47:59 +00:00
Paul Berry 83af09021f Front end: Fix field promotion for extension type representation variable.
Update the type inference algorithm so that `FlowAnalysis.propertyGet`
is appropriately called when analyzing code that refers to the
representation variable of an extension type.

Flow analysis requires an arbitrary `Object` to represent the property
in question; this is later passed to
`OperationsCfe.isPropertyPromotable`. We use the synthetic
"representation field" (which is actually a `Procedure`) for this
purpose
(`ExtensionTypeRepresentationAccessTarget.representationField`).

Representation variables are considered promotable if they are public
(see
https://github.com/dart-lang/language/pull/3411). `OperationsCfe.isPropertyPromotable`
can tell if the representation variable is public by checking the name
of the synthetic representation field.

Fixes #53439.

Bug: https://github.com/dart-lang/sdk/issues/53439
Change-Id: I8f7ff8fcd8e5a43de419b8441951b52a555fda1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332480
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-10-27 16:34:30 +00:00
Jake Macdonald 24936fecb9 [macros] ensure we close the socket if the process fails to start
Change-Id: I29a9583080d27ce286d0c2f9f7dfa2d267b60b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-10-27 16:32:35 +00:00
Paul Berry f644a30069 Test field promotability for fields "passed through" extension types via "implements".
Change-Id: Ic5bbb5eb12259d076b697bce7624cde181d7beb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332484
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2023-10-27 16:23:02 +00:00
Erik Ernst 5cebb0f980 Adjust Dart.g such that an extension can not have the name type
The declaration `extension type on(int i,) {}` is ambiguous: It can
be an extension named `type` or an extension type named `on`. This
CL adjusts the specification grammar Dart.g such that it is
disambiguated in favor of being an extension type.
See https://github.com/dart-lang/language/issues/3258 for details.

Change-Id: I74f800a75c6c5061675c345c546a85cff046d27f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332243
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-10-27 16:21:41 +00:00
Stephen Adams c87fec8663 Revert "[typed_data] Deprecate unmodifiable views"
This reverts commit b4bae467d4.

Reason for revert: Flutter plugin contains use of deprecated method.

Original change's description:
> [typed_data] Deprecate unmodifiable views
>
> CoreLibraryReviewExempt: Reviewed in https://dart-review.googlesource.com/c/sdk/+/321922
> Bug: #53785
> Change-Id: I23a064e76a4b359e804f41676b3b775dd02ea183
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331723
> Commit-Queue: Stephen Adams <sra@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>

Bug: #53785
Change-Id: I01998a3d74681ef2d8c804f59a82d51a2e4290e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332580
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-10-27 15:22:54 +00:00
Tess Strickland e7fd34b82c [tests] Fix language/type_object/runtime_type_function when obfuscated.
Add the "vm:keep-name" pragma to the class whose name is checked.

Add isObfuscated to guard the check that includes named parameter
names, since currently they are obfuscated, even if the function is
marked with the "vm:keep-name" pragma.

TEST=language/type_object/runtime_type_function on
     vm-aot-obfuscate-linux-release-x64

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

Cq-Include-Trybots: luci.dart.try:vm-aot-obfuscate-linux-release-x64-try
Change-Id: I7698607ed6e1c95860f2e26ede923320a409eba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332425
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-27 14:02:22 +00:00