Commit Graph

91447 Commits

Author SHA1 Message Date
Alexander Markov 8d0677eca5 [vm] Simplify type finalization
After recursive types are gone, finalization of types can be
simplified: types can be finalized with a simple recursive traversal
and they no longer need to track "being finalized" state.

Also, finalization doesn't need to write back finalized types
because type finalization without canonicalization is always performed
in place and doesn't result in a new type (or type arguments vector).

TEST=ci

Change-Id: Ifc0a4e12aa410eb2be18c4a475c2f486cfa9ebf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299300
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-04-28 19:37:10 +00:00
Alexander Markov 2f2af4cfae [vm] Cleanup unnecessary SetHash(0)
After recursive types are gone, there is no need to reset hash code
of types during canonicalization, as it cannot change.

TEST=ci

Change-Id: Ibc64f08b52a66829f72dbae5906771f134bbffb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299260
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-04-28 19:37:10 +00:00
Alexander Markov e46b97e1b7 [vm] Cleanup UntaggedTypeParameter::parameterized_class_id_
For class type parameters 'parameterized_class_id' duplicates
a recently added 'owner' and can be removed.
'owner' is changed to hold class reference as a class id (Smi).

TEST=ci

Change-Id: I93fc11e6bcfcc00058a5281b497f59c5c5847ea6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-04-28 19:37:10 +00:00
Alexander Markov 2ee6fcf514 [vm] Remove TypeRef
TypeRef type wraps around another type and it was used to represent
a graph of recursive types. After [0], the only use of TypeRef is
for TypeParameter.bound which may indirectly reference the same
TypeParameter.

This change replaces TypeParameter.bound with TypeParameter.owner and
removes TypeRef entirely. Various parts of the VM no longer need to
handle and support TypeRefs.

TypeParameter.owner can reference a FunctionType, Class,
or, as an optimization, it can be set to null in order to share
class type parameters among different classes.

With the exception of the 'TypeParameter.owner' back pointer,
VM types are now not recursive and can be visited without
additional tracking.

Caveats:

* Generic FunctionType cannot be cloned in a shallow way:
  when copying a FunctionType, type parameters should be cloned too
  and their owners should be updated. For that reason,
  a mapping between 'from' and 'to' function types
  (FunctionTypeMapping) is maintained during type transformations
  such as InstantiateFrom.
  FunctionType::Clone is used instead of Object::Clone where
  appropriate.

* When testing types for subtyping and equivalence, mapping
  between function types is passed to make sure
  type parameters belong to the equivalent function types.

* IL serializer needs to serialize function types as a whole before
  serializing any types potentially pointing into the middle of a
  function type (such as return type 'List<Y0>' pointing into
  the middle of a function type 'List<Y0> Function<Y0>()').

[0] https://dart-review.googlesource.com/c/sdk/+/296300

TEST=ci

Change-Id: I67c2fd0117c6183a45e183919a7847fd1af70b3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294165
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-04-28 19:29:36 +00:00
Ryan Macnak 709ba7aa24 [vm] Use PR_SET_VMA_ANON_NAME on Linux too.
This was upstreamed to Linux in 5.17.

TEST=ci
Change-Id: Idcc0c6a80a8f8e148bf13ed4a1d9d54122379ff9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279206
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-28 18:29:58 +00:00
Konstantin Shcheglov 4756d077ed Update NamedType to use ImportPrefixReference and name token.
Using Identifier expression inside NamedType does not make sense.

Change-Id: I4a61d2b472fd66fb7c5e6e92a80cccb391b06d49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-28 17:31:46 +00:00
Daco Harkes 59ff3b75c1 [infra] Fix Windows bots
Change-Id: I90f5f770f73119aa030ff2eb8198c7856d571423
Cq-Include-Trybots: luci.dart.try:vm-win-release-x64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299661
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-04-28 15:25:27 +00:00
Sigurd Meldgaard a4f8c122c7 Bump pub to a3f8b2fd36ec432450caf907474a02023ef3e44e
Changes:
```
> git log --format="%C(auto) %h %s" 21eb39e..a3f8b2f
 https://dart.googlesource.com/pub.git/+/a3f8b2fd Reinterpret dart sdk constraints when read from a lockfile (3897)
 https://dart.googlesource.com/pub.git/+/7ac56a97 Document cache layout (3890)
 https://dart.googlesource.com/pub.git/+/daf16c78 Suggest resolution updates (3569)
 https://dart.googlesource.com/pub.git/+/23fd8ad4 Use the lockfile when computing upgradable, resolvable in outdated (3887)
 https://dart.googlesource.com/pub.git/+/642b1f58 Distinguish between package:flutter_gen and the synthetic flutter_gen (3889)
 https://dart.googlesource.com/pub.git/+/d1ae5469 Merge pull request 3888 from sigurdm/cherry_pick_to_3
 https://dart.googlesource.com/pub.git/+/ef45ef4a Merge remote-tracking branch 'origin/master' into cherry_pick_to_3
 https://dart.googlesource.com/pub.git/+/762a16d4 Improve message when sdk constraint is not null-safety enabled (3875)

```

