Commit Graph

106221 Commits

Author SHA1 Message Date
Sam Rawlins 331c700f33 DAS plugins: Move Assist code to analysis_server_plugin package
The PluginServer class needs access to AssistProcessor in order to
compute assists. That class needs access to a few other classes, which
then must also be moved:

* assist_core.dart - the Assist class
* assist_dart.dart - the DartAssistContext class
* assist_generators.dart - the registeredAssistGenerators variable
* assist_performance.dart - the AssistPerformance and
  GetAssistsPerformance classes
* assist_processor.dart - the AssistProcessor class with it's
  singular API, `compute()`
* performance.dart - the ProducerRequestPerformance class
* the `addCaretAtOffset` helper function, refactored into a
  `withCaretAt` extension method

This change is functionally a no-op.

Change-Id: Ic883d21e9cc8c3db1f6093f830f01ec6eb9a0976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-03-19 13:44:51 -07:00
Ryan Macnak 0f2c6d7302 [vm] Make vm/cc/SafepointOperation_SafepointPointTest robust to unfavorable scheduling.
TEST=ci
Change-Id: Icb03a30cbcbf181fa07c939b606524b29ac70747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416400
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-03-19 12:38:14 -07:00
Alexander Markov 1b6f89d284 [vm, tfa] Fix tree-shaking of late final fields with initializers
TFA tree shaker removes initializers of fields which cannot be accessed
but retained due to an entry point pragma / dynamic interface.

For late final fields with initializers that changes semantics as
late final fields without initializers have an implicit setter.
Such setter is not accounted in the kernel AST
(Field.setterReference == null and Field.hasSetter == false) and
it doesn't get an assigned selector id, which causes a crash in
dispatch table generator.

The change fixes this bug by retaining initializers for late final
fields. The initializer code is still replaced with
throw "Attempt to execute code removed by Dart AOT compiler (TFA)".

TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_b404559785.dart

Bug: b/404559785
Change-Id: Id998a715ea75a4768414997ce66bcdd1d4f19189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416720
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2025-03-19 12:31:02 -07:00
Brian Wilkerson 42bdd6071f Add support for a zero-length marker in test code
Change-Id: I44642ecbb09d8fc2c3b86400f5d388c74d6fb3d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-03-19 12:18:40 -07:00
Nate Biggs c3f6e4f591 [dart2js] Allow for consistent CLI flags for staged compilations.
Issue: https://github.com/dart-lang/sdk/issues/60353
Change-Id: I58f9f17b6916fec0d6279e1659618950aa695f81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416327
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2025-03-19 12:02:39 -07:00
Mayank Patke 3a3dfcbb7d [dart2js] Remove references to new-rti/old-rti.
The "new" rti library has been standard for years now and no one should
be passing `--experiment-new-rti` or `--use-old-rti`. We can now clean
up any references to different versions of rtis.

Change-Id: I4421b8943fe5034ed4d259477e8112b25ba0c763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416326
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-03-19 11:54:57 -07:00
Mayank Patke 30f2914e74 [dart2js] Remove SNS checks flag.
Change-Id: Idb2163a47e7c6ad4f2482bc24aecfc3483c7023b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416342
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-19 11:54:57 -07:00
Paul Berry c67a80f3f5 Stop using NullabilitySuffix in fe/analyzer shared code.
The getter `SharedType.nullabilitySuffix` is replaced by
`SharedType.isQuestionType`, which returns a boolean.

The method `TypeAnalyzerOperations.withNullabilitySuffixInternal` is
replaced by `SharedType.setNullabilitySuffix`, which accepts a
boolean.

Support for `*` types has been removed from `mini_types.dart`.

A few test cases in `flow_analysis_test.dart` previously used `*`
types as a way of exercising corner cases involving types that were
mutual subtypes of each other. These tests have been changed to take
advantage of the fact that `dynamic` and `Object?` are mutual
subtypes.

Change-Id: Id9904f9570fc738b388192db8536848204af03e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414581
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-03-19 11:24:21 -07:00
Konstantin Shcheglov 9d3a55077d Elements. Do not add extra substitution to Member.
Change-Id: I447bdea0092fafd1465cf8621442d6403ef5d588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416761
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-03-19 11:03:58 -07:00
Ömer Ağacan e319a6ce80 [ddc] Fix batch mode argument parsing on Windows
This bug was introduced with
https://dart-review.googlesource.com/c/sdk/+/415280.

Fixes #60346.

