Commit graph

99261 commits

Author SHA1 Message Date
Ryan Macnak 7fd8d79e91 [vm, compiler] Assert against using CSP as the source/destination register for ld[x]r/st[x]r.
Fix simulator misinterpreting R31 for ldxr/stxr.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54703
Change-Id: I21d1d60f61928c766c2854024cce36e93f7fb665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348041
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-01-24 01:06:28 +00:00
Sam Rawlins 27ba055f1f analyzer: Remove unused CancelCorrectionException
The comment makes it sound like a worthy exception type, but it is never
thrown or even instantiated.

Change-Id: Icc946250ed730a3eb61cdc39eed3dc68206e9663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348083
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-24 00:29:28 +00:00
Srujan Gaddam a6e8759888 [dart2wasm] Add concrete box and symbol for JSBoxedDartObject
The current implementation externalizes and internalizes the Dart
value instead of adding a box and using a runtime-specific symbol.
This makes the implementation consistent with the JS backends.

Change-Id: Iefa382f742bc819b18dfe27ca33741b12473ee39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347222
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-01-23 23:39:49 +00:00
Mayank Patke b4be031505 [dart2js] Ensure SSA builder doesn't omit casts with SNS checks enabled
Change-Id: I108e73e45e98047b45e3f904fe7b93acc5dd2221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348040
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-01-23 23:22:51 +00:00
Derek Xu 4a82018d88 Revert "[VM/Debugger] Ignore optimized out variables when building scope in ActivationFrame::BuildParameters"
This reverts commit e727f4ecbd.

Reason for revert: breaks some tests in debug mode

Original change's description:
> [VM/Debugger] Ignore optimized out variables when building scope in ActivationFrame::BuildParameters
>
> TEST=pkg/vm_service/test/evaluate_optimized_out_variable_test.dart
>
> Issue: https://github.com/dart-lang/sdk/issues/53996
> Change-Id: I5e6f0b2c02455af73c2108e6996039c95d3f1f31
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347940
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Issue: https://github.com/dart-lang/sdk/issues/53996
Change-Id: I0d5c94b206ea31e82240f17e9304bec1b01e3580
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347942
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-01-23 21:17:57 +00:00
Konstantin Shcheglov b7ef0da64e Augment. Consider constructors and augmentations when reporting (un)initialized fields.
Change-Id: I56b8c7761ae5a6b26795717507370edd723a4abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-01-23 20:40:50 +00:00
Derek Xu e727f4ecbd [VM/Debugger] Ignore optimized out variables when building scope in ActivationFrame::BuildParameters
TEST=pkg/vm_service/test/evaluate_optimized_out_variable_test.dart

Issue: https://github.com/dart-lang/sdk/issues/53996
Change-Id: I5e6f0b2c02455af73c2108e6996039c95d3f1f31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347940
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-01-23 20:12:42 +00:00
Brian Wilkerson 0dcef64e67 Only suggest non-void members in string interpolations
Bug: https://github.com/dart-lang/sdk/issues/54682
Change-Id: I03a7fc0dc6f914b65775c84124b963929a9813bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347980
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-01-23 18:59:59 +00:00
Anna Gringauze 389d66a515 Fix inner DDC types display
Closes: https://github.com/dart-lang/sdk/issues/54694
Change-Id: Ie141959eedc9cdbb5c675d33da985eb1ac5588e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347761
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2024-01-23 18:26:43 +00:00
Mayank Patke e78c0cf7a0 Remove language tests that opt out of null safety
Change-Id: I17409423f04f2eddebd4f20fd613cbcc9164dca5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347860
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-01-23 18:23:32 +00:00
Danny Tuppeny 2b1d407ea6 [dds/dap] Use pause-on-exit for attach tests
This should prevent the app from terminating but the debug adapter gets the output events via the stdout stream.

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

Also updated the expected output based on the fix for https://github.com/dart-lang/sdk/issues/54582.

