Commit graph

1513 commits

Author SHA1 Message Date
Tess Strickland d5dd0a5eea "Reland "[vm] Remove warnings about non-standard stack traces."
This is a reland of commit cc9d14d822

TEST=vm/dart{,_2}/causal_stacks/async_throws_stack_lazy_non_symbolic_test

Original change's description:
> [vm] Remove warnings about non-standard stack traces.
>
> The language team has clarified in
> https://github.com/dart-lang/language/issues/1212 that the content of
> stack traces is not specified in a way that is violated by either
> obfuscation or non-symbolic stack traces. Thus, we remove the warnings
> about supposedly standard-violating stack traces.
>
> TEST=No change in actual functionality, so tested manually.
>
> Bug: https://github.com/dart-lang/sdk/issues/43388
> Change-Id: I2c7ac44cf2f9afafa85d902b2783e1173e727264
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249185
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Bug: https://github.com/dart-lang/sdk/issues/43388
Change-Id: I2f99779e391b156ca963be57467b40dbe69f2b76
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253281
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-08-03 09:51:35 +00:00
Zach Anderson 3b8817e7fc Revert "[vm/compiler] Add symbols for read-only data when requested."
This reverts commit 286326f834.

Reason for revert: Reverting for the regressions mentioned in https://github.com/flutter/flutter/issues/108378

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>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I82bdabf07c137fbabe7b4c45bdf23011350c3d87
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/+/252801
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2022-07-27 13:30:28 +00:00
Tess Strickland a174dd7e89 [vm/test] Handle any simulator architectures more generically.
In `use_flag_test_helper.dart`, there is code for SIMARM/SIMAR64,
but now we have SIMRISCV64.

For now, just look for `SIM` in the build directory to determine
whether or not we're running on a simulated architecture, and
disable the assembly part of `use_dwarf_stack_traces_flag_test.dart`
on all simulated architectures instead of just SIMARM/SIMARM64.
(They run fine locally for SIMARM/SIMARM64, but trybots don't
have the buildtools fetched currently as the configuration uses our
own ELF writer to generate snapshots, not an assembler.)

TEST=vm/dart{,2}/use_dwarf_stack_traces_flag

Closes: https://github.com/dart-lang/sdk/issues/49519

