Commit graph

98720 commits

Author SHA1 Message Date
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
Kenzie Schmoll 865b49898f Update DevTools rev to f3756798cc53a74ae34a89d661b8718e6f9b7154
Change-Id: I5fe3f743ad37151b09db388311c0e50d55178918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341395
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2023-12-14 18:33:07 +00:00
Paul Berry 949f3af120 Remove kernel flag Procedure.isAbstractFieldAccessor.
This used to be used solely by field promotion, to recognize when a
getter arose from a declaration of an abstract field, so that abstract
fields would be promotable but explicitly declared abstract getters
would not be.

However, with the adoption of
https://github.com/dart-lang/language/issues/3328, both abstract
fields and abstract getters are now considered promotable, so there is
no longer any need to distinguish them.

Bug: https://github.com/dart-lang/language/issues/3328
Change-Id: Idc14512568eb0a11dae4e364df453d117adff2e3
Tested: standard presubmit bots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338643
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-14 18:06:52 +00:00
Alexander Markov 508cdb51c2 [vm] Fix handling of force-optimized functions in debugger
Force-optimized functions where not consistenly checked when
deoptimizing world and querying local variables in debugger.

TEST=Manual testing of repro from https://github.com/flutter/flutter/issues/140074
Fixes https://github.com/flutter/flutter/issues/140074

Change-Id: I097ea60dd2371757f29d89ffbe5b85119e31e15d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341621
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-12-14 18:01:32 +00:00
Paul Berry f08dab3b11 Add some test cases to function_type_bounds_test.dart.
Change-Id: Iba7bb2b1e2a1f63a228154be2a9ce23d46da54cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341382
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-14 17:33:17 +00:00
Ryan Macnak 2d01bf3779 [vm, gc] Interrupt to finalize concurrent marking.
STW marking is no longer O(new-space), so there's no longer a reason to delay finalizing marking hoping for a scavenge to make new-space mostly empty.

TEST=ci
Change-Id: Ie782e88852714d30e0c75aa9aecac62e56c434ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319880
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-12-14 17:27:49 +00:00
Brian Quinlan da0b9aa8b3 Revert "Call tzset() in OS::Init() on Android so localtime_r() has populated timezone information."
This reverts commit 49f6657c37.

Reason for revert: This caused a performance regression in Android startup time.

Original change's description:
> Call tzset() in OS::Init() on Android so localtime_r() has populated timezone information.
>
> POSIX and glibc do not guarantee that timezone setup is done by localtime_r().
>
> Android <= 7.1.1 did *not* do timezone setup in localtime_r(), which means that users will see their timezone as "GMT".
>
> macOS/iOS seem to guarantee that timezone setup is done in 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 do timezone setup
>
> Bug:https://github.com/dart-lang/sdk/issues/53276
> Change-Id: I8f6abfbfcf07a61cb341c1dbbd8323440cb8f581
> Tested: manually tested on Android 7.1.1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340281
> 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: I02ae79d5c3a3f5a3a9003fae71b81ff5a10ac272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341338
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-12-14 16:33:21 +00:00
Johnni Winther 73624fc7f8 [cfe] Add test for issue 52849
Closes #52849

Change-Id: I179c1a1871353a6e4dc4274ad94ba78d7f9791b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341540
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-14 16:08:36 +00:00
Brian Wilkerson 441072ba57 [code completion] Convert CombinatorContributor
Change-Id: I3d3b0239c744a417455c45aca88fcc67fb121ccf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341392
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-14 16:00:33 +00:00
Ben Konyi 2ede541780 [ CLI ] Don't throw an error when --disable-analytics is provided when running in a CI environment
--suppress-analytics is implicitly set when we detect we're running in a
CI environment, but providing --{disable,enable}-analytics conjunction
with --suppress analytics was considered an error.

This change allows for --{disable,enable}-analytics to be provided when
running in a CI environment without causing a fatal error to be thrown.