Change-Id: I677145bcbf30b2c56eb061998be8ffd56f392dcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416700
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 11:02:59 -07:00
MarkZ e958560965 [ddc] Adding error messages for illegal enum conversions after a hot reload.
Fixes: #60102, #60104
Change-Id: I5b89edffc3aa753d0882c2b9fd6aefd9bfef7175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416080
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2025-03-19 10:36:59 -07:00
Ryan Macnak 55fb750877 [vm] Fix race in vm/cc/SafepointOperation_SafepointOpBlockedWhileDeoptSafepointOp.
LongDeoptTask: MarkAndNotify(kFinishedDeoptOperation)
         main: MarkAndNotify(kPleaseExit)

If main wins, LongDeoptTask will override the state and wait for a kPleaseExit that will never come.

TEST=ci
Change-Id: I2f29da2fca980ca8f2b3c42477c4e793d7379af4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416381
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-03-19 09:40:42 -07:00
Kallen Tu 9b116d047b [cfe] Dot shorthands - Const constructors
Parse and build dot shorthand invocations that are constant.
Added a new listener to handle and store the const-ness. It didn't feel right re-using any of the other `beginConstPattern` methods.

Added an error message if invoking a non-const constructor where we expected a const constructor.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I8551e3b8f71e89a69d090510bb64694d5e09247d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-19 08:52:23 -07:00
Ömer Ağacan cf9f45f1d4 [dart2wasm] Copy VM's map and set factory transformers
Transform factory calls to default map and set classes to the
constructor calls to the classes to improve kernel.

Also remove some redundant null checks in VM's transformer.

`source_map_simple_optimized_test.dart` is updated: with improved kernel
wasm-opt now eliminates the `testMain` function, so the stack trace
doesn't mention it.

Fixes https://github.com/dart-lang/sdk/issues/60343.
Tested: minor refactoring in VM doesn't need testing. Wasm tested with
existing tests.
Change-Id: Ie448d1374ff0e1b278859f22bc250899e0e4cfd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416640
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 08:10:16 -07:00
Danny Tuppeny 29c350dfe9 [dds/dap] Ensure DAP always sends resume on PausePostRequest
The change at https://dart-review.googlesource.com/c/sdk/+/410760 to fix a race incorrectly assumed that once we had handled startup for a thread, we would never need to send an automatic resume again. However this was not the case - after a hot reload, we need to resume the thread even though we had technically already handled startup.

This is essentially a partial revert of 84e6ed0784, with a test to verify we trigger readyToResume on PausePostRequest.

Change-Id: I1e171043f04f38dd6f52e1692d9257d34e5248be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2025-03-19 07:32:19 -07:00
Sam Rawlins 5c1b9086c0 linter: Document and test more specifically what the rule does
In preparation for the `@awaitNotRequired` annotation, I looked into
the implementation of this rule, and changed the documentation to be
more specific about the very specific situations in which lints are
reported (there are only three). This should alleviate issues like
https://github.com/dart-lang/sdk/issues/60006.

I also added some test cases that will be useful in exploring what the
new annotation will be able to suppress.

Change-Id: Iea3a90b6c79df4b8eee7c33063780b3cf0298109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415780
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-03-19 07:20:45 -07:00
Johnni Winther 47f7972a2f [cfe] Add GetterDeclaration and SetterDeclaration
In preparation for handling getter/setter patches through fragments

Change-Id: I25778f96df35856f84654949eb9dc8ce65a37bac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416560
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2025-03-19 07:04:14 -07:00
Alexander Markov 2ac7957077 [vm, dynamic_modules] Support extensions and extension types in dynamic interface annotator
TEST=pkg/vm/test/transformations/dynamic_interface_annotator_test.dart

Bug: b/404399018
Change-Id: I9b4baafc0c75b62f4fe15cb1191f0e31669a8538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416340
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-03-19 06:30:48 -07:00
Ömer Ağacan 55d57541cb [dart2wasm] Fix --extra-compiler-option parsing
Don't split the `--extra-compiler-option` values by commas, to allow
passing `-D`/`--define` flags like `-DFOO=a, b` as one argument.

Fixes the dart2wasm failure in #60346.

Change-Id: I9c621f93d4bcd4e35926e495735c8d15a3bac212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 05:36:17 -07:00
Mudit Somani e5bdab7271 [doc] update dart tui project proposal
Closes https://github.com/dart-lang/sdk/pull/60356