Change-Id: I710de16f29a24e6d64a8bce3469da9648ee25def
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simriscv64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252604
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-07-26 13:27:18 +00:00
Anis Alibegić 40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Tess Strickland 286326f834 [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>
2022-07-25 11:03:29 +00:00
Tess Strickland 27f6c6d660 Reland "[pkg/native_stack_traces] Support Mach-O dSYM debugging information."
This is a reland of commit 08c13f173c

Fixes test failures on non-x64 architectures, both in the test
harness and due to DWARF5 line number program headers having a
non-backwards compatible format. (We generate DWARF2 in the
ELF snapshot writer, but the assembler used for assembly snapshots
may generate DWARF5.)

TEST=vm/dart{,_2}/use_dwarf_stack_traces_flag

Original change's description:
> [pkg/native_stack_traces] Support Mach-O dSYM debugging information.
>
> TEST=vm/dart{,_2}/use_dwarf_stack_traces_flag
>
> Bug: https://github.com/dart-lang/sdk/issues/43612
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-product-x64-try,pkg-mac-release-arm64-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
> Change-Id: Icda21bb14dcc0cf4784cea118e6ba7dd4edd35aa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250381
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/43612
Change-Id: I8a9cb70e78bc8594bcae004809c5a1be778d691d
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-product-x64-try,pkg-mac-release-arm64-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-nnbd-mac-release-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251464
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-07-22 07:05:26 +00:00
Daco Harkes 0f456a845c [vm] Check for undefined symbols in assembly snapshots
We don't check undefined symbols in our assembly snapshots. We
currently never emit undefined symbols, because Dart code only refers
to Dart code statically.

When adding static linking, we would like to have the option to have
PC relative calls to native libraries provided as relocatable files
(object files or static libraries).

Not checking would compile the symbols to dynamic linker, but we don't
support that `dart compile exe` at the moment. So we should add this
sanity check.

Also: Removes unused imports in relevant test.

Bug: https://github.com/dart-lang/sdk/issues/49418
Change-Id: I10701b82a1e8a06ce41271bd9183064addfb88f4
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251261
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-07-15 11:32:35 +00:00
Ben Konyi a75e9cd3ee Revert "[pkg/native_stack_traces] Support Mach-O dSYM debugging information."
This reverts commit 08c13f173c.

Reason for revert: Causing failures on simarm, simarm64, etc

Original change's description:
> [pkg/native_stack_traces] Support Mach-O dSYM debugging information.
>
> TEST=vm/dart{,_2}/use_dwarf_stack_traces_flag
>
> Bug: https://github.com/dart-lang/sdk/issues/43612
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-product-x64-try,pkg-mac-release-arm64-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
> Change-Id: Icda21bb14dcc0cf4784cea118e6ba7dd4edd35aa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250381
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/43612
Change-Id: I020c29f7329e9b53a8fe0f4f4a4de4070fca0ec3
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-product-x64-try,pkg-mac-release-arm64-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251242
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-07-13 16:15:45 +00:00
Alexander Markov da18c7c9a7 [vm] Fix type of Future returned from async closure created in a factory
In order to create a Future for the result of async closure,
closure needs to instantiate a type argument of its result type.
The result type may reference type arguments of enclosing function or
class and scope builder should visit closure's result type
in order to capture receiver or type arguments variable of parent
factory.

TEST=runtime/tests/vm/dart/regress_49424_test.dart
Fixes https://github.com/dart-lang/sdk/issues/49424

Change-Id: I1cd131251717fca43f8ca95856d13718eb9aca68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251320
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-07-13 14:09:53 +00:00
Alexander Markov 61caeca47a Reland "[vm] Cleanup old async/async*/sync* implementation from the VM"
This is a reland of commit bc8afad855

On top of the original commit, this change fixes incorrect
propagation of async/async*/sync* modifiers from a function to
its dynamic invocation forwarder.

TEST=ci, runtime/tests/vm/dart/regress_b_238653741_test.dart
Fixes b/238653741
Issue: https://github.com/dart-lang/sdk/issues/48378

Original change's description:
> [vm] Cleanup old async/async*/sync* implementation from the VM
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/48378
> Change-Id: I089ba4ed5613f30eec29f0db4ac6d5d8fbffd185
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249980
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Change-Id: Iaad033d974a23fc6c5880a3d7f41818eb117f839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251300
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-07-12 19:25:32 +00:00
Tess Strickland 08c13f173c [pkg/native_stack_traces] Support Mach-O dSYM debugging information.
TEST=vm/dart{,_2}/use_dwarf_stack_traces_flag

Bug: https://github.com/dart-lang/sdk/issues/43612
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-product-x64-try,pkg-mac-release-arm64-try,vm-kernel-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: Icda21bb14dcc0cf4784cea118e6ba7dd4edd35aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250381
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-07-12 11:10:02 +00:00
Alexander Markov 2f17c118b5 Revert "[vm] Cleanup old async/async*/sync* implementation from the VM"
This reverts commit bc8afad855.

Reason for revert: b/238653741

Original change's description:
> [vm] Cleanup old async/async*/sync* implementation from the VM
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/48378
> Change-Id: I089ba4ed5613f30eec29f0db4ac6d5d8fbffd185
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249980
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=vegorov@google.com,kustermann@google.com,alexmarkov@google.com

Change-Id: I6437d2d7d3914eb7fb9fe397472e2a5f7ae0cd9e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/48378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251147
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-07-11 21:09:52 +00:00
Alexander Markov bc8afad855 [vm] Cleanup old async/async*/sync* implementation from the VM
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I089ba4ed5613f30eec29f0db4ac6d5d8fbffd185
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249980
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-07-11 18:46:41 +00:00
Ryan Macnak 3a45cf139b [vm, compiler] Fix --no_load_cse.
TEST=ci
Change-Id: I9b970a5a43577f879bd1edf9c40f3af064900f0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250980
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-07-11 18:15:41 +00:00
Martin Kustermann f047c33d5a [gardening] Mark all tests as slow in debug-ia32 mode
On ia32 the CFE will run from a kernel file instead of an AppJit
snapshot. This is generally not that fast. In debug mode the JIT will
have various additional verifications turned on in the runtime (e.g.
flow graph checker runs, ...) - which will make it very slow.

So we should give all tests on debug-ia32 extra time.

TEST=ci

Change-Id: Iafd20a4c555d952641bc75a4f2d318f33a2751ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251080
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-07-11 09:00:21 +00:00
Vyacheslav Egorov 9c3c3886c9 [deps] Rev benchmark_harness dependency
benchmark_harness (0ae822e..f4ed0fc):
  f4ed0fc  Wed Jul 6 03:45:31 2022 -0700  Leaf Petersen  Fix harness to not call timer repeatedly in the measured loop. (#38)

Change-Id: I5843e1700af29939d69c80eab7348bf39bbcd0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250742
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-07-07 09:48:02 +00:00
方哲源 6b04cac19d [vm] Bug fix in dedup optimization when build deferred components.
Closes https://github.com/dart-lang/sdk/pull/49393

TEST=vm/dart{,_2}/regress_49372

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try
GitOrigin-RevId: c6306f96ae2bafa25c45e5c7a818c71eb72d8d12
Bug: https://github.com/dart-lang/sdk/issues/49372
Change-Id: I7ec4b170819321cb74037e475006890259446744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250720
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-07-06 11:04:10 +00:00
Vyacheslav Egorov ec9a660ccc [vm] Avoid clobbering array length in AllocateArray stub on ARM
It was calling EnsureIsNewOrRemembered on the slow path which
was forgetting to preserve registers around a runtime call.

Fixes https://github.com/flutter/flutter/issues/106510

TEST=vm/dart{,_2}/flutter_regress_106510

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm-try
Change-Id: I621e392304fcd1fd643c009fbcde3f88b6f19b7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250168
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-07-01 12:31:47 +00:00
Alexander Aprelev f51149eba3 [embedder] Clean up deprecated secure connection enforcement mechanism.
Addresses https://github.com/flutter/flutter/issues/54448
TEST=ci, flutter

Change-Id: If1ea8044cdfa8d593e0cd5b5201c2fbe71dd08ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248220
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-06-29 16:59:25 +00:00
Martin Kustermann dd9a2dca24 [gardening] Mark vm/dart{,_2}/byte_array_test as slow
The test runs with --opt-counter-threshold=10 and can be very slow,
especially in debug mode.

TEST=Should address flaky timeout of this test.

Change-Id: I2e45681743c4660e20c765ec0fcf85424393f2c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250084
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-06-29 08:29:47 +00:00
Martin Kustermann 0113970da0 [gardening] Mark some tests as Pass, Slow
The tests are generally slow and sometimes hit the limit to a timout
(e.g. recently on win-debug-ia32)

TEST=Should fix flaky timeouts.

Change-Id: I8879d0e6df94046e79e43957877877a3458deb3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249607
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-24 13:26:39 +00:00
Martin Kustermann db6b2679e6 [gardening] Use .dart_tool/package_config.json instead of deprecated (and now removed) .packages
TEST=Fixes test after support for .packages was removed.

Change-Id: I44e077f06b62e3abb9f1a96cae0fbe576e44ef39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249682
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-06-24 11:20:19 +00:00
Jens Johansen b4e2012f5b [CFE] Remove support for .packages file
This CL:
* Removed the redirect from .packages to .dart_tool/package_config.json
  (whenever such a file existed).
* Removes support for the old format entirely.
* Updates all tests etc that were found.

Fixes https://github.com/dart-lang/sdk/issues/48939

TEST=Existing tests updated.

Change-Id: Iccf711c455ac1885189aa773ca74dd8f55012964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248603
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-06-24 08:20:39 +00:00
Emmanuel Pellereau bb104f07fc Revert "Reland "[vm] Remove warnings about non-standard stack traces.""
This reverts commit 6651c29779.

Reason for revert: breaks google3 (b/236928633)

Original change's description:
> Reland "[vm] Remove warnings about non-standard stack traces."
>
> This is a reland of commit cc9d14d822
>
> TEST=vm/dart{,_2}/causal_stacks/async_throws_stack_lazy_non_symbolic_test
>
> Original change's description:
> > [vm] Remove warnings about non-standard stack traces.
> >
> > The language team has clarified in
> > https://github.com/dart-lang/language/issues/1212 that the content of
> > stack traces is not specified in a way that is violated by either
> > obfuscation or non-symbolic stack traces. Thus, we remove the warnings
> > about supposedly standard-violating stack traces.
> >
> > TEST=No change in actual functionality, so tested manually.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/43388
> > Change-Id: I2c7ac44cf2f9afafa85d902b2783e1173e727264
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249185
> > Commit-Queue: Tess Strickland <sstrickl@google.com>
> > Reviewed-by: Daco Harkes <dacoharkes@google.com>
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
>
> Bug: https://github.com/dart-lang/sdk/issues/43388
> Change-Id: Ifa7915b4ba21cca592ed5645cd9ad6cda1575f12
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249192
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>

TBR=kustermann@google.com,dacoharkes@google.com,sstrickl@google.com

Change-Id: I65f3d84caee3ec9ac30f0ce058104bb24ef6ea11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/43388
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249580
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
2022-06-23 09:25:00 +00:00
Tess Strickland 6651c29779 Reland "[vm] Remove warnings about non-standard stack traces."
This is a reland of commit cc9d14d822

TEST=vm/dart{,_2}/causal_stacks/async_throws_stack_lazy_non_symbolic_test

Original change's description:
> [vm] Remove warnings about non-standard stack traces.
>
> The language team has clarified in
> https://github.com/dart-lang/language/issues/1212 that the content of
> stack traces is not specified in a way that is violated by either
> obfuscation or non-symbolic stack traces. Thus, we remove the warnings
> about supposedly standard-violating stack traces.
>
> TEST=No change in actual functionality, so tested manually.
>
> Bug: https://github.com/dart-lang/sdk/issues/43388
> Change-Id: I2c7ac44cf2f9afafa85d902b2783e1173e727264
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249185
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Bug: https://github.com/dart-lang/sdk/issues/43388
Change-Id: Ifa7915b4ba21cca592ed5645cd9ad6cda1575f12
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249192
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-06-22 09:19:37 +00:00
Alexander Markov 1aa406869b [gardening] Skip enable_mirrors_test on configurations with separate kernel compilation
Separate kernel compilation on sim* bots doesn't respect VM options, so
--enable-mirrors=false has no effect on those bots.
This change skips the recently added test for that VM option.

Issue: https://github.com/dart-lang/sdk/issues/49266
Change-Id: I2119c2c9623054fa24fdeee248c80b14287e7ee8
TEST=ci
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249022
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-17 19:05:09 +00:00
Alexander Markov 8bc1cda3f7 [vm] Fix --enable-mirrors VM flag to affect environment and conditional imports
This change propagates --enable-mirrors VM flag to CFE via
TargetFlags.supportMirrors. CFE uses that to select conditional
imports and for constant evaluation of bool.fromEnvironment.

TEST=runtime/tests/vm/dart/enable_mirrors_test

Issue: https://github.com/dart-lang/sdk/issues/49266
Change-Id: I9f6b03f1ab224d13cbe9f035fb5b6fa6eb59055c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249020
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-17 17:20:09 +00:00
Martin Kustermann a6b408d901 [gardening] Remove null safety flag from newly added test
This fixes an issue in our testing infrastructure: If // VMOptions
swiches the null safety mode explicitly, all tools/test.py runs that
require multiple steps (e.g AOT that compiles+runs or simarm that
compiles to kernel + runs) would fail with mismatch in null safety mode.

Instead rely on our test matrix to run this test in all null safety
configurations.

TEST=ci

Change-Id: I6e2f6963351a1a6c071cefb4444e64d2904c63f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249001
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2022-06-17 13:37:48 +00:00
Martin Kustermann 4703d2c54e [vm] Make _CastError.{_url,_line,_column} nullable fields
The ! operator causes _CastErrors to be thrown without the
_CastError.{_url,_line,_column} fields to be set (see
runtime/vm/runtime_entry.cc:NullErrorHelper).

This CL makes the fields nullable. An alternative would be to remove the
fields entirely since the fields are not used and the position of the
failed null check is visible from top frame in the stack frame as well.

Though the fields are visible in the debugger and there are other
situations where they are correctly set (e.g. in type errors that cause
_CastError to be thrown). To avoid changing this behavior, we make them
nullable.

Fixes https://github.com/dart-lang/sdk/issues/49279

TEST=vm/dart{,_2}/regress_49279_test

Change-Id: Ieff9e84819d5afa83c8950ad1f99d684d184340a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248980
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2022-06-17 10:39:28 +00:00
Daco Harkes 2b700003d9 Reland "[vm] Only call .hashCode once when adding to Map and Set"
Relanding after https://dart-review.googlesource.com/c/sdk/+/244200.

Original change's description:
> [vm] Only call `.hashCode` once when adding to `Map` and `Set`
>
> The methods to add to hash maps and hash sets are recursive: if the
> index needs to be rehashed then the same method is called again
> after rehashing.
>
> This CL nests the actual implementation in a private method that takes
> the full hashCode as an extra argument.
>
> No significant code size or run time changes are reported on our
> benchmarks. (Our benchmarks do not contain purposefully slow hashCodes.)
>
> Note that hashCode can be called again later if rehashing of the index
> is required on adding subsequent elements.
>
> Bug: https://github.com/dart-lang/sdk/issues/48948
> Change-Id: Ia3ccff9e592d675b4922ac78c4aa7ee0287ecb50
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243623
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>


Change-Id: I033bd7cc29fc812dccb6dccf0c3dca6e22cae2ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248802
Commit-Queue: Tess Strickland <sstrickl@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2022-06-17 10:05:18 +00:00
Tess Strickland 73bc88f957 [vm/compiler] Fix bad check in CompilerType::IsAssignableTo.
In order to know whether a value is assignable to a given type,
we need the fully instantiated type. Thus, return false if the
type given to CompilerType::IsAssignableTo is uninstantiated,
similar to CompilerType::IsInstanceOf.

TEST=vm/dart{,_2}/regress_b_230945329_test.dart

Bug: b/230945329
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-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I7ff9eb2214debc274f09580d51c80f0921f8f77d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244200
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-06-16 14:03:00 +00:00
Alexander Markov 058265f4e7 Reland "[vm] More efficient 'await' of not Future and completed _Future"
This is a reland of commit 6b3d1752fa

Fixes b/235734143
TEST=runtime/tests/vm/dart/await_in_custom_zone_test.dart

Original change's description:
> [vm] More efficient 'await' of not Future and completed _Future
>
> When awaiting a value which is not a Future or a completed
> built-in _Future, 'await' implementation can bypass heavyweight
> _Future/_FutureListener machinery and schedule micro-tasks directly.
>
> Benchmarks:
> JIT, x64:
> AsyncLiveVars.* +46-54% (bigger is better)
> Calls.AwaitAsyncCall -46% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -45%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45%
> Calls.AwaitFutureOrCall -60%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -60%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%
>
> JIT, ia32:
> AsyncLiveVars.* +43-52% (bigger is better)
> Calls.AwaitAsyncCall -42% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -42%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -41%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -39%
> Calls.AwaitFutureOrCall -55%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -54%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -53%
>
> JIT, arm:
> AsyncLiveVars.* +64-71% (bigger is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -51% (less is better)
> Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -48%
> Calls.AwaitFutureOrCall -64%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -64%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -59%
>
> JIT, arm64:
> AsyncLiveVars.* +65-78% (bigger is better)
> Calls.AwaitAsyncCall -51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -51%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -50%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49%
> Calls.AwaitFutureOrCall -69%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -68%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -67%
>
> AOT, x64:
> AsyncLiveVars.* +55-61% (bigger is better)
> Calls.AwaitAsyncCall -47% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -47%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -46%
> Calls.AwaitFutureOrCall -59%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -59%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -58%
>
> AOT, arm:
> AsyncLiveVars.* 54-66% (bigger is better)
> Calls.AwaitAsyncCall -46-51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -46-50%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -46-52%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -45-50%
> Calls.AwaitFutureOrCall -63-68%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -63-66%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%
>
> AOT, arm64:
> AsyncLiveVars.* +53-66% (bigger is better)
> Calls.AwaitAsyncCall -50-51% (less is better)
> Calls.AwaitAsyncCallInstanceTargetPolymorphic -50%
> Calls.AwaitAsyncCallClosureTargetPolymorphic -50-51%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits -49-50%
> Calls.AwaitFutureOrCall -66-68%
> Calls.AwaitFutureOrCallInstanceTargetPolymorphic -66-68%
> Calls.AwaitFutureOrCallClosureTargetPolymorphic -63-67%
>
> TEST=ci
> Issue: https://github.com/dart-lang/sdk/issues/48378
>
> Change-Id: I65e3702fcd816ee3fee876ff442b9887c035b1ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243102
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Change-Id: I245984ace1c768fdcba58dfdd6aa46e52126be4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248442
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-15 15:35:38 +00:00
Ahmed Ashour 85700570f6 Fix typos
Fixes #49241

TEST=ci

Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-15 11:08:28 +00:00
Johnni Winther 7900e9071a [cfe] Remove support for old super-mixins feature
This CL remove the support for mixing in classes that don't extend
Object. An error has been report by the analyzer for some time and
now also by the CFE.

This puts the breaking change https://github.com/dart-lang/sdk/issues/48167 into effect.

TEST=pkg/front_end/testcases/general/issue48167.dart

Change-Id: Ia7715a27dc1aa18a7c85b24ed86d19a91b6924d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247551
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-06-13 15:30:57 +00:00
Alexander Markov de43a7c16a [vm] Cleanup --lazy-async-stacks VM option
This option was enabled by default in https://dart-review.googlesource.com/c/sdk/+/149288
This change removes old logic behind --no-lazy-async-stacks
and makes --lazy-async-stacks/--no-lazy-async-stacks options no-op.

TEST=ci

Change-Id: I5726690e90e78dd2ac37d8c5944e388042fc3acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-10 13:41:24 +00:00
Alexander Markov 3e0abdbb98 Reland "[vm] Enable new implementation of async/async* in JIT mode"
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I5b8720b8ef5b8d28773d26c7e94c2e78d876c9d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247603
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-06-09 15:24:13 +00:00
Alexander Markov e505ab1fd2 [vm] Fix stack trace collection while registering async callbacks in the Zone
During 'await', when registering 'then' and 'error' callbacks in
a custom Zone, the stack trace should be collected synchronously
as there are no awaiters yet, but the suspended function and its
callers are still on the stack.

This change corrects the new implementation of async to collect
these stack traces synchronously.

Class StackZoneSpecification from package:stack_trace relies on the
stack traces during callback registration in order to provide more
detailed chain of async stack traces via Chain.capture.
Without this change package:stack_trace captured truncated Chains.

Issue: https://github.com/dart-lang/sdk/issues/48378
Issue: https://github.com/flutter/flutter/issues/105340

TEST=vm/dart/causal_stacks/zone_callback_stack_traces_test

Change-Id: Iee348aa5c9abb4126f6c5d8215a6dc2cee57e124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247620
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-09 14:52:33 +00:00
Alexander Markov 3e10d8c833 Revert "[vm] Enable new implementation of async/async* in JIT mode"
This reverts commit b3544c44dc.

Reason for revert: avoid incompatibility between Dart->kernel compiler
and Dart VM during Dart and Flutter rolls (b/234850964).

TEST=ci

Original change's description:
> [vm] Enable new implementation of async/async* in JIT mode
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/48378
> Change-Id: I0fc069508cb1ce5648deb6604171dfdcd5bcb5c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246082
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,johnniwinther@google.com

Change-Id: I6157623857dbfa9bb07eb1f620d100f5b24314d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/48378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247243
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-06-07 17:57:30 +00:00
Martin Kustermann 7a8f742425 [gardening] Mark some tests using optcounter flags Pass, Slow
On ia32 the kernel service runs from .dill file instead of app-jit
snapshot which makes it already slow (even more so in debug mode because
we run e.g. FlowGraphChecker).

The tests additionally use --optimization-counter-threshold flags,
causing more optimized compilations which makes it even slower.

=> Give tests more time.

TEST=ci

Change-Id: If09b4eb0971fed0c4572373598bbf171f4452eb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247083
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-06-03 09:58:08 +00:00
Alexander Markov b3544c44dc [vm] Enable new implementation of async/async* in JIT mode
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I0fc069508cb1ce5648deb6604171dfdcd5bcb5c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246082
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-02 23:40:15 +00:00
Martin Kustermann 257b664c2f [gardening] Make test not depend on thread-cpu-time (not available on windows)
Closes https://github.com/dart-lang/sdk/issues/49068

TEST=Fixes vm/dart_2/isolates/fast_object_copy_timeline_test on windows.

Change-Id: I85bb712df2231b41836200e0a52272f94d5cc1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245368
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-05-23 09:47:27 +00:00
Martin Kustermann b83b89a900 [vm/concurrency] Add number of objects / bytes copied to timeline events for inter-isolate messages
Closes https://github.com/dart-lang/sdk/issues/48591

TEST=vm/dart{,_2}/isolates/fast_object_copy_timeline_test

Change-Id: I1de3a6f0d8a31450e45f689e0d67358285204a71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245167
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2022-05-20 08:16:41 +00:00
Alexander Markov d7a34029c0 [gardening] Skip slow dart/isolates/fast_object_copy_test on vm-kernel-precomp-*sim* bots
Fixes https://github.com/dart-lang/sdk/issues/49060

Change-Id: I8c312ac1f92b2ee854acf59a02d46131e55316ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245401
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-05-19 19:17:20 +00:00
Martin Kustermann 95360796c2 [gardening] Skip vm/dart{,_2}/isolates/fast_object_copy_test on sim* due to timeout
Closes https://github.com/dart-lang/sdk/issues/46740

TEST=ci

Change-Id: I076dcad6c1492c755c76ff6258ba0ad6935b1877
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245364
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-05-19 17:33:10 +00:00
Martin Kustermann 31ae00fb13 [vm] Ensure transitive object copy allows low safepoint latencies
To make responsiveness to safepointing requests better when a thread
does a transitive object copy we add safepoint checkins.

In the fast object copy implementation - which runs inside
NoSafepointScope - we bail out to the slow path if there's a safepoint
requested.

The slow path is safe to GC at any point due to having all objects
inside handles / GC-visible objects.

TEST=Existing test suite.

Change-Id: Ie2c37e2f618506ab62a592aa9ff9ab266a02b64b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245166
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-05-19 12:22:24 +00:00
Daco Harkes efa7439c16 Revert "[vm] Only call .hashCode once when adding to Map and Set"
This reverts commit 438c1ed2ba.

Reason for revert: b/231617607 and b/230945329.
Will reland after b/230945329 is addressed.

Original change's description:
> [vm] Only call `.hashCode` once when adding to `Map` and `Set`
>
> The methods to add to hash maps and hash sets are recursive: if the
> index needs to be rehashed then the same method is called again after
> rehashing.
>
> This CL nests the actual implementation in a private method that takes
> the full hashCode as an extra argument.
>
> No significant code size or run time changes are reported on our
> benchmarks. (Our benchmarks do not contain purposefully slow hashCodes.)
>
> Note that hashCode can be called again later if rehashing of the index
> is required on adding subsequent elements.
>
> Bug: https://github.com/dart-lang/sdk/issues/48948
> Change-Id: Ia3ccff9e592d675b4922ac78c4aa7ee0287ecb50
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243623
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

TBR=kustermann@google.com,dacoharkes@google.com

Change-Id: I214251b65ea89e7f729564a125e226f2e6d580c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/48948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243900
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-05-06 10:24:29 +00:00
Daco Harkes 438c1ed2ba [vm] Only call .hashCode once when adding to Map and Set
The methods to add to hash maps and hash sets are recursive: if the
index needs to be rehashed then the same method is called again after
rehashing.

This CL nests the actual implementation in a private method that takes
the full hashCode as an extra argument.

No significant code size or run time changes are reported on our
benchmarks. (Our benchmarks do not contain purposefully slow hashCodes.)

Note that hashCode can be called again later if rehashing of the index
is required on adding subsequent elements.

Bug: https://github.com/dart-lang/sdk/issues/48948
Change-Id: Ia3ccff9e592d675b4922ac78c4aa7ee0287ecb50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243623
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-05-05 11:48:35 +00:00
Martin Kustermann fe50796c6f [gardening] Remove standalone{,_2}/io/raw_datagram_socket_test from iso-stress builder
The test shows up as flaky when running in parallel on the
"iso-stress" builder and as such is not needed to test concurrency in
the VM, so we'll remove it.

The test fails with
```
FutureExpect.throws received Instance of '_RawDatagramSocket' instead of an exception
#0      FutureExpect.throws.<anonymous closure>
#1      _rootRunUnary
#2      _CustomZone.runUnary
<asynchronous suspension>
#3      FutureExpect.throws.<anonymous closure>
<asynchronous suspension>
```

TEST=Should get "iso-stress" builder geen.

Change-Id: Iad79851bda5c8eb75b2387df296b357e3884c822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243622
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-05-04 14:29:34 +00:00
Martin Kustermann a9c1cb60d1 [gardening] Mark stacktrace-asserting tests as SkipByDesign in obfuscated/non-symbolic-dwarf mode
Issue https://github.com/dart-lang/sdk/issues/48907

TEST=Updates status file.

Change-Id: I4a80611fdd91eb44f082d429553ecc778fb407cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242866
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-29 09:57:41 +00:00
Alexander Markov 609ba96115 [vm] Fix assertion failure during class finalization
TEST=vm/dart/regress_48323_1_test

Issue: https://github.com/dart-lang/sdk/issues/48323
Change-Id: I50c04a269183c0df5b4ce0ce7be32cd2385e95d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242601
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-04-27 19:19:54 +00:00