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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>