Commit graph

91197 commits

Author SHA1 Message Date
Ilya Yanok 3c284a0c95 Revert "Reland "[VM] Begin supporting Perfetto file recorder""
This reverts commit 4cd9c9c666.

Reason for revert: reusing the same proto package for copied files breaks rolling it to G3.

Original change's description:
> Reland "[VM] Begin supporting Perfetto file recorder"
>
> This is a reland of commit 7424295ce9
>
> The differences between this reland and the original CL are: now the
> Perfetto file recorder does not get built in PRODUCT builds, and it does
> not get built unless the SUPPORT_PERFETTO macro is defined.
>
> TEST=Recorded traces with the Perfetto file recorder and explored them
> in Perfetto's trace viewer, CI
>
> Original change's description:
> > [VM] Begin supporting Perfetto file recorder
> >
> > This CL adds the `TimelineEventPerfettoFileRecorder` class, which is a
> > timeline recorder that writes a trace to file in Perfetto's proto
> > format. This CL supports the recording of all types of timeline events
> > except flow events. Support for flow events will be added in a future
> > CL.
> >
> > TEST=Recorded traces with the Perfetto file recorder and explored them
> > in Perfetto's trace viewer, CI
> >
> > Change-Id: Iaa2051e536589a473c5e15f9de9bb9c251f13d38
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278942
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Derek Xu <derekx@google.com>
>
> Change-Id: I8713f704b5fbeed5f1231012bce8a32aaf566ae4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286020
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: I2da67ffe5bff01d568f32f682455bb2c789499b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295821
Commit-Queue: Ilya Yanok <yanok@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2023-04-18 11:25:49 +00:00
dependabot[bot] 754aca0049 Bump github/codeql-action from 2.2.11 to 2.2.12
Closes https://github.com/dart-lang/sdk/pull/52053

GitOrigin-RevId: e5391795af051fe4761c4d376784afc6cc9a8cdb
Change-Id: I704cd2830c0c36a87c4582cf22ea44b6b5c8b915
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295561
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-18 08:20:48 +00:00
dependabot[bot] 7c8e61104f Bump actions/checkout from 3.5.0 to 3.5.2
Closes https://github.com/dart-lang/sdk/pull/52054

GitOrigin-RevId: 50fafd4554841ee069fe126d80b3be36d3a19929
Change-Id: If6be6160b332988fc309c575d821d32e19229448
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295560
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-18 08:19:56 +00:00
Daco Harkes f9f1030959 [infra] DEPS and test dart-lang/native packages
This CL pulls in dart-lang/native packages and runs them on the
pkg bots.

Bug: https://github.com/dart-lang/sdk/issues/50565
Change-Id: Ifcd8ba25f8bdfeca8f4c161adfc3c20e0ce500d1
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295280
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-04-18 08:04:49 +00:00
Alexander Aprelev b04b084406 [vm/win7] Dynamically load functions for unwinding instructions.
Dynamically probe and load system functions for adding/deleting unwinding instructions to ensure vm can gracefully handle running on Windows 7, where those functions are not available.

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

Change-Id: If4696bb8172d12f84f49d1d10affd7930a5bedfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295741
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-18 02:38:48 +00:00
Janice Collins a6ebd6fa8e Bump tools to 545d7e1c73ce21b8c91f638021f9d487d324a501
This will customize the consent message based on the `dart` or `flutter`
entry points and allow unified_analytics to honor the legacy analytics
opt-out.

Changes:
```
> git log --format="%C(auto) %h %s" 2308c67..545d7e1
 https://dart.googlesource.com/tools.git/+/545d7e1 Honor legacy opt out status (80)

```

Diff: https://dart.googlesource.com/tools.git/+/2308c672e0d7446f5bfdba96594b41f26fa24a2e..545d7e1c73ce21b8c91f638021f9d487d324a501/
Bug: https://github.com/dart-lang/tools/issues/74
Bug: https://github.com/dart-lang/tools/issues/82
Change-Id: I36bffde69b6d7f798a40f140ca5e838336d81d3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295742
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2023-04-17 23:09:14 +00:00
Ryan Macnak c4795a7550 [vm, compiler] Don't do safepoint transitions in generated code under TSAN.
Go to the runtime so TSAN sees the instrumented access to Thread::safepoint_state_, avoiding false data race reports.

TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/52024
Change-Id: Ic686bac2221d8ac6b9865ce9c82a4c36711037a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295740
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-17 22:37:57 +00:00
Danny Tuppeny 39fc15a0b4 [analysis_server] Add missing declaration semantic token modifier on classes/constructors
Fixes https://github.com/Dart-Code/Dart-Code/issues/4498.

Change-Id: Ia1c89d02a12fd51fe6f18ce4208ff88a7fbd7ba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 21:19:25 +00:00
Konstantin Shcheglov 609db33dc7 Issue 51985. Quick fix to add missing pattern case to switch expression/pattern.
Bug: https://github.com/dart-lang/sdk/issues/51985
Change-Id: I43a24e889789da962a8ee1359702ea04db2a36f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295391
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 20:34:13 +00:00
Konstantin Shcheglov 8fa08ae80b Add 'Convert to if-case statement' quick assist.
Change-Id: I6c65060029c5cf474c59a05b0330a89ebf16082a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295502
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 20:27:24 +00:00
pq 17d92f90d0 offer wildcard suggestions for destructured record fields
See: https://github.com/dart-lang/sdk/issues/52025

Change-Id: I298c7f5b82b47b8cb02ca1a401e0658aab8f40a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295680
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 20:25:36 +00:00
Danny Tuppeny 3149f813bb [dartdev] Update --enable-analytics to re-enable unified analytics
Previously, running `dart --disable-analytics` would disable this, but `dart --enable-analytics` would not re-enable.

Change-Id: I3da33f0c0ed9a3e29ff4fbbfd66ceeb030014c4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 19:54:17 +00:00
Paul Berry eee509140d Add dependency overrides for pkg/analyzer
These dependency overrides prevent pub from getting confused about the
fact that our SDK development is in a mono-repo; that in turn allows
unit tests to be run from inside vscode using the standard test
integration.

Change-Id: Ica94f0a49d8c79f6a1f6395707b02d36da20089d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295661
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 19:27:27 +00:00
Danny Tuppeny 3069c4f3e2 [analysis_server] Add missing "constructor" semantic token modifiers on constructor declarations
Fixes https://github.com/Dart-Code/Dart-Code/issues/4495.

Change-Id: I5fa21504562f7437be30118e5dc96fd5b49f2853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295544
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 19:12:46 +00:00
Nate Biggs 9834f87c54 [dart2js] Fix noSuchMethod override handling.
This bug manifested as change in 'language/no_such_method/mock_test' from RuntimeError to Passing in 'dart2js-production-linux-d8'.

Change-Id: Ieedb544c3d684437f7c79dfa62b4e30e1970637c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295480
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-04-17 18:48:11 +00:00
Erik Ernst 639a6f06ef Simplify several non-terminals to use regex-like grammar operators
Follow-up to SDK issue #51744.

Change-Id: Ic713ed5adf99bed49f1e93a70817650d5f0c3c46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295545
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-04-17 18:43:31 +00:00
Konstantin Shcheglov f88e3bd77c Issue 51903. Test fixes for ParserErrorCode.VAR_AND_TYPE
I think DartFixKind.REMOVE_VARwas already available.

This CL adds DartFixKind.REMOVE_TYPE_ANNOTATION support.

Bug: https://github.com/dart-lang/sdk/issues/51903
Change-Id: Ie582cc22fad038edb8b58c1f260afab1595fdcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295388
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 17:51:38 +00:00
Danny Tuppeny f4d42303ad [analysis_server] Handle completion in whitespace after string values
Fixes https://github.com/dart-lang/sdk/issues/52049.

Change-Id: Idf594cd528065939b49aa55acf362fe9d909e22a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295543
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 17:19:08 +00:00
Modestas Valauskas 70762f0de0 [ANTLR] Transform recursive definition of onParts to use iteration ...
Closes https://github.com/dart-lang/sdk/pull/51744

GitOrigin-RevId: 08a3bb98762275f10f6911f59b7cdf5ac1ae6c1d
Change-Id: Ib50f2361ca392554e9c632d7b780f83008bfbef7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288980
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2023-04-17 17:11:24 +00:00
Danny Tuppeny 453647022f [analysis_server] Don't fail on invalid/complex setters in LSP code completion
Fixes https://github.com/dart-lang/sdk/issues/52050.

