This flag used to be used for field promotion (to ensure that lowered
late fields are promotable, provided that they are private and final
and don't have a name that conflicts with something else
non-promotable). However, as of
https://dart-review.googlesource.com/c/sdk/+/330168, the logic for
determining when a Procedure is promotable now operates solely by
checking for all the conditions that prevent promotability. Lowered
late fields are now promotable because there is no reason for them not
to be.
Change-Id: I15982acef6fe8c46334fb859306bca1417a2ca64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331207
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
If the user attempts to promote a property, and their language version
does not permit field promotion, the "why not promoted" logic now
checks whether the language version is the sole reason for the failure
in property promotion. In other words, it checks whether the property
would have been promotable *if* field promotion had been enabled. If
it would, then the context message displayed to the user explains that
the property did not promote because field promotion is not supported
by the current language version.
However, if there is some secondary reason why the property failed to
promote (in other words, if the property would not have been
promotable even if field promotion had been enabled), then the context
message now favors the secondary reason.
Rationale: imagine a user is maintaining a package that doesn't yet
support SDK version 3.2, and that package contains some property
that's non-promotable both because the language version is prior to
3.2 *and* for some other reason (e.g., because the property isn't a
private field). It would be quite frustrating if the user saw a
context message suggesting that the property would be promotable in
SDK 3.2, and then went to a lot of effort to bump their minimum SDK
version, only to discover *after* the bump that the property is still
not promotable.
In the process of making this change, I discovered that the CFE
doesn't support field promotion in patch files. This is because patch
files aren't listed in `SourceLoader.sourceLibraryBuilders`, so the
logic in the `FieldPromotability` is never invoked for those
files. Since patch files are an artifact of SDK development, and will
never be used by end users, it doesn't seem worth going to extra
effort to add this support. However, I've taken care to make sure that
the "why not promoted" logic recovers gracefully in patch files (by
simply not generating a context message).
Change-Id: I6c0d1c0f4b8a7690f6f775408cb5e857b2dd7b03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330241
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Also if converting an unboxed int with only non-negative values
that fit in 32 bits to a uint32, then keep the range from the value.
TEST=regress_306327173_il_test
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try
Change-Id: Id9e7c2d5f477e560822a02574739c57d77b5a6d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332202
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Run the seal_native_object.js preamble before any other code when
trying to benchmark dart2js compiled code.
Change-Id: Iec95dd3189869738185bce34f5202be4db0b90f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330669
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
These tests had bugs intronduced during the the null-safety test
migration. Surprisingly the failures didn't show up on some
configurations because the tests were previosly not using the
async-helper wrapper. As a result, the test was logged as completed and
passing before it was done executing. Together this was the cause why
these tests failed in d8 and flaked in firefox.
This CL fixes both issues. A few notes:
* web_2 tests didn't have bugs, but this CL also adds asyncHelper to
match
* it's quite possible that many of these `is` tests are optimized away
in dart2js. I added a couple `confuse` calls when the trivial tests
were highlighted by the analyzer directly (not based on whether or not
dart2js optimized them away).
Change-Id: I8f58c0b0b850023764524f57201eada89a5c0d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332062
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This create a stub for combined member signatures from multiple
inherited non-extension type members and adds these to the
extension type declaration.
A sealed [TypeDeclaration] superclass is added to [Class] and
[ExtensionTypeDeclaration] to support accessing the enclosing type
declaration from a [Member].
TEST=existing
Change-Id: Ic01535d27a14187d37b00868e7e90fe73558b051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331181
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
This change includes:
- Removal of deprecated methods and constants
- Removal of dependency on package:expect for testing, instead copying
over the minimal amount of functionality needed for testing from
package:expect into pkg/vm_service/test/common/expect.dart
- Removal of classes and interfaces that are now found in
package:vm_service_interface
Change-Id: I21c2d228e615f97e64dd98b6512bf2e533916454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331760
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The new Secure Page Table Monitor in iOS on A15 and A16 does not allow
`vm_remap`ping memory pages that are manually created. It only allows
remapping pages which come directly from a signed binary.
Manually copying the pages is supported in JIT mode.
TEST=manually tested locally in a local-engine build
Bug: https://github.com/flutter/flutter/issues/136980
Change-Id: I94d87f753a50648486f46fe728dd8358038971fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332241
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Before, converting a Uint32 to a Int32 would just clamp the range
to be within the possible Int32 range. However, that's not what the
IntConverterInstr represents in this case: in this case, it's just
a reinterpretation of the bits as signed instead of unsigned.
For simplicity's sake, the initial fix for this is to keep the range
[x, y] if it is 0 <= x <= y <= kMaxInt32, and otherwise just use
the full Int32 range.
Also add a version of Range::Full that takes a Representation instead
of a RangeSize, so that the ranges for unsigned unboxed ints can be
made more precise. Previously, they'd be overapproximated by the next
largest signed representation instead.
Also check that we're never trying to create a range for x->untagged,
and that untagged->x just uses the full range for x.
TEST=vm/dart/regress_306327173_il_test
Fixes: b/306327173
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try
Change-Id: Ic60d24be016844deda56ee477a6950a315b8506f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332040
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
The first test being compiled on a batch compiler pays for the cost of
the batch compiler startup, meaning it is more likely to time out, e.g.
see https://github.com/dart-lang/sdk/issues/53672.
E.g via
`tools/test.py '--progress=status' --report --time --write-results --write-logs --clean-exit -ncfe-strong-linux service/next_...`
I get output like this:
```
0:00:37.713771 - fasta - fasta-none release_x64/service/next_through_simple_linear_test/service
0:00:37.682524 - fasta - fasta-none release_x64/service/next_through_for_loop_with_break_and_continue_test/dds
0:00:36.805734 - fasta - fasta-none release_x64/service/next_through_create_list_and_map_test/service
0:00:36.589329 - fasta - fasta-none release_x64/service/next_through_simple_linear_2_test/dds
0:00:36.586428 - fasta - fasta-none release_x64/service/next_through_simple_linear_2_test/service
0:00:36.518832 - fasta - fasta-none release_x64/service/next_through_for_each_loop_test/dds
0:00:36.407107 - fasta - fasta-none release_x64/service/next_through_create_list_and_map_test/dds
0:00:36.259945 - fasta - fasta-none release_x64/service/next_through_for_each_loop_test/service
0:00:36.211573 - fasta - fasta-none release_x64/service/next_through_call_on_field_in_class_test/service
0:00:36.189456 - fasta - fasta-none release_x64/service/next_through_call_on_field_in_class_test/dds
0:00:35.974007 - fasta - fasta-none release_x64/service/next_through_for_loop_with_break_and_continue_test/service
0:00:35.921138 - fasta - fasta-none release_x64/service/next_through_simple_linear_test/dds
0:00:09.690812 - fasta - fasta-none release_x64/service/next_through_multi_catch_test/service
0:00:09.562068 - fasta - fasta-none release_x64/service/async_next_test/service
0:00:09.530882 - fasta - fasta-none release_x64/service/next_through_operator_bracket_test/dds
0:00:09.407169 - fasta - fasta-none release_x64/service/next_through_function_expression_test/dds
0:00:09.366673 - fasta - fasta-none release_x64/service/next_through_multi_catch_test/dds
0:00:09.327895 - fasta - fasta-none release_x64/service/next_through_function_expression_test/service
0:00:09.303926 - fasta - fasta-none release_x64/service/next_through_await_for_test/service
0:00:09.236295 - fasta - fasta-none release_x64/service/next_through_simple_async_with_returns_test/dds
```
where the first 12 (the really slow ones) each is the first test being
run on that particular batch compiler, where they both pay for the
startup cost of the batch compiler (~12 seconds on my machine when
launching 12 simultaneously which is the default on my machine -- it's
probably more on the bots) and for the jit not having warmed up yet:
E.g. the first test compiles in ~22 seconds, the second in ~9 seconds,
the third in ~6 seconds on my machine (again with 12 simultaneous runs).
To make it less likely that the first compile times out this CL adds
some extra time allowance for the first run after the bulk compiler is
started. For now it's 30 seconds, but it can be adjusted if needed.
Longer term we should probably start a batch compilation test by
aot-compilng the batch compiler (which, at least currently,
doesn't support asserts
(https://github.com/dart-lang/sdk/issues/53343)
which is unfortunate).
I'll leave that for a future CL.
Bug: https://github.com/dart-lang/sdk/issues/53672
Change-Id: Id3427223c46c1e7a34b401097a3f7d5f1321ad93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332220
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
After further review the slight increase in memory usage is minimal and worth the improvement in runtime for each phase.
The new indices follow the same format as before, we assign each entity an index when it is registered into the entity map. However these new indices are only used by the entity maps and not as part of the serialization format for those entities. The index only exists to make look ups faster in the "map". As such, I've made the field private to prevent/discourage outside use of it.
Change-Id: I7a7c20a2dd51b01d2390bb4401545821a1014832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331360
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
This instance of service_extension_router has been hooked into DDS seperately. The vm_service and DDS tests still worked with the integration.
There will still be some iteration and discussion to be had, but I'd like to get this up as the initial version.
Bug: https://github.com/dart-lang/sdk/issues/53300
Change-Id: Ic72b770a61b2fc61fbd7c4b47ff8996a90f78665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
New option will only include diffs in the "main" output unit for the provided builds. Only sub-library entities have an output unit. Libraries do not have an output unit because there is no code associated with the library itself and a single library's contents can be spread across multiple output units.
Mutually exclusive with the 'package-only' flag because that one only prints libraries and 'main-only' includes no libraries.
Change-Id: I4d5abe54daa8e09d892dd2e2fc2b840f0705ad86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`.
dartdoc (f7e9b17..53da3e1):
53da3e1d 2023-10-23 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#3544)
62d5469d 2023-10-23 Sam Rawlins Support extension types in sidebars and categories (#3537)
69abd0f0 2023-10-22 Sam Rawlins Refactor file-gathering logic (#3539)
e9c61d1d 2023-10-22 Sam Rawlins Convert some late final fields to getters in Accessor, Annotation, Constructor (#3534)
adcdc8b7 2023-10-20 Parker Lougheed Update package:lints to v3 (#3542)
41f02622 2023-10-19 Sam Rawlins Greatly simplify ModelCommentReference (#3541)
50e4b679 2023-10-19 Sam Rawlins Remove use of NodeLocator2 (#3538)
b2de813c 2023-10-19 Sam Rawlins Remove support for deprecated leading new in comment references (#3529)
b350c688 2023-10-19 Sam Rawlins Bump to 7.0.1 (#3540)
5256e2fb 2023-10-19 Sam Rawlins Remove unused warnings (#3533)
lints (975c687..2cf8403):
2cf8403 2023-10-23 Devon Carew add no_wildcard_variable_uses; rev to a new major version (#165)
7b0f556 2023-10-23 Parker Lougheed Remove mention of no_wildcard_variable_uses from changelog (#164)
matcher (356e5f6..7512f80):
7512f80 2023-10-23 Michael Goderbauer Specify language in neverCalled docs for nicer formatting in docs (#230)
protobuf (050c162..3528fad):
3528fad 2023-10-24 Ömer Sinan Ağacan Use `setRange` when copying output chunks to the final buffer in `CodedBufferWriter` (#887)
tools (15cc9c7..da6bb18):
da6bb18 2023-10-24 Elias Yishak Enum + event constructors added for doctor events (#178)
e3dd149 2023-10-24 Elias Yishak Use futures list internally to manage send events (#184)
webdev (1bd434b..6e324af):
6e324afb 2023-10-24 Ben Konyi Add dependency on `package:vm_service_interface` (#2262)
8429a79f 2023-10-20 Elliott Brooks Only notify chatroom when daily stable testing fails (#2259)
3463d169 2023-10-19 Elliott Brooks Remove Chrome 115 extension error (#2258)
fdebc06e 2023-10-19 Elliott Brooks Reset Webdev to 3.2.0-wip after release (#2260)
9cffb896 2023-10-19 Elliott Brooks Reset DWDS to 22.1.0-wip after release (#2256)
07c70c6c 2023-10-19 Elliott Brooks Prepare Webdev for release to 3.1.0 (#2255)
Change-Id: Ieae3aadcc804a270867d7935b702987cf1f6d51c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332060
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Flow analysis has improved and issue #40041 is resolved. These
`FutureOr<T>` conditionals are promoting to `Future<T>` or `T` and no
longer need an explicit cast.
R=lrn@google.com
Change-Id: I925db6d7f52aad54c88434ff02e1d0ae4e72278b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331206
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Both VM and DWDS populate isGetter now so we don't need to check this internal field.
There are existing tests verifying this behaviour.
Change-Id: Ia0f0d74167c718ec66a692523c1f255d63eed654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330784
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This adds a check that scripts exist before we create a sourceReference to assume we can download them.
I don't have a good way to test this (in the Dart SDK) because this never happens for Dart - we can always download the scripts. However this code is triggered in Flutter because of https://github.com/flutter/flutter/issues/128880 - we can't find the source so we will try to set it up for downloading.
Fixing that would avoid the need for this change (and make the behaviour more consistent with Dart), but in the meantime I think it's better that we don't produce sourceReferences for sources that don't exist.
Change-Id: I4de3f6e87fe3ff867a1ff7e6d3a5d79f7bf9fa1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330780
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
I know this is just an unpublished tool, but enabling the expanded analysis at least makes the development experience consistent with other packages within `/pkg`.
Change-Id: Id4daf75cf37042662e3ab3c75dc4c4f856fd4099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329864
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
During this test, sometimes the refactor would complete before the overlay modification was processed, which means we don't get the expected failure response.
This isn't a server bug because the results are still consistent (and clients should discard any responses if a file was modified since the request was sent). This test was to ensure we handled the obvious cases of this in case the client did not handle it.
The fix is to artificially slow down the refactor to ensure the overlay change has time to execute before we check for consistency at the end.
Change-Id: I5697a73d7ca6dd7115dc6c0e87b8a93ba3cd533b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Bug: b/296994239
Change-Id: I179cc7729846885ee952d26082a1e615a46a30b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331923
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This test has flaked on our CI but actually it's consistently failing
because we do not represent `typedef`s in a reflective way in the VM
since switching to kernel (because they used to be desguared on kernel
level).
So this has not been working for a long time, let's remove this test.
Issue https://github.com/dart-lang/sdk/issues/44489
Change-Id: I36e8d8aee7a7736e8afc5741b01d10429ac0d7a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331941
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>