Change-Id: Iec878132e407956d427826f466e3e3fc60d041f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347660
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
2024-01-23 18:10:56 +00:00
Brian Wilkerson 3a92c525a6 Suggest the representation field in an extension type
Bug: https://github.com/dart-lang/sdk/issues/54681
Change-Id: I98a8d1843205d8c127a1d053db530903349db391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347651
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-01-23 17:52:59 +00:00
Sam Rawlins 1f603eb35b analyzer: Tidy up our extensions on AstNode
* No need to give an extension a private name, without an explicit extension override. Just go unnamed.
* Co-locate the two extensions on `AstNode` and on AstNode?` in analyzer package.
* Combine two linter extensions on the same type, `AstNode?`.

Change-Id: I88fef7d5b85bb04bf7263af3810a1c8c3b35f541
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347652
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-01-23 16:48:59 +00:00
Danny Tuppeny a95b584101 [dds][dap] Fix global evaluation inside package: files
The initial global evaluation support only worked when the open script was loaded into the VM as a `file:///` URI (eg. things in a `bin/` folder, and not a `lib/` folder). This is because we short-cut resolving file paths to `package:` URIs for most VM functionality (for example setting breakpoints) because it's unnecessary (the VM supports setting breakpoints with file:/// URIs even for `lib/`).

This change forces us to resolve paths to their resolved URIs (eg. `package:` where applicable) in the case where we're looking up a script for global evaluation.

We could enable this lookup for all cases (to remove the additional `force` flag here), but since it's called much more from the other path (breakpoints) we should add caching (which was more than I wanted to change for this fix).

Fixes https://github.com/Dart-Code/Dart-Code/issues/4932

Change-Id: I57a99ec3b7c726d9d120e6cda7d0b938fec397bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-23 16:38:32 +00:00
Sam Rawlins b19141a202 analyzer: Rename some extensions
And add a bit to our style doc about naming of extensions.

Change-Id: I22dd05dfe08b46ae38cc200456eb008e02eb002f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-01-23 16:26:39 +00:00
Paul Berry 7f6b082216 Remove redundant if test from InferenceVisitorBase._inferInvocation.
Change-Id: Ib787c5267b3f2e1a8fa39a5e0e2b59db9e26ccd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347383
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-01-23 16:15:01 +00:00
Konstantin Shcheglov ba8b4704e9 AnalysisDriver. Remove deprecated 'results' stream.
The google3 CL landed, so this CL might work.

Change-Id: I5ed108f7a2dd00d3fe581a6a9f8647fd900e40bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347648
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-23 15:47:43 +00:00
Johnni Winther e1233c3ccc [cfe] Replace line/column with *
The updates the expectation tests to use * instead of line/column number
for sdk messages.

Change-Id: I882abe6e3b1d88238d87a71d655ca9807869592c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347901
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-01-23 15:34:39 +00:00
Johnni Winther 1bd8755035 [cfe] Add library dependencies from macros
This updates the processing of macro generated augmentation libraries
to add library dependencies of the augmentation libraries to the
emitted library.

Change-Id: Ibc06a3c309fb3cfc8eb1f02beda637dfd9a3ea62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347601
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-01-23 13:46:27 +00:00
Johnni Winther 694c2911e2 [cfe] Support json_serializable macro
This refactors and update the cfe macro implementation to support
macro annotations generated by macros.

Change-Id: I6a4b669f2f01b1f2fec4efbc87271eecf397205d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346841
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-01-23 12:24:49 +00:00
Lasse R.H. Nielsen 64b03d1998 Add extra documentation to Enum to point to EnumName.
Closes https://github.com/dart-lang/sdk/pull/53164

GitOrigin-RevId: 0c96101a1239a4e3a04cd01c4765e5687c39dc0f
Change-Id: I26391dddde87cdea0cc6ae4a70d04be1a48576f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319463
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-01-23 09:34:32 +00:00
Mayank Patke f79ed9301b [dart2js] Remove remaining language version overrides
Now that dart2js only takes migrated files as input, all tests should
use the current language version.

Change-Id: I6c84850f5786aeac04154b67bd7a3c19083c8bba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345344
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-01-23 01:26:09 +00:00
Konstantin Shcheglov 307c6d1dd2 Use notDefault extension method.
Change-Id: Iaa58435a5e7bbd6565758f6c862cddbec5de82a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347649
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-01-23 01:07:23 +00:00
Nicholas Shahan b811ab5b04 [ddc] Reset all initialized consts on hot restart
Clear local caches storing const values in each module.

