Commit graph

87577 commits

Author SHA1 Message Date
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
Daco Harkes ce4973b3cd [tools] generate_idefiles.py support for Windows
Three improvements to the generated compile_commands.json on Windows.

1. Prevent the use of .rsp files by using `ninja -t compdb -x`.
   Start using the ninja from DEPS that supports the `-x` flag.
2. Remove the `ninja -t msvc` part of the the build commands. Clangd
   does not understand it.
3. Add the windows sysroots (which are set with `-e environment.x64`
   in the build).
   Currently, these are hardcoded to the ones shipped in depot_tools
   because the `environment.x64` is non-trivial to parse.

Bug: https://github.com/dart-lang/sdk/issues/50032
Change-Id: I897ded9e7c97abdf4dde738c275db36536e0b0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260701
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-09-26 12:30:17 +00:00
Johnni Winther 008190bf11 [cfe] Ensure constructor type in type alias invocation
Closes #49985

Change-Id: I0fdf1a1cc984a5ab9e10f9df794864bbeaf44579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260705
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-09-26 10:52:47 +00:00
Alexander Thomas d8cf2a5cbf [release] Add changelog for 2.18.2
Change-Id: I47ae13f80780c57419e252431c429fbb040db599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260104
Reviewed-by: Michael Thomsen <mit@google.com>
2022-09-26 10:06:44 +00:00
Konstantin Shcheglov cfddeee68e Use shared positionalFieldIndex() to check for INVALID_FIELD_NAME_POSITIONAL.
Change-Id: I368a49b8304304f09e835c690e3f91b84dd1a688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260962
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-24 19:22:46 +00:00
Nate Biggs 94507d6502 [dart2js] Migrate node_tracer.dart
Change-Id: I2b0f7ad80477da638ed70fdfd0d0a20acdbc097c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260801
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-09-24 00:24:00 +00:00
Nate Biggs c0b449667a [dart2js] Migrate other abstract value domains
Change-Id: I7ede2113f8520ade4713f2bd64266a6090060255
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260800
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-24 00:24:00 +00:00
Simon Binder eb1f864540 analyzer_plugin: Support latest analyzer in pubspec
Related to https://github.com/dart-lang/sdk/issues/50043

Change-Id: I6e0a93f647e4017bfb320abf29992745908f466e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260704
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-23 21:57:49 +00:00
Ryan Macnak cba1a09e5c [vm, compiler] Inform MSan about parameters coming from FFI.
- Mark the outgoing arguments stack area as initialized.
 - Mark the trampoline's incoming parameter slots as initialized in case they are used as local handles.
 - Mark the outgoing register arguments as initialized.

TEST=msan
Bug: https://github.com/dart-lang/sdk/issues/42314
Bug: https://github.com/dart-lang/sdk/issues/49298
Bug: https://github.com/dart-lang/sdk/issues/49957
Change-Id: Ifa978e1b905a424ec9f64b89879cea6e82f70d12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259102
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-23 21:31:14 +00:00
Brian Wilkerson 025a55e354 Replace uses of colon as a default value separator in tests
Change-Id: I19a9ccc55e889e3519ff656f39d188592a0dd8ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260960
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-23 20:28:49 +00:00