Change-Id: I6cf5420d5e017b501481cb436a7d1b17f46c0e44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295542
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-17 17:11:03 +00:00
Konstantin Shcheglov a565638b91 Issue 51689. Report when 'super' is used as a standalone expression, not as a receiver of an invocation.
Bug: https://github.com/dart-lang/sdk/issues/51689
Change-Id: I1c9a407ff3b17034a18842484a28b0f9c82bcd83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295500
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 16:42:47 +00:00
Konstantin Shcheglov b78d89ce0c Fix DynamicTypeImpl to InterfaceTypeImpl cast exception in AddTypeAnnotation, when ambiguous SetOrMapLiteral.
Saw it in crash logs.

Change-Id: I631e4da816b689ec017f44ecd2a5dc70122ceec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295501
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-17 16:34:37 +00:00
Alexander Aprelev bd9c7a46e2 Roll zlib to 14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f
Bug: https://github.com/flutter/flutter/issues/124971
Change-Id: Ie4abdff9d3b32ba34a7b811080675e0e62905cf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-17 16:32:20 +00:00
Alexander Markov 18b5ecdfc9 [vm] Cleanup dead code around TypeArgumentClassFinder
TypeArgumentClassFinder.FindClass always returns null (because
non-null values are never stored to TypeArgumentClassFinder::klass_).

Consequently, code using TypeArgumentClassFinder
(TypeUsageInfo::PropagateTypeArguments) seems to be redundant and
can be removed, along with another utility class
TypeArgumentInstantiator.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try
Change-Id: I7bfc98e5c4d5b4d3effa639031ae4bd6dce25643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-04-17 16:26:35 +00:00
Sam Rawlins 9d4d48949c Add a top-level variable strict-inference test case
Fixes https://github.com/dart-lang/sdk/issues/38426

Change-Id: I31487b28f32df5109c1cf240d87ce828e718e76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-04-17 16:24:15 +00:00
Derek Xu 8df1b88877 [VM/Service] Create JSONBase64String class
TEST=CI

Change-Id: Ia14fcb1788a2685bef4fd61babfdd7089dd85a06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287801
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-04-17 15:58:28 +00:00
Derek Xu b4aa83b0b7 [VM/Service] Rename JSONStream::AppendSerializedObject to JSONStream::AppendBytes
TEST=CI

Change-Id: I2bb950c608716156e0dfe357a0fd481463b8d0dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287800
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-04-17 15:58:28 +00:00
Derek Xu 4cd9c9c666 Reland "[VM] Begin supporting Perfetto file recorder"
This is a reland of commit 7424295ce9

The differences between this reland and the original CL are: now the
Perfetto file recorder does not get built in PRODUCT builds, and it does
not get built unless the SUPPORT_PERFETTO macro is defined.

TEST=Recorded traces with the Perfetto file recorder and explored them
in Perfetto's trace viewer, CI

Original change's description:
> [VM] Begin supporting Perfetto file recorder
>
> This CL adds the `TimelineEventPerfettoFileRecorder` class, which is a
> timeline recorder that writes a trace to file in Perfetto's proto
> format. This CL supports the recording of all types of timeline events
> except flow events. Support for flow events will be added in a future
> CL.
>
> TEST=Recorded traces with the Perfetto file recorder and explored them
> in Perfetto's trace viewer, CI
>
> Change-Id: Iaa2051e536589a473c5e15f9de9bb9c251f13d38
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278942
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Derek Xu <derekx@google.com>

Change-Id: I8713f704b5fbeed5f1231012bce8a32aaf566ae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286020
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-04-17 14:42:50 +00:00
Daco Harkes fa3a72fa7e [cfe/ffi] Error on compound constructors
TEST=co19/LibTest/ffi/Struct/Struct_A02_t01
TEST=co19/LibTest/ffi/Union/Union_A03_t01
TEST=co19/LibTest/ffi/Union/Union_A03_t02
TEST=co19/LibTest/ffi/Union/Union_A03_t03
TEST=co19/LibTest/ffi/Union/Union_A04_t01

Closes: https://github.com/dart-lang/sdk/issues/46813
Change-Id: I2a057613a62eccc0de81083a6f63f8ba68430fc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293684
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-17 11:03:57 +00:00
Marya 6c7be24b24 Typo in future_iterable_extension_test
Closes https://github.com/dart-lang/sdk/pull/52042

