Commit graph

101351 commits

Author SHA1 Message Date
Ryan Macnak 1a9acb9171 [vm, ffi] Make callbacks profiler-safe.
Delay changing Thread::vm_tag on callback entry and restore the tag early on callback return so that the profiler doesn't see the "running Dart" tag unless it can also see the fake return address marking the entry frame.

TEST=ffi/async_void_function_callbacks, ffi/function_callbacks_subtype, ffi/function_callbacks, ffi/isolate_local_function_callbacks
Bug: https://github.com/dart-lang/sdk/issues/52814
Change-Id: I40d80ec7c44063d078db0e211565e2d127c6b81e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367460
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-05-28 21:16:41 +00:00
Danny Tuppeny 761b4288a1 [analyzer] Update the correction message for IMPORT_OF_NOT_AUGMENTATION
Change-Id: I4d136c10719450a5e9ea46c7cb4d6b3d085a4d83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-28 19:46:33 +00:00
Danny Tuppeny d328e9c06a [analysis_server] Add highlights/semantic tokens for augmented()
+ tests for fetching semantic tokens for macro-generated sources.

Change-Id: I1811e5fd3eb3f5564a1d6f21348f9650e30eb536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-28 19:39:16 +00:00
Konstantin Shcheglov cae5e3b4c3 Prepare to publish analyzer 6.5.1 and _fe_analyzer_shared 69.0.0
After https://dart-review.googlesource.com/c/sdk/+/368460

Change-Id: I9013bf67b820b3e47ab00c9607a043b254f588eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368441
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-05-28 19:38:28 +00:00
Danny Tuppeny 3833a7bd3e [dartdev]/[analysis_server] Report server errors to "dart analyze" to prevent misleading output for parse/analysis exceptions
If analysis failed due to an exception, "dart analyze" may still report "no issues found" because it didn't get any server errors.

It didn't get server errors for a number of reasons:

