Commit graph

98206 commits

Author SHA1 Message Date
Lasse R.H. Nielsen a1783a9c34 String.fromCharCodes allows start and end after end of iterable.
The current `String.fromCharCodes` behavior, throwing if `start`
or `end` is larger than the length of the `charCodes` iterable,
is inconsistent with the argument being an `Iterable<int>`,
which the user is not expected to know the length of.

Most other operations that accepts or produces an `Iterable` and
restricts it to a range, will allow the range to exceed the length
of the iterable, acting like `.take(end).skip(start)`, just without
needing to create wrappers that hide the original value.

(`List.setRange` is another exception, and should probably be fixed
by allowing the range to be partially filled, since it's too hard
to change it to require a `List` argument.)

Fixes #50253, #53937

Tested: Added to `corelib/string_fromcharcodes_test.dart`
Bug: https://dartbug.com/53937, https://dartbug.com/50253, https://dartbug.com/23282
Change-Id: Ie19c5fa8e715ea1c58c9c77c247f2a563654c1aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333921
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-11-17 13:34:22 +00:00
Lasse R.H. Nielsen 5543293a16 Reland "Expire 3.0.0 experiment flags."
This is a reland of commit 6f29e7fce4

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>

TEST=Existing tests covers.
Change-Id: I384e77744c74774a250be413358a7fa176117167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332684
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-11-17 13:10:01 +00:00
Alexander Thomas cc161c4e5c [infra] Restore pkg test coverage on analyzer builders
These were unintentionally removed in go/dart-reviews/335442.

Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try
Change-Id: I55e69fdef0acfe68fe0ade92a20fbc296e09f3a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336900
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-11-17 11:48:36 +00:00
Daco Harkes 4f5a6c8530 [ffi/test] Skip handles test on Win AOT
Closes: https://github.com/dart-lang/sdk/issues/54072
Change-Id: Id9babd0ca9e4c6de35104b975bf7acbd9b1564ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336882
Reviewed-by: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-11-17 10:54:02 +00:00
Alexander Thomas d8177eff7e [infra] Turn off legacy tests for the Dart VM
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64-try
Change-Id: Ib9b9de26068d719769643f413019260cacc5e837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335460
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-11-17 09:13:13 +00:00
Alexander Thomas 15a79bad53 [infra] Turn off legacy tests for the CFE
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:front-end-linux-release-x64-try
Change-Id: Ie02447da524b5cd0656db434ee8472434daeb3c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-11-17 09:04:42 +00:00
Alexander Thomas 37744978a0 [infra] Turn off legacy tests for the analyzer
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try,analyzer-analysis-server-linux-try
Change-Id: I9fafc524a3f6f461e17c456f7a53570c74ebffa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335442
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-17 09:00:36 +00:00
Alexander Thomas 43b4c2bb03 [infra] Turn off legacy tests for web compilers
Bug: b/310114753
Cq-Include-Trybots: luci.dart.try:dart2js-hostasserts-linux-unsound-try,ddc-linux-chrome-unsound-try,dart2js-unit-linux-x64-release-try
Change-Id: Ia2c1b64981de75cf3051e215794767abb3250e2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335440
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-11-17 08:27:02 +00:00
Dan Chevalier 272b9d28a8 Improve DSPS Readme and remove todos.
Change-Id: Id82ad846dd566306d41db211d9ae9a9370192306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336540
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-11-16 21:00:29 +00:00
Ryan Macnak dd03188661 [vm, compiler] Also don't go out-of-bounds for PointerToMemory.
TEST=windows-x64
Bug: https://github.com/dart-lang/sdk/issues/53829
Change-Id: Ic7a3cd6e1e8d49a138a74a67c9d30680e91a86a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-11-16 20:56:29 +00:00
pq 07c77f59a2 Final todo updated format fixes
This should tidy up the last ones. 🤞

Sorry for the noise!

