Commit graph

87686 commits

Author SHA1 Message Date
DEPS Autoroller
ba822cbda4 Roll Dart Documentation Generator from ce5bd271eda9 to 691fa9640aae (1 revision)
https://dart.googlesource.com/dartdoc/+log/ce5bd271eda9..691fa9640aae

2022-09-27 srawlins@google.com Make two regular expressions static (#3194)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I3c6ed921c2919d5fc224ed1ebd05710dcfaf49f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261462
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-09-27 22:47:18 +00:00
Ryan Macnak
efbf68f306 [vm, gc] Common page structure for both generations.
- Prep work for non-moving promotion.
 - The generations still have different alignment offsets.
 - Old-space pages now participate in the page cache.
 - Fix boolean/null bit tricks to assert the right requirements on the alignment of a page's first object.

TEST=ci
Change-Id: I4369d8c6af73228e162c226d411914868bafed33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260401
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-27 21:34:05 +00:00
Brian Wilkerson
3616bd5992 Enable the patterns feature in parser-based tests
Change-Id: I0c2db4540d1868af02d4b1a067d027dad93f92b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261444
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 21:33:55 +00:00
Paul Berry
54906759b9 Don't delegate foreign private names to noSuchMethod.
If a concrete class implements an interface containing a name that's
private to a different library, any attempt to invoke that name will
result in an exception getting thrown.  Previously, such attempts
would result in the call being diverted to noSuchMethod.

This change closes a loophole in Dart's privacy system, and paves the way for
a future implementation of promotion for private final fields (see
https://github.com/dart-lang/language/issues/2020).

Bug: https://github.com/dart-lang/sdk/issues/49687
Change-Id: Ie55805e0fc77dc39713761a80a42c28bd0504722
Tested: language tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255640
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-27 21:20:35 +00:00
DEPS Autoroller
1ab0414a42 Roll Dart Documentation Generator from 6b8b1c46da9a to ce5bd271eda9 (3 revisions)
https://dart.googlesource.com/dartdoc/+log/6b8b1c46da9a..ce5bd271eda9

2022-09-27 srawlins@google.com Fix generic typedef pointing to typedef (#3193)
2022-09-27 srawlins@google.com Unnamed libraries (#3189)
2022-09-27 srawlins@google.com Make InheritingContainer._inheritedElements late final (#3191)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I371d173b9225721274f4faf652b56ee4f9fa8082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261461
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-09-27 20:56:05 +00:00
Joshua Litt
203344cf5d [dart2wasm] Add support for runtime types for function types.
Change-Id: I3c446b8ef7dd9b1edc612b9e27893870a25c54d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261160
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-27 20:44:35 +00:00
DEPS Autoroller
0e2483cf64 Roll Dart Documentation Generator from a6676ee58628 to 6b8b1c46da9a (2 revisions)
https://dart.googlesource.com/dartdoc/+log/a6676ee58628..6b8b1c46da9a

2022-09-27 srawlins@google.com Simplify _buildFullyQualifiedName (#3190)
2022-09-27 srawlins@google.com Simplify Library.dirName (#3192)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I5809e94dc7da449a2606414b24785d4ff8b70110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261460
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
2022-09-27 19:41:45 +00:00
Nate Biggs
8939d1e0f0 [dart2js] Migrate iterable tracers in inferrer.
Change-Id: I0a9eba5a65cb6dd1b8db5aef53c3a2caed9530b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260803
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-27 19:19:25 +00:00
Konstantin Shcheglov
dd63e54e2c Remove fluent check().
Change-Id: I6f41efb2432ebd4a6a03638d5db0937f20386200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 19:15:55 +00:00
Brian Wilkerson
798c57bef9 Capture some conventions around writing tests
Change-Id: Idf23690d944eddfbd575bcb608d6949c10e7d1f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261442
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 19:07:45 +00:00
Danny Tuppeny
813aa69dff [analysis_server] Fix Inline Method refactor for methods with type args
Change-Id: I0bac7bbdb4f2ef8560d2948927527512fb468b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 18:48:35 +00:00
Danny Tuppeny
63b6239f79 [analysis_server] Tweaks to new server refactorings
Change-Id: If2dc19b724a4fd617288466003a8d35e599d5950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261403
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 18:22:05 +00:00
Devon Carew
a5b9594e20 Bump http to 738a55b20e391c5a526b86bf4b02af6b7745b494
Changes:
```
> git log --format="%C(auto) %h %s" d6a4bf1..738a55b
 https://dart.googlesource.com/http.git/+/738a55b Increment cronet_http version (#803)
 https://dart.googlesource.com/http.git/+/eb4d457 Fix a bug where cronet_http did not set content-length correctly (#800)

```

Diff: https://dart.googlesource.com/http.git/+/d6a4bf1e8f9d6e8f372958387cea32b0a6a62cfa~..738a55b20e391c5a526b86bf4b02af6b7745b494/
Change-Id: Ic2713b83e140a3a3a25c7565baf27e063c32910e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261200
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-09-27 18:19:16 +00:00
Alexander Markov
d592882f49 [vm] Unify nullability and type state among all types
This change moves 'nullability' and 'type_state' from all kinds of
types to AbstractType base class. This removes a lot of code
duplication and allows uniform access to nullability and type state
for all kinds of types.

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47034

Change-Id: I1f0dc7fda78426db83fec6a20ebebcd632ad6d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260662
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-27 17:30:03 +00:00
Ryan Macnak
f04984b432 [vm] Mark assembly produced by the VM as not requiring an executable stack.
Cf. 32715d1d5b

TEST=readelf
Change-Id: I27e2404f49e500adf82329e3a969e91d8c0dc51f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260963
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-27 17:28:16 +00:00
Danny Tuppeny
d83cb4e621 [analysis_server] Fix some issues with requests made at an offset between name and type/parameter lists
Removal AstNodes for names in declarations left some of these places getting FormalParameterList/TypeParameterLists when an offset was between the name and parameter list. This is a fairly common case if you double-click to select a name in VS Code (it sends the end of the name as the offset).

This only changes the case where a single offset is provided (not a range), and it is both the start of the parameter list and the end of the name.

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

Change-Id: I1219fa70b0795b61c60f31ad61ff9a34954c8b43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 17:13:53 +00:00
Devon Carew
9d55d52640 Bump stream_channel to a5129ca44322a7024074ca38fb98e343dcb638c7
Changes:
```
> git log --format="%C(auto) %h %s" 63831cb..a5129ca
 https://dart.googlesource.com/stream_channel.git/+/a5129ca Prepare to publish (#81)

```

Diff: https://dart.googlesource.com/stream_channel.git/+/63831cb74c5a413da893bda0fa4a80b5cb567076~..a5129ca44322a7024074ca38fb98e343dcb638c7/
Change-Id: I15ff8707bd6f04f3169442247a70fd9e4b8d231e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261204
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-09-27 17:00:33 +00:00
Martin Kustermann
05cf1c3218 [gardening] Disable heap snapshot referrers test on simulators
The test takes long time to run and is too slow on simulators. So we
disable it there.

We also rename the test to reflect that an object's users are called now
`referrers` and not `referencees`.

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

TEST=ci

Change-Id: Ic092db05a4930c33a9e6e4e0b2bbdb817936f97f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261363
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-09-27 17:00:23 +00:00
Tess Strickland
1d081c8bdd [vm] Add symbol size and type information to the assembly output.
Add symbol size and type information to the assembly output when
compiling for Linux-based platforms, so that the symbol tables in the
assembled output include that information.

Since symbol tables in Mach-O files do not include symbol size
information, we don't output either currently for MacOS or iOS targets.

TEST=vm/dart{,_2}/use_add_readonly_data_symbols_flag

Change-Id: I4219b898249153dc84214565e85ac9d3cf802538
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-gcc-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260820
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-09-27 16:45:53 +00:00
Tess Strickland
823934f1c5 Reland "[vm/compiler] Add symbols for read-only data when requested."
This is a reland of commit 286326f834

Checking into https://github.com/flutter/flutter/issues/108378, it
looks like the stripped snapshot indeed is unchanged, but the .ipa
being benchmarked includes .dSYMs, which is why there was a size
regression in adding this extra debugging information.

If that changes, we can remove the flag, but for now, I've added the
flag back so these symbols are not added by default.

TEST=vm/dart{,_2}/readonly_data_symbols

Original change's description:
> [vm/compiler] Add symbols for read-only data when requested.
>
> Symbols for non-clustered objects in the read-only data section are
now added to the static symbol tables for unstripped snapshots and
separate debugging information.
>
> In DEBUG mode, the name for a non-String read-only data object also
includes the name of the parent object.
>
> TEST=vm/dart{,_2}/readonly_data_symbols
>
> Change-Id: I623b023138aeca0580bc76392882eac5686f8f50
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251104
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: I41be1c494c4324f1f3fae648d9832772c45bfbaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260522
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-27 16:45:53 +00:00
Daco Harkes
8a78aaf463 [analyzer/ffi] Fix FfiNative Pointer params
TEST=pkg/analyzer/test/src/diagnostics/ffi_native_test.dart
TEST=tests/ffi/regress_49684_test.dart

Closes: https://github.com/dart-lang/sdk/issues/49684
Change-Id: I756635c0a34aa18f3a3a2cbdcc0657b08cb5050e
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try,analyzer-analysis-server-linux-try,vm-ffi-android-debug-arm64c-try,vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261400
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 15:58:16 +00:00
Konstantin Shcheglov
95d559921d Replace check() with textual dumps in CompletionDomainHandlerGetSuggestionDetails2Test.
Change-Id: I8ca1bfb8af93b09e8190c1dc1f7354e52a691ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261285
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 15:54:13 +00:00
Danny Tuppeny
17bd00df50 [dds/dap] Attempt to fix flaky tests on Linux during shutdown while debugger is initializing
Fixes https://github.com/dart-lang/sdk/issues/50058.

Change-Id: Ia0b498a4f1c943bc1f21f940c533584837ba5311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261401
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-09-27 15:43:13 +00:00
Devon Carew
74b7248773 Bump mockito to 02ad6c793d9ea970b5cc892f45a55d12d8ebf4e8
Changes:
```
> git log --format="%C(auto) %h %s" ef37e87..02ad6c7
 https://dart.googlesource.com/mockito.git/+/02ad6c7 Bump analyzer to support 5.0.0

```

Diff: https://dart.googlesource.com/mockito.git/+/ef37e871d2673a66ca57303253901748622f04ca~..02ad6c793d9ea970b5cc892f45a55d12d8ebf4e8/
Change-Id: I460fef009a9a2819e654e3d41a2513c99b5bfa8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261202
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-09-27 15:17:43 +00:00
Erik Ernst
263be7413b Update spec_parser to handle new features (super, anywhere, records)
This CL updates Dart.g and hence the spec parser to handle new features
added to Dart in 2.17.

Change-Id: I42d6534d933df9a30453f12643dcc90e4d86fa80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260821
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-09-27 14:10:53 +00:00
Paul Berry
6945a72009 Patterns: initial parser support.
The parser now supports the following subset of the parser grammar:

- logical-or and logical-and patterns (called "binary patterns" to
  reflect analyzer nomenclature)

- extractor patterns

- cast patterns

- list patterns

- map patterns

- null-assert patterns

- null-check patterns

- variable patterns where the variable is preceded by `var`, `final`,
  <type>, or `final <type>`

- if-case statements (and if-case within collections); without guards

- record patterns

- parenthesized patterns

- constant patterns where the constant is a plain expression not
  beginning with `const` (booleanLiteral, nullLiteral, numericLiteral,
  stringLiteral, identifier, or qualifiedName).

- relational patterns

- patterns in switch statements

- integration with the analyzer's AstBuilder class

Not implemented yet:

- constant patterns beginning with `const`

- variable patterns where the variable is a single identifier (note:
  this means that `_` is currently interpreted as a constant pattern
  rather than a "wildcard" variable pattern)

- guards (a.k.a. "when clauses")

- switch expressions

- pattern variable declarations

- patterns appearing in "for loop parts"

- pattern assignment

- several error checking and error recovery scenarios (see TODO
  comments)

- integration with the front_end's BodyBuilder class

- front_end style parser tests (currently the feature is tested using
  analyzer unit tests only)

Note that in patterns, `as` binds has higher precedence than `&` and
`|`, whereas in expressions, `&` and `|` have higher precedence than
`as`.  To reflect this, a new precedence has been added,
CAST_PATTERN_PRECEDENCE.

To reduce the risk to users during parser development, the parser
currently only attempts to parse patterns when instructed to do so
(i.e. when the language feature is enabled).  In the long term, I
intend to change the parser so that it always attempts to parse
patterns, and it is the responsibility of its listener to report
errors if patterns are used without enabling the language feature.

Change-Id: I360b535d2a6ebd35a0ee4d066b06e3ae8e3121ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-09-27 13:16:33 +00:00
Paul Berry
d7e130e930 Patterns parsing: update expectations (no functional change).
For ease in code review, I've made all the changes that affect test
expectations files here, in a way that can easily be confirmed during
code review to have no functional effect on parser semantics.

This will be followed by a change that introduces parser support for
patterns, but doesn't affect test expectations.

Change-Id: I830600c1ae89447c7745bfae6fd91c379b6e05d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261022
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 12:56:54 +00:00
Martin Kustermann
d42d7429b9 [gardening] Fix VM zone allocator assertion and size accounting
When reallocating a piece of memory that was just allocated one can
re-allocate to larger or smaller new size.

The latter was disallowed by an assertion, which seems like a bug.

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

TEST=vm/cc/ZoneRealloc

Change-Id: Iee9f72fead285fb8150ba8639b6de655afc515ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261340
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-09-27 12:55:43 +00:00
Alexander Thomas
e87f2d895c [build] Switch builds to the ninja in DEPS
Note: this "upgrades" ninja to 1.11.1.

Change-Id: Idca0f8a2a67cf5d5dbe75661bb14de174012580f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261101
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-09-27 11:24:03 +00:00
William Hesse
28263235b6 [release] Update changelog for 2.18.2
Bug: https://github.com/dart-lang/sdk/issues/50052
Change-Id: I1d9aedac81b2fdb05f04a0246d1088ffa66192ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261300
Reviewed-by: Alexander Thomas <athom@google.com>
2022-09-27 11:07:48 +00:00
Jens Johansen
4124e85f09 [parser] Fix shifting that fails on web
This CL uses Martins suggested fix (adding 1 to avoid shifting a
negative), and adds a simple test that compiles the parser to dart2js
(with asserts enabled) and runs it via d8. This will perhaps catch
breakage up front another time.
To my knowledge this is not a supported use case though, so likely
we can't but in much effort for any future big breakages.

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

Change-Id: Ic5ac6e63f2d6d32e38ba562ed21dbe85328935cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261301
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-09-27 10:33:53 +00:00
Daco Harkes
c04673f44b [vm/ffi] Support DynamicLibrary.process() on Windows
Support looking up a symbol in the process on Windows by using the
Windows Process Status API to iterate over all loaded Modules.

TEST=tests/ffi/has_symbol_test.dart
TEST=tests/ffi/vmspecific_dynamic_library_test.dart

Change-Id: I1029f1c7dae9a193b662d942388affb681842c90
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-debug-x64c-try,vm-kernel-win-debug-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,dart-sdk-win-try,vm-kernel-win-release-x64-try,vm-kernel-win-release-ia32-try,vm-kernel-precomp-win-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260760
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-09-27 08:42:03 +00:00
Nate Biggs
d6d33e61c9 [dart2js] Migrate closure_tracer.dart
Change-Id: Ic12ac824427cbddb1609f5c7b1e642621b39f82e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260802
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-27 04:29:18 +00:00
DEPS Autoroller
1171193c99 Roll Dart Documentation Generator from 22facbb145d7 to a6676ee58628 (2 revisions)
https://dart.googlesource.com/dartdoc/+log/22facbb145d7..a6676ee58628

2022-09-27 kevmoo@users.noreply.github.com client search cleanup (#3186)
2022-09-27 kevmoo@users.noreply.github.com tool/grind.dart: cleanup directory signature calculation (#3187)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I0ff3cb34bb645b5e084a562862718e303e581643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261261
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-09-27 02:48:58 +00:00
Stephen Adams
1af4a6a835 [dart2js] Migrate js_backend/specialized_checks.dart
Also prepare some ssa/ files by importing world_iterfaces.dart

Change-Id: Ifa1c61d27a32619baec60ab7835f66e36dee3bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261283
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-09-27 02:27:48 +00:00
DEPS Autoroller
3973013abe Roll Dart Documentation Generator from c22e5e77de29 to 22facbb145d7 (1 revision)
https://dart.googlesource.com/dartdoc/+log/c22e5e77de29..22facbb145d7

2022-09-27 kevmoo@users.noreply.github.com client search code: stop event propagation when navigating (#3185)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I46e43aa6b1c8448258a792bd65d5fc438690fe34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261241
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-09-27 01:55:38 +00:00
Brian Wilkerson
02fe211e27 Ensure that replace-with-var works with record types
Change-Id: Ie7ee7c7373dd2170d80b6dfb9d1d60e45cd81973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261181
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 00:38:49 +00:00
Konstantin Shcheglov
745d0ff64a Deprecate 'Element.enclosingElement3', use 'enclosingElement'.
Change-Id: I6f4fd7e8c0f071bde10cb5e57ed6195ae517e575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-26 23:58:14 +00:00
Konstantin Shcheglov
83eec5f26f Replace check() with textual dumps for CompletionDomainHandlerGetSuggestions2Test.
Change-Id: I73f9b4a48d7115dd226bb22ae920122df3a40744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-26 23:57:18 +00:00
Ryan Macnak
353dc891c8 [vm] Allocate old after isolate messages reach a certain size.
This avoids expensive promotion of large messages.

Cf. 04659de9f05af63d5fe4b8d67d70bb3cdf1c9a7a

TEST=ci
Change-Id: I89d5e560063f7d0c1f791ef299bb74c971f3dccf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257801
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-26 23:45:07 +00:00
Liam Appelbe
875922a88f [vm]: Rewrite library_filters in source_report
When library_filters were given, we used to prefill the script_table_,
then just assume that any scripts not in the script_table_ must have
been filtered out. We wrote it this way to avoid checking the filters
in every GetScriptIndex call. But in some cases (eg mixins),
lib.LoadedScripts() can miss some scripts, so they'd be incorrectly
omitted from the table.

The new implementation lazy loads the scripts, the same way it works
when there are no library_filters. Skipped scripts are still placed in
the script_table_, but given an index of -1, and omitted from
script_table_entries_.

Bug: https://github.com/dart-lang/sdk/issues/49887
Change-Id: Ide938ddfa9a3750c72c615e296b1a23875e46ab8
TEST=CI (also manually tested that the bug is fixed, but it's a really fiddly setup and I'm not sure how to put it in a unit test. See bug for details)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260076
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2022-09-26 23:03:18 +00:00
Konstantin Shcheglov
8820b9d4de Rewrite MethodInvocation(s) on RecordType to FunctionExpressionInvocation(s).
Change-Id: I77d6fcdddf015a18eeb9a8057e099746dba0f570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-09-26 22:44:18 +00:00
Kallen Tu
80c6f0e824 Clean up dynamic invocations in dart2js core library files.
Change-Id: I3967a13585b2e3c8e0859bef9d08f181f88bf1f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260450
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-26 22:26:37 +00:00
Devon Carew
3038f9b37c Bump shelf to 39d820d4e32fc99c65f562786097487d597dcee1
Changes:
```
> git log --format="%C(auto) %h %s" 2400c99..39d820d
 https://dart.googlesource.com/shelf.git/+/39d820d Prepare to publish (#296)

```

Diff: https://dart.googlesource.com/shelf.git/+/2400c999dad17b2708c3f4e720399c92e47e3992~..39d820d4e32fc99c65f562786097487d597dcee1/
Change-Id: If1001d56ebab46f0c7d8598b95882613ed095356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261203
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-09-26 22:18:37 +00:00
Konstantin Shcheglov
2e380ff2ff Issue 50045. Special case bool.fromEnvironment('dart.library.js_util') to return unknown.
Ideally, all `bool.fromEnvironment()` should return "unknown".
But we have issues with making it to be compatible with Andular Dart.
At least at the moment.
So, to unblock Flutter people working on a new platform, we need this.

Bug: https://github.com/dart-lang/sdk/issues/50045
Change-Id: I088a5b822f495d7258ceb1fdeee8f0b8a6a9e120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-26 20:32:47 +00:00
Konstantin Shcheglov
aa793715e0 Resolve annotations on RecordTypeAnnotationField(s).
Change-Id: I33f23e33b97d440ae77225c17ab372025c27b0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258161
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-26 18:29:32 +00:00
Konstantin Shcheglov
5a812f423d Prepare to publish analyzer 5.1.0 and _fe_analyzer_shared 49.0.0
Change-Id: I64bbfb67d39a86cf4c3b00067f78c992d0fe2502
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-09-26 18:14:58 +00:00
Alexander Aprelev
c5b0a2de72 [docs] Further update Isolate.spawn documentation
Addresses missed review comments from https://dart-review.googlesource.com/c/sdk/+/260403

TEST=ci

Change-Id: Ic2f5cc5278126f393877970375d50560ee8e2677
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260620
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-09-26 16:23:18 +00:00
Danny Tuppeny
fe8c22cc69 [dds/dap] Support sending standard and custom progress notifications
This adds the ability to send DAP progress notifications to the client. In this change, the CLI adapter sends them when connecting to the debugger, although the main motivation is to provide feedback when Hot Reload/Hot Restart is in progress (which will be handled in the Flutter adapter once this rolls in).

Additionally, a flag allows sending custom notifications because VS Code's standard handling of notifications (which delays showing them for 500ms) does not work well for Flutter hot reload/hot restart (which can often complete in less time than that) so sending custom events allows the Dart extension to show the progress immediately instead.

Change-Id: I1c91da6dc023b3d2d6cf3c6e8b8bbb53ee5167d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261102
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-09-26 15:26:47 +00:00
Chloe Stefantsova
354f144c08 [cfe] Add initial implementation of type inference for records
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I9208bbfa410fbf6d200e4715ea6171ed58b3510d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260882
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-09-26 15:25:27 +00:00