Change-Id: I7766e92df6b8d1f91bad5fbb2addb8ace7763646
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347220
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-01-22 23:25:18 +00:00
Sam Rawlins 39b7249915 Analyzer: Combine CorrectionUtils_InsertDesc into InsertLocation
Change-Id: I4b847f20e53ba57012a412e0099a6310fdc9c6d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-01-22 23:15:08 +00:00
Parker Lougheed 60fbf2a4c3 [analysis_server] Expand unnecessary_final fix to typed locals
Bug: https://discord.com/channels/608014603317936148/1171510601655275612/1195499827174309988
Change-Id: I691f7dd2f1e00087c5daa80fbfba8a2fac54b148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346120
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-22 22:54:31 +00:00
Sam Rawlins 4361834047 analyzer: Inline CorrectionUtils.patternOfBoolCondition into ConvertToSwitchStatement
This method takes advantage of a class, PatternCaseExpression, which
was only introduced for the method. The class should not be made
private, as it is returned by the method, to code outside the library. However, since patternOfBoolCondition is only used by one correction producer, I think it is more pragmatic to just inline it into that producer.

We can remove the need for the PatternCaseExpression class, as it can easily be replaced by a record. I think this change nicely simplifies both ConvertToSwitchStatement, and the correction/util.dart library.

Change-Id: If630994ce74451047c5ce5cccd2641475121a94b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347781
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-01-22 22:28:45 +00:00
Konstantin Shcheglov 26bb3ba609 Augment. Use AugmentedInterfaceElement when checking for NON_GENERATIVE_IMPLICIT_CONSTRUCTOR.
Change-Id: Ice0b4fe0b11e1d0deb1e07a01bf2972f5c82bf6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347647
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 22:02:19 +00:00
Daco Harkes b5fb90614a [vm/ffi] Remove reachability fence on Pointers in FFI calls
These fences were added before we decided that (1) `NativeFinalizer`s
are only attached to `Finalizable`s and (2) `Finalizer`s do not have
a guarantee against premature finalization.

Now that we're inlining, we should avoid allocating the `Pointer`
object.

TEST=Should be a no-op, running a bunch of bots just in case.

Closes: https://github.com/dart-lang/sdk/issues/54680
Change-Id: I3b2702d910c8ed53a3f3fcbf0e6f437d1b8026c5
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347740
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-01-22 22:01:35 +00:00
Konstantin Shcheglov b0fd10f5e9 AnalysisDriver. Remove deprecated 'status' stream.
Change-Id: Ibe83693057c766d7f8223987d0c9c16c5b9206a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347763
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-01-22 21:50:25 +00:00
Ryan Macnak bc6efdb696 [io] Update fallback root certificates.
Change-Id: I1e11213eb96b890cde529216384d0a4ea214817b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347460
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2024-01-22 21:36:06 +00:00
Konstantin Shcheglov 5313bf6595 Augment. Fix for invoking super.foo() in a class augmentation.
Change-Id: Idca0eff0483ee49392c4a7ba9f3f8b9647b1221c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347646
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 21:32:54 +00:00
Devon Carew 335a9b0c68 [docs] update the messaging for dart:html and related libraries
Change-Id: Idca54c94a583d688e3f2470f1e062e9f44f0d131
CoreLibraryReviewExempt: doc only change to the web libraries
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347387
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2024-01-22 21:28:02 +00:00
Konstantin Shcheglov 65f438684d Augment. Don't report FINAL_NOT_INITIALIZED_CONSTRUCTOR for augmentations.
Change-Id: I24d2656ef1a3664bce230a3691fa8335ef47f13f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347428
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 21:24:51 +00:00
Konstantin Shcheglov d076d92f1a Prepare to publish analyzer 6.4.0 and _fe_analyzer_shared 66.0.0
Change-Id: I9dc8c58d172dc580572b6c694ff77be7cd6ca883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347062
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-01-22 21:19:59 +00:00
Sam Rawlins 19b2224e61 analyzer: Remove unused TransformOverride class
Change-Id: Ie713b2b262de21fe88d017867c08b48a31c18327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347641
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-22 21:16:48 +00:00
Konstantin Shcheglov 7965219df2 Extension type. Report CONST_EVAL_EXTENSION_TYPE_METHOD if the operator is declared by extension type.
Change-Id: I26a04332939d2a09b898835dc82cdc75cf23fb33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347388
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 21:11:47 +00:00
Konstantin Shcheglov a3c115f9b0 AnalysisDriver. Use AnalysisStatusAnalyzing to contain the 'idleCompleter'.
Change-Id: I155c2213624f87f415e11bda1ba1006660677f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347540
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 20:35:50 +00:00
Parker Lougheed e55af921ce [dart2js] Remove superseded switch case diagnostics
This logic ends up unused as the CFE was updated to report the relevant errors in language versions before 3.0. With a language version of 3.0 or greater, they aren't relevant.