GitOrigin-RevId: 7720eb33b7156a2b6f8b68d2da99de3c8b072f90
Change-Id: I9da87293b58cf7b1f93a754ce3e14dca033f4a8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295384
Reviewed-by: Michael Thomsen <mit@google.com>
2023-04-17 08:24:29 +00:00
Marya fa8197bea8 Typo in future_iterable_extension_test
Closes https://github.com/dart-lang/sdk/pull/52042

GitOrigin-RevId: 7720eb33b7156a2b6f8b68d2da99de3c8b072f90
Change-Id: Idfda8ac9555eb49e7df54c558e280d5f94119810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295385
Reviewed-by: Michael Thomsen <mit@google.com>
2023-04-17 08:20:14 +00:00
Nate Biggs 90d84c8494 [dart2js] Parameterize calls to get (non-)virtual type information.
Change-Id: Icd3aafc7290cd7dcdd74b6f50095ad5b096422e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295260
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-15 03:10:53 +00:00
Nate Biggs 8b01742d60 [dart2js] Fix linearization issues.
- For parameters of closurized members make sure to mark the virtual parameter as closurized where appropriate. Closurized parameters are treated as dynamic and this needs to propagate to all the virtual target's overrides. Previously only the concrete target was getting marked as closurized.

- For mixins defining an abstract member, foo, implementations of foo (either directly on the mixin target or superclasses of it) should propagate their types to the abstract foo as they are effectively overriding it. Calls to foo within the body of the mixin can only target the abstract foo with a virtual call. So that virtual target needs to reflect the types of all its overrides.

Tests have been added that capture both of these cases. The values here reflect the non-linearized algorithm but prior to these fixes the linearized algorithms showed a diff for both tests. After these changes there is no diff.

This fixes all failures referenced in b/277876666.

Change-Id: Icaca99cb6902c54f481eebdbb65cbd7cf81aa2c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294960
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-04-15 02:05:49 +00:00
Stephen Adams bfd71ad330 Test for yield* of Iterable with throwing get:iterator
DDC passes, dart2js and VM fail.

----

The dart2js and VM fringe-following scheme could be modified to call
`.iterator` at the `yield*` site and use the Iterator instead of the Iterable.
Calling `.iterator` at the `yield*` site  would move the exception to the right place. It might also present an optimization opportunity where  the call might be inlined, or the entry into the fringe-following algorithm could be made more efficient based on the type of the iterator.

Change-Id: Icfb6f7ca0b92cbeea1349ce138e469cfa707f571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295200
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-14 22:04:28 +00:00
Brian Wilkerson 2197c81060 Add documentation for data-driven fixes
Let me know if any of this is unclear or if there's missing information.
Of course, you might not know that until you start trying to enhance the
support, but we can also refine the doc when issues are discovered. I'm
mostly just interested in helping you get started.

Change-Id: Ib48a8ce46af7b6cc37a27508c81df03bfd2093e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295040
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-04-14 21:33:50 +00:00
Konstantin Shcheglov 36caf084b9 Issue 51953. Quick fix for ParserErrorCode.DEFAULT_IN_SWITCH_EXPRESSION
Bug: https://github.com/dart-lang/sdk/issues/51953
Change-Id: I21d7abdda8b7197cffb87a359c97f12e54cf427a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295390
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 21:15:18 +00:00
pq cae0bfa66f assist to destructure local record variable assignments
First, basic cut.

See: https://github.com/dart-lang/sdk/issues/52025

Change-Id: I3388f5ec96a45211669e3ac8a5975ff39feea4bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-04-14 21:04:20 +00:00
Keerti Parthasarathy 90c434254f Add support for patterns for Add type quick fix
Bug: 51866
Change-Id: Id38d0c8405931cad057ec3db1e0c0e3d297d7b4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-04-14 20:09:52 +00:00
Derek Xu fd607ba778 [Runtime] Add extra_product_deps and extra_nonproduct_deps params to "library_for_all_configs_with_compiler" template
These are params of the "library_for_all_configs" template, and I
believe they should also be params of
"library_for_all_configs_with_compiler".