Change-Id: I07fbbe7aeb8632c6f432d4feeb79d8ee3cf190c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341401
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Elias Yishak <eliasyishak@google.com>
2023-12-14 15:15:10 +00:00
Martin Kustermann 83cf40afef [dart2wasm] Add support for compile-time/code-size/memory-use benchmarks of dart2wasm compiler
```
% DART_CONFIGURATION=ReleaseX64 pkg/dart2wasm/tool/compile_benchmark --
CompileFluteComplex.CompileTime.Total(CompileTime): 34.48 s
CompileFluteComplex.CompileTime.Dart2Wasm(CompileTime): 12.74 s
CompileFluteComplex.CompileTime.Wasm2WasmOpt(CompileTime): 21.74 s
CompileFluteComplex.CodeSize.mjs(CodeSize): 11333 bytes
CompileFluteComplex.CodeSize.mjs.gz(CodeSize): 3144 bytes
CompileFluteComplex.CodeSize.wasm(CodeSize): 3462517 bytes
CompileFluteComplex.CodeSize.wasm.gz(CodeSize): 1019112 bytes
CompileFluteComplex.CodeSize.wasm.opt(CodeSize): 1500111 bytes
CompileFluteComplex.CodeSize.wasm.opt.gz(CodeSize): 477204 bytes
CompileFluteComplexMemoryUse.Max(MemoryUse): 574341120 bytes
CompileFluteComplexMemoryUse.Dart2Wasm(MemoryUse): 574341120 bytes
CompileFluteComplexMemoryUse.Wasm2WasmOpt(MemoryUse): 487387136 bytes
```

We measure all metrics (compile-time, code size, memory use) separately
for dart2wasm and wasm-opt/binaryen. We also report total compilation
time as well as maximum memory usage across the tools.

Change-Id: I94c190475443b52d437a21ba85d5c5433f03dc50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341486
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2023-12-14 14:59:33 +00:00
Paul Berry 47e6eaad5e Migrate dart_doctest_runner.dart to null safety.
Change-Id: I6406e7c7306e2149c4e556d11bc9167bced67046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341322
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-12-14 14:29:26 +00:00
Jonas Termansen 7a84a7eb02 [infra] Delete .vpython.
Change-Id: Ib1743494eeaf203049b0710dd0149b6dafe83764
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341462
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-12-14 14:16:38 +00:00
Paul Berry d6a47a4a23 Rework inference_update_2 tests using expectStaticType.
Using `expectStaticType` is a more effective test, because it verifies
that the type is _exactly_ what is expected. It also makes the test
easier to read.

Change-Id: I4b0a22f32601a5dca830a182ff4d37cddd657776
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340580
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-12-14 14:00:35 +00:00
Johnni Winther 56e81ece20 [cfe] Add test for issue 54293
In response to https://github.com/dart-lang/sdk/issues/54293

Change-Id: Idbd898b49f631074e0cd7d3321acaeac8a89b819
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341488
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-14 12:39:30 +00:00
Jonas Termansen d03160e552 Assign owners to each top level file.
Fixes: b/316131537
Change-Id: I68cfe2a987a11f1bf750dfdd021cfc0924667570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341541
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-12-14 12:38:11 +00:00
Chloe Stefantsova 931c6af820 [cfe] Add tests for issue 53172
Closes https://github.com/dart-lang/sdk/issues/53172

Change-Id: I95a39a1fd6e5701f21b92cca3d63a7948ae79690
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341661
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-12-14 12:10:53 +00:00
Chloe Stefantsova 3a8698a62c [cfe] Recover structural parameter builders from dill
Closes https://github.com/dart-lang/sdk/issues/54068

