Commit Graph

79811 Commits

Author SHA1 Message Date
Dominik Inführ
e7a336d72b [objects] Use NotifyObjectSizeChange for BigInt right-trimming
Use the bottleneck for right-trimming of objects also for BigInts.

Change-Id: I82fcb38143f939fdd3d7763c9c60d2e9003196eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165614
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85319}
2023-01-16 14:07:43 +00:00
Omer Katz
713cf5dfa7 [heap] Fix data races with concurrent promoted page iteration
V8 uses memcpy and memmove for implementing Heap::CopyRange and
Heap::MoveRange respectively, but only when concurrent marking is off.
When concurrent marking is on, atomic stores are used to avoid data
races.
Since iteration of promoted pages also iterates objects concurrently,
memcpy and memmove should be avoided while it is active as well.

A dedicated bailout for promoted page iteration is added rather than
checking when sweeping is active. Sweeping will likely be active
until the next GC, which means relying on it here would prevent us
from ever using memcpy and memmove.

Bug: chromium:1407041
Change-Id: Idde80b456df843f91ef7ef05c0694c5930711ae4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165084
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85318}
2023-01-16 13:46:37 +00:00
Clemens Backes
63bff6b94b [wasm][fuzzer] Fix check for max_steps (again)
After the latest fix (https://crrev.com/c/4118547), it could happen that
we stop execution even though the stored "max steps" counter did not
reach zero. This was previously not possible because we did always
subtract 1, and only terminated once we reached zero. Not we sometimes
subtract bigger numbers, and terminate if the counter is smaller than
the number we want to subtract.

This CL fixes this by first subtracting, and then checking if the
counter ran negative.

R=thibaudm@chromium.org

Bug: chromium:1405322
Change-Id: I19d7be263b000eb0a6319aaeb8838d11b8c5a3b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165602
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85317}
2023-01-16 13:32:47 +00:00
Manos Koukoutos
e62810f71a Skip flaky test
Bug: v8:13660
Change-Id: I0fb6950447ba13867685b152e3bca58cc849221d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165615
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85316}
2023-01-16 13:19:26 +00:00
Al Muthanna Athamina
bbb05dde5b Skip regress/regress-1394663 until issue is resolved
Caused by repeated failure such as this https://ci.chromium.org/ui/p/v8/builders/ci/V8%20NumFuzz%20-%20debug/20417/overview even though it is reported.

Bug: chromium:1394659
Change-Id: Idd8e8dabc9c0cdc74cc91ef209b3bd476760d1de
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165606
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85315}
2023-01-16 12:53:38 +00:00
v8-ci-autoroll-builder
c14852e0e7 Update V8 DEPS (trusted)
Rolling v8/build: 2527423..396e122

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cfd313d..a4c8178

Change-Id: I047b02d60dc187a9976289faab492ae7b9640f21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168609
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85314}
2023-01-16 12:26:15 +00:00
Victor Gomes
08cf82af35 [maglev] Remove kScratchRegister from MaglevAssembler
kScratchRegister is not safe to use in arm64 code.

Bug: v8:7700
Change-Id: Ied242e103d4947cd17770a440ed1475729472d40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165610
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85313}
2023-01-16 12:03:24 +00:00
Andreas Haas
47b87ac124 [wasm] Optimize lazy compilation initialization
With https://crrev.com/c/4111524 the jump table of a newly created
NativeModule gets initialized with CompileLazy stubs. This CL optimizes
the initialization by hoisting function-index independent code out of
the iteration over all functions.

R=clemensb@chromium.org

Bug: chromium:1402732
Change-Id: I531335e2a5e36a939a63ec3d2f8822beea4f315b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128098
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85312}
2023-01-16 12:02:21 +00:00
Leszek Swirski
11df29c4d6 [maglev] Embed FBV as constant in prologue
... instead of loading it from the closure.

Bug: v8:7700
Change-Id: Ie8128731e407eecd4f15bc7b3a875bd53793a402
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165609
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85311}
2023-01-16 12:00:58 +00:00
Clemens Backes
cfdb4e0791 Reland "Use preserve_most calling conventions for Zone::Expand"
This is a reland of commit 48fee7d232.
We now use the "COMPONENT_BUILD" macro to disable preserve_all, which
covers more uses (like building libbase or libplatform, where we would
otherwise have to check for BUILDING_V8_BASE_SHARED or
BUILDING_V8_PLATFORM_SHARED).

