Commit graph

44417 commits

Author SHA1 Message Date
Johnni Winther b745fa8923 [cfe] Avoid "Instance of " in parser intertwined test expectations
Change-Id: I7d7b1c9a001c43ec160d26c478bd71b41505f273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323361
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-09-04 13:06:29 +00:00
Aske Simon Christensen 744c0e8b66 [dart2wasm] Support multiple returns in code generator call method
Removes the assumption from the code generator `call` helper method
that the called function has zero or one return value. This enables
the helper to be used for functions with multiple return values (e.g.
constructor initializer functions), allowing such functions to be
inlined.

Many places that explicitly called a function behind a reference using
`b.call(translator.functions.getFunction(reference))` are now using
the `call` helper like `call(reference)` such that those calls can be
inlined.

Also fixes a bug in the inlining heuristic that would allow inlining
of `async` functions, which would break.

Change-Id: I180d45de8ad36ef8ef1d27a71fc8ec473a25db8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324023
Reviewed-by: Jess Lally <jessicalally@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2023-09-04 11:29:44 +00:00
Ilya Yanok cbdae14d2f Revert "linter: Refactor prefer_collection_literals to use context type more"
This reverts commit cd8a3370e7.

Reason for revert: lint starts barking at the wrong tree: b/298917960

Original change's description:
> linter: Refactor prefer_collection_literals to use context type more
>
> There is a basic premise in this rule which we cannot satisfy exactly:
> we need to disallow `LinkedHashSet()` unless the context type requires
> the developer to use `LinkedHashSet`. But the context type is long
> gone when the lint rule is run.
>
> This CL adds some logic to try to attempt figuring out the context
> type in the cases where users have filed bugs, but it will never be
> super accurate.
>
> Fixes https://github.com/dart-lang/linter/issues/4736
> Fixes https://github.com/dart-lang/linter/issues/3057
> Fixes https://github.com/dart-lang/linter/issues/1649
> Fixes https://github.com/dart-lang/linter/issues/2795
>
> Change-Id: I3e6c6de81084dca2825488c89830ab3e7ea63186
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323680
> Reviewed-by: Phil Quitslund <pquitslund@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Samuel Rawlins <srawlins@google.com>

Change-Id: I980053dd51ffd4447721e0ad7436b07ca704b554
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324021
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-09-04 10:43:54 +00:00
Jens Johansen 44bcd896e0 [CFE] Enable fuzzing for strong suite by default
Most status updates have been copied blindly from the weak.status file.

Change-Id: I41c271c8658cb0d48d96ea6ace03279276528303
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324020
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-09-04 10:08:00 +00:00
Jia Hao Goh 4640efef8e [dart2wasm] Fix default name for pragmas
Fixes the following:

When using `@pragma("wasm:import")` or `@pragma("wasm:export")` without the second argument (as documented in https://github.com/dart-lang/sdk/tree/main/pkg/dart2wasm#imports-and-exports), this would fail with the following error:

```
type 'NullConstant' is not a subtype of type 'String?' in type cast
#0      Translator.getPragma (package:dart2wasm/translator.dart:939)
#1      FunctionCollector._importOrExport (package:dart2wasm/functions.dart:52)
#2      List.forEach (dart:core-patch/growable_array.dart)
#3      FunctionCollector.collectImportsAndExports (package:dart2wasm/functions.dart:37)
#4      Translator.translate (package:dart2wasm/translator.dart:268)
#5      compileToModule (package:dart2wasm/compile.dart:138)
<asynchronous suspension>
#6      main (package:dart2wasm/dart2wasm.dart:134)
<asynchronous suspension>
...
```

Change-Id: Ie9b6766be10ced45ec360c7fb71cffa7097ee38a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323140
Commit-Queue: Jia Hao Goh <jiahaog@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-09-04 09:43:00 +00:00
Johnni Winther e3621561aa [parser] Refactor BlockKind
Refactors BlockKind to pass an explicit template/message instead
of injecting words directly into the message which leads to
grammatically incorrect english in the output message.

Change-Id: I3b91abf2e5a748f3dfca2cc0a6c877e77b3ad7d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322121
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-09-04 09:40:21 +00:00
Sam Rawlins 0a567d01e5 linter: Move unnecessary_this tests
Change-Id: I689feebb74a03e810853faf5f3d2d7dd917701b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323962
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-09-01 22:47:59 +00:00
Konstantin Shcheglov a7bb403125 Extension type. Test for DartSelectionRangeComputer.
Change-Id: I5e88681dc901a900e5de7ccd13e0c05341c42456
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 21:48:09 +00:00
Anna Gringauze 3740e620cd Reland "[ddc] Add module local caches for new types"
This is a reland of commit a9fc9ffc4d

Additional changes:

- Set incremental mode on generic class table
  - fixes expression evaluation failure discovered by dwds tests
    (generic class table was not always defined in compiled expression)
- Allow expression evaluation while the app is running in e2e suite
- Add regression tests for the expression evaluation failure.

Original change's description:
> [ddc] Add module local caches for new types
>
> - Provides fast access for types that are used multiple times in the
>   same module.
> - Enable the existing type table cache when running with new types.
> - Add a similar cache for instantiated generic classes. This cache
>   is used in the current type system as well to help keep the
>   difference between types and classes more clear.
>
> Issue: https://github.com/dart-lang/sdk/issues/48585
> Change-Id: I32103cf0c0bcf9b9771e789c0d04e63a4365a066
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321320
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>

Change-Id: I9c31d1d07d7f9bb15645ac9aa6e91d35e8906e85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323501
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-09-01 21:10:09 +00:00
asiva 36c6daa920 [dartdev/test] Added missing test case for https://github.com/dart-lang/sdk/issues/52892
Change-Id: If3b17d9c6d87c126afee6ec962f6049b4942624d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2023-09-01 21:05:04 +00:00
Konstantin Shcheglov 53cd950e7a Extension type. Code folding.
Change-Id: I33ee2cf63a275c7c2d8f41c4033a0ee4d2641e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323944
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 20:47:23 +00:00
Konstantin Shcheglov 49f5312fed Extension type. Overrides notification.
Change-Id: I1865e0d44093c1501b422d1b6d34fbc1e9612db8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323943
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 20:44:38 +00:00
Keerti Parthasarathy 234c129a81 Add test for extension type documentation.
Change-Id: Ic7ebad6865207339528abafb8e58b39accdab589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-09-01 20:19:29 +00:00
Konstantin Shcheglov a0d32a1e3f Extension type. Include into 'occurrences' notification.
Change-Id: Ibfe62a4916c9b991e5d407e239d82ad8eb90b5ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323923
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-01 20:07:35 +00:00
Sam Rawlins cd8a3370e7 linter: Refactor prefer_collection_literals to use context type more
There is a basic premise in this rule which we cannot satisfy exactly:
we need to disallow `LinkedHashSet()` unless the context type requires
the developer to use `LinkedHashSet`. But the context type is long
gone when the lint rule is run.

This CL adds some logic to try to attempt figuring out the context
type in the cases where users have filed bugs, but it will never be
super accurate.

Fixes https://github.com/dart-lang/linter/issues/4736
Fixes https://github.com/dart-lang/linter/issues/3057
Fixes https://github.com/dart-lang/linter/issues/1649
Fixes https://github.com/dart-lang/linter/issues/2795

Change-Id: I3e6c6de81084dca2825488c89830ab3e7ea63186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323680
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-09-01 19:58:29 +00:00
Konstantin Shcheglov 13e109e6b6 Extension type. Workspace symbols.
Change-Id: Ied0e652a18f07ab3b3e7d2a0d76bf20bf3dc55d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323921
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 19:15:48 +00:00
Konstantin Shcheglov 3e4ab6bc16 Extension type. Implemented markers.
Change-Id: I9477ac521f8889a935fe8b439b92f9cb65acad69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 18:56:57 +00:00
Sam Rawlins d0273dda5f linter: Move no_runtimeType_toString tests
Also re-order the skip checks, to avoid walking up ancestors on
every method call that isn't named 'toString'.

Change-Id: I69e9b58b1ae26d44498381546d5881c7e66d4935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323681
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-01 18:51:18 +00:00
Konstantin Shcheglov 12bd986c71 Extension type. Request based test for rename, a fix for representation field.
Change-Id: Ic10550089272797724a0047a31fa040f4a293001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323706
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 17:53:57 +00:00
pq 349e6266ff verify linter source sorting
Fixes: https://github.com/dart-lang/linter/issues/2368

Change-Id: I498e271dc32348115a34472b44688be8de2169a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-09-01 17:40:07 +00:00
Konstantin Shcheglov 84f65be285 Fix 'Extract Method' refactoring inside extensions.
Change-Id: If055456980361c5ec768bf5cb104af11cfa1b12e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323704
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 17:06:39 +00:00
Konstantin Shcheglov 42d8cdfe29 Issue 53405. Report PATTERN_NEVER_MATCHES_VALUE_TYPE got record patterns.
Bug: https://github.com/dart-lang/sdk/issues/53405
Change-Id: I139fc620f10f18ab2b44b806ab24fa09e9956f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323685
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 16:06:17 +00:00
Derek Xu 40c2a63c66 Revert "[analyzer] Make KernelCompilationService use AOT frontend_server snapshot"
This reverts commit 21743361b0.

Reason for revert: b/298654122

Original change's description:
> [analyzer] Make KernelCompilationService use AOT frontend_server snapshot
>
> TEST=pkg/analyzer/test/src/summary/macro_test
>
> Change-Id: I28a37c7648de3e9b3c98b93fea1244234854e439
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322424
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: Idec05c8759edd26821ee4eeffe9be76ed750f8fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323880
Commit-Queue: Derek Xu <derekx@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-09-01 15:57:47 +00:00
Danny Tuppeny ddfc758572 [analysis_server] Expand list of features to review for new language features
I'm not certain all of these could be affected by new language features, but
it seems better to include them and do nothing than potentially miss something.

Change-Id: I4fc74e91511039b6679bc7b72dc3d90a1a45fc30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-09-01 15:06:49 +00:00
Derek Xu 21743361b0 [analyzer] Make KernelCompilationService use AOT frontend_server snapshot
TEST=pkg/analyzer/test/src/summary/macro_test

Change-Id: I28a37c7648de3e9b3c98b93fea1244234854e439
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322424
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-09-01 15:02:30 +00:00
Johnni Winther 9e781c20e8 [cfe] Make TypeBuilder sealed
This changes the TypeBuilder to be a sealed class and changes
implementation to use exhaustive switch, including fixes for all
missing cases found.

Change-Id: I24436801c93ee43858d35ed6b396489fd13125be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-09-01 13:22:23 +00:00
Nate Biggs 72694a93c8 [dart2js] Add option to only emit deferred load ID mapping.
Some customers use tools to preprocess this set of load IDs in order to optimize how code is loaded in their app. This flag allows us to emit this information as early as possible in the compiler without having to completely compile to JS.

Change-Id: I572d4f06ffd49a672767adc344819388a741e20c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-09-01 01:36:29 +00:00
Ryan Macnak 4038b4f9df [frontend_server] Forward --keep-class-names-implementing.
Cf. 708f098c4f

TEST=ci
Change-Id: I65b51d5aa93eeb0e41ee276b4288dd231d6dbc87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323424
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-08-31 22:27:45 +00:00
Konstantin Shcheglov 80a76ff357 Extension type. Extract method refactoring.
Change-Id: I34e08182b568bfc0296b45851ccedb803595efa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323701
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-31 21:35:39 +00:00
Konstantin Shcheglov 55634cbb5b Extension type. Rename refactorings.
Change-Id: Ia65a8e18ff0a92b799ac376872b621e69ad61701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323683
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-31 20:40:00 +00:00
Konstantin Shcheglov 2c9089f120 Extension type. More tests for search, highlight, navigation.
Change-Id: Iffa7e73be52219591dc75f8aacb7defa4b001b1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-08-31 19:36:37 +00:00
Kallen Tu 74794c81b2 [analyzer] Fix comparison of doubles in constant evaluation.
Reland of https://dart-review.googlesource.com/c/sdk/+/96840

Bug: https://github.com/dart-lang/sdk/issues/36188
Change-Id: Iebfde151f098cb2352ddb5cb9368861b313fed4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323230
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-08-31 19:35:01 +00:00
pq 039640fad1 prefer_const_literals_to_create_immutables extension type test
Closes: https://github.com/dart-lang/linter/issues/4722

Change-Id: Ifd60ab27242e802638c072e5957c5c35fe89c399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-31 19:33:37 +00:00
Sam Rawlins 4a9a0dcfdb analyzer: Parse '@nodoc' in a doc comment
Work towards https://github.com/dart-lang/sdk/issues/52705

Change-Id: Icaa0bcb0e58ca07250d135372dc88985b5f1f68c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323423
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-31 18:27:28 +00:00
Konstantin Shcheglov 224a5c7d32 Enable language 3.2 for analysis_server/ and linter/.
Change-Id: Ifba960f2947a6c900c81fc794bfc5ed288cc2e97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-31 17:38:39 +00:00
pq 040c8e3247 allow @immutable extension types
Fixes: #53351

Change-Id: I5afcce3940fe7c01e37e0f133068325ec3fb5579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-31 17:00:37 +00:00
Konstantin Shcheglov 702cca5a18 Extension type. Updates and tests for search.
Change-Id: I17c5c9eb5237ba6f090cab974d4419e46b584ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323504
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-31 16:02:18 +00:00
Johnni Winther 30e3cf018b [cfe] Declare this variable in constructors
This avoids a crash from reading the this variable before it is
declared.

Change-Id: I604828c83e2179fa63f2037832e82db013fbfe4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323580
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-08-31 13:50:18 +00:00
Johnni Winther 33108ade4b [cfe] Move extension types tests to extension_types/ folder
Change-Id: I1814a11cd4a753f9620b00747aebf021bd6dfca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323540
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-08-31 13:50:18 +00:00
Srujan Gaddam b25873f11c [dart2js] Erase static interop type in static invocation
Static invocations of external factories are casted so that the
result, which is a @staticInterop type, can be treated as the erased
type instead. This CL fixes the issue where the type that it was
casted to was never replaced with the erased type.

Change-Id: Ic6eb529349ea2b5c42f91c2740d501d4f81bc38e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323505
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-08-31 09:10:57 +00:00
Sam Rawlins 734e9c3c5b analyzer: Report configurations in doc imports
Work towards https://github.com/dart-lang/sdk/issues/50702

Change-Id: If9c3d702f16e609e0d1f2c2bf09ec02a73cd5a54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323427
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-30 21:26:28 +00:00
Konstantin Shcheglov bbc3dcbe30 Extension type. Tests for type hierarchy.
Change-Id: Ic0e31bb13efd68a3413429d1ff9110bb9b268e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323432
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-08-30 21:18:25 +00:00
Danny Tuppeny 5926a7301b [analysis_server] Fix duplicate fields when extracting widgets
Fixes https://github.com/dart-lang/sdk/issues/53383

Change-Id: Ia985f1c71c99416906bac4669ff61961d32f29fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-30 21:10:49 +00:00
Danny Tuppeny 4be9016afe [analysis_server] Migrate completion tests to use TestCode
No functional changes, just switching from `withoutMarkers()` and `positionFromMarker()` to use `TestCode` while I was in these files.

There are now approx 130 calls to `withoutMarkers()` remaining.

Change-Id: I71e7fa918d2ef00e7ad64820392920a1f28a7222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-30 21:10:22 +00:00
Sam Rawlins 27153e9c26 [analyzer] Canonicalize info strings in doc comment code blocks
Change-Id: I995e7ab063194805c7b8fb7e25a7f7641325d1f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-08-30 20:47:27 +00:00
Dan Chevalier 6c6b8e7666 Initial commit for pkg/service_extension_router
This is the initial stub that will take the changes used in implementing the service_extension_manager.

Fun GIF: https://media.giphy.com/media/10oL2zVIyW2fgk/giphy.gif

Bug: https://github.com/dart-lang/sdk/issues/53297
Change-Id: Iabcabe826b78623fe968c2edf23c271e6ef58bb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322041
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-08-30 20:18:12 +00:00
Konstantin Shcheglov 85928aba2a Linter. Remove trailing whitespaces in tests.
Change-Id: I2cad84d9a9a9ecc342493ff64416b3c3f43c7c5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323430
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-08-30 19:55:51 +00:00
Jake Macdonald feda2f41ca mark some more analyzer tests as failing
Bug: b/298227442
Change-Id: I7f49b6f4cd65a2693ae60ae1d37a4984cb4db458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2023-08-30 19:42:11 +00:00
Nicholas Shahan 8d52ee6547 Revert "[ddc] Add module local caches for new types"
This reverts commit a9fc9ffc4d.

Reason for revert: Breaks some expression evaluation tests in DWDS

Original change's description:
> [ddc] Add module local caches for new types
>
> - Provides fast access for types that are used multiple times in the
>   same module.
> - Enable the existing type table cache when running with new types.
> - Add a similar cache for instantiated generic classes. This cache
>   is used in the current type system as well to help keep the
>   difference between types and classes more clear.
>
> Issue: https://github.com/dart-lang/sdk/issues/48585
> Change-Id: I32103cf0c0bcf9b9771e789c0d04e63a4365a066
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321320
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ied36cd006249cce32426b8d0b52d3443fdbce59a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323500
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-08-30 19:15:16 +00:00
Konstantin Shcheglov ca608ee54e Extension type. Support in ElementLocator.
Change-Id: Icfcaf19a5aaa3b4dfe2b9c1e0b453a261e50ef1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323428
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-30 18:56:06 +00:00