1. Analysis errors were silent (see https://github.com/dart-lang/sdk/issues/39284)
2. `server` in ErrorNotifier was always `null` because the code that set it did so too early
3. `ErrorNotifier` was never added to the instrumentation service, so never got called anyway

Additionally, "dart analyze" printed "No errors found!" even if server errors occurred (as long as the server didn't crash).

This change fixes up the server reference in ErrorNotifier, adds it to the instrumentation service and uses a new flag ("--disable-silent-analysis-exceptions") to allow opting-in to getting analysis errors to the client. It also updates "dart analyze" to not print "No errors found!" (and to not use a 0 exit code) when server errors occur.

Because this change "fixes" ErrorNotifier, it's possible that with this change clients will now get additional error notifications (non-silent exceptions that were being dropped previously) which could result in users seeing more errors - but presumably errors that should have been reported before anyway.

Fixes https://github.com/dart-lang/sdk/issues/49931

Change-Id: I4948117c78b8f382550b7641076de443250bba6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358902
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-28 19:10:40 +00:00
Sam Rawlins 500a8c0a72 linter: Make some allowances in avoid_catches_without_on_clauses
Fixes https://github.com/dart-lang/linter/issues/3023

This fix is a little unusually large because I have to add some
elements to both the mock flutter package, and the mock SDK. This
affects some completion tests.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I44b68754f756cfe1cf99518957d74c4af56043f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-28 18:36:58 +00:00
Sam Rawlins 97d4d12dc0 meta: Add TargetKinds for @immutable; narrow error range for "invalid annotation" warnings.
This change looks big, and this is because we change the range of all
of the "INVALID_x_ANNOTATION" from the whole annotation (like
`@Immutable("...")`) to just the annotation identifier (like
`Immutable`). This affects many tests.

The error range is changed so that we can consistently use the
`RemoveAnnotation` fix to fix these warnings; it just needs a
consistent error node, so that it can find the Annotation node above.

All this to support `TargetKind`s for `@immutable`, so that we can
remove the custom "INVALID_IMMUTABLE_ANNOTATION" message.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ifd64e154986b6cbcbafeb9420ca8d0949653e618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367881
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 18:28:49 +00:00
Parker Lougheed 238a29d8a1 [analyzer] Mark latest FFI diagnostic docs as published
Change-Id: I1582ee1dc8c3618ccea60853843c729bb30f05e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368361
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 14:48:32 +00:00
Parker Lougheed 687a1d5a43 [linter] Fix formatting of noop_primitive_operations docs
Fixes https://github.com/dart-lang/site-www/issues/5867

Change-Id: I618199e38dfb524f0a4caeb2b01b498c63411064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-05-28 14:47:36 +00:00
Jake Macdonald 77490aacc7 update macros and _macros versions to reflect breaking change for implementations
Change-Id: Ia60631c494de0e5f8a286275c056ce0c3026410a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2024-05-28 14:40:29 +00:00
pq 27883e748a quick fix for MIXIN_SUBTYPE_OF_FINAL_IS_NOT_BASE
Change-Id: I3a7edf5290b542abadaee8b007d2786c43a54c17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367986
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-28 14:39:32 +00:00
Martin Kustermann 647c039d56 [infra] Update firefox to 126.0
Change-Id: Icd255b46d9374f45287b014d87870b8c7fa7fa39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368404
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-28 13:32:19 +00:00
Martin Kustermann 7b61a7c888 [dart2wasm] Remove deprecated --omit-type-checks/--dart-sdk options from dart2wasm
Flutter no longer uses the --dart-sdk option (see [0]).
g3 usages will be removed in [1]


[0] https://github.com/flutter/flutter/pull/149129
[1] cl/637819163

Change-Id: Ic06bb30da45428367ddcbfaf165c8f046dcbaaa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368306
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-28 12:35:57 +00:00
Martin Kustermann 8aa5e2dbca [dart2wasm] Remove pkg/dart2wasm/README.md and move remaining things into pkg/dart2wasm/docs/*.md files
* removes duplicate list of options in readme file (that is available
  via `--help` already)

* add more information about checkout, namely the custom vars for
  `.gclient`

* moves remaining 2 sections into their own pkg/dart2wasm/docs/*.md file

Change-Id: I9a505b7a37cdfe6e3745933410dd1ba309e50c3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368305
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-05-28 11:36:40 +00:00
Martin Kustermann 004d6a3fad [dart2wasm] Remove experimental warning for dart compile wasm and make dart compile --help show the wasm subcommand
Closes https://github.com/dart-lang/sdk/issues/32894

Change-Id: Ief15c21bb28de8df6ef9aefbb8891d9af9368626
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368307
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-05-28 11:02:48 +00:00
Simon Binder 78f2e16cc9 Add asInstanceOf to StaticType introspection capabilities
This adds `asInstanceOf` to `StaticType`, which tries to find the
instantiation of a given class so that a `StaticType` becomes a subtype
of it.
To actually make use of that data, the definition of `NamedStaticType`
is expanded to contain information about the resolved type identifier
and the type arguments instantiating the class.

Change-Id: I4f7b05d9e44f5228863ef875545286b5cd7f9a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348920
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2024-05-28 10:56:55 +00:00
Sigurd Meldgaard 5ae66feaac Mention workspaces in CHANGELOG
Change-Id: I6c2fe0f87292402f5af1399fc6fb4706c32dead6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368342
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2024-05-28 10:07:09 +00:00
Jens Johansen f22752f661 [kernel] Give better error message if crashing on .location
In for instance https://github.com/flutter/flutter/issues/148668 we
crash on .location, but don't have anything to go on about why that is.
This CL adds more information (e.g. the url, and - in the particular
crash - it would also have added the name of the procedure it got the
uri from).

If this will actually be enough (once a crash comes in with this info)
to fix the issue, I'm don't know, but it should give us more to go on.

Change-Id: Iceab6f7841380d59aa39f26a728fd8fcad90ffb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368303
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-05-28 07:28:59 +00:00
Ömer Sinan Ağacan a0f1bd5a4b Update test for #45060
Equal types should have the same hash, but they are not necessarily
identical.

Update the test to remove the identity check between a constant type and
a type constructed in runtime.

Change-Id: I0d6c6395c587391d3087c26b00fff36d645b33dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368340
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-05-28 07:10:39 +00:00
Sam Rawlins cf4550718f DAS: Move CorrectionProducer and Selection classes
Work towards https://github.com/dart-lang/sdk/issues/53402

None of the classes which were moved are changed in any way.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: If81098971de044e2f69c1039ec23eff07b108af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-28 04:54:08 +00:00
Chloe Stefantsova 991fbf4aca [cfe] Avoid concurrent modification in delayed action processing
Closes https://github.com/flutter/flutter/issues/148611

Change-Id: Idb091df6d771f286428809326e65ac6203f09d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368301
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-05-27 13:11:55 +00:00
dependabot[bot] 9a7e07aca0 Bump github/codeql-action from 3.25.5 to 3.25.6
Closes https://github.com/dart-lang/sdk/pull/55846

GitOrigin-RevId: 94c89fafc90542b8b81056f9ffcaaee12e77eda4
Change-Id: Id9140855246167ceb968692b04fab41154a3be72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368280
Reviewed-by: Alexander Thomas <athom@google.com>
2024-05-27 12:19:44 +00:00
Martin Kustermann 827a7c4e95 [dart2wasm] Only perform compile-time lookup in constant list if index is in-bounds
We have an optimization that will do list lookups at compile time when
the receiver is a constant list and the index is a constant integer.

=> We should only perform this optimization if index is in-bounds.
=> If it's out-of-bounds it should be a [RangeError] thrown at runtime
   (if that code is ever executed)

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

Change-Id: I3e99cdd96c79e7ff3f490babb2d52131cbd83a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368302
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-05-27 11:52:48 +00:00
Johnni Winther 85ab16ff67 [cfe] Add OffsetMap
This adds OffsetMap to avoid using names (or other means) to
connect objects/builders created in the OutlineBuilder with the
DietListener. The OffsetMap uses offsets, through Tokens or
Identifiers, as the key for the created objects.

Change-Id: I704d8f8374402463ea741e36ed15b279acb85535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366942
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-05-27 08:12:34 +00:00
Ivan Inozemtsev 72b2883c6f Revert "[js_runtime, js_dev_runtime] Implement microsecond field of DataTime"
This reverts commit fb057ea4e0.

Reason for revert: b/342552853

Original change's description:
> [js_runtime, js_dev_runtime] Implement `microsecond` field of `DataTime`
>
> - Move DateTime implementation for dart2js and DDC into a shared place to reduce duplication.
>
> - Add a _microsecond field to the web DateTime to track microseconds outside of the JavaScript Date.
>
> - The cute dart2js optimization whereby `DateTime.now().millisecondsSinceEpoch` is compiled to `Date.now()` still works.
>
> - Both implementations report better errors.
>
> - Fixed VM bug with in-range sentinel.
>
>
> Change-Id: I9156255bdb6ecc195500ae9bc88f91fb315b6297
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366963
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>

Change-Id: I58572256a7710df4589bb5e41c7afee295c2388b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368103
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2024-05-27 07:54:14 +00:00
Johnni Winther a3f83a9e44 [vm] Generate VM platform dill in strong mode
This changes the VM platform dill from agnostic to strong. The
VM no longer supports weak mode, so agnostic is not needed.

TEST=existing

Change-Id: I85defb6aec15262b71b4f1c199e77bd356826332
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366670
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-05-27 07:52:24 +00:00
Sam Rawlins cf7a697aa5 DAS: Run the shadowing test
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ie7ab482018ecc6c74ac8fd9f3bb533f33ed3bd62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-25 05:31:18 +00:00
Sam Rawlins f07e042eaf linter: Fix avoid_types_on_closures for inference cases
Fixes https://github.com/dart-lang/linter/issues/1099
Fixes https://github.com/dart-lang/linter/issues/3330

We just add a check that the (approximate) context type is a function type.

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I56fe14ff8852375754fdaf6b92b3c632b7df9c95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367982
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-05-25 05:28:39 +00:00
pq aa28753491 quick fix for MIXIN_SUBTYPE_OF_BASE_IS_NOT_BASE
Change-Id: I0a397f3aa1fd697014ff20debfbe08a1ea2f62e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368181
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 22:26:58 +00:00
Parker Lougheed a768742545 [linter] Clarify that none can be specified to disable highlighting
Fixes https://github.com/dart-lang/site-www/issues/5861

Change-Id: Ic0dfdded5f38f1de4a19a7b41e52f87f3f9b9cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368221
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 22:11:51 +00:00
Konstantin Shcheglov f42b019f43 Macro. Support for 'extendsType'.
Change-Id: Ic913d26b630f2d2f22fd6c4dec25ed27814d9f8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368201
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 21:38:51 +00:00
Jake Macdonald 0ee590e954 stop importing util.dart, it isn't supported (imports dart:mirrors)
Change-Id: I1dd4d650ace0866e3ef88655582c7edfcf946d01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368222
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-05-24 21:27:04 +00:00
Konstantin Shcheglov f02f12be97 Macro. Start implementing reusing cached results.
Change-Id: I35e145da373abb5d8b3065c7e1c5402434351905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-24 21:17:38 +00:00
Jake Macdonald ba9af345c2 fix failing pkg/_macro/test/executor/executor_test
Change-Id: I15040720ae47f28b90064db94b1c08cd9db1484f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-05-24 21:01:54 +00:00
pq 61c46d06c2 Fix removed lint rule test
Change-Id: I8fee5a30ae9135e2af247432887d375acb7e4d26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368200
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2024-05-24 20:23:08 +00:00
Sigmund Cherem 9dad32ce41 [ddc] Library level expression evaluation for the Dart SDK.
Today, support for expression evaluation in DDC uses a lot of
information.  To properly support compiling expressions in arbitrary
frames, we consume source-maps, module metadata, and full kernel
components at various stages of the process.  This data is already
plumbed and available for non-sdk modules in our debugging systems
(frontend-server, webdev, g3), however it is not available the Dart
SDK module itself.  Because of that, the expression compiler today
rejects all expression evaluation requests when the target is a Dart
SDK library.

Until the fix the availability of this data everywhere, we believe
we can support a limited form of expression evaluation: only
evaluation of libary level expressions. Basically, expressions
where scope data is not necessary and kernel outlines are sufficient to
compile the expression.

Here we introduce logic to recognize the first offset location of a
library, which is a clear indicator that no scope data is needed and
a library level expression evaluation is being requested.

This change is an attempt to help resolve
https://github.com/flutter/devtools/issues/7766.  Note: just like
changes were needed here in the worker and test-compiler files, it
is possible that some change may be necessary in dwds and other
parts of the pipeline.  Additional validation will be needed after
this lands.

Change-Id: Iff081a24ecb05092407279a0a7ed3d38c13cf41d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367981
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-05-24 20:08:37 +00:00
Kallen Tu 70b9b4637b [wildcard-variables] Add async rethrow test and wildcard patterns.
Fix follow up comments with an async rethrow test.
Tests that wildcard patterns still work while mixed with wildcard variables.

Bug: https://github.com/dart-lang/sdk/issues/55652
Change-Id: If6ab4de68ff27ad51215427a7183f1aed7229947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367501
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-05-24 18:40:47 +00:00
pq 8e405fdff7 quick fix for EXTENSION_TYPE_WITH_ABSTRACT_MEMBER
Change-Id: I6f4874a3919bcaeab094a1488c131542469eb7c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367984
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-05-24 18:36:07 +00:00
Jake Macdonald 0d2b01bab3 add extendsType API which adds an extends clause to an existing type
refactors builder implementations to fix some bugs, nested builders go through a separate constructor now which has all required params so we can ensure the parent maps are passed down.

update pubspecs/changelogs for release

Bug: https://github.com/dart-lang/sdk/issues/55425
Change-Id: I5bfe3bea3b7574de83d8b3774e92fd9101325b8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368080
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-05-24 18:16:22 +00:00
pq 1e9351672b quick fix for CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER
Change-Id: Id39b57597f8d34084f6b931526dd31b85207da41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-24 18:05:09 +00:00
pq ab41d83dd9 quick fix for UNDEFINED_LINT
Change-Id: I375d523ba7dcf7fbe8ab55c7efb38c80880e24c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367763
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-24 17:07:11 +00:00
Sam Rawlins 51f8b43696 linter: typos in use_build_context_synchronously
Fixes https://github.com/dart-lang/linter/issues/4979

Change-Id: I9692ccaf16b04a37071c16a9fdd172532916c86e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368120
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-05-24 16:24:30 +00:00
Sam Rawlins c45bc06571 analyzer: Fix return_of_do_not_store tests
Bug: https://github.com/dart-lang/sdk/issues/48476

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I3af9ad950b2ef42717fb84dde4f9b3c22993df05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367860
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-05-24 16:22:19 +00:00
Jake Macdonald 7134ba1d6d package:json - drop vendored packages, prep to release
Change-Id: I974f10d91e4213476ac7e32c1ab3b0d0bef6b15e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367841
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2024-05-24 15:41:05 +00:00
Sergey G. Grekhov 5d959fcef1 [co19] Roll co19 to 3b6147cd64211dace7ea86b9bab7ba48f4a328d2
2024-05-24 sgrekhov22@gmail.com Fixes dart-lang/co19#2684. Update expected errors positions for CFE (dart-lang/co19#2685)
2024-05-24 sgrekhov22@gmail.com dart-lang/co19#2641. Add wildcards do not shadow tests (dart-lang/co19#2683)
2024-05-23 sgrekhov22@gmail.com dart-lang/co19#2641. Add patterns tests (dart-lang/co19#2682)
2024-05-22 sgrekhov22@gmail.com dart-lang/co19#2641. Check that it is still an error to declare more than one enum member named `_` (dart-lang/co19#2674)
2024-05-22 sgrekhov22@gmail.com dart-lang/co19#2641. Add import prefix tests (dart-lang/co19#2681)
2024-05-22 sgrekhov22@gmail.com dart-lang/co19#2641. Add record types tests (dart-lang/co19#2679)
2024-05-22 sgrekhov22@gmail.com dart-lang/co19#2641. Add local functions test (dart-lang/co19#2680)
2024-05-22 sgrekhov22@gmail.com dart-lang/co19#2641. Check that it is still an error to declare more than one extension type member named `_` (dart-lang/co19#2675)
2024-05-21 sgrekhov22@gmail.com dart-lang/co19#2641. Add late variables named `_` tests (dart-lang/co19#2677)
2024-05-21 sgrekhov22@gmail.com dart-lang/co19#2641. Check that it is still an error to declare more than one extension member named _ (dart-lang/co19#2676)
2024-05-19 sgrekhov22@gmail.com Fixes dart-lang/co19#2660. Add missing import to augmented_expression_A01_t05_lib.dart (dart-lang/co19#2673)
2024-05-17 sgrekhov22@gmail.com dart-lang/co19#2641. Check that it is still an error to declare more than one mixin member named `_` (dart-lang/co19#2672)
2024-05-17 sgrekhov22@gmail.com dart-lang/co19#2641. Wildcards. Update expected errors positions for CFE (dart-lang/co19#2671)

Change-Id: Ia94383cb2dc2a5912950ee3e13ee93a9576f3500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367963
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2024-05-24 10:46:44 +00:00
Johnni Winther a59faa2636 [cfe] Remove nnbd annotation from id-tests
Change-Id: Ib63b80e19027389cec41adf705829b5d4201c0d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366669
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-05-24 10:44:54 +00:00
Vyacheslav Egorov a4dd314c9e [tools] Allow precompiling gen_kernel and compile_platform
When iterating on core library changes or changes in the AOT compiler
many seconds are wasted waiting on gen_kernel/compile_platform to
parse Dart code. This happens because we are running these tools
from sources on prebuilt Dart SDK.

This CL allows SDK developer to opt-in into AOT compiling these
tools by adding `precompile_tools=true` to their DART_GN_ARGS.

AOT compilation is performed using prebuilt SDK - so these
executables do not need to be recompiled if core libraries or
VM changes reducing iteration cycles.

pkg/vm/tool/precompiler2 is tweaked to detect when DART_GN_ARGS
contains `precompile_tools=true` and use precompiled
gen_kernel.exe instead of running it from source.

Using precompiled compile_platform takes vm_platform_strong.dill
build from 20 seconds to 3 seconds.

Using precompiled gen_kernel takes small benchmark build from
~10 seconds to 2 seconds.

This relands 5cda2a871c with fixes
for Flutter build.

TEST=manually tested

Change-Id: I552861c80c152890655e41baaf6ea3fb3b03a57e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367961
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-05-24 09:40:39 +00:00
Sigurd Meldgaard 7dad9a6516 Bump pub to 75ab224376e80e918d3c53494a36d4bf8a2f2af6
Changes:
```
> git log --format="%C(auto) %h %s" e70850b..75ab224
 https://dart.googlesource.com/pub.git/+/75ab2243 `outdated` show transitive dependencies by default (4277)
 https://dart.googlesource.com/pub.git/+/e05f76bf Properly handle case where the client is unable to fetch advisories  (4275)
 https://dart.googlesource.com/pub.git/+/0e870f21 Fix bug in ensureUpToDate fast path, when following workspaceRef (4276)

```

Diff: https://dart.googlesource.com/pub.git/+/e70850b53ef9b15a08af7fb0f0f2dcdbfa762b34..75ab224376e80e918d3c53494a36d4bf8a2f2af6/
Change-Id: Icdd4d09df26fda60a015a5d71816e86a8a707e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368101
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2024-05-24 08:31:12 +00:00
Jens Johansen 213e679f59 Reapply "[CFE] Coverage on try bot"
This reverts commit 60a52f66f5.

This runs the strong suite, does coverage, and compares the coverage
(percentage) to the (hardcoded) expected percentage.

Change-Id: Ie2885fae05015394e49feadc95b294d46ee9ab8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367901
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-05-24 07:44:08 +00:00
Nate Biggs a52acf1ff2 [dart2js] Fix memory regression in closed world due to member/call pattern on wide type hierarchy.
If the enclosing class is a leaf node search for live matches in "canHit". Do this by iterating the class hierarchy starting at the enclosing class of the element and checking the supertype to see if they're included in the constraint set.

Change-Id: If859bbca1d2744303c03ac91d1601a05c61dfc2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367220
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-05-23 21:02:51 +00:00