This change generalizes no_such_method_restriction_stack_trace_test so
that it recognizes all circumstances where there is stack obfuscation
(not just Javascript builds).
Fixes test failures on `vm-kernel-precomp-obfuscate-linux-release-x64` bot.
Fixes#50074
Bug: https://github.com/dart-lang/sdk/issues/50074
Change-Id: I53f3eaa6ae3cf3585b3d4c492d80dd1e72ca216b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261621
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
And all the other things it didn't mention.
And update the `==` documentation too.
Change-Id: Iccd4b046b0632db788e44b02799d1f8d5541d766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260881
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
This fixes a few minor issues:
- Setting a new selection position did not remove a previously set selection range (which could result in a mismatched offset/length due to how the resulting change merges the position/range)
- Setting a new selection range did not update a previously set selection position
- Inserting new changes before a change that sets a selection range only updated the selection position, not selection range
- Setting a selection range/position after another change that inserts only updated the selection position to compensate and not the selection range
These issues led to cases where selection ranges could be incorrect, or even overlap with linked edit groups that could cause errors that caused code action requests to fail.
Fixes https://github.com/Dart-Code/Dart-Code/issues/4184
Change-Id: I43e2a8361c97b2eccb2d6b426a75eda5cc811e06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261682
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This adds a test for the dartdoc "See code in examples/api..." navigation in the analysis_plugin, and changes things so that it doesn't walk the directory tree to find the examples directory more than once per compilation unit.
Change-Id: I1938396b160ca2d21b08214f79fb1c7ddbf6a388
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Greg Spencer <gspencer@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Make a constant lazy if it involves creating a list that is too long
for the `array.new_fixed` instruction, or, for composite constants, if
one or more of its sub-constants are lazy.
Also read lazy string constants directly from a data segment instead
of writing them to linear memory first.
Change-Id: Iea26460580e6134cd3e26eaaa84cb0dde09016dd
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261402
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
We shouldn't fail ("Future already completed") if the timing allows multiple errors from the bad input to arrive during the test run.
Change-Id: I358b8401b865c22d5808c22e463dea0e6416f6ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261602
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
This change restores `parseParenthesizedExpressionOrRecordLiteral`,
`parseArguments`, and `parseArgumentsRest` to the way they looked
prior to adding parser support, and instead adds new methods
`parseParenthesizedPatternOrRecordPattern` and
`parseExtractorPatternRest` that are specialized for patterns parsing.
Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I104e031a796ef7f217cd427e1a9ae94a04dafa7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261620
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Make `dart compile exe -v` forward gen_snapshot output in
verbose mode.
Fix --write_code_comments_as_synthetic_source_to=... flag. There
was a change to Dwarf writer API which broke it.
Motivated by https://github.com/dart-lang/sdk/issues/50059
TEST=manually
Change-Id: I0431925f724a9b24e938bdb9d7ae1019143da83a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261360
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Using ring (or other similar types) of recorders in PRODUCT
does not make sense because you can't extract the information
they record without vm-service. Additionally "ring" (default
recorder type) preallocates ~4Mb of memory to store the data.
This CL adds a "none" recorder which simply drops all data
and has no memory overhead and makes this default recorder
in PRODUCT.
We also change code to only allow none, callback, systrace
and file recorders in PRODUCT.
TEST=manually
Bug: b/237989929
Change-Id: I52d6ff8bf766e8fa0969eab0bf2adc45dd9a57c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261320
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
- Prep work for non-moving promotion.
- The generations still have different alignment offsets.
- Old-space pages now participate in the page cache.
- Fix boolean/null bit tricks to assert the right requirements on the alignment of a page's first object.
TEST=ci
Change-Id: I4369d8c6af73228e162c226d411914868bafed33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260401
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
If a concrete class implements an interface containing a name that's
private to a different library, any attempt to invoke that name will
result in an exception getting thrown. Previously, such attempts
would result in the call being diverted to noSuchMethod.
This change closes a loophole in Dart's privacy system, and paves the way for
a future implementation of promotion for private final fields (see
https://github.com/dart-lang/language/issues/2020).
Bug: https://github.com/dart-lang/sdk/issues/49687
Change-Id: Ie55805e0fc77dc39713761a80a42c28bd0504722
Tested: language tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255640
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
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>
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>
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>
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>
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>
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>