GitOrigin-RevId: bff081f25b30d65058cbedb56f154df76238f511
Change-Id: I9b4c168cb9fb6c882498481243bc98a6532f1b61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416520
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2025-03-19 03:20:10 -07:00
Ömer Sinan Ağacan bb0184365d [dart2wasm, infra] Add dart2wasm minify test configuration
Change-Id: I4639bcad207b7832c6eb2f77a1751ebb03a84bbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415583
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2025-03-19 02:43:18 -07:00
Johnni Winther 4daa40bf42 [cfe] Remove NnbdModeMismatch
Change-Id: I27d1f63050f1e4ab4b7f57e25e6287ab27f49f09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416480
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2025-03-19 02:41:12 -07:00
Jens Johansen d3bbacfa9d [analyzer] Faster export scope calculation in bad cases
With the `big_chain_benchmark` for ImportExportCycle and
ImportCycleExportChain it scales a lot better. The other ones
(ImportCycle, ImportChain, ImportExportChain) doesn't change.


For ImportExportCycle, in AOT mode, before we got:

```
+------+-----------+------------+------------+
| Size |  Initial  | Completion | Fully done |
+------+-----------+------------+------------+
|   16 |   0.46673 |   0.169486 |   0.406448 |
|   32 |  0.875871 |   0.242876 |    0.85543 |
|   64 |  1.583077 |   0.465915 |   1.506953 |
|  128 |  3.198071 |   0.903894 |    3.09165 |
|  256 |  6.786677 |   2.149489 |   6.779569 |
|  512 | 17.346131 |    8.92149 |  17.971033 |
| 1024 | 63.358453 |  46.152089 |  65.401559 |
+------+-----------+------------+------------+
```


now instead we get:

```
+------+-----------+------------+------------+
| Size |  Initial  | Completion | Fully done |
+------+-----------+------------+------------+
|   16 |  0.474942 |   0.166857 |   0.411457 |
|   32 |  0.834925 |   0.243397 |    0.76843 |
|   64 |  1.608813 |   0.439885 |    1.53438 |
|  128 |  3.198453 |   0.805756 |   3.302559 |
|  256 |  6.347211 |   1.712426 |   6.165624 |
|  512 | 12.874747 |   3.551489 |    13.1461 |
| 1024 |  27.14403 |   7.844261 |   27.32785 |
+------+-----------+------------+------------+
```

An almost 6x improvement for completion and 2x+ improvement for both
initial analysis and analysing after the change.


For ImportCycleExportChain, in AOT mode, before we got:

```
+------+-----------+------------+------------+
| Size |  Initial  | Completion | Fully done |
+------+-----------+------------+------------+
|   16 |  0.454349 |   0.152505 |   0.400889 |
|   32 |  0.892146 |   0.302407 |    0.81263 |
|   64 |   1.67604 |   0.439954 |   1.517379 |
|  128 |  3.335087 |   0.907002 |   3.262481 |
|  256 |  6.378526 |   1.943725 |   6.292922 |
|  512 | 15.477861 |   6.461358 |  15.560008 |
| 1024 | 50.671197 |   33.14349 |  51.689455 |
+------+-----------+------------+------------+
```


now instead we get:

```
+------+-----------+------------+------------+
| Size |  Initial  | Completion | Fully done |
+------+-----------+------------+------------+
|   16 |  0.548357 |   0.166257 |   0.415632 |
|   32 |  0.906483 |   0.296618 |   0.910544 |
|   64 |  1.623723 |   0.464061 |   1.527888 |
|  128 |  3.067769 |   0.801507 |   2.927981 |
|  256 |  6.224551 |   1.596711 |   6.098531 |
|  512 | 12.941757 |   3.277487 |  12.345753 |
| 1024 | 25.870713 |   7.020787 |  25.760605 |
+------+-----------+------------+------------+
```

A ~4.7x improvement on completion and ~2x improvement for both initial
analysis and analysing after the change.

Change-Id: I052879c1695ad5f0aa63c2d96013a1e3eae96428
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413421
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2025-03-19 02:11:16 -07:00
Johnni Winther 06d938046f [kernel] Remove NonNullableByDefaultCompiledMode
and TargetFlags.soundNullSafety

TEST=existing

Change-Id: I5e28d3d187b0f84fa23130c042fd3c55b89c687c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413460
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-19 01:37:07 -07:00
Johnni Winther 4884112185 [cfe] Handle patch factories through fragments
Change-Id: I11a5b2e113d854ae159a823359ddbdd8e796f6db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415281
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2025-03-19 01:32:14 -07:00
Mayank Patke 107660616e [dart2js] Remove all uses of useLegacySubtyping.
Bug: #60327
Fixes: #41960
Change-Id: Idc766a1cccd008aa7262c79effe25daa240850bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416180
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 77cd774d08 [dart2js] Remove legacy type test specializations.
Bug: #60327
Change-Id: Ie9b1b86c0f7695e0b9d377004a082f56f44bd57f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416160
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 549639dc6c [dart2js, ddc] Remove LEGACY support from rti.
- Remove support for `JS_GET_FLAG('LEGACY')` from backends
- Remove `kindStar` Rtis
- Remove `Recipe.wrapStar`