Original change's description:
> Use preserve_most calling conventions for Zone::NewExpand
>
> The zone uses bump allocation in the fast-path, and falls back to
> allocating a new segment if there is not enough space.
> Since this is rarely executed and zone allocations happen a lot, we
> should mark `Zone::NewExpand` as "preserve_most" to make
> `Zone::Allocate` as fast and slim as possible.
>
> R=bikineev@chromium.org, leszeks@chromium.org
>
> Change-Id: I0d592a35440bc3d61ca04425fc2f98c8a8bbbaae
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4146436
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85258}

Change-Id: I1413d47d84f384a724850a6f5b60adf75bba84f8
Cq-Include-Trybots: luci.v8.try:v8_win64_dbg
Cq-Include-Trybots: luci.v8.try:v8_win_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162931
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85310}
2023-01-16 11:46:54 +00:00
Dominik Inführ
601913ded3 [heap] Mark main isolates WaiterQueueNode in EPT with --shared-space
With --shared-space we weren't marking the main isolate's entry in
the EPT for the WaiterQueueNode.

Bug: v8:13267, chromium:1406729
Change-Id: I833b0a9f93d6b129529dcda71084c3bff5417bad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162927
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85309}
2023-01-16 11:43:48 +00:00
Omer Katz
06198fa975 [heap] Add tests for OLD_TO_SHARED failures
The tests deal with recording OLD_TO_SHARED slots during page promotion
(in MinorMC) on a client heap, and retaining the corresponding shared
objects.

These tests cover issues fixed by crrev.com/c/4152485 and
crrev.com/c/4094755 (in the reland, compared to the previously submitted
version).

Bug: v8:12612
Change-Id: I7ba399d56ad75646092e6955f347a210c3dcac6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156473
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85308}
2023-01-16 11:42:43 +00:00
Nico Hartmann
269c39e90a [turboshaft] Fix -0 case for turboshaft's FloatType::AllocateOnHeap
Bug: v8:12783, chromium:1407070
Change-Id: I4abe39aed967e3e50d5fac78317413c1a068f47a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165605
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85307}
2023-01-16 09:56:55 +00:00
Matthias Liedtke
debcabf7b5 [wasm-gc] Add callback for Wasm GC origin trial
The callback can be used to enable / disable Wasm GC from Chrome or
other users. For more simplicity and as many users of Wasm GC also use
stringrefs, enabling it via the callback will also stringrefs.

Bug: v8:7748
Change-Id: I474034eabe438f0ce9759c1d34dda12a99aa491e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165090
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85306}
2023-01-16 09:49:46 +00:00
Leszek Swirski
6ca23f83ee Reland^2 "[maglev] Test maglev on Mac Arm64 bots"
This is a reland of commit b791f4f040

More bugs have been fixed.

Original change's description:
> Reland "[maglev] Test maglev on Mac Arm64 bots"
>
> This is a reland of c6e96cf622
>
> Various bugs have been fixed since the revert and we're ready to try
> again.
>
> Original change's description:
> > [maglev] Test maglev on Mac Arm64 bots
> >
> > Also remove unnecessary maglev runs on x64 FYI bots, since maglev runs
> > on the main waterfall's x64 bots already.
> >
> > Bug: v8:7700
> > Change-Id: I5bb23c3ba7696b48f2fe1af4036a3de8c5b1801a
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128092
> > Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#85174}
>
> Bug: v8:7700
> Change-Id: I969e6ae7bd01adb12da0f1240e152232cca00f33
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156056
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85275}

Bug: v8:7700
Change-Id: I274d6cac2f39cb4bffcf346649fb9b9676b7d93f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4164681
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85305}
2023-01-16 09:36:47 +00:00
Leszek Swirski
36e0d7a359 [snapshot] Split ReadSingleBytecodeData cases into functions
This should give the compiler more flexibility around inlining,
particularly with PGO.