Change-Id: I9fe959a98a9a1d0ebd2bea8f0959bcba4fc794ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295420
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-04-14 19:51:40 +00:00
Konstantin Shcheglov 0d6067232b Issue 51980. Reduce relevance of 'break' inside 'switch'.
Bug: https://github.com/dart-lang/sdk/issues/51980
Change-Id: Ic3a365c85a36a18739b20482c8c7c136210b12b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295387
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-14 19:37:38 +00:00
Brian Wilkerson 5f2d9cf41f A cursor at the end of a file should be inside the compilation unit
Change-Id: I68ff9337af9a416f18573e500a10eec1194adeaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295400
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 19:04:48 +00:00
Derek Xu c454945915 [Runtime] Include extra_nonproduct_deps instead of extra_product_deps in debug builds
The "dart_maybe_product_config" and "dart_product_config" configs in
runtime/BUILD.gn have logic to avoid building PRODUCT artifacts in debug builds.
"library_for_all_configs" should account for this and include
extra_nonproduct_deps in debug builds even when conf.is_product is true.

Change-Id: I98a6e35fcb6f90b751d2c98f35c70ded04990b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295120
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-14 18:45:40 +00:00
Konstantin Shcheglov 1925041a31 Issue 52019. Late instance field is not a static context.
Bug: https://github.com/dart-lang/sdk/issues/52019
Change-Id: I6416a2e65c93b08ad145c2e64129873ae414ccfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 17:58:24 +00:00
Janice Collins 1abf129bf8 Enable crash reporting via the unified_analytics consent mechanism.
This pulls in the `okToSend` method from https://github.com/dart-lang/tools/pull/79 in the tools repository.

Bug: https://github.com/dart-lang/sdk/issues/28633
Change-Id: I512d041750050338699d3635ba426cc0acdd5a20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2023-04-14 17:29:28 +00:00
Konstantin Shcheglov 9a6b637444 Issue 51989. Add 'Convert to switch statement' assist.
Bug: https://github.com/dart-lang/sdk/issues/51989
Change-Id: I297cbc077604d0c750dc0d78d8480b33852f3a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295201
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-14 17:19:25 +00:00
Jackson Gardner 3015fd34fd [dart2wasm] Allow the user to specify the path of the js runtime file.
Change-Id: Iceb0428f70c77d34daa675e199abf670542babb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295220
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2023-04-14 16:51:18 +00:00
William Hesse 9466e8d53d [infra] Fix version ordering in release scripts
The prerelease_patch number was being compared before the prerelease
number in the version comparison.

Change-Id: I77cc46d07912ffdbe321ee9d855f928452572a5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-04-14 12:27:01 +00:00
Sergey G. Grekhov b5ac2821e0 [co19] Roll co19 to c01fbd751c060650b6582523a7751b83777026c3
2023-04-11 sgrekhov22@gmail.com dart-lang/co19#1401. Exhaustiveness tests fixed and new ones added (dart-lang/co19#2019)
2023-04-11 sgrekhov22@gmail.com Fixes dart-lang/co19#2006. `Pointer` can have top types as type arguments (dart-lang/co19#2013)
2023-04-11 sgrekhov22@gmail.com Fixes dart-lang/co19#2010. Fix exhaustiveness tests for a cast-pattern (dart-lang/co19#2018)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2004. Update expected errors locations for CFE (dart-lang/co19#2011)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2005. DynamicLibrary.process() is supported on Windows (dart-lang/co19#2012)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2007. Fix UintPtr_A01_t01.dart not to fail on 32-bit platforms (dart-lang/co19#2014)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2008. Split pattern_context_A01_t01.dart test to multiple methods (dart-lang/co19#2015)
2023-04-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2009. Update scope_A01_t01.dart according to the current CFE behavior (dart-lang/co19#2016)

Change-Id: I5b43a5c5f133dded30564749b38f6a0c965b62fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295281
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-14 10:39:01 +00:00
Ryan Macnak 26f235faf5 [vm] Don't hold function.CurrentCode across the Dart entry safepoint transition.
Also remove edge cases now that constant evaluation does not invoke generated Dart code.

TEST=none
Bug: https://github.com/dart-lang/sdk/issues/52035
Change-Id: Ia6cd733e10dbba2b6f480308d6225c210ea100b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295103
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-14 03:09:39 +00:00
Ryan Macnak d6abb7b89a [vm, gc] Fix scavenger deleting heap sampler entries for collected objects.
TEST=lsan
Bug: https://github.com/dart-lang/sdk/issues/52029
Change-Id: I4ea03a4b5cead076547423ff5dedc4b988e5111d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295160
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-13 23:17:47 +00:00