Change-Id: I7104fc33282184acb0c843eae6e73f6fcc77d892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336723
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-11-16 20:18:32 +00:00
Konstantin Shcheglov c2e3f9dfa9 Augment. Support for constructor elements.
Change-Id: Id9a44580fc6c13cfa6c2af6a0783a92be662ac57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-16 19:21:40 +00:00
pq 4aefa448c2 fix todos in analyzer
Change-Id: Ib5b5351637a07d1530eb96e100613de4fcabe6f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336720
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-16 19:03:58 +00:00
Ryan Macnak fb1d821bbe [vm] Fix flaky race with --runtime_allocate_spill_tlab.
TEST=tsan
Change-Id: Ib37a3812a122e3688a1fd9310d4cfda5f4780c21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336602
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-16 18:43:24 +00:00
Siva Annamalai 02db5b95e6 Revert "Call tzset() before localtime_r()."
This reverts commit 6027bcb1e2.

Reason for revert: We are seeing TSAN failures in the bot runs

Original change's description:
> Call tzset() before localtime_r().
>
> POSIX and glibc do not guarantee that tzset() is called by localtime_r(). tzset sets the timezone name, UTC offset and whether or not it is daylight savings time.
>
> Android <= 7.1.1 did *not* call tzset() in localtime_r(), which means that users will see their timezone as "GMT".
>
> macOS/iOS seem to guarantee that tzset() is called by localtime_r() but the wording is vague:
>
>   localtime_r() and gmtime_r() functions provide the same functionality
>   as localtime() and gmtime()...
>
> N.B.: localtime() is guaranteed to call tzset().
>
> tzset() must be called before each localtime_r() to catch the case where the user changes the timezone while the application is running.
>
> Bug:https://github.com/dart-lang/sdk/issues/53276
> Change-Id: I0503a0a109aa6c281c9a3aefe8ba0b54841a42a7
> Tested: manually tested on Android 7.1.1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336240
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Brian Quinlan <bquinlan@google.com>

Bug: https://github.com/dart-lang/sdk/issues/53276
Change-Id: I4bbadf2b69eeac583b7da605c0686bcc6f72081f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336721
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-11-16 18:24:38 +00:00
Paul Berry 18b5f25052 Use OWNERS files to restrict editing of tests/language to language team.
Also tests/language_2 (which hopefully we can delete soon).

Change-Id: I4c7086ecb1b374c2068be9d1366f76323435e57f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336624
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-16 18:18:00 +00:00
Brian Wilkerson c7458baa7a Add tests of shadowing in code completion
I'm fairly sure the failing tests are recent breakages. I was only able
to break it without noticing because we didn't have adequate testing.

The next CL should fix the tests.

Change-Id: I69f5fde6e7cd2e872b2ffab38905467d366caa9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336625
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-11-16 17:45:09 +00:00
Daco Harkes c6a85b81f4 [vm/ffi] Tests with Handles and constants
Adds tests to cover constant values flowing into `Handle` parameters
of `@Native external` functions.

The first test is a repro of the failure from
https://dart-review.googlesource.com/c/sdk/+/333840

The other tests construct more extreme cases.

Handles can't be passed to leaf functions, so no `isLeaf`.

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

TEST=tests/ffi/ffi_native_handles_test.dart

Change-Id: I89d31a940f5a63793a03a9eb364231a54164a328
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336661
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2023-11-16 16:44:59 +00:00
Ben Konyi f039d50437 [ package:vm_service ] Fix flakiness in should_pause_on_exit_test.dart
This test would sometimes fail when trying to resume the main isolate in
the target program when it was not yet runnable. Waiting for the main
isolate to pause at start before resuming should fix this.

Change-Id: Ie242a222199a01e2c84d7c7be56376e616f9989e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336700
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-11-16 16:24:11 +00:00
Aske Simon Christensen 4b880aec60 [dart2wasm] Avoid using _Closure as a type
`_Closure` is the implementation class for function objects. When used
as a type, it translated to the same Wasm type as the `Function` type,
but in the type system it missed the special property of `Function`
that it is a supertype of all functions. Instead, it was translated
into an interface type, leading to incorrect type check results.

Thus, we must always use the `Function` type when referring to any
function.

The problem was hidden by the type check specialization for simple
interface type checks and exposed by `--verify-type-checks`.

Change-Id: I384d35506c0c8cd932ba789e977f8257e684b8d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336423
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2023-11-16 15:04:58 +00:00
Aske Simon Christensen c605dfc4e8 [dart2wasm] Bypass list indexing checks inside type checks
Apart from improving the performance of type checks, this avoids type
checks inside type checks, which could lead to infinite recursion.