Change-Id: Iee73b0047b91eb29853390a1820ae30e740b33fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162924
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85304}
2023-01-16 08:49:24 +00:00
Manos Koukoutos
275c747ed1 Revert "Update V8 DEPS (trusted)"
This reverts commit 2d52e86fae.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/47779/overview

Original change's description:
> Update V8 DEPS (trusted)
>
> Rolling v8/build: 2527423..c976e40
>
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cfd313d..a4c8178
>
> Change-Id: If8cc5251b468e4124fad7eeefde4dc4b49fe4687
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168605
> Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#85301}

Change-Id: I0823eaa81f08ed53ab0d062c22b52ea4ab2d9933
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168896
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Owners-Override: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85303}
2023-01-16 08:48:19 +00:00
Liu Yu
6c55f09ed5 [loong64][mips64][codet] Remove the CodeT=Code implementation
Besides, remove obsolete CodeT dispatch functions;

Port commit 177b6be920
Port commit 651d4d9748

Bug: v8:13654
Change-Id: Ifc3ef61b6f525b7cf41dbaf6b84ee1275df76c54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4170403
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#85302}
2023-01-16 07:23:05 +00:00
v8-ci-autoroll-builder
2d52e86fae Update V8 DEPS (trusted)
Rolling v8/build: 2527423..c976e40

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cfd313d..a4c8178

Change-Id: If8cc5251b468e4124fad7eeefde4dc4b49fe4687
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168605
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85301}
2023-01-16 03:46:38 +00:00
Junliang Yan
592fa769fe ppc64: [ptr-cage] Enable in BUILD.gn
Change-Id: Iaa905d7ec6e390eb3e963bd934783ac0627a8c1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162551
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85300}
2023-01-16 01:57:32 +00:00
v8-ci-autoroll-builder
6dd5049a1a Update V8 DEPS (trusted)
Rolling v8/build: 24fbcb5..2527423

Rolling v8/buildtools/third_party/libunwind/trunk: 5e22a7f..bb5988e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a172c91..cfd313d

Rolling v8/third_party/depot_tools: e38d195..1757677

Rolling v8/third_party/zlib: 2d88319..dca2b91

Change-Id: Ie37d637a1156d738f0da13a2fcbb4b4e7273fb46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4167880
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85299}
2023-01-14 03:59:52 +00:00
Andrew Grieve
f7fe84b317 Delete android_assets() target for snapshot.bin
Chromium now defines its own android_assets() rather than using this
target (assets are about how things are packaged, so make more sense
living in embedders).

Bug: chromium:1402705
Change-Id: I95ff828393cec4e1e388776ed2e6be09c67b1e30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4157274
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85298}
2023-01-13 21:16:45 +00:00
Clemens Backes
2dd614d61e [wasm] Use preserve_most calling conventions for DecodeError
This method has a lot of call sites, but is rarely called, so mark it
preserve_most to make caller code slimmer (and faster).

R=dlehmann@chromium.org

Bug: v8:13565
Change-Id: I6c1b1ee78895fbcffbbd0d47d904d97930d5d90f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136715
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85297}
2023-01-13 20:25:36 +00:00
Milad Fa
f5bf7b701a PPC/s390: [codet] Remove obsolete CodeT dispatch functions
Port 651d4d9748

Original Commit Message:

    These are no longer relevant now that CodeT is an unconditional alias
    for CodeDataContainer.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ie4fa2fbaa5beefce62cbf4de4fca25b05d028fa1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165560
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85296}
2023-01-13 19:09:15 +00:00
Shu-yu Guo
8951d68a0a [d8] Add writeFile to the global
Request from Wasm tools team for testing. This is only available when
not --fuzzing.

Change-Id: I88cde5ecdcae6724b56c2f89c9d81c6f054f68d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4159854
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85295}
2023-01-13 18:12:23 +00:00
Olivier Flückiger
44df2a5bd5 [runtime] Zero padding of sequential strings
SeqStrings have up to kTaggedSize-1 bytes of padding, due to
allocation sizes being rounded up to kObjectAlignment. This CL ensures
that all (non-external) sequential strings on the heap have (and keep)
this padding set to all zeroes.

The approach is to unconditionally zero the last tagged word of the
uninitialized allocation of string objects.

