I'm not sure if the output truncation was ever practically useful. But
it causes problems now that we have a CFE test that wants to validate
that the CFE can produce many errors in one go.
I thought about allowing a test to extend the truncation size, but I
figured the simplest fix was to just not truncate at all and make the
test runner a little simpler. Also did a little clean up on this
ancient code while I was at it.
Fix#44493.
Change-Id: Ie678c80e7114e0fb7f68931335075e3d319fb53a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178940
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This change removes code duplication between
LoadIndexedInstr::representation() and
StoreIndexedInstr::RequiredInputRepresentation(), multiplied by 4
target architectures.
This change also removes duplicated logic from FFI load and store
intrinsics.
TEST=ci
Change-Id: I9f10cc8c70288ecaea33a337a880c181ecbfcd6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194281
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Adds a convenience getter to ServiceProtocolInfo which transforms the VM
Service HTTP URI into a valid web socket URI that can be used to connect
to the VM service.
Fixes https://github.com/dart-lang/sdk/issues/42968.
TEST=runtime/observatory/tests/service/developer_server_control_test.dart
Change-Id: Ib15de1f1a9b26ac5cf45f55a53014761a6fa7900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194209
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Also changes the default to bundling rather than interleaving fragments.
Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
In for instance https://dart-review.googlesource.com/c/sdk/+/193961/5
we had an instance of something good happening (a crashing-ish test
that started to pass) but where the author was told no (red bot) and
not given a path to make the bot happy (bad messaging).
Specifically tests failed and the best log one got was
```
To re-run this test, run:
dart pkg/front_end/test/unit_test_suites.dart -p pkg/front_end/test/fasta/textual_outline/general/constants/js_semantics/issue45376
```
which isn't very helpful.
If running it locally a little more information is given via stdout,
but having to do that isn't great (and the little extra information
still wasn't great).
This CL updates the messaging to - hopefully - give a path to make the
bot happy. The messaging will now - directly from the log
on the bot - be
```
FAILED: pkg/front_end/test/fasta/textual_outline/general/constants/js_semantics/issue45376: Pass
To re-run this test, run:
dart pkg/front_end/test/unit_test_suites.dart -p pkg/front_end/test/fasta/textual_outline/general/constants/js_semantics/issue45376
The test passed, but wasn't expected to. You should update the status file for this test.
There's a status entry looking something like
general/constants/js_semantics/issue45376: FormatterCrash
which should be removed.
The status file is file:///[wherever]/sdk/pkg/front_end/testcases/textual_outline.status.
```
which
a) gives the extra information previously only available via stdout when
running locally (the first line).
b) Gives an explanation as to why it failed
("The test passed, but wasn't expected to.").
c) A path to make the bot green ("You should update the status file for
this test. [...] should be removed").
Hopefully this will make it easier to deal with in the future when
something good happens.
Change-Id: I838699abce580334c956d8b4753884fd600802ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194242
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is a reland of bc6cdf54fd
Original change's description:
> Flow analysis: track property get targets.
>
> These targets are needed for "why not promoted" error messages, and
> it's easier to have flow analysis keep track of them than to have the
> analyzer and CFE try to reconstruct them at the time of reporting the
> error.
>
> Bug: https://github.com/dart-lang/sdk/issues/44898
> Change-Id: Ia8ef4a7ce13cc30860e59b7369e6230d233e252d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193832
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: Ib5e6a0eafb381f3a9c8770c6c1c3e55581e44b01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194105
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: William Hesse <whesse@google.com>
A constant was renamed to conform to the style guide, and that made it
have the same name as a local variable, and it was shadowed inside that function.
Rename another constant while we're here.
Fixes#45432.
Bug: http://dartbug.com/45432
Change-Id: Ie7e83bb77fea25a93a006bde78431ec35007a82a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192920
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This CL enables tree shaking of `Struct` sub classes by simulating the
native behavior in Dart code.
We call the struct constructors in let expressions where FFI trampolines
are created which allocate these struct objects in native code. This way
TFA is instructed about the native behavior. The VM recognizes these
constructor calls as dead code and removes them.
For more info see go/dart-ffi-struct-treeshaking.
Closes: https://github.com/dart-lang/sdk/issues/38721
This CL fixes the types on the generated #fromTypedDataBase constructors.
Also, this CL also cleans up the struct naming:
* _addressOf -> _typedDataBase
* _fromPointer -> _fromTypedDataBase
* #pointer -> #typedDataBase
These cleanups are not split into a separate CL to prevent updating
the .expect files multiple times.
Finally, this CL enables running a single transformer test through:
`dart pkg/vm/test/transformations/type_flow/transformer_test.dart name`
TEST=pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart
TEST=tests/ffi(_2)/function_callbacks_structs_by_value_generated_test.dart
TEST=tests/ffi(_2)/function_structs_by_value_generated_test.dart
Change-Id: I418d0d73bc86b234dfe5b7b04ae726c33d2b8aeb
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,dart-sdk-linux-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193661
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Since some of the async transformers return `null`, signaling that they
remove nodes, they must extend the RemovingTransformer in order to
migrate to null safety where arbitrary node removal is not possible.
Change-Id: I8e20e2c61ce23699fe32c7450aacdd15467da5f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191923
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This is the follow-up to https://dart-review.googlesource.com/c/sdk/+/193831.
This change fixes undefined behavior corresponding to read from
the member of the union that wasn't most recently written.
TEST=ci
Change-Id: I5a74a75f8dca3526068880bfd3a848b611d6cbf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193887
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* Now tests both DDC + AMD module systems
* Porting more tests + purging them from the regular test
* Fixing a bug related to string-typed JS scope objects
Change-Id: I703d3760971ef8c14ef4157a71b364d8d3c22aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194080
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
This change adds a `setBreakpointState` RPC which allows for breakpoints
to be enabled or disabled without needing to remove and recreate
breakpoints.
Fixes https://github.com/dart-lang/sdk/issues/45336.
TEST=set_breakpoint_state_test.dart
Change-Id: I1a04e6028d4e4560fdb8d3d26420c9a05da06b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193896
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Previously, FFI store could use kUnboxedUint32 for value being stored
via 8-bit or 16-bit StoreIndexed instruction. However, such
StoreIndexed instructions require kUnboxedIntPtr representation.
Due to the mismatch in the representations, SelectRepresentations
pass inserts a speculative (deoptimizing) IntConverter instruction,
which cases crash in AOT mode. Similar problem exists for FFI loads.
This change corrects representation when unboxing value in the body
of FFI store intrinsics and when boxing the value in FFI loads,
so representation of the value matches representation required by
StoreIndexed / returned by LoadIndexed.
TEST=ffi/regress_flutter79441_test
Fixes https://github.com/flutter/flutter/issues/79441
Change-Id: Ida144e8d2e7a69d6767c9d4447bb20e79d847d48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193824
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Account for the fact that a Function could be only reachable via
FfiTrampolineData in the FFI trampoline function.
TEST=ffi_2/function_callbacks_test
Fixes https://github.com/dart-lang/sdk/issues/45510
Change-Id: I2db81c7730ae48d1f1355aa236339e54562ee6c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193893
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Adding the dartdevc_test target to the pkg-linux-debug bot config since some of its tests require that the sound SDK be built. Also failing more gracefully if the expected dill is not found.
Change-Id: I5d2004a3a13d9f73dcb51afb3c68c0b7c18e614e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194108
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>