The recursion problem was hidden by the type check specialization for
simple interface type checks and exposed by `--verify-type-checks`.

Change-Id: Icbaebd6d68e6576a784fe3efaee81d4479adba5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336422
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-11-16 15:04:58 +00:00
Aske Simon Christensen 80a69223e0 [dart2wasm] Add option to verify type check implementations
This adds a `--verify-type-checks` option to dart2wasm to instrument
the code such that whenever we are able to generate specialized code
for a type check, we generate both the specialized code and also call
the general fallback path, then compare the results.

This can be used to expose bugs in the type check specializations, or
in the reference implementation, as it may be.

Change-Id: I081540a8eedc7d029b332919283810220b21b3ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336023
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-11-16 15:04:58 +00:00
Johnni Winther 1e981c48a2 [cfe] Add test for issue 54070
Closes #54070

Change-Id: Ib3f081e0bb5c8d7fea16f30752a7e7a7bd6b339d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336640
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-16 14:52:29 +00:00
Ömer Sinan Ağacan 4c34b6534d [dart2wasm] Fix Float32x4List, Float64x2List, Int32x4List setRange
In the current slow implementation of SIMD lists we can't check for
aliasing (as we don't know the storage type) and can't do `memmove`, so
for now we copy the iterable to a list before setting the elements.

Fixes #52979.

Change-Id: I2ebf69c6e0cef32b762cf9f35534d03fb9918f39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336363
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-11-16 14:37:48 +00:00
Johnni Winther 346662457d [cfe] Handle extension type constructor access through typedefs
Closes #53531
Closes #53563

Change-Id: Ibaf99f4255547d17545223ded58eba9e31d30175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336421
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-16 11:47:57 +00:00
Johnni Winther 56a86e599e [cfe,ddc] Add tests for scopes in extensions, extension types and mixins
This adds support using experimental features in id testing in DDC and
uses it to add tests for scopes in extensions, extension types and
mixins.

The tests show that the DartScopeBuilder and DartScopeBuilder2 differ
on the scope on instance members in extensions and extension types for
the synthetic #this variable.

Change-Id: Iec0f3b938da567578b1245ada885370fb2a8b33f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335824
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-16 09:37:31 +00:00
Ömer Sinan Ağacan 817adbc7cc [dart2wasm] Use bitwise-and instead of modulo in typed data ops
Generated code for modulo is not as good as bitwise-and, even after
inlining modulo as we inline truncating division in [12e0690][1].

Bitwise-and saves 0.3% binary space in the TypedData benchmark. It
should also be faster.

[1]: 12e0690dfe

Change-Id: I4ebac592d7c93d0e81e8b28e789f671ce261780a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336361
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-11-16 09:00:48 +00:00
pq fe6950eceb enable flutter_style_todos
Change-Id: Ic82963b754404d54e37f5fb03819aebc3fa67954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336502
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-15 23:04:19 +00:00
Brian Wilkerson 974b97ca3f Fix the semantic highlighting for both extension types and mixins
Change-Id: Ie64494adbe9d54810b0b156b4884734bdb801309
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336601
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-11-15 23:01:13 +00:00
Konstantin Shcheglov c06f69c442 Macro. Introspection for constructors.
Change-Id: I4589bd9b3eb152427360818e4ba2fac7540dcf46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-15 21:59:35 +00:00
Konstantin Shcheglov 5dbb5960ef Extension type. Issue 53918. Fix type literal constant type.
Bug: https://github.com/dart-lang/sdk/issues/53918
Change-Id: I941332f30bdc681dd10c8471e1710f2e9dde4c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336501
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-15 21:10:48 +00:00
Brian Quinlan 6027bcb1e2 Call tzset() before localtime_r().
POSIX and glibc do not guarantee that tzset() is called by localtime_r(). tzset sets the timezone name, UTC offset and whether or not it is daylight savings time.

Android <= 7.1.1 did *not* call tzset() in localtime_r(), which means that users will see their timezone as "GMT".

macOS/iOS seem to guarantee that tzset() is called by localtime_r() but the wording is vague:

  localtime_r() and gmtime_r() functions provide the same functionality
  as localtime() and gmtime()...

N.B.: localtime() is guaranteed to call tzset().

tzset() must be called before each localtime_r() to catch the case where the user changes the timezone while the application is running.

Bug:https://github.com/dart-lang/sdk/issues/53276
Change-Id: I0503a0a109aa6c281c9a3aefe8ba0b54841a42a7
Tested: manually tested on Android 7.1.1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336240
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-11-15 20:57:51 +00:00
Devon Carew 2583f7b80b [docs] minor cleanup of the docs/ directory
Change-Id: Ic9d0805ee7658b97b3075dd129d4fb471bff3ccd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336560
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-11-15 20:06:51 +00:00
Konstantin Shcheglov 0bc4cfdeb0 Macro. Use shared _getMacroCode(), single introspect macro, file.
Change-Id: Ie54453dd3432889254823670716fb3d181069662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-11-15 19:45:09 +00:00
Nate Biggs d7fa5f3d89 Reland "[dart2js] Evaluate CFE consts as part of phase 0b (CFE linker)."
This is a reland of commit bebd08746b

Original change's description:
> [dart2js] Evaluate CFE consts as part of phase 0b (CFE linker).
>
> Constants are current evaluated in a few places during closed world generation, primarily as part of the ScopeModelBuilder. The scope visitor was modifying the AST which meant we had to emit a new dill with these evaluated constants along with the closed world results.
>
> This change instead evaluates the constants directly after linking the Kernel as part of the global transformations. This means we can update the ScopeModelBuilder to not mutate the AST at all as all constants are already simplified.
>
> A potential follow up here is to simplify the ScopeModelBuilder since all nodes should already be simplified if they can be, we should be able to avoid visiting some children.
>
> After this change we only directly create a single ConstantEvaluator, the one in `load_kernel`. The const simplifier also creates one and a follow up CL moves this to to run right after this new transformation.
>
> Note: Alternate versions of this CL tried to make the global transformation simpler by either:
> 1) Running the const evaluator indiscriminately on all expressions. This didn't work because it lead to exponential computation on constants set up as a DAG (see tests/language/const/constant_dag_test).
> 2) Only evaluating ConstantExpression nodes to update UnevaluatedConstants. This does not cover all the cases where the ScopeModelBuilder is modifying the tree and lead to a different compiler output.
>
> Change-Id: I746d889b37feddc9ab6c386c6252016dec745e6e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332601
> Reviewed-by: Mayank Patke <fishythefish@google.com>