Change-Id: I32ee4a53e25fa470f79562a71b8c648c7205523f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4143019
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85294}
2023-01-13 17:27:40 +00:00
Clemens Backes
e02e128455 [wasm] Make {read_leb_slowpath} cheap to call
The {read_leb_slowpath} method is not called most of the time, so we
make it preserve most registers. This makes callers slimmer and faster.

Since the "preserve_most" attribute is currently broken for functions
with return values, we need to change two functions to return the result
via output parameter.

R=dlehmann@chromium.org

Bug: v8:13565
Change-Id: I2c41a37e8e8a86bee4e29ec04a2623cc887eb9e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136713
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85293}
2023-01-13 16:38:47 +00:00
Olivier Flückiger
0903e0a49b [ptr-compr] Improve ptr decompresion in C++
Optimizations introduced in
https://chromium-review.googlesource.com/c/v8/v8/+/1776079
are currently defeated since Address is not a pointer type.
Clang does not seem to carry over alignment information as range
information when casting to ints.

Using __builtin_assume we can restore the same effect.

Reland of half of
https://chromium-review.googlesource.com/c/v8/v8/+/4156060

Bug: v8:9353
Change-Id: I35e3afcb1b8e7faa0cb7ab5573f0e475c045e0c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162929
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85292}
2023-01-13 16:06:09 +00:00
pthier
aceba00ebf [maglev][arm64] Fix CheckMapsWithMigration
Reload the map after the TryMigrateInstance runtime call.

Bug: v8:7700
Change-Id: Ifabbfaec733989002361ca73e50f1a57cbbfb87f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165091
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85291}
2023-01-13 15:58:31 +00:00
Matthias Liedtke
928c3e7829 [wasm-gc] Support i31ref in WebAssembly.Global js interop
Bug: v8:7748
Change-Id: Id37b67170173149b59ad6bbf46218c529cc8d6c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162928
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85290}
2023-01-13 15:51:32 +00:00
Leszek Swirski
1219328b1e [parser] Check for stack overflow in ParseFunctionBody
We previously did not check for stack overflow when recursively nesting
functions and class declarations, with no statements in between.

Fixed: chromium:1404863
Change-Id: I00ec90ed4ac48ae7996a2d54201732bcaebc9757
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162925
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85289}
2023-01-13 15:35:50 +00:00
Milad Fa
d48aea7a23 PPC/s390: [codet] Remove the CodeT=Code implementation
Port 177b6be920

Original Commit Message:

    There is no reason to keep the CodeT dispatch (which switches
    between `CodeT = CodeDataContainer` and `CodeT = Code`) around. Using
    CodeDataContainer doesn't actually depend on anything from v8_enable_external_code_space, so let's use it unconditionally and
    simplify our codebase.

    In this first step, update the
    `v8_enable_external_code_space = false` configuration to use
    `CodeT = CodeDataContainer` as well and remove all support for
    `CodeT = Code`.

    Upcoming CLs will remove the CodeT alias type, and rename
    the Code/CodeDataContainer pair to something more intuitive.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Id50007e4af51974e3e666e98ffbc7d74e1224c59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162297
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85288}
2023-01-13 15:32:13 +00:00
Leszek Swirski
71dea568ee [maglev] Allow loop phis to extend input lifetimes
The comment about loop phis not needing to extend their inputs'
lifetimes to the end of the outer loop was... wrong. Of course the input
into a inner loop phi needs to be kept alive for subsequent iterations
of the outer loop.

Bug: v8:7700
Change-Id: I4e5de510a7f0188524dd3206f9369b473c128019
Fixed: chromium:1406733
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165088
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85287}
2023-01-13 15:28:22 +00:00
Nico Hartmann
59e5982838 Reland "[turbofan] Properly perform range check for array access"
This is a reland of commit ec4f19d530

Original change's description:
> [turbofan] Properly perform range check for array access
>
> Turbofan optimized array access returned incorrect values in some cases
> when a negative index was provided. This CL fixes this by changing the
> way those bounds checks are performed in JSNativeContextSpecialization.
>
> Bug: chromium:1320641
> Change-Id: Id1f06680ccf7964994d179f7fb44199a0b1245b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4147622
> Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85207}

