Commit graph

98778 commits

Author SHA1 Message Date
Jonas Termansen a5109dc82b [build] Handle RBE in -fdebug-prefix-map.
The RBE build happens in a different working directory when run
remotely and the -fdebug-prefix-map option with a local path inhibits
cache sharing between tryjobs and developers. This change fixes the
RBE object files so they don't contain the remote absolute path and
also ensures the build commands can be cache shared.

Bug: b/296994239
Change-Id: I6d2cd42fd775724ccb5c335c85b5f31ad279624f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342342
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-19 10:28:33 +00:00
Jonas Termansen 2ff976e9e3 [infra] Specify Linux in RBE platform.
Bug: b/296994239
Change-Id: Ice6ed1bda597e300600d6d6823901ec21f5cfcd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342420
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-19 10:23:52 +00:00
David Morgan 12c548d331 [macros] Add first language tests for introspection.
R=jakemac@google.com

Change-Id: Ic6e081a0a97f23c35b90bc3d935d3c97f4ec5bcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341963
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2023-12-19 09:56:46 +00:00
Chloe Stefantsova 3eeba4a4e2 [cfe] Refactor FunctionNode.futureValueType into emitted value type
Previously we would encode the type of the value returned in `async`
functions as the field `futureValueType` on `FunctionNode`. For all
other kinds of functions, such as `sync`, `sync*`, and `async*`, that
field would be null. This CL renames `futureValueType` into
`emittedVAlueType`, and for functions of kinds `async`, `sync*`, and
`async*` that is expected to be the type of values emitted via
`return` or `yield` statements. For `sync` functions that field is
supposed to contain `null`.

In response to https://github.com/dart-lang/sdk/issues/54159

TEST=existing

Change-Id: I1efdbcc4e75d150f5618c7ca50cfe49a0e54fce6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341662
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-12-19 08:44:43 +00:00
Johnni Winther 8d8c4c6125 [cfe] Handle extension types in *Concatenation nodes
Closes #54357

Change-Id: Ie5ff5c6c61c537658dcc6715054ff82c6f8537c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341961
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-19 08:43:56 +00:00
Parker Lougheed f49c786443 [cfe/analyzer] Report error on invalid abstract final class modifier combinations
Fixes https://github.com/dart-lang/sdk/issues/54143

Bug: https://github.com/dart-lang/sdk/issues/54143
Change-Id: I5710a8524dfea94b8e42595c8907b1ebf738405c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-19 08:35:33 +00:00
Martin Kustermann 338fd6501b [dart2wasm] Make _RecordType use WasmArray<>s instead of List<>s
Change-Id: I063d35209dbd5a66fbcf591ccb6a04d5139afa26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341901
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-12-19 07:43:17 +00:00
Paul Berry 355d7e02fc Stop testing nnbd-weak and nnbd-legacy on analyzer.
After discussion with Siggi about
https://dart-review.googlesource.com/c/sdk/+/341020 (which removed a
lot of mixed-mode tests from the language test suite), we've decided
that these tests are worth keeping around, because they exercise
important "weak mode" runtime functionality on the web platform, and
weak mode is still used inside google3.

