Commit Graph

98756 Commits

Author SHA1 Message Date
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
Derek Xu 53be2cb558 [package:dds] Prepare to publish version 3.1.1
Change-Id: I56132705e10657a3210f9b9938744fb2ce3e8bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341502
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-12-15 15:32:18 +00:00
Alexander Markov dcdfcc2b8d Reland "[vm/ffi] Express FFI call closures explicitly in AST"
This reverts commit 1800039c2a.

The changes fd2e9b9f1a and
c20f9eaf6f are relanded as is.

Reason for revert was fixed separately in
https://dart-review.googlesource.com/c/sdk/+/341621

TEST=ci

CoreLibraryReviewExempt: Implementation change only.
Issue: https://github.com/dart-lang/sdk/issues/54172
Issue: https://github.com/dart-lang/sdk/issues/39692
Change-Id: I1a2324768502e5ffbce328127938c0d3c96c38ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341642
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-12-15 15:25:29 +00:00
Dan Chevalier a32d37ef84 Initial implementation of Dart Tooling Daemon server
This will contain the code for running the DTD server.

When this is fully funcitonal VSCode will be responsible for running the, and letting our other tools(i.e. DevTools) know which address it is running at.

Change-Id: Ia4cc9553f000a5e765f604541f4846b107d4d00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338501
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-12-15 15:05:09 +00:00
Johnni Winther d0b6ce505a [cfe] Handle call tear-off on non-interface types
Closes #54352
Closes #54339

Change-Id: Ia1562a495b97a7a1b0638667b906e805cc12f829
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341940
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-15 12:09:38 +00:00
Simon Binder 150e61a662 [vm/ffi] Support @Native fields
Allow annotating top-level or static fields with `@Native` to create
fields backed by native memory.
By using the `_addressOf` operator implemented in the VM, these fields
can be implemented in the CFE by replacing them with accessors looking
up the pointer and then using existing methods to load and store the
value.

Closes https://github.com/dart-lang/sdk/issues/50551

TEST=tests/ffi/native_assets/asset_*_test.dart
TEST=pkg/analyzer/test/src/diagnostics/ffi_native_test.dart

CoreLibraryReviewExempt: VM & dart2wasm only feature
Change-Id: I61dccc88076723d6a6ba02d7fd848b18e4caf780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338020
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-12-15 11:20:23 +00:00
Chloe Stefantsova 39e48045de Revert "[cfe] Check type variable dependency cycles via extension types"
This reverts commit 9bb61c0da6.

Reason for revert: NPE detected in google3.

Original change's description:
> [cfe] Check type variable dependency cycles via extension types
>
> Closes https://github.com/dart-lang/sdk/issues/54097
> Closes https://github.com/dart-lang/sdk/issues/54164
> Part of https://github.com/dart-lang/sdk/issues/49731
>
> Change-Id: I73aac5f7e2c7f05fd0872b37e6f39fa7b5ed4862
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337183
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: If1e102112546e333f2e7058e432af142ce7da56e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341922
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
2023-12-15 09:23:07 +00:00
Johnni Winther 8ca0aa23ea [cfe] Report error on covariant in extension type methods
Closes #53324

Change-Id: Iff86c4eb7c141f27c64de29459390ac395e1c4ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341487
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-15 09:13:07 +00:00
Chloe Stefantsova 9bb61c0da6 [cfe] Check type variable dependency cycles via extension types
Closes https://github.com/dart-lang/sdk/issues/54097
Closes https://github.com/dart-lang/sdk/issues/54164
Part of https://github.com/dart-lang/sdk/issues/49731

Change-Id: I73aac5f7e2c7f05fd0872b37e6f39fa7b5ed4862
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337183
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-12-15 08:37:49 +00:00
Sam Rawlins 7320da0d19 linter: Add a PRESUBMIT check for example/all.yaml
Work towards https://github.com/dart-lang/sdk/issues/53578

Change-Id: Ia07d999abc2fcf4b8195c9f7688799bc099a1d88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341385
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-12-15 04:04:28 +00:00
Konstantin Shcheglov b305954b60 Macro. Support enums introspection.
Only from nodes for now.

Change-Id: I2fe9419590b78b4cf87d1d30587845c362f6129d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341822
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-15 00:44:49 +00:00
Sam Rawlins aad9e57674 Revert "Revert "[analyzer] new warning for nullable '==' parameter type""
This reverts commit 885457e1d3.

[analyzer] new warning for nullable '==' parameter type

This rule checks that a parameter to an `operator ==` implementation has
a non-nullable type.

I intentionally did not enforce, in this rule, that the parameter is
exactly `Object`. It is legal to narrow the parameter type to a
different non-nullable type, like `int`. I can't imagine doing it, but
it seems to be unrelated to whether the type should be nullable or not.

Fixes https://github.com/dart-lang/linter/issues/3441

Replaces https://github.com/dart-lang/linter/pull/3923

Change-Id: Ic0be2bfebaf59b0336e9a3a58e5b7f5359eb8646
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-12-14 23:58:12 +00:00
Jake Macdonald 38f6c82f0e record and print the original stack trace for argument errors
Change-Id: I5d3e5421bc06547463c060ecf70cecd773c1a753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-12-14 23:43:35 +00:00
Ryan Macnak 877dbd7226 [vm, service] Fix heap snapshot generation to account for there no longer being a kMaxImagePages.
With deferred loading, the number of image pages can be arbitrarily large. The compactor already has the analogous change.