Bug: chromium:1320641, chromium:1382948
Change-Id: I45e38598b97e2e997fc75d272dba470669e835c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4164680
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85286}
2023-01-13 15:20:00 +00:00
Clemens Backes
249d11e8ab [wasm] Make stack growing cheap to call
The method to grow the capacity for the value stack is rarely called.
Make it preserve most registers. This makes callers slimmer and faster.

R=dlehmann@chromium.org

Bug: v8:13565
Change-Id: If4bb8cbd7a61852af1d07b83d0881110c5e91528
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136714
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85285}
2023-01-13 15:16:04 +00:00
Victor Gomes
d7d5049cfa [maglev] Create DataViewGetVariableLength builtin
kDataViewGetVariableLength has JS linkage, and so it has a strong
requirement to what should be in the stack and in the registers
(including having a JSFunction for kDataViewGetVariableLength).

These were missing before, which would crash when checking the frame.

Fixed: chromium:1406727
Bug: v8:7700
Change-Id: Iad878cbc06d46403e21162dfdfd3bcd1a2a063d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162926
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85284}
2023-01-13 14:59:03 +00:00
Clemens Backes
b5ada88ab6 [wasm] Add regression test for 1395604
This adds a regression test for https://crbug.com/1395604.

R=jkummerow@chromium.org

Bug: chromium:1395604
Change-Id: Ibc7b20d66a167cc5ec4db37c959849a214d0473c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162912
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85283}
2023-01-13 14:50:44 +00:00
George Wort
eae216f5dc [turbofan] Make register allocator error message more useful
Explicitly state that the error message in ExistsUseWithoutDefinition
displays the LifetimePosition and also provide the instruction index.

Change-Id: I21f810ea694a9f4832c150e2479d1d3097d9f629
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165082
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85282}
2023-01-13 14:49:41 +00:00
Olivier Flückiger
942cb80eaa [static-roots][arm64] Disable decrompression of static roots
This is to see if a reported regression stems from the fact that
decompressing static roots on arm64 takes two instructions -- as opposed
to loading it from the roots array with one move.

Bug: v8:13466
Change-Id: I03f5f2c6a5436d06da0a9dfb9c9d214e10fac896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162923
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85281}
2023-01-13 12:55:35 +00:00
Matthias Liedtke
3b680a2d6c [wasm-gc] Add flag for wasm max inlining function size
Additionally to the inlining budget that limits inlining into large
functions / functions that have already inlined a lot, the new flag
limits the maximum size of any inlining candiate. Any function larger
than that will not be inlined independent of the inlining budget.

Also adapt the current limits to be less aggressive on inlining.

Bug: v8:7748
Change-Id: I338a0e7ee1c4a2dfae86ff2016a0c16d5284a54c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161770
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85280}
2023-01-13 10:59:04 +00:00
Marja Hölttä
c9c873b9fd [arm64] Fix BlockPoolsScope usage when CFI is enabled
Bug: chromium:1327444
Change-Id: I67e4a207cd1ad9799d6a772ba51d2ea8013317ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162913
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85279}
2023-01-13 10:52:33 +00:00
Clemens Backes
91872b9330 Reland "[wasm][test] Remove useless macro"
This is a reland of commit c74c9e63e1.
Types have been fixed to make MSVC happy.

Original change's description:
> [wasm][test] Remove useless macro
>
> Remove the BUILD macro, call a function with an initializer list
> instead. This makes the code slightly shorter, but most importantly it
> avoids an unnecessary macro, which improves maintainability and
> debuggability.
>
> R=jkummerow@chromium.org
>
> Bug: v8:13312
> Change-Id: I904ccf8e5b98c4d2f487c0cedc865db1386321c6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152482
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85259}

Bug: v8:13312
Cq-Include-Trybots: luci.v8.try:v8_win64_msvc_rel
Change-Id: Ie3ca8dcd295ec22385b5d40262c2cb03bfcfeda4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162932
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85278}
2023-01-13 10:45:30 +00:00
Leszek Swirski
d53540be77 Revert "Reland "[maglev] Test maglev on Mac Arm64 bots""
This reverts commit b791f4f040.

Reason for revert: Nope, still not yet: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/10154/overview

Original change's description:
> Reland "[maglev] Test maglev on Mac Arm64 bots"
>
> This is a reland of c6e96cf622
>
> Various bugs have been fixed since the revert and we're ready to try
> again.
>
> Original change's description:
> > [maglev] Test maglev on Mac Arm64 bots
> >
> > Also remove unnecessary maglev runs on x64 FYI bots, since maglev runs
> > on the main waterfall's x64 bots already.
> >
> > Bug: v8:7700
> > Change-Id: I5bb23c3ba7696b48f2fe1af4036a3de8c5b1801a
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128092
> > Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#85174}
>
> Bug: v8:7700
> Change-Id: I969e6ae7bd01adb12da0f1240e152232cca00f33
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156056
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85275}

Bug: v8:7700
Change-Id: I39ff626e799511d79665b4a9e9fb0f8ef7ae1b7f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4164679
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85277}
2023-01-13 10:19:32 +00:00
Jakob Linke
651d4d9748 [codet] Remove obsolete CodeT dispatch functions
These are no longer relevant now that CodeT is an unconditional alias
for CodeDataContainer.

Bug: v8:13654
Change-Id: Ia283f735cad380d1b97606715cc3b99768e49464
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161762
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85276}
2023-01-13 09:42:20 +00:00
Leszek Swirski
b791f4f040 Reland "[maglev] Test maglev on Mac Arm64 bots"
This is a reland of c6e96cf622

Various bugs have been fixed since the revert and we're ready to try
again.

Original change's description:
> [maglev] Test maglev on Mac Arm64 bots
>
> Also remove unnecessary maglev runs on x64 FYI bots, since maglev runs
> on the main waterfall's x64 bots already.
>
> Bug: v8:7700
> Change-Id: I5bb23c3ba7696b48f2fe1af4036a3de8c5b1801a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128092
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85174}

Bug: v8:7700
Change-Id: I969e6ae7bd01adb12da0f1240e152232cca00f33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156056
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85275}
2023-01-13 09:38:20 +00:00
Michael Lippautz
cb4a62e3c5 [heap] Trivial LocalEmbedderHeapTracer removals
Some trivial removals to avoid bouncing in and out of the tree with
larger changes.

No-try: true
Bug: v8:13207
Change-Id: I7d9a6eec0e9a1b047d4684b1cd2477a6a4314dbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156477
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85274}
2023-01-13 08:19:52 +00:00
Jakob Kummerow
34f63ad5e3 [bigint] Move a DCHECK to the right place
The termination check must happen before the DCHECK.

Fixed: chromium:1406177
Change-Id: I1c79473c8d5f8440ec5033f00cda25a945a25524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161768
Reviewed-by: Samuel Groß <saelo@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85273}
2023-01-13 08:02:44 +00:00
Hao Xu
c2a0acd47a [turbofan] Improve reduction of TruncateInt64ToInt32
When TruncateInt64ToInt32 is owned by Word32Op, it can be elided
because Word32Op automatically truncate int64 to int32.

Change-Id: Ia9dd4405f2b9b28710093dbc4c0471ea58df4e12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100664
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#85272}
2023-01-13 05:57:39 +00:00
v8-ci-autoroll-builder
21de2f66e7 Update V8 DEPS (trusted)
Rolling v8/build: d57dd8d..24fbcb5

Rolling v8/buildtools: 6409ca9..a1adda9

Rolling v8/buildtools/third_party/libc++/trunk: ccb0d32..cf80323

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8f4c5d6..a172c91

Rolling v8/third_party/depot_tools: 4f3b322..e38d195

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230110.3.1..version:11.20230112.1.1

Change-Id: Icb60e4dfa70c7e38bf4984580e3e75fab8e3d166
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162300
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85271}
2023-01-13 03:53:34 +00:00
Shu-yu Guo
c57a13dc3b [heap] Skip ephemeron values that shouldn't be marked
Bug: chromium:1403129
Change-Id: Ic26583be78e4e16a5bc18d8d8ce2bfb79ec70dad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136976
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85270}
2023-01-12 20:00:41 +00:00