Change-Id: I53871a57144a3a1bd363af141d8f31c8ffa5ca6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336221
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-11-15 19:15:29 +00:00
Ryan Macnak 1569e88983 [vm] Attempt to symbolize JIT frames during a crash with no exit frame.
TEST=broke some stub code
Bug: https://github.com/dart-lang/sdk/issues/53952
Change-Id: I9fcd4315857805bd19228d5c8ce23c6b132270af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335951
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-11-15 18:48:27 +00:00
Stephen Adams 4a25eae660 [benchmark] Utf8Decode chunked and polymorphic benchmark
This benckmark complements the existing `Utf8Decode` benchmarks by exploring different scenarios. There are three axes of variation - input complexity, conversion type, and polymorphism.


Change-Id: I06706e8efd1b254d65c7abee9f29e6d0b10923ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335504
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-11-15 18:21:23 +00:00
Dan Chevalier cb5c3b6617 Small improvements to dart_service_protocol shared.
These are small changes that got missed in https://dart-review.googlesource.com/c/sdk/+/335244

Change-Id: Icfebf3fe538d0c07e435d86f1812d430ffd86c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336090
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-11-15 18:19:39 +00:00
Devon Carew 7e52cf0e91 Bump tar to 0fc831c6e93be5342d4863d9e464428e73007cce
Changes:
```
> git log --format="%C(auto) %h %s" 3383397..0fc831c
 https://dart.googlesource.com/external/github.com/simolus3/tar.git/+/0fc831c Skip flaky test
 https://dart.googlesource.com/external/github.com/simolus3/tar.git/+/3d8ba39 Avoid test failures with localized terminals

```

Diff: 3383397b08..0fc831c6e9/
Change-Id: I2315c76cf2658fd1f19bfbc0999627e633d75e43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2023-11-15 18:12:16 +00:00
Danny Tuppeny be709b288c [analysis_server] Ensure exclude folder paths are always normalized
Workspace folder paths were normalized but these ignore paths are not.