TEST=ci
Change-Id: Ie5a1ff0902e56aaebf1d1c679ce26b35e8a03ec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341781
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-14 22:48:49 +00:00
Sam Rawlins e1bec8d7d6 linter: prefer_collection_literals; fix reports in ctor initializers, conditionals
Change-Id: Ie56201b717b3af482b22f8449b4eb9ae1a329669
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341394
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2023-12-14 22:05:40 +00:00
Sam Rawlins c7cf2c8cb2 analyzer: Improve error message when no unit found
Change-Id: Ib42ddc2a9051900e7ece05f69f0dc942f3bf9f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-12-14 22:05:28 +00:00
Konstantin Shcheglov 0696f66e4d Macro. Introspect extensions, extension types, more functions from elements.
Change-Id: Ib9df35d5e03c00ee58be14ba1df4df0b4c315885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341623
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-14 21:05:16 +00:00
Kallen Tu ee3ee59012 [ddc] Re-enable 'variance' experiment flag.
We want to be able to emit variance information in DDC and this flag was gating the variance checking logic in `rti.dart`.

Set to `true` by default since we can't use the feature without the experiment enabled anyways.

Change-Id: I69a0691e9fbe6f0f355fc7319151c19bbffc1961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341640
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-12-14 21:01:10 +00:00
Sam Rawlins db45b11539 Revert^2 "Bump dartdoc to f05afb4e95767825e52b99dc84eae6eda08a7d8f"
This reverts commit 321c113fa0.

Reason for revert: Reland

Original change's description:
> Revert "Bump dartdoc to f05afb4e95767825e52b99dc84eae6eda08a7d8f"
>
> This reverts commit 6dd26487d8.
>
> Reason for revert: b/316078115
>
> Original change's description:
> > Bump dartdoc to f05afb4e95767825e52b99dc84eae6eda08a7d8f
> >
> > Change-Id: Icafb1c3df9390fbb7de56f870f420871c5916352
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341387
> > Reviewed-by: Paul Berry <paulberry@google.com>
> > Commit-Queue: Samuel Rawlins <srawlins@google.com>
>
> Change-Id: I00a8700d97fc2b500670a5066ca5e5f3367f4b1a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341484
> Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
> Reviewed-by: Ilya Yanok <yanok@google.com>
> Commit-Queue: Ilya Yanok <yanok@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I6dffa71bf6794597a88121dbd53ad418e3a8c62e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341335
Reviewed-by: Paul Berry <paulberry@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-12-14 20:57:13 +00:00
Devon Carew 0ab972d114 Revert "Bump web_socket_channel to 547184aba2e49a0a2174cc7e262d682fba278ccf"
This reverts commit 4f9a9f6a51.

Reason for revert: b/316377314

Original change's description:
> Bump web_socket_channel to 547184aba2e49a0a2174cc7e262d682fba278ccf
>
> Changes:
> ```
> > git log --format="%C(auto) %h %s" 5241175..547184a
>  https://dart.googlesource.com/web_socket_channel.git/+/547184a blast_repo fixes (302)
>  https://dart.googlesource.com/web_socket_channel.git/+/969bc6c Fix JS value to Dart conversion when receiving from a web socket (298)
>  https://dart.googlesource.com/web_socket_channel.git/+/df096a9 Remove removed lints (299)
>  https://dart.googlesource.com/web_socket_channel.git/+/67bf9a3 Drop some use of ! (296)
>  https://dart.googlesource.com/web_socket_channel.git/+/d4a8d70 Small tweak (295)
>  https://dart.googlesource.com/web_socket_channel.git/+/9e80b8d migrate to pkg web (294)
>
> ```
>
> Diff: https://dart.googlesource.com/web_socket_channel.git/+/5241175e7c66271850d6e75fb9ec90068f9dd3c4..547184aba2e49a0a2174cc7e262d682fba278ccf/
> Change-Id: I2428819f5da9cc7c761118f79db335725f36b24e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341324
> Reviewed-by: Kevin Moore <kevmoo@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>

Change-Id: I960f72193009b00200da6bc7aa21962730697c69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341782
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-12-14 20:53:06 +00:00
Ryan Macnak 09a1fa143c [test] Shrink write barrier elimination stress tests.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54167
Change-Id: Ic707b1dc039f65a8f5367c5e679594e1b4aafd6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341622
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-12-14 20:49:07 +00:00
Konstantin Shcheglov 2b0c848cbe Macro. Use the types of formal parameters of the macro constructor for argument types.
Change-Id: I0570832a4b8c842013e87460e24408d15a42310f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341396
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-14 19:42:17 +00:00
Devon Carew 4f9a9f6a51 Bump web_socket_channel to 547184aba2e49a0a2174cc7e262d682fba278ccf
Changes:
```
> git log --format="%C(auto) %h %s" 5241175..547184a
 https://dart.googlesource.com/web_socket_channel.git/+/547184a blast_repo fixes (302)
 https://dart.googlesource.com/web_socket_channel.git/+/969bc6c Fix JS value to Dart conversion when receiving from a web socket (298)
 https://dart.googlesource.com/web_socket_channel.git/+/df096a9 Remove removed lints (299)
 https://dart.googlesource.com/web_socket_channel.git/+/67bf9a3 Drop some use of ! (296)
 https://dart.googlesource.com/web_socket_channel.git/+/d4a8d70 Small tweak (295)
 https://dart.googlesource.com/web_socket_channel.git/+/9e80b8d migrate to pkg web (294)

```

Diff: https://dart.googlesource.com/web_socket_channel.git/+/5241175e7c66271850d6e75fb9ec90068f9dd3c4..547184aba2e49a0a2174cc7e262d682fba278ccf/
Change-Id: I2428819f5da9cc7c761118f79db335725f36b24e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341324
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-12-14 18:34:45 +00:00