However, we would like to unblock removal of legacy support from the
analyzer (because this is _not_ used inside google3 anymore, and
there's a nontrivial cost to maintaining it). So, to ensure that
removing legacy support from the analyzer doesn't cause test failures,
we need to stop running these "weak mode" tests on the analyzer
platform.

The test runner already has the ability to recognize these tests and
skip them; it recognizes them by the comment `Requirements=nnbd-weak`
at the top of the test. We simply need to instruct the test runner not
to run these tests on the analyzer platform anymore.

This CL also disables running of `Requirements=nnbd-legacy` tests on
the analyzer. No such tests exist anymore, but since support for this
requirements comment still exists in the test runner, it makes sense
to include it in the effect of this CL.

Change-Id: Ib5d5eb7c1bf879581b21fa5093fa7fa6304005a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342080
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-12-19 02:19:39 +00:00
Dan Chevalier 27892de349 Adding DTD and DTD_impl owners.
I neglected to add these while adding pkg/dtd and pkg/dtd_impl.

Adding them now to make sure vm and devtools members have ownership before too many people go on holiday.

Change-Id: I379488255786ff9f4c9b2684a0672e57c5e6aff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342500
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-12-19 00:54:12 +00:00
Paul Berry 6a9216a46f Remove Requirements=nnbd-weak from superinterfaces_out_of_order_error_test.dart.
The annotation `Requirements=nnbd-weak` controls prevents a test from
being run on a platform that doesn't have weak mode runtime semantics
(e.g. a program running with sound null safety).

In a previous CL
(https://dart-review.googlesource.com/c/sdk/+/341020), I removed
several tests from `tests/language` that contained legacy code, in
order to unblock removal of legacy support from the analyzer; those
tests all contained this annotation. However, after discussion with
Siggi, we've decided that it would be better to keep those tests
around for a while longer, because they exercise important runtime
behaviors of unsound null safety mode on the web and VM platforms, and
not all google3 code has been migrated off of unsound null safety mode
yet.

So, I intend to take a different approach to unblocking removal of
legacy support from the analyzer: stop running tests with the
annotation `Requirements=nnbd-weak` through the analyzer. This will
allow the tests removed in
https://dart-review.googlesource.com/c/sdk/+/341020 to be restored,
but it will have a side effect of causing a small number of additional
analyzer tests to be skipped. All those tests are benign to skip on
the analyzer (because they are purely concerned with runtime
semantics) except for one:
`superinterfaces_out_of_order_error_test.dart`.

This test doesn't have any runtime semantics at all; it merely checks
that the analyzer and CFE produce the correct errors for certain
compile-time type checks that have nothing to do with weak mode
runtime semantics.

So, to prevent a gap in test coverage when the analyzer begins
skipping tests annotated with `Requirements=nnbd-weak`, we need to
remove this annotation from
`superinterfaces_out_of_order_error_test.dart`.

Change-Id: I7932a0200be750116c41a303b48aaef50bc952ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-19 00:08:19 +00:00
Konstantin Shcheglov d646c92abe Macro. Tests for StaticType.isSubtype()
Change-Id: I476d090567074d18bb9d1cb61faf8cb1f7294325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342387
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-18 23:23:25 +00:00
Kenzie Schmoll 5881d669f0 Update DevTools rev to c7aa1df42178b054901c36bb1b8ea25b5542be8c
Change-Id: I72f9fdb249b53b16d34f11919db1696a66ca4b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342384
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-18 23:07:16 +00:00
Sam Rawlins 6359449766 Remove dead code in prefer_constructors_over_static_methods.dart
Dead code like this is allowed to be added when it is made unnecessarily
public. Fields that are not accessed outside a library should be made
private; being made private also gives us sportier static analysis,
detecting unused fields like this.

Change-Id: Ibd322357bfcb3e9ed1603e35aadb76eb0474a8b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342386
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 22:32:14 +00:00
Konstantin Shcheglov 739baa4bc1 Macro. Implement DefinitionPhaseIntrospector.inferType()
Change-Id: I5b2582acf2d55eef07ecbc7535b777cc6e59a3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342385
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 22:24:19 +00:00
asiva 794d3adf93 [VM] - Minor cleanups
TEST=ci

Change-Id: I5c2839fe48f1a4f1f48aa86cee948dc99fcca511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342383
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-12-18 21:39:09 +00:00
Keerti Parthasarathy 3e73f10de0 Disable fixes for unawaited_futures in cascades.
Fixes https://github.com/dart-lang/sdk/issues/54105.

Change-Id: Ibf69c9c52d7d514d709ebc43a8d9a2d363e85e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342382
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 21:19:48 +00:00
pq 8348807c86 stop collecting strictCasts settings from options
Fixes: https://github.com/dart-lang/sdk/issues/54376

Change-Id: Ie57c4292454da35522368f22c00d9ed7a768e39c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342481
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 21:12:48 +00:00
Nicholas Shahan 38e2d34424 [ddc] Erase extension types in as expressions
Ensures the same optimizations to expressions statically typed as
extension types.

Issue: https://github.com/dart-lang/sdk/issues/49735
Change-Id: If85f17203cb4c07c06da0e2e1712fea15c39c444
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342106
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-12-18 20:56:54 +00:00
Nicholas Shahan 8d24f7ebd4 [ddc] Erase extension types in string concats
Ensures the same optimizations to expressions statically typed as
extension types.

Issue: https://github.com/dart-lang/sdk/issues/49735
Change-Id: I981859562bdd81cf34bd5ed4160a270e6fdff9f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342105
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-12-18 20:56:54 +00:00
Nicholas Shahan b2cd914227 [ddc] Erase extension types in assertions
Ensures the same optimizations to expressions statically typed as
extension types.

Issue: https://github.com/dart-lang/sdk/issues/49735
Change-Id: Id9b944d3f716faf38bb4770eb9b90ccc708056ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342104
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-12-18 20:56:54 +00:00
Kim Hellman 66a955b09f Fixed typo
Closes https://github.com/dart-lang/sdk/pull/54400

GitOrigin-RevId: 2f12984210f03490d2253ec8a74cd055909f74b5
Change-Id: I9130a14e58999eacf79e4f2ead40aad3396f05bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-12-18 20:25:27 +00:00
James Lin 48ac398f11 Fix Directory.current setter compatibility with IOOverrides
The `Directory.current` setter has a `dynamic` parameter so that it
can accept either `String` or `Directory` arguments. (This is
asymmetric with the getter, which always returns a `Directory`.)

The corresponding `IOOverrides` callback, however, assumes that the
argument is always a `String`, and `Directory.current` passed its
`dynamic` argument through unchanged.  Consequently, overriding
the `Directory.current` setter would result in a `TypeError` when
setting `Directory.current` to a `Directory` object.

Changing `IOOverrides.setCurrentDirectory` to use a `dynamic`
parameter would be a breaking change, so instead make the
`Directory.current` setter check the argument's runtime type before
passing it along.

Bug: https://github.com/dart-lang/sdk/issues/52140
Change-Id: I3c5bba6b442b314c798bd7949dfeb5eb6251dc6e
CoreLibraryReviewExempt: No API changes and VM-only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336604
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: James Lin <jamesdlin@gmail.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-12-18 20:23:21 +00:00
Zach Anderson c84edaefe9 Check in //third_party/root_certificates.
No one could remember why this code was in a separate repo, and
checking it in to the SDK repo will make eliminating the
flutter buildroot repo a tiny bit easier.

TEST=It builds.
Change-Id: Ia34ca0c284fee1dd1734f45ef7acb9dd5cde808c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342083
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2023-12-18 19:40:36 +00:00
Konstantin Shcheglov 63f5b1272b Discover actual dart-sdk/ and bin/ when running tools/test.py
Context: hanging when running new macro tests.
https://dart-review.googlesource.com/c/sdk/+/341483

Change-Id: I59648e47df06b38ec61e8e34e6abe2228a1149f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-18 19:29:10 +00:00
Shikhar Soni 81dc3f6f6e [tests/ffi]: Fix failing pointer arithmetic test.
Closes #54397.

R=dacoharkes@google.com

Cq-Include-Trybots: luci.dart.try:vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try
Change-Id: I4ae2cbc7f4eee1bfcd6d608dbc0d838da703c7e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342460
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Shikhar <shikharish05@gmail.com>
2023-12-18 18:38:05 +00:00
Nicholas Shahan 83ba9fe0a8 [ddc] Enable new runtime types by default
Fixes: https://github.com/dart-lang/sdk/issues/48585
Change-Id: I7b0cfd70c4ada42e094e6ecbfbd077aebf16a490
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341329
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-12-18 18:35:29 +00:00
Keerti Parthasarathy 95e049c7e2 Add a test case for #52233
Bug:
Change-Id: I1d98420ce20ec6d52baef5683ae1ab83b21066e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342103
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-12-18 18:30:01 +00:00
Parker Lougheed 3e2ac6721d [linter] Report deprecated_consistency only on constructor name
Before this fix the lint was being reported on the entire constructor definition.

Also moves all tests to be reflective.

Change-Id: I8e32600cd87a7f34f8e8aa701acf180c741b915a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 18:02:42 +00:00
Parker Lougheed 89381ea4db [linter] Simplify 'prefer_mixin' implementation
The allow-listed classes have all been migrated to be typedefs to mixin classes.

Keeps the tests for them there to ensure this is the case.

Change-Id: I322707fc6d6ff61a98f43824b5ca70f197064b22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342301
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-18 18:00:42 +00:00
Parker Lougheed 691ae80cd5 [analysis_server] Allow rethrow partial completion in catch clause
Fixes https://github.com/dart-lang/sdk/issues/54384

Bug: https://github.com/dart-lang/sdk/issues/54384
Change-Id: Id86f0e1b71d27921054e11f2fcbb8bb952f8161e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-12-18 17:20:27 +00:00
Derek Xu ba0835f5e2 Revert "[ DDS ] Fix DDS AOT snapshot build rules"
This reverts commit 0a393f1b69.

Reason for revert: breaks dartdev on Windows

Original change's description:
> [ DDS ] Fix DDS AOT snapshot build rules
>
> dds_aot.dart.snapshot was not being generated for runtime build targets,
> and dds.dart.snapshot was being built regardless of whether or not we
> were building for an IA32 target.
>
> This change also adds a check for IA32 in 'dart run' so the "Could not
> find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
> isn't printed when we fall back to using dds.dart.snapshot.
>
> This change also reverts 2cc08595a6, which
> failed to fix the issue it was attempting to fix.
>
> TEST=pkg/vm_service tests
>
> Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

Change-Id: I479a026184fc1fe27926d1ab0d7d3221dec3130e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342440
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-12-18 17:13:59 +00:00
Jonas Termansen 37b2209722 [vm] Remove timer non-zero assertions.
For some reason, these assertions fire when snapshots are trained on RBE
inside a docker container. It's potentially a race condition if the
timer resolution is low enough or RBE is lying about the time. However,
there is no need to check if the start time is non-zero since there's
already a running_ variable protecting against stopping times that
haven't been started.

TEST=CQ, locally, and on RBE

Bug: b/296994239
Change-Id: I2a5b36d0b1cb9b939e94fe6aabb5f41fec077f2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342401
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-12-18 17:01:18 +00:00
Simon Binder f2329a703f [vm/ffi] Fix field tests on Windows
Fields used in Dart test with `@Native` fields must be `extern "C"` to
avoid name mangling.
As seen from build and test failures, MSVC doesn't seem to consistently
use C fields for `extern "C"` fields defined in a C++ file.
By moving these fields into a C file, they can be referenced both from
the other C++ test functions and via Dart fields.

TEST=Windows CI build

Cq-Include-Trybots: luci.dart.try:vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-aot-win-debug-x64c-try
Change-Id: Ia504a1d6e04efd00bdd50de54f4b65292ec7a41a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342260
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-18 16:55:01 +00:00
Michael Thomsen 9f3433b9d7 Update readme content
Change-Id: I0358c4e46f19d02adb78c2949b7204714c2fcdd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342341
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-12-18 15:30:58 +00:00
Jonas Termansen fb2f007c71 [infra] Advertise RBE on Googler machines.
Bug: b/296994239
Change-Id: Id604b3f786dc90363fd77ea93ea8e1d080e2b43b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-12-18 13:31:04 +00:00
Sam Rawlins 8863ed646e presubmit: fix file path
Change-Id: Ia24889ef70f1d99e5168c739c594119a361a4e56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342100
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-12-18 09:41:58 +00:00
Konstantin Shcheglov 2261250bea Macro. Implement typesOf()
Change-Id: I25a104c58e6c850a233b51e4ab737ee72bfd1063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-12-15 23:06:10 +00:00
Konstantin Shcheglov b848a72837 Macro. Test isExactly() and resolveType() when using RawTypeAnnotationCode.
Change-Id: I42ade6b9c0bce41ee91309c520ea441e95c4dc86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342089
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-15 22:32:35 +00:00
Daco Harkes c963fbeb68 [vm/ffi] Fix windows
This **partially** the fixes the breakage caused by https://dart-review.googlesource.com/c/sdk/+/338020

TEST=Windows CI build
TEST=tests/ffi

Bug: https://github.com/dart-lang/sdk/issues/54382
Change-Id: Ic71f15c751ac35f06b362a607c6a397911fd44e6
Cq-Include-Trybots: luci.dart.try:vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-aot-win-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342120
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2023-12-15 22:23:06 +00:00
Nicholas Shahan 3838338bc4 [frontend_server] Add dart:_rti to test libraries
Compiling with the new type system in DDC requires a few more classes
from the dart:_rti library.

Change-Id: I984e0cdbe3937e4ef70c40a9a6eabc714738e88a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341780
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-12-15 22:20:18 +00:00
pq a00dc1504e remove TypeSystemImpl.strict{Casts|Inference}
Fixes: https://github.com/dart-lang/sdk/issues/53873

Change-Id: I8cb982c8f6549a604c6815cfebbeede27f56b030
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342102
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-15 22:05:47 +00:00
pq b7aa9106a8 cleanup unneeded strictCast tracking
Follow-up from: https://dart-review.googlesource.com/c/sdk/+/341336

Change-Id: I09a142b00f10e44793b70b10b08920e1245770b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342088
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-12-15 20:29:48 +00:00
pq 40e5e46a54 migrate strict{Casts,Inference} from typeSystem
Another angle on removing tracking of `strictCasts` and `strictInference` from the type system, this time threading these configuration values individually to the functions that need them. (In contrast to the solution in https://dart-review.googlesource.com/c/sdk/+/341326).

See: https://github.com/dart-lang/sdk/issues/53873.

Change-Id: I63d73fd81401ac03121831af5e8d4ca43200bb7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341336
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-15 19:45:09 +00:00
Ben Konyi 0a393f1b69 [ DDS ] Fix DDS AOT snapshot build rules
dds_aot.dart.snapshot was not being generated for runtime build targets,
and dds.dart.snapshot was being built regardless of whether or not we
were building for an IA32 target.

This change also adds a check for IA32 in 'dart run' so the "Could not
find dds_aot.dart.snapshot. Have you built the full Dart SDK?" message
isn't printed when we fall back to using dds.dart.snapshot.

This change also reverts 2cc08595a6, which
failed to fix the issue it was attempting to fix.

TEST=pkg/vm_service tests

Change-Id: Ic990082c25b0d022093ad66600332dfb2878709f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341760
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-12-15 19:05:59 +00:00
Konstantin Shcheglov 3d24839907 Macro. Support more elements in resolveIdentifier(), parts.
Change-Id: I88c5b15f826113a21869228f66ac4a1ede7a0415
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342084
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-15 18:55:17 +00:00
Brian Wilkerson ae15831811 [code completion] Move completion generation for initializing and super parameters
Change-Id: Ie9d09b323c7072c4fe375b6de12347a16065ac5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341823
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-15 17:41:32 +00:00
Sam Rawlins 07bba0a7d2 analyzer: Make new filesWithClientDiagnostics field private
Change-Id: I5ff762c54434fb81425275ef002b4186ceedc1dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341801
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2023-12-15 17:20:08 +00:00
Alexander Markov 5bff7fa6a3 [vm/aot] Keep import graph connected when tree-shaking libraries
TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_54324.dart
Fixes https://github.com/dart-lang/sdk/issues/54324

Change-Id: Ifefb490dfd5f4fea7b94d1841385a9761f258ba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341783
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-12-15 17:17:29 +00:00
Ryan Macnak 04d606aaff [vm] Account for --no_retain_function_objects in Code::Name.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54344
Change-Id: Ic72b877efaf36a5b68285caa595604e203ea83b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341821
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-15 17:08:56 +00:00
Ben Konyi 9a96a8eb97 [ VM ] Fix timestamp overflow when building Perfetto protos on IA32
Fixes https://github.com/dart-lang/sdk/issues/54290

TEST=pkg/vm_service/test/get_perfetto_cpu_samples_rpc_test.dart should start passing on IA32

Change-Id: I826c7e965a88f11b678e1f836eb4140292160e35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342060
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-12-15 16:48:37 +00:00