Diff: https://dart.googlesource.com/pub.git/+/21eb39e148c720ab8577bbf3bf089556a113eb10..a3f8b2fd36ec432450caf907474a02023ef3e44e/
Change-Id: I99c885105681e82fb429749cbefa4c5812ed5acd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299680
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2023-04-28 15:10:39 +00:00
Daco Harkes 6c3c7ae331 [pkgs/native] Windows support + CI
We use the MSVC from Depot Tools to build C files.
When using clang from DEPS, we need to pass the right INCLUDE / LIB
environment variables. So we might as well use the MSVC instead.

Moves the `nativeCompilerEnvironmentVariables` to the
`TestConfiguration` so that it's cached.

Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: I3576cd0ed07081afb9ae5ba737b8bfe1b21941e5
Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try,pkg-linux-debug-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298580
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-04-28 13:31:10 +00:00
Paul Berry 637dd76c7f Patterns parsing: fix ambiguity resolution for when and as.
This change fixes parsing of case clauses such as:

    case foo when !flag:

Constructions like this require some lookahead in order to parse
correctly, because the token `when` is valid both as an identifier and
as a part of the grammar for a case clause. Therefore, at the time
`foo` is encountered, the parser must decide whether it is looking at
a variable pattern (`foo when`, where `when` is the name of the
variable) or an identifier pattern (`foo`, where `when` begins the
case's guard clause). Previous to this fix, the algorithm for
disambiguating these two choices was as follows:

- If the token sequence starting at `foo` looked like a type, and the
  token that follows was an identifier, the parser assumed it was
  looking at a variable pattern with a type; otherwise it assumed it
  was looking at an identifier pattern.

- EXCEPT that if the token that followed the supposed type was `when`
  or `as` (both of which are valid identifiers), then it probed
  further:

- If the token that followed `when` or `as` was a token that could
  legitimately follow a pattern, then it assumed that it was looking
  at a variable pattern with a type. (The tokens that could
  legitimately follow a pattern are `,`, `:`, `||`, `&&`, `)`, `}`,
  `]`, `as`, `when`, `?`, `!`).

- Otherwise it assumed that it was looking at an identifier pattern.

This didn't fully disambiguate, because the third bullet didn't
account for the fact that the tokens `as`, `when`, and `!` could
_either_ legitimately follow a pattern _or_ legitimately begin an
expression (or, in the case of `when`, a type), therefore constructs
like the following were incorrectly parsed:

- `case foo when as:` (where `as` is a local boolean variable)
- `case foo when when:` (where `when` is a local boolean variable)
- `case foo when !flag:` (where `flag` is a local boolean variable)
- `case foo as when:` (where `when` is the name of a type)

The solution is to simplify the disambiguation logic so that if if the
token that follows the supposed type is `when` or `as`, then the
parser assumes that it's looking at an identifier pattern, _not_ a
typed variable pattern.

The consequence of this is that the above four constructions are
parsed correctly; however it is no longer possible for a typed
variable pattern to name a variable `when` or `as`.

For consistency we would like to prohibit _any_ variable pattern from
naming a variable `when` or `as`, however to keep this change as small
as possible (and reduce the risk involved in a possible cherry-pick)
that will be postponed until a later CL.

Fixes #52199.

Bug: https://github.com/dart-lang/sdk/issues/52199
Change-Id: Ibab9b92f01e3e4020d7d64f1ff000a9b964a4564
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299400
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-04-28 13:22:28 +00:00
Robert Nystrom 1c19e5c417 Remove the old now-unused PubGetError test expectation.
I'd like to clean up more of these confusing expectations, but that's
harder. But this one seems like an easy fix since it's totally unused.

Change-Id: Ic624b12fc7122827e4d6b384d6d5388558bc7729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297762
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-04-28 13:15:26 +00:00
Sergey G. Grekhov cda6ab570d [co19] Roll co19 to fc31789eadd5a664fe25e69cb966555e78a65d0d
2023-04-25 sgrekhov22@gmail.com dart-lang/co19#1959. Test valid combinations of modifiers. Part 3 (dart-lang/co19#2025)
2023-04-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2027. Hint expectation added (dart-lang/co19#2028)
2023-04-24 sgrekhov22@gmail.com dart-lang/co19#1959. Test valid combinations of modifiers. Part 2 (dart-lang/co19#2024)

Change-Id: I32326cf0be0e3ac7a0ac901ea476213083307355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299520
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-04-28 09:03:30 +00:00
Johnni Winther cb7546f58d [cfe] Handle unevaluated constants in enums for exhaustiveness checking
If enum values have used defined fields that use fromEnvironment constants
the enum values themselves are seen as unevaluated constants when
compiling with dart2js. This means that the enum value are not recognized
correctly in exhaustiveness checking.

This CL changes the enum value representation of the CFE to use the
enum class and the name of the enum element, derived either from the
instance constant or the unevaluated constant expression.

Change-Id: I7d5791a41349dacd20b588f5dbfca37d8755ef79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299100
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-04-28 06:52:59 +00:00
Johnni Winther 88721baf2b [cfe] Allow void typed switch expression
This allows void typed switch expressions by allowed void typed
expressions in all subexpressions inferred through the shared type
analysis.

This might lead to allowing void in intended places but the current
approach employed by the CFE doesn't really scale so we need to revisit
it anyway.

In response to https://github.com/dart-lang/sdk/issues/52191

Change-Id: Iee53670d3c316764cfc1309dc76cf37bb3b03629
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299020
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-04-28 06:50:51 +00:00
Jens Johansen d7b70f94e3 [kernel] Short-circut 'computeNonNull' when already nonNullable
When compiling "compile.dart" the type given to computeNonNull
is already non-nullable in ~42% of the cases, meaning it spends
time not doing anything.

Change-Id: I94598efceb3b46f0ac81ec36814c216d01a9e38b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298823
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-04-28 06:38:30 +00:00
Ryan Macnak 5493bc035d [infra] Remove arm32 from gcc builder.
Bug: https://github.com/dart-lang/sdk/issues/52080
Change-Id: I8332638ebb758507403b098f463291fd19f231e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299240
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-28 05:33:00 +00:00
mnordine b5f4692a41 Fix typo
Closes https://github.com/dart-lang/sdk/pull/52206

GitOrigin-RevId: bcf3d10c689c73ea27092b1cc2813d7964627b59
Change-Id: Ic850a649290f1c71908bbe6b0f80dcbe98a0a7f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299460
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2023-04-28 04:57:31 +00:00
Konstantin Shcheglov 7f503e3688 Issue 52202. Fix crash when object pattern type is potentially nullable.
Bug: https://github.com/dart-lang/sdk/issues/52202
Change-Id: I54068a58f68f46c3d75c1586e6ed575b361a22fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299380
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-04-28 03:20:39 +00:00
Brian Wilkerson 7d9340156e Add a missed todo comment
Change-Id: I48dd729555861e87240be137d7a35d76dabeca6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299360
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
2023-04-27 21:53:38 +00:00
Konstantin Shcheglov 310f854c24 Issue 52177. Add rename refactoring for type parameters.
Bug: https://github.com/dart-lang/sdk/issues/52177
Change-Id: I4ae5bb7d72c8956af6dcd91ad28fb1d7397bf424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299280
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-27 21:43:48 +00:00
Janice Collins f193d91ba5 Update dartdoc to 6.2.2.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v6.2.2

Change-Id: Idbd529d4b102ec8dba6b6868a97a42f2da4ad7f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299340
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2023-04-27 21:30:32 +00:00
Konstantin Shcheglov 0f4275a443 Issue 52197. Remove null assert from getEnumElementValue()
I see a crash like this from external users.

Bug: https://github.com/dart-lang/sdk/issues/52197
Change-Id: I5b18552ae1db50c7a103ee6b04f36d0ade8c6f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-04-27 21:22:48 +00:00
Konstantin Shcheglov d838d1a08a Issue 52191. It is not an error to use a void typed expression in SwitchExpressionCase.
Bug: https://github.com/dart-lang/sdk/issues/52191
Change-Id: I2cea3260ad63a0c59399f02dadb99bb09a944623
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299200
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-27 21:22:29 +00:00
Konstantin Shcheglov a0218e916c Issue 52176. Support for ojbect pattern in 'Create Getter' and 'CCreate Field'.
Bug: https://github.com/dart-lang/sdk/issues/52176
Change-Id: Ic9c97bec1981c5613b23206e872f6f708d53792d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-27 20:52:39 +00:00
Robert Nystrom 0eee9f1392 Add 3.0 language changes to CHANGELOG.
Change-Id: Ib5dcc5510b520bc648243801b4dbb435aaf44df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294128
Reviewed-by: Marya Belanger <mbelanger@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-04-27 20:45:52 +00:00
Alexander Thomas 69b4bc43ab [release] Add 3.1 section to the changelog
Change-Id: I1d39be7238220f3bea9149c6fccc22ff8856c8a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299220
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
2023-04-27 20:14:04 +00:00
Nate Biggs b9c73fdf23 [dart2js] Update switch block local handling to correctly propagate types that fall through the block.
Fixes #52170

Change-Id: I7c473c3101d446eb17433d583bfe266bf6f193d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298760
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-27 19:35:45 +00:00
Joshua Litt 47b7c1f31d [js] Add js_interop_unsafe library.
CoreLibraryReviewExempt: Web only library.
Change-Id: I4d6007e0731ecae81fcc614168baee7d5e662fd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293743
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-04-27 18:51:49 +00:00
Nate Biggs a6f543e50a [dart2js] Repro for issue 52170.
Type inference is not tracking the type of 'local' correctly through the switch statement into the inner return. The same code without the for loop does work correctly though.

Change-Id: I0b1b4741e4ff17c22dec3383defb412f5fff0836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298980
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-27 18:15:48 +00:00
Nicholas Shahan a7854364a6 [docs] Fix small typo in code example for Function
Change-Id: Ia762b823c51724229c0eb452a02885ff0f8bc7af
CoreLibraryReviewExempt: Changes documentation only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299140
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-27 17:07:38 +00:00
Nicholas Shahan 9d0781bd9b [ddc] Refactor NSM error tests
Change-Id: Id88b6809736320b6ae098f40f16ced218649a385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297181
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-04-27 16:36:58 +00:00
Konstantin Shcheglov 58e48de282 Issue 52175. Support for ConstructorDeclaration in 'Remove unused element' quick fix.
Bug: https://github.com/dart-lang/sdk/issues/52175
Change-Id: I7c5a237fc9a358488e4431d4785ec51b0322f66a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-27 16:00:12 +00:00
Alexander Aprelev 63bc3a685e [gardening] Remove test from stress testing.
The test was removed in https://dart.googlesource.com/sdk/+/4bfb196287ed2c746382c87dee38c3f17b02ef41.

TEST=ci

Change-Id: I97654b03f0e1147c5c0cd3bade2842f096e2d50a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299120
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-27 14:57:58 +00:00
Danny Tuppeny 0588afe783 [analysis_server] Add a script to print tests marked @FailingTest() referencing closed GitHub issues
Change-Id: I8e68b70c4f271d1610f955cf22dfe9523d7f7ca2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-04-27 14:46:48 +00:00
Jacob Bang 2140dac6cb Remove Gitter.im from Issue Template #52188
Closes https://github.com/dart-lang/sdk/pull/52196

GitOrigin-RevId: 5682ea5c51970ea42e7f004385d19cebf62ba2a2
Change-Id: I5cdb132543c86c97720d7852551c162cac359a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299060
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-04-27 13:49:22 +00:00
Johnni Winther bfda964ab8 [cfe] Add BodyBuilderContext
This adds a BodyBuilderContext to separate the BodyBuilder from its
[member], [declarationBuilder] and [sourceClassBuilder] fields. The
latter two are fully removes and trivial uses of [member] have been
removed.

This is a step towards a more clean implementation of inline class
members. The plan is to have the members create their own
BodyBuilderContext to use in the BodyBuilder which should the be
agnostic about the builders of its context.

Change-Id: Ic3b29693dd26aa8c57a9ac175b4a07ce4b0a15d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298860
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-04-27 09:40:39 +00:00
Alex Li fae49c0514 Improve comments of Directory methods
Closes https://github.com/dart-lang/sdk/pull/52194

GitOrigin-RevId: d6684f771db36b917b30d789785f3f883a76fad3
Change-Id: Ie6a172e7bf818368fe5557fec8b7b9eb1e7de8b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298841
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-04-27 09:40:30 +00:00
Ryan Macnak 4c2ec2ef45 [infra] Remove configurations for legacy QEMU.
Change-Id: Iec8bff7573c2b9d7544511916c8e1c0fc3859398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296063
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-27 09:39:51 +00:00
Ryan Macnak 07326f7762 [infra] Add configurations for NNBD QEMU.
Change-Id: Id3bb6d1b09ccbfe445d2f5132e1f3b07b4edd852
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296060
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-27 09:39:51 +00:00
Oleh Prypin 7bbf7ff43e Revert "[cfe] Enable verification in platform compilation"
This reverts commit 20e0ddf130.

Reason for revert: breakages in google3

Original change's description:
> [cfe] Enable verification in platform compilation
>
> Closes #32530
>
> Change-Id: I5a44e211a4b203e4879dbc8f6bf4bbec5abf51f3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298820
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>

Change-Id: Idb2c30d93ad385431734c4a4e884d3d53be76b2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299040
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-04-27 08:43:00 +00:00
Johnni Winther 20e0ddf130 [cfe] Enable verification in platform compilation
Closes #32530

Change-Id: I5a44e211a4b203e4879dbc8f6bf4bbec5abf51f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298820
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-04-27 07:34:39 +00:00
Jens Johansen 255d755975 [CFE] Cache calls in type inference that almost always creates a FunctionType
InstanceAccessTarget calls "base.getGetterTypeForMemberTarget" a lot;
this CL caches the result which is almost always a new FunctionType,
thus creating fewer FunctionTypes.
When compiling compile.dart ~29% fewer:
Before this CL, compiling compile.dart created a little over 217k
FunctionTypes (down in a previous CL from almost 263k); with this CL
"only" ~153.5k FunctionTypes are created.

Change-Id: Ib110ed5e0d152a3b86044f20dc50f0924a083f46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298601
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-04-27 07:30:41 +00:00
Jens Johansen f72b7ae86f [CFE] Don't create new 'unknown' FunctionTypes for each TypeInferrerImpl
When compiling "compile.dart" this creates ~17% fewer FunctionTypes
(from almost 263k to a little over 217k).

Change-Id: I0090c287ce427b298897846de03679f562223e63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298581
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-04-27 07:14:51 +00:00
Konstantin Shcheglov ea2d6a7659 Issue 52177. Fix rename refactoring for type parameter of a class.
It does not work for function / method type parameters though.

Bug: https://github.com/dart-lang/sdk/issues/52177
Change-Id: I51ae5379425e156640ae32d0cea6fd59cdc62b15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-04-27 04:51:26 +00:00
Helin Shiah 5ef021b116 Add debug adapter to DAP
Change-Id: I5bacd460175a5b2e86326f7501d7f250bbe3ab0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292060
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-04-27 01:19:57 +00:00
Alexander Aprelev 86d754690a [vm/isolates] Put limit on how many isolates are suspended.
Fixes https://github.com/dart-lang/sdk/issues/52154
TEST=ci

Change-Id: I6f620113232cf8f771dd73be334ace0e385784f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297920
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-26 22:18:51 +00:00
Konstantin Shcheglov 97a762b083 Remove debug output from analysis_server/ tests.
Change-Id: Ia358d4f51c605ca66e5111769d1f716559251f63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298780
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-26 19:58:48 +00:00
Alexander Aprelev 4b7de54e03 [vm/regex] Pick a fix for unicode negated range RegExp.
Pick up v8 fix https://chromium-review.googlesource.com/c/v8/v8/+/3802690.

Fixes https://github.com/dart-lang/sdk/issues/52182
TEST=corelib/regexp/regexp_test

Change-Id: I01057ec5c8babdafc06ddeea3db48e14ae7c5357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298700
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-26 19:46:06 +00:00
Devon Carew ef0ad396b5 [deps] rev mockito, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

mockito (https://github.com/dart-lang/mockito/compare/28e8eda..f851e17):
  f851e17  2023-04-26  Ilya Yanok  Run CI with Dart 2.19 and dev

test (https://github.com/dart-lang/test/compare/7fab079..c9a3138):
  c9a31388  2023-04-24  Nate Bosch  Remove ignores for undeprecated libraries (#2000)

webdev (https://github.com/dart-lang/webdev/compare/8b42c95..12f2285):
  12f22857  2023-04-25  Elliott Brooks  Run `chrome_proxy_service_test.dart` everyday at 8 AM PST (#2098)

Change-Id: I1c90351b7cde4ead84bb410fa76807b33fdae1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298740
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-26 19:17:41 +00:00
Brian Wilkerson 03270f748b Convert the tests for the combinator contributor
Change-Id: Ic165bf7fed1f045f489998ecf9dec9edbd516274
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-04-26 18:42:37 +00:00