Change-Id: Ie14849f1d5be7588dd0093e10a1a9b8a967669d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346720
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-01-22 20:33:21 +00:00
Graciliano Monteiro Passos 5d18799eae HTMLSelectElement: fix selectedOptions when selectedIndex < 0
Closes https://github.com/dart-lang/sdk/pull/54618

Also adds a comment to go.sh mentioning vpython3 comes with
depot_tools.

GitOrigin-RevId: 5e057703067c24d9d41bac75b6251c8f3a2fddd3
Change-Id: I937d8618c24602b4c0844d8a52ff00095836bca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-01-22 20:15:26 +00:00
Konstantin Shcheglov 4983ea79be Issue 54686. Fix canBeSubtypeOf() for FutureOr and records.
Bug: https://github.com/dart-lang/sdk/issues/54686
Change-Id: Idbacac0b114f0b84d1703fb1454e0165ea5be69b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347643
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 20:06:59 +00:00
pq 155df2fdbd mark getAnalysisOptionsForFile API experimental
Change-Id: I2e38f8158da13e45d5d4c36d0af22b14fe2a492f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-22 19:37:59 +00:00
Konstantin Shcheglov 8839b3f22f AnalysisDriver. Move tests for priorities to use assertEventsText()
Change-Id: Ib89b8362ca554fde44a4d3abc9bae2742fb45dfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347520
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 19:26:28 +00:00
Konstantin Shcheglov 793f4f3088 Augment. Use the scope of the container - library or augmentation.
This fixes resolution of metadata in library augmentations, and brings
us a step closer to supporting JsonSerializable.

Change-Id: I8874540cb020a40f551d72b842f1e75f2d3ad118
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347424
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 19:12:22 +00:00
Sigmund Cherem 05a53dae0d [tests] delete html/async_test.
This test was written to validate correctness of the web
implementation of `dart:isolates`, back when it was supported.

Today, this API is unsupported in both dart2js and DDC. The test was
consistently failing in DDC and skipped in dart2js. We don't believe
it's valuable to continue running this test at this moment.

Change-Id: I578533b09c4172daf3f49fcc528ccb2cebebb53d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347642
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-01-22 18:54:04 +00:00
Alexander Markov 3545ce4966 [vm] Build elf_loader and crashpad with correct TARGET_OS
Previously they were built with TARGET_OS_FUCHSIA regardless of target OS.

TEST=ci

Change-Id: I53e95bb61c3926334e861ed56ceb3ea018e7bf1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347202
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-01-22 18:12:41 +00:00
Konstantin Shcheglov a8b48d3e2c AnalysisDriver. Remove transitionToAnalyzingToIdleIfNoFilesToAnalyze()
It caused race condition via async nature of DAS and AnalysisDriver.

My understanding of the scenario:
1. We started fulling AD with files.
2. We set `priorityFiles`, this notifies the scheduler.
3. We add Dart files to AD.
4. We do something async, this allows the scheduler to ask AD
   to takes the next file, and start analyzing it.
5. We run transitionToAnalyzingToIdleIfNoFilesToAnalyze(), it sees
   there there are no files _to_ analyze (the only file is _being_
   analyzed). So, it turns analysis on/off.
6. DAS sends "analysis: done", `dart analyze` says, I'm done, no errors.
7. AD ends analysis of the file, report errors. Too late.

I believe we don't need this (hackish) method anymore.
1. We switch to analysis status with `priorityFiles`, for good or bad.
2. We are more aggressive now to switch status on/off.

Bug: https://github.com/flutter/flutter/issues/141873
Change-Id: If4e8b74ebdce33b173a686a7b87d14368dfc175d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 17:59:51 +00:00
Jake Macdonald 8c537438ec JSON macro: support extending serializable classes
Change-Id: I157d71225a6170fdfb6bc56da4eb1b8581fe3d5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347400
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2024-01-22 17:48:27 +00:00
Konstantin Shcheglov 5fb9610fd5 Augment. Don't report FINAL_NOT_INITIALIZED when there is a constructor, added by augmentation.
Change-Id: I273d1ffd4ee63f5a1faccd1df15ded6792b98172
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347422
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-01-22 17:18:26 +00:00
Konstantin Shcheglov fa03df6de7 Augment. Don't report DUPLICATE_CONSTRUCTOR for augmentations.
Change-Id: Ida1593805bce1f5656cd8877d702d003f18ab576
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347427
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-01-22 17:12:20 +00:00