With this change it takes 150s vs. 220s without it.
Change-Id: I7097052a2520ba9b90da79c9263673dbc0a5705f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290345
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Upcoming changes to the analyzer will result in compilation errors
in dartdoc without this change.
Change-Id: Ie80724fcfa6bc2b6fdfff3d851806669f9c20329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290401
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This is useful to systrace release mode applications on iOS. With this change and with systrace disabled, the `TimelineEventNopRecorder` is used so there should not be any performance impact.
See also the following bug where this was done for Android.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/47264
Change-Id: If3d127054d6345213fe0ade827dd60f7904a99a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289925
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Jia Hao Goh <jiahaog@google.com>
Test that all subtypes of classes marked base/final are required to be
base/final/sealed, and that base/final classes may not be implemented
outside of their own library. Also test restrictions on sealed and
interface classes.
Change-Id: I15314a34b684bbec5a16b8ae228ca7de08f8498a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290100
Reviewed-by: Erik Ernst <eernst@google.com>
Cascading @visibleForTemplate to class members and enum constants.
TEST=invalid_use_of_visible_for_template_member_test.dart
Change-Id: Ic79010e777626ff2b9bca7cdbcf4f9fb679e4456
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287671
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Ludi Zhan <ludizhan@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This has two changes:
- Hide "--fix" in the help. The command is still fully supported, we
just don't show it because we want to gradually migrate users to
"dart fix".
- Remove support for the "interface", "final", and "sealed" modifiers
on mixin declarations, since the proposal no longer supports those
(and we need to remove them from the analyzer AST API).
There are no meaningful style changes, so there's no need to update the
pre-build SDK for this change.
Change-Id: I2357970e298a9be8f6f26efb5b922d40ee4fbb7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290020
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
E.g., x64 Linux building a gen_snapshot that runs on an ARM Linux machine and targets Fuchsia x64.
TEST=ci
Change-Id: Id17a74d053a75c5e71c13cfe444374b638970e8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289342
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This is a reland of commit 1755f89092
Can land after (or with) the Flutter PR:
https://github.com/flutter/engine/pull/40434
Original change's description:
> [vm/ffi] Add class modifiers
>
> Adds class modifiers to `dart:ffi`.
>
> Migrates all user-defined subclasses of `Struct`, `Union`, `Opaque`,
> and `AbiSpecificInteger` to be `final class`es.
>
> Does not remove the manual error checking, so some errors will show up
> twice now in language version 3.0. In language version <3.0, only the
> FFI-specific error will show up.
>
> In a follow-up CL, we will try to make the language-errors to show up
> also <3.0 so that we can remove the FFI-specific errors.
>
> Examples of duplicated errors:
> pkg/analyzer/test/src/diagnostics/subtype_of_ffi_class_test.dart
>
> TEST=pkg/analyzer/test/ (for the analyzer)
> TEST=pkg/front_end/testcases/ (for the CFE)
> TEST=test/ffi/ (for the VM)
>
> CoreLibraryReviewExempt: No need for dart2js to review.
> Bug: https://github.com/dart-lang/sdk/issues/51683
> Change-Id: I2964ceccb7db59fbdaf6be5319f5e4ec2dabe0f3
> Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289223
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Devon Carew <devoncarew@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
TEST=pkg/analyzer/test/ (for the analyzer)
TEST=pkg/front_end/testcases/ (for the CFE)
TEST=test/ffi/ (for the VM)
CoreLibraryReviewExempt: No need for dart2js to review.
Bug: https://github.com/dart-lang/sdk/issues/51683
Change-Id: I2ee3f0ac31d4162068a2346a06320029b2263ee2
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-win-release-try,pkg-mac-release-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-reload-rollback-linux-debug-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289781
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This has been allowed since 06ab0148b6.
Change-Id: Ibd202c7ed93dc147ead4fb58030c44f0a00ab352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289900
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This reverts commit 171744589a.
Reason for revert:
Flutter engine hasn't rolled into g3 yet. We need to wait
for it to roll into g3 to bring [0] in - after which
running flutter from source in g3 no longer tries to
use this _registerServiceExtension entrypoint.
[0] e07fb9b5dd
Original change's description:
> [vm] Mark _registerServiceExtension entrypoint conditional on being non-product mode
>
> The runtime should only call this in non-product mode, we should be able
> to tree shake it in product mode.
>
> TEST=ci
>
> Change-Id: Ic8628b1e239f123894efc5a79253b8d6a9b56a73
> CoreLibraryReviewExempt: Doesn't change API
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289780
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
Change-Id: If1342a51f2491cf81cd69fbc1de0b4549b1d8b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290067
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
The Windows builder analyzer-win-release is waiting for shards
to complete after running the analysis server benchmarks, so we
can run the benchmarks twice to get more better results.
Bug: b/74375756
Change-Id: I03f459aece293a7e0b0eed3f4c52c037e2d9641c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290061
Reviewed-by: Alexander Thomas <athom@google.com>
This reverts commit e34165c543.
Also reverts commit 39ecf5f9d2
Reason for revert: breaks internal testing: b/274563167
Original change's description:
> Reland "[io] Improve the performance of the IOSink returned by `openWrite` by writing eagerly and accumulating small writes."
>
> This is a reland of commit c2bdda63f5
>
> Original change's description:
> > [io] Improve the performance of the IOSink returned by `openWrite` by writing eagerly and accumulating small writes.
Bug: b/274563167
Change-Id: I551c92a5fe121c85999f8a6ec513f83481ae2dbd
CoreLibraryReviewExempt: Revert
Tested: Revert
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290064
Auto-Submit: William Hesse <whesse@google.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Includes a fix for matched value type being invalid, encountered
during development.
Closes#51770
Change-Id: I0c960eaef528f16789e8d9a42340e50f05326cf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289602
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
I have not yet run the analyzer's generators just to keep the generated
version of the changes out of the review.
There are 10 parser diagnostics that are not being documented:
- ParserErrorCode.INVALID_CONSTANT_CONST_PREFIX
- ParserErrorCode.INVALID_CONSTANT_PATTERN_BINARY
- ParserErrorCode.INVALID_CONSTANT_PATTERN_DUPLICATE_CONST
- ParserErrorCode.INVALID_CONSTANT_PATTERN_EMPTY_RECORD_LITERAL
- ParserErrorCode.INVALID_CONSTANT_PATTERN_GENERIC
- ParserErrorCode.INVALID_CONSTANT_PATTERN_NEGATION
- ParserErrorCode.INVALID_CONSTANT_PATTERN_UNARY
- ParserErrorCode.FINAL_MIXIN_CLASS
- ParserErrorCode.INTERFACE_MIXIN_CLASS
- ParserErrorCode.SEALED_MIXIN_CLASS
Let me know if you think any of those need documentation.
Change-Id: I904ecaeb07383fedcdc5c7c286f36d635ed8684e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286524
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Merge conflict not caught by the trybot.
Change-Id: I41e419fb79e40a5ee1954e8e2e0b51dc63cd15da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289905
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Changed the classes to store induced modifiers on `isBase`, `isFinal`, and `isInterface`. If one of these getters are true and `isSealed` is true, then we assume it's an induced modifier. (Since a class or mixin cannot be both sealed and another modifier).
There's a subtle change here where the induced modifiers are only marked on sealed classes which means that classes that subclass/subtype non-sealed classes won't get any base or final errors. This will also affect how lints will be reported -- at the next erroneous subtype and not downstream from that type.
Also, the context messages now point to the class with the explicit modifier inciting the error.
Bug: #51671
Change-Id: I4c7541d956382dcb3917a4b8d73756840880c52f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289406
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
This field is no longer used; the SSA node for the scrutinee is now
looked up using the scrutinee's promotion key.
Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: I67768fa1311cecf62508844d3074758fbf55b426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287941
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>