Change-Id: I39564441c653ac82aa610c530e874d3de4e4f2bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341580
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-12-14 11:55:37 +00:00
Shikhar Soni efb60eac59 [ffi]: Add extension operator methods(+,-) for pointer arithmetic
Closes [#54250](https://github.com/dart-lang/sdk/issues/54250).

TEST=test/ffi

Change-Id: I2299e019b6c0b0db74662e4f9439feac46bc9b40
CoreLibraryReviewExempt: FFI only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341420
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Shikhar <shikharish05@gmail.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-12-14 11:42:38 +00:00
Chloe Stefantsova c6c6c09819 [cfe] Break cycles in cyclic typedefs during the check for it
This CL breaks the dependency cycles in typedefs, allowing the
subsequent phases of compilation to rely on typdefs no longer being cyclic.

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

Change-Id: Id5e2d579c65019ad7072913ccf586ea2a1963ef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341180
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2023-12-14 10:43:36 +00:00
Johnni Winther ae4607abff [cfe] Preclude inherited members
This updates the handling of method/setter conflict between declared
and inherited members in extension types. Declared member now precludes
the conflicting members from being inherited, thus avoid the compile
time error.

Closes #53720

Change-Id: Ie185fa5f378d3bca64ebf77480e2fcefa767bc30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341560
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-12-14 10:24:33 +00:00
Daco Harkes 593a3d3c2c [vm/ffi] Document API handle scopes on Handle
Bug: https://github.com/dart-lang/sdk/issues/54263
CoreLibraryReviewExempt: Doc updated of VM-only feature.
Change-Id: Ie9c643ca6028b86239099932112a88ff59d123df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341461
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-12-14 10:16:30 +00:00
Konstantin Shcheglov 55bd60be32 Macro. Find the declaration to introspect by URI and name, when from elements.
This makes the output more compact.

This also allows to introspect declarations that are otherwise hard
to reference, such as functions. I will add more in following CLs.

Change-Id: I4775beca6aac5e642028b05f40aac31b079ba9de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341391
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-12-14 02:27:26 +00:00
Alexander Markov 1800039c2a Revert "[vm/ffi] Express FFI call closures explicitly in AST"
This reverts commit fd2e9b9f1a.

Revert "[vm/ffi] Cleanup FFI call trampolines"

This reverts commit c20f9eaf6f.

Reason: https://github.com/flutter/flutter/issues/140074
TEST=ci
CoreLibraryReviewExempt: Implementation change only.
Change-Id: Ib193d8f015fc66461fe3cc90550a92e1ba65f236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341620
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-12-14 01:14:58 +00:00
Nicholas Shahan fbcae44b96 [ddc] Update dynamic NSM errors to match
Makes the error messages consistent between stable and canary mode.

Change-Id: I2e7e0b78e2f81dedd24b6ef7cdd034dfe0c4b6a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341390
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-12-14 00:51:50 +00:00
Nicholas Shahan d5d8486c25 [ddc] Remove legacy code from tests
Stop running expression evaluation and module symbols tests on legacy
code. These still run with unsound null safety, just on migrated code.

Change-Id: Ifb602c058ebcc3fbd8254e8c2f431f8b18146a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337615
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-12-14 00:34:15 +00:00
Mayank Patke b10728fbac [dart2js] Use correct element type for generators.
dart2js previously syntactically matched on `Iterable<T>` and
`Stream<T>` exactly and did not compute the union-free type. The new
computation is a direct translation of the specified semantics.

Change-Id: Iaf916c6ba65e626181663ca554c38c90cdd88899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341337
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-12-14 00:12:50 +00:00
Nate Biggs 66445534ea [dart2js] Fix implicitly used free type variable not being registered in closure scope.
Fixes: https://github.com/dart-lang/sdk/issues/54209
Change-Id: Ia042ac4444ebe134107ab5d626a3328d49b38241
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339381
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-12-13 22:42:57 +00:00
Mayank Patke 4387b5d69c [dart2js] Use futureValueType in impact computation.
Change-Id: Ic6f54cf14098c9cc1cfe01ee01a09e7be5ce419a
Bug: #54317
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341600
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-12-13 18:46:45 +00:00
Keerti Parthasarathy 6c09ade242 Add a test for flutter use case: renaming enum value
https://github.com/dart-lang/sdk/issues/54188

Change-Id: I3c436a4055f0d99c9c7a00e852e16a798f14aeba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341389
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-13 18:32:28 +00:00
Konstantin Shcheglov b922ada5c5 Macro. Use sealed TypeAnnotationImpl and its subclasses to avoid 'default'.
Maybe?

Change-Id: I67372e4269a2db5d2426f16a2af3ddd02766fca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341334
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-12-13 18:03:57 +00:00
Brian Wilkerson 7a3df2c801 Move the last of the local reference contributor to the first pass
Change-Id: Ib345a5facef37e2d9d9fc8494b8df116d36c23f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341332
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-12-13 18:01:03 +00:00
Mayank Patke 0b0a972526 [dart2js] Use correct futureValueType.
Fixes: #54317
Change-Id: Id94b486df6a66ef6c77f2c578ab8d11a73189ff9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341328
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-12-13 17:50:00 +00:00
Konstantin Shcheglov 9a452fb98a Macro. Use 'optionalPositionalParameters' for resolveType(), and when build FunctionTypeAnnotationCode.
Change-Id: I4103e95bacc47bd0a97129329a003e0e83393ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341333
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-12-13 17:28:57 +00:00
Nicholas Shahan dcb03af9e1 [ddc] Fix legacy type appearing modules migrated to null safety
Since we are no longer testing legacy mode this can be changed to
be non-nullable.

Change-Id: I092b24e055f8fa0f9c183477699a301ffb176660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337920
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-12-13 17:22:41 +00:00
Derek Xu 3a69a02e5f [package:vm_service_interface] Prepare to publish version 1.0.1
Change-Id: Ica2d7fafd51a67af12dbdd0b67d8ae7489602f9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341443
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-12-13 16:12:24 +00:00
Derek Xu 4e480ef8b1 [package:dds_service_extensions] Prepare to publish version 1.6.3
Change-Id: I7b0218673d83dcd7e4e8fd7a89f34b21017db439
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341444
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-12-13 16:11:12 +00:00