Commit graph

91207 commits

Author SHA1 Message Date
Brian Quinlan db491eb671 Set minimum mac SDK version to 10.14
Bug: https://github.com/dart-lang/sdk/issues/47820
Change-Id: I42310999303d1849aaedd800e4222e6863870fc5
Tested: Build-only change - tested with flutter engine build
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295389
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-04-18 19:55:03 +00:00
Derek Xu 6011ba67b3 Reland "Reland "[VM] Begin supporting Perfetto file recorder""
This is a reland of commit 4cd9c9c666

This will be relanded without changes because we discussed the .proto
definition package name clashing problem with the Dart in google3 team,
and we have decided that the best solution is to ignore the checked in
.proto files in google3 builds.

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

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: Ia97ef1f0fe73e76c7022623b9ae7e21a4ea73a46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295804
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-04-18 19:39:05 +00:00
Sam Rawlins 008ef8c1a9 Bump linter
Change-Id: If108d01736a6fb7a07e4c894752934ea9fc952bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295802
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-04-18 19:25:48 +00:00
Ryan Macnak 30518b205d [infra] Copy llvm to shards, which is the target of the llvm-strip symlink.
Bug: https://github.com/dart-lang/sdk/issues/52010
Change-Id: I44d81ebb2f9e3db5ed86e560f7b043bd26804bf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295747
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-18 18:33:10 +00:00
Ryan Macnak b6adf9ff6a [vm] Remove dead current_sp from Dart entry.
This was part of an older mechanism that set the checked stack limit based on the SP values we had seen so far. Today we query the exact stack boundaries on all platforms.

TEST=ci
Change-Id: I5692d97b5d4f9104ee9796de7406eb5f050ac276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295745
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-04-18 18:31:15 +00:00
Joshua Litt c4167766f2 [js] Restrict imports in strict mode.
Change-Id: I90cdf408e60cf8115c6321448623cf363dc92f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292960
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-04-18 17:21:27 +00:00
Sam Rawlins 25348fb95c [analyzer] Move 2 more HintCodes to be WarningCodes, UNNECESSARY_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Iddcb1b6d035e9590600e6bfbd8d2133da39bcc35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295803
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-04-18 16:55:30 +00:00
Ryan Macnak 9d834197bb [vm] Guard against invoking Dart code during AOT compilation.
TEST=ci
Change-Id: Idf213c57ad3d227738958c53e1d5b55d11477f1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295743
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-04-18 16:53:44 +00:00
Jake Macdonald cb4c9c74de Add support for mixin declarations in the macro APIs
Adds MixinDeclaration/IntrospectableMixinDeclaration for introspection.

Adds MixinTypesMacro/MixinDeclarationsMacro/MixinDefinitionsMacro macro
interfaces.

Updates supporting serialization/execution code and tests.

Change-Id: I57245fe7d177b6d5ba57649455fbd844ba1f85c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294380
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2023-04-18 16:04:00 +00:00
Paul Berry cc4eb93b11 Add dependency overrides for pkg/front_end
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: I7629375f0ba4b07cd9ccdbb69f243d8eb0aa555a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295660
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-04-18 12:01:51 +00:00
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