Change-Id: Idc6197b04d740e473bc3f3fede1d7798f5b94944
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336364
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-15 18:08:32 +00:00
Devon Carew 09de61569c [analyzer] upstream minor changes to the analyzer's display_string_builder.dart
Change-Id: Ia8885c674f5f35854a090e15d5dbe8b1989aeb0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335304
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-11-15 17:24:20 +00:00
Keerti Parthasarathy 99bbf8d67e Revert "Reland adding a pass to fix pubspec during dart fix runs."
This reverts commit 9186eb1b94.

Reason for revert: https://github.com/flutter/flutter/issues/138485
Flutter roll failure

Original change's description:
> Reland adding a pass to fix pubspec during dart fix runs.
>
> The regressions were fixed with changes to MisssingDependencyValidator in previous CL's.
>
> Change-Id: Id8418811c067535e44fc58c1d2d47afb1c30716f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335864
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Keerti Parthasarathy <keertip@google.com>

Change-Id: I68cd6640b0620c24e02b9a5f8c0d659481146541
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336460
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-15 17:08:22 +00:00
Konstantin Shcheglov 444ad4daae Include 'localVariableDistance' feature into relevance.
Bug: https://discord.com/channels/608014603317936148/1174045252164796566/1174149206571753594
Change-Id: Id3aed7cc67194a5efdbfbf1851c132b8e7b933e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-15 17:08:10 +00:00
Jonas Termansen 6a08407c6f [infra] Bump reclient and don't RBE on gcc.
This is a no-op since RBE is not enabled anywhere yet.

Bug: b/296994239
Change-Id: I2d39419736fca0382a6082f6be64e787348bb825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336440
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-11-15 16:47:49 +00:00
Johnni Winther 3c456ccbd2 [cfe] Report error on constructor/static member conflict
Change-Id: I30c939e2d1dfe6e814b08e6ceac0bbb27af56f93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-11-15 16:30:30 +00:00
Paul Berry 75d943bf97 Reland "Add support for non-late local variables to the Wolf analysis prototype."
This is a reland of commit b76d60340d

Original change's description:
> Add support for non-late local variables to the Wolf analysis prototype.
>
> The AST-to-IR conversion stage now handles function parameters, local
> variable declarations, `this`, and reads and writes of local
> variables. In order to make this easier to test, support was also
> added for block function bodies, expression statements, and return
> statements.
>
> This required adding the following instruction types: `alloc`, `br`,
> `drop`, `dup`, `readLocal`, `release`, and `writeLocal`. To allow for
> thorough testing, support for these instruction types was added to the
> interpreter and validator.
>
> Change-Id: Iedef6aa75297081d128e89a2ac24019a198cf948
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335505
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Phil Quitslund <pquitslund@google.com>

Change-Id: I660947ff7adc6173508dcd69f625ced7e1d35721
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336202
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-11-15 14:55:05 +00:00
Chloe Stefantsova c6b0e218c7 [cfe] Make extension type non-nullable only if it implements Object
Part of https://github.com/dart-lang/sdk/issues/49731

TEST=existing

Change-Id: I397bbd5ca7868a9fb344286c910536c6ac341222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333500
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-11-15 14:02:35 +00:00
Johnni Winther 000e67bb20 [cfe] Add test for Object member access
Change-Id: I3b9138a48878110f1af42afe8eee7a5338766378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335823
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-11-15 12:47:23 +00:00
Ömer Sinan Ağacan ba596c51a3 [dart2wasm] Simplify native ByteBuffer implmenetation view conversions
After checking alignment of the offset we know that it's aligned (as the
check throws otherwise), so we return the fast view class without
checking the alignment again.

Change-Id: I11e64cf867da8a837e6087ee6548cc509e686ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336360
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-11-15 11:41:15 +00:00
Ömer Sinan Ağacan bf587fbb71 [dart2wasm] Use unsigned comparison in native typed array index checks
wasm-opt is not able to do this optimization and using one unsigned
comparison instead of two comparisons saves some binary space and runs
faster.

(JS typed array classes already do this)

Change-Id: Ia51d0d501af9bfd119b53d2373456bd4f0c36f25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335825
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-11-15 10:33:29 +00:00