Bug: #60327
Change-Id: I2ec9b0afc9f3cd99fc6167600e6d908c9771af1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416101
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 6a2e567859 [dart2js, ddc] Remove PRINT_LEGACY_STARS.
Bug: #60327
Change-Id: I32a9f078e4c2ae5fc3b79b4f549a4357a08818d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416043
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 13b5b8ab37 [dart2js, ddc] Remove support for SNS checks.
Bug: #60327
Change-Id: I38f04fea4e51dcd0fd43dc93ecc7007a0a816f29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416120
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 38ef3748c3 [dart2js] Remove LegacyType.
Bug: #60327
Change-Id: Ia236d1674ba8030da3b91e88ac869e99fe5b8399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416024
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 1f8ab5f53b [dart2js, ddc] Remove LEGACY_TYPE_REF.
Bug: #60327
Change-Id: I30017acd7087227e646b230078066208fb27e398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416060
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Konstantin Shcheglov 5543581416 CQ. Use named formal parameters for Member(s). #2
Change-Id: I146c18173fa0662df8457f95f12122dab00c2b24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416325
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-03-18 16:32:26 -07:00
Alexander Markov bbdb840023 [vm, dynamic_modules] Handle native stack overflow in the interpreter
TEST=corelib/error_stack_trace2_test

Change-Id: I337c15eecddccbe770158fa493bf296c171f9f08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415940
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2025-03-18 15:57:16 -07:00
Ryan Macnak 49bf6449d0 [vm] Fix race between Page::Deallocate during isolate group shutdown and Page::Cleanup during Dart_Cleanup.
Dart_Cleanup waited only for the isolate group to be unregistered, which happens before the group's heap is deleted.

TEST=tsan
Change-Id: I20046516635adbcbf63eae460d7b09e7e26169d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416283
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-03-18 14:53:50 -07:00
Ryan Macnak b591571935 [vm] Fix symbol creation during DeoptSafepointOperationScope.
TEST=reload stress mode
Bug: https://github.com/dart-lang/sdk/issues/60337
Change-Id: Ieb85a832b72f0940155b6c3480abb91d5c803805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416042
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-03-18 14:52:18 -07:00
Alexander Markov 18a44b3095 [vm, dynamic_modules] Support required named parameters in function types
TEST=language/nnbd/subtyping/function_type_required_params_test

Change-Id: I050f8fdd331985512f204b265d81c7deec0d67fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415640
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-03-18 14:50:45 -07:00
Sam Rawlins fe5086d4e6 CHANGELOG: add entries for substantial features in analyzer
Change-Id: I09e3ef3dd763cd7108a934e5d8f2a431fe4ade3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-03-18 14:34:28 -07:00
Martin Kustermann ea5f45e02e [dart2wasm] Make test runner validate <app>.support.js code says support is available before running test
This ensures we exercise the `<app>.support.js` code in our tests and
also catch it if a browser doesn't support what's needed (e.g. running
tests on Safari with `js-string` builtin)

Change-Id: Ib8874231d3aa82b598e0e206a2e27cb66775bbec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415882
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2025-03-18 13:39:31 -07:00
Konstantin Shcheglov 99ccc6b3bf CQ. Use named formal parameters for Member(s).
Change-Id: I732592481541e31c16157f9432739cc356f89a65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416341
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-03-18 13:33:39 -07:00
Srujan Gaddam 1f7b5092b4 Add GSoC proposal for .d.ts->JS interop declarations translator
Change-Id: I93a503752a9709dd75843df44cad3bd01a59d7b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416100
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2025-03-18 12:40:22 -07:00
Kallen Tu 7de867dd93 [cfe] Dot shorthands - FutureOr for invocations.
This CL implements `FutureOr` for static method invocations and constructors.

Note: `static_method_future_or_test` doesn't work due to unrelated reasons (initializers), but I corrected a typo anyways.

Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I77b97b0a9104fb0354ce1de39b619394f4477f32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414664
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2025-03-18 12:28:14 -07:00
Konstantin Shcheglov 78e1278188 Elements. Remove augmentationSubstitution.
Change-Id: Ic90906b72b6f8344a4142b39d3b1975e58348f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416324
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-03-18 12:22:42 -07:00
Konstantin Shcheglov a54c21178e Elements. Remove TopLevelVariableMember.
Change-Id: Ied29316b3c2b87297d5b9878052ab6b6a333b5cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416282
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-03-18 11:30:21 -07:00
Konstantin Shcheglov ba7314467d Elements. Migrate src/error/inheritance_override.dart
Change-Id: I8080c6dd961ad92c983c3b53cd048bbbe31f822b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-03-18 10:06:32 -07:00
Sam Rawlins 641ec4c515 DAS: report exceptions caught in plugin isolate as plugin exceptions
This change means that during `dart analyze`, an exception caught in a plugin isolate will be printed to the terminal, and the process will
exit (similar to the support for when the isolate has static errors).

Change-Id: I31b1ebe7a71a331274d4f1dc1ea1b94f33e2329b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415981
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-03-18 10:03:22 -07:00
Devon Carew d5f1395fb1 [deps] rev core, ecosystem, http, i18n, protobuf, tools
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/9f43210..61e6771):
  61e67710  2025-03-12  Moritz  Check for mandatory when using option (dart-lang/core#871)
  77d33c83  2025-03-04  Devon Carew  Update publish.yaml (dart-lang/core#870)
  db610bb5  2025-02-28  Erik Ernst  Adjust the implements clause of IntX (dart-lang/core#866)
  22d8879f  2025-02-27  Devon Carew  [package:lints] fix the changelog (dart-lang/core#867)
  2f0325e9  2025-02-26  Devon Carew  Contribute a Gemini Code Assist config (dart-lang/core#865)

ecosystem (https://github.com/dart-lang/ecosystem/compare/a3cc42d..5b8e6b8):
  5b8e6b8  2025-03-17  Devon Carew  [dart_flutter_team_lints] remove 'discarded_futures'; prep for publishing (dart-lang/ecosystem#347)
  b96e5d2  2025-03-14  Devon Carew  Add the discarded_futures lint; rev for publishing (dart-lang/ecosystem#346)

http (https://github.com/dart-lang/http/compare/001665e..9129a96):
  9129a96  2025-03-13  Brian Quinlan  Prepare to release cupertino_http 2.1.0 (dart-lang/http#1727)
  91d8719  2025-03-13  Brian Quinlan  Upgrade to `package:objective_c` 7.0.0 (dart-lang/http#1726)

i18n (https://github.com/dart-lang/i18n/compare/b09c822..d9cce0b):
  d9cce0b  2025-03-13  Moritz  Grab new artifacts from version `intl4x-icu-v.0.11.2-artifacts` (dart-lang/i18n#957)

protobuf (https://github.com/dart-lang/protobuf/compare/7838e44..0bab78d):
  0bab78d  2025-03-14  Devon Carew  rename -dev pubspec versions to -wip (dart-lang/protobuf#968)

tools (https://github.com/dart-lang/tools/compare/9c53358..62bc13b):
  62bc13bc  2025-03-17  Kevin Moore  [markdown, stream_transform] Fix deprecated usage of pkg:web (dart-lang/tools#2046)
  f1a5e7a2  2025-03-17  Devon Carew  [package:markdown] update package:web references in the example (dart-lang/tools#2039)
  a4ae1759  2025-03-17  Nate Bosch  [package_config] Update language version and reformat (dart-lang/tools#2040)
  a2af1447  2025-03-17  Nate Bosch  [package_config] Remove unnecessary casts to Uint8List (dart-lang/tools#2041)
  07ebd15d  2025-03-14  Devon Carew  [package:mime] generate a markdown table of the current mime mappings (dart-lang/tools#2038)
  920fdb64  2025-03-13  dependabot[bot]  Bump dart-lang/setup-dart from 1.7.0 to 1.7.1 in the github-actions group (dart-lang/tools#2022)
  b55643da  2025-03-13  David Iglesias  [html] Allow ampersands in attribute values. (dart-lang/tools#2036)

Change-Id: I2998ebecfdc7b1790a74a8ab2128895694658a5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416023
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2025-03-18 09:52:17 -07:00
Sam Rawlins 9cb7e9ea0c DAS: document enabling lint rule and suppressing
Change-Id: I26504b84c3a899c4f9f80d8a35f6c2c622c5613c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416181
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-03-18 09:51:59 -07:00
Konstantin Shcheglov 630119e92a Elements. Migrate ErrorVerifier.
Change-Id: Ic3c96bcd290adf7cd31542af83c4c2d6ae94229c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416041
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-03-18 09:34:25 -07:00
FMorschel 3369bebde2 [DAS] Refactors all wrap with builders to the same implementation
R=pquitslund@google.com

Fixes: https://github.com/dart-lang/sdk/issues/60075
Change-Id: I177830361f080e11321f8bd0c85929ab9b3871ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-03-18 09:31:33 -07:00