Commit Graph

79529 Commits

Author SHA1 Message Date
Matthias Liedtke
2c36e2213f [wasm.gc] WebAssembly.Table: Allow 'i31ref' type specifier
Bug: v8:7748
Change-Id: Iec34e16219a76e83cfadf7724fda5a6cfa80f69c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115748
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84987}
2022-12-22 09:02:39 +00:00
Liu Yu
ac65192ce2 [loong64][mips64][centry] Remove the unused SaveFPRegsMode parameter
Port 605e46479a

Bug: v8:13606
Change-Id: I8dc8ba9c8ec57d01e290f1817d3fa1f8aa17263a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4117943
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#84986}
2022-12-22 08:11:52 +00:00
v8-ci-autoroll-builder
c3302c902a Update V8 DEPS (trusted)
Rolling v8/build: 8b3f134..92221be

Rolling v8/buildtools: 600a615..134af4c

Rolling v8/buildtools/third_party/libc++/trunk: 7b20455..7c5e4b4

Rolling v8/buildtools/third_party/libc++abi/trunk: 123239c..df3cc8e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1e43416..1651224

Rolling v8/third_party/depot_tools: 5decb17..cf31045

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221219.3.1..version:11.20221221.3.1

Rolling v8/tools/clang: cab032b..3b54a13

Change-Id: Iac0610e49ec38efc0cebb8c1d09ba07941596561
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4121196
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@{#84985}
2022-12-22 04:10:28 +00:00
Kunihiko Sakamoto
90eeb55fc7 Clear compilation cache in Isolate::ClearCachesForTesting()
This prevents blink leak detection from complaining when there is a
reference from SharedFunctionInfo to a blink object that is a target of
leak detection.

Bug: chromium:1393246
Change-Id: I9381f5e27e90c77e4ed721fcc3d257b5f6edd212
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4114056
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84984}
2022-12-22 01:39:38 +00:00
Milad Fa
dcba0f0201 PPC[liftoff]: Implement FP promote and demote
Change-Id: I9e2c79d9b1b679c2780135fe02c14f526bdf93f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120355
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84983}
2022-12-21 19:34:11 +00:00
Adam Klein
477116fb5a Skip mjsunit/md5 under --future due to maglev
It's failing regularly on the ubsan bot, closing the tree.

This CL also adds a 'variant == future' section in the mjsunit.status
file to enable easy disabling of maglev-specific failures.

No-Tree-Checks: true
Bug: v8:13612
Change-Id: I3c0f7725e1fb36577e97c662cd3830c64ba298e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120554
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84982}
2022-12-21 19:02:26 +00:00
Andrew Grieve
fd81728f2e Depend direclty on run_mksnapshot_default rather v8 for v8_external_startup_data_assets
This will prevent building v8 arm code when all we want is the snapshot
file.

Bug: chromium:1402705
Change-Id: If8137e8ef79ff1943c24d5bd71d8374e59bdf561
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4117695
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84981}
2022-12-21 18:40:14 +00:00
Olivier Flückiger
bbe24f16c6 [static-roots] Clear string padding faster
Clearing the exact amount of padding bytes apparently measurably
regresses some string operations. For freshly allocated strings we can
write into the payload area too, since that one is being written later.
This allows us to clear a statically known amount of padding bytes which
greatly speeds up the initialization.

Bug: chromium:1402898
Bug: v8:13466
Change-Id: Ib5fd4877a88c88fbf5247ed0e2c4b2de1775623d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118772
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84980}
2022-12-21 17:31:57 +00:00
Victor Gomes
dc950c32bd [maglev][arm64] Add Switch and Generator IRs
Bug: v8:7700
Change-Id: I63012676d85a97a06b2869666d17b9410e7ff71d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118773
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84979}
2022-12-21 17:10:42 +00:00
Victor Gomes
da4fa98a7d [maglev][arm64] Add ThrowIf*** IRs
Bug: v8:7700
Change-Id: I7229a10e5b7d0236a90a4d0a3456e1730fe35095
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120066
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84978}
2022-12-21 14:43:56 +00:00
Manos Koukoutos
3a232e7ab8 Revert "[maglev] Destroy jobs on BG thread"
This reverts commit 8623fd473b.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/12508/overview

Original change's description:
> [maglev] Destroy jobs on BG thread
>
> Maglev job destruction is suprisingly expensive, taking up roughly a
> third of total finalization time. Rather than destroying jobs as part of
> finalization, re-post them to the concurrent dispatcher to be destroyed
> in the background
>
> Bug: v8:7700
> Change-Id: I450d8a7b49737504c2aaebbfa7754e0ae15e7f05
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111238
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84970}

Bug: v8:7700
Change-Id: I797a34529652c814b11cd13309b2d3a5ff68266e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115747
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84977}
2022-12-21 14:20:51 +00:00
Victor Gomes
9869766097 [maglev][arm64] Add BranchIfReceiver + BranchIfUndefOrNull
Bug: v8:7700
Change-Id: I5b80062b463b07a9354909638415d834e128ec55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111529
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84976}
2022-12-21 13:44:50 +00:00
pthier
0e0057a7d8 [maglev][arm64] Port CallBuiltin
Drive-by: remove restriction to builtins without VarArgs.

Bug: v8:7700
Change-Id: I7a18626bc94460a53f7f25aedf1e30e79b3162ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118867
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84975}
2022-12-21 13:21:33 +00:00
Olivier Flückiger
f6d85958e0 [static-roots] Use operator== in HeapObject::Is##Type
Replace SafeEquals with normal equals operator in `IsUndefined` and
friends. This will allow us to have more efficient checks with static
roots, since pointers do not need to be decompressed.

After this change calling Is##Type on CodeObjects is no longer possible.
This is ensured by dchecks in operator==. The change might reveal more
callers that need to be fixed.

Bug: v8:13466
Change-Id: I3353d10aebb7a192a77281c44e4159f0da336297
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106849
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84974}
2022-12-21 12:33:34 +00:00
Nikolaos Papaspyrou
53e7cf253a Revert "Reland "[heap] Fix conservative stack scanning for client isolates""
This reverts commit 2a71e8637f.

Reason for revert: This probably blocked the V8 roll.
https://chromium-review.googlesource.com/c/chromium/src/+/4116621?tab=checks

Original change's description:
> Reland "[heap] Fix conservative stack scanning for client isolates"
>
> This is a reland of commit 36bac1bcae
>
> Original change's description:
> > [heap] Fix conservative stack scanning for client isolates
> >
> > With this CL, the context of stacks corresponding to all client isolates
> > are saved, so that conservative stack scanning can be used correctly
> > during a shared garbage collection. This happens:
> >
> > 1) in Heap::PerformSharedGarbageCollection, for the stacks of the shared
> >    isolate and the initiator;
> > 2) when an isolate's main thread is waiting in a safepoint; and
> > 3) when an isolate's main thread is parked.
> >
> > Bug: v8:13257
> > Change-Id: I9ff060f2c0c1ec12977c70d67d65d9c543e2d165
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027210
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Reviewed-by: Omer Katz <omerkatz@chromium.org>
> > Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84712}
>
> Bug: v8:13257
> Change-Id: I61df6eeca5a28e04eb3a858f7d601bc5f6312e49
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4092737
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84963}

Bug: v8:13257
Change-Id: I3a235f11e5fe55c476591a5274946aeb6cc9bf6e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111178
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84973}
2022-12-21 11:27:43 +00:00
Nikolaos Papaspyrou
24da079444 Revert "[heap] Merge mechanisms for disabling CSS"
This reverts commit f51e0bb1db.

Reason for revert: Dependent on crrev.com/c/4092737 that is being reverted.

Original change's description:
> [heap] Merge mechanisms for disabling CSS
>
> EmbedderStackStateScope is used to disable conservative stack scanning
> for cppgc when the stack is known to not contain heap pointers. Also,
> DisableConservativeStackScanningScopeForTesting is used to disable CSS
> for the V8 heap in tests that assume a precise GC. Until now, these two
> have used two different mechanisms for disabling CSS. This CL merges
> the two mechanisms and implements the latter scope via the former.
>
> Bug: v8:13257
> Change-Id: Ieca082657854fe2eff9eb5d95a30d48bb8eab44f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111954
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84964}

Bug: v8:13257
Change-Id: Id769af6215a2ed319ec96b354734a5362b2384cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111179
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84972}
2022-12-21 11:10:46 +00:00
Lu Yahan
39abc76699 [riscv][centry] Remove the unused SaveFPRegsMode parameter
Port commit 605e46479a
Bug: v8:13606

Change-Id: I0f700a2607860ad93be3b2f8492f5822e48b0c3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4119766
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#84971}
2022-12-21 11:02:39 +00:00
Leszek Swirski
8623fd473b [maglev] Destroy jobs on BG thread
Maglev job destruction is suprisingly expensive, taking up roughly a
third of total finalization time. Rather than destroying jobs as part of
finalization, re-post them to the concurrent dispatcher to be destroyed
in the background

Bug: v8:7700
Change-Id: I450d8a7b49737504c2aaebbfa7754e0ae15e7f05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111238
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84970}
2022-12-21 11:00:35 +00:00
pthier
baf110644c [maglev][arm64] Fix scratch register usage in deferred code
Usage of scratch registers acquired via scratch register scope in
deferred code is not valid, as the scope is not active within deferred
code.
Use proper temporaries (assigned by register allocation) instead.

Bug: v8:7700
Change-Id: If4ef4c09ea6f5a551f44bda15b8eeb1055d07070
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111170
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84969}
2022-12-21 10:47:48 +00:00
Toon Verwaest
f7547a135a Reland "[maglev] Enable --maglev with --future"
Bug: v8:7700
Change-Id: Ic14006b4f3bed1f48cb910b1d1eb2d45fc207d8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118771
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84968}
2022-12-21 10:33:13 +00:00
Dominik Inführ
72f041654d [objects] Use global safepoint in OptimizedCodeIterator if needed
MakeHeapIterable() in a shared heap isolate requires a global
safepoint. OptimizedCodeIterator uses MakeHeapIterable() but always
entered a local safepoint.

This CL changes OptimizedCodeIterator to request a global safepoint
for shared heap isolates.

Bug: v8:13267
Change-Id: I642a7731f4294cc1558de92d4daf5a1e3603f6cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110854
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84967}
2022-12-21 09:32:59 +00:00
Victor Gomes
ab957d40bd [maglev] Fix clobbering input in Switch
TurboAssembler::Switch can cloabber the input register
depending on the case value.

Bug: v8:7700
Change-Id: I5064826c8616389237c6c8b5fcd1b4e73e27ea29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110853
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84966}
2022-12-21 09:08:14 +00:00
Milad Fa
70bdadce8f PPC/s390: [centry] Remove the unused SaveFPRegsMode parameter
Port 605e46479a

Original Commit Message:

    The SaveFPRegsMode::kSave specializations of CEntry were unused.
    Remove this parameter to eliminate dead code.

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

Change-Id: I114dbd0045e891085182e5af79ff1f1201b48765
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4116857
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#84965}
2022-12-20 20:59:54 +00:00
Nikolaos Papaspyrou
f51e0bb1db [heap] Merge mechanisms for disabling CSS
EmbedderStackStateScope is used to disable conservative stack scanning
for cppgc when the stack is known to not contain heap pointers. Also,
DisableConservativeStackScanningScopeForTesting is used to disable CSS
for the V8 heap in tests that assume a precise GC. Until now, these two
have used two different mechanisms for disabling CSS. This CL merges
the two mechanisms and implements the latter scope via the former.

Bug: v8:13257
Change-Id: Ieca082657854fe2eff9eb5d95a30d48bb8eab44f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111954
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84964}
2022-12-20 20:16:24 +00:00
Nikolaos Papaspyrou
2a71e8637f Reland "[heap] Fix conservative stack scanning for client isolates"
This is a reland of commit 36bac1bcae

Original change's description:
> [heap] Fix conservative stack scanning for client isolates
>
> With this CL, the context of stacks corresponding to all client isolates
> are saved, so that conservative stack scanning can be used correctly
> during a shared garbage collection. This happens:
>
> 1) in Heap::PerformSharedGarbageCollection, for the stacks of the shared
>    isolate and the initiator;
> 2) when an isolate's main thread is waiting in a safepoint; and
> 3) when an isolate's main thread is parked.
>
> Bug: v8:13257
> Change-Id: I9ff060f2c0c1ec12977c70d67d65d9c543e2d165
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027210
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84712}

Bug: v8:13257
Change-Id: I61df6eeca5a28e04eb3a858f7d601bc5f6312e49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4092737
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84963}
2022-12-20 20:04:24 +00:00
Dominik Inführ
5d1e0837a4 Revert "[heap] Enable --shared-space by default"
This reverts commit b831775786.

Reason for revert: Causes failures on bots.

Original change's description:
> [heap] Enable --shared-space by default
>
> Bug: v8:13267
> Change-Id: I63c520203975397534d9942e3d78704d2c73ff5f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105024
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84960}

Bug: v8:13267
Change-Id: I0a046aa4a1068228cd56247512de0934db8a504f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4116859
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84962}
2022-12-20 19:59:06 +00:00
legendecas
804be91ab9 [ShadowRealm] side-effect-free inspection on cross-realm exceptions
The spec does not allow side effects on wrapping the exceptions
crossing the realm boundaries. We need to provide an easy way to inspect the exception-thrown cross-realms according to the last TC39 meeting
consensus.

Related spec change: https://github.com/tc39/proposal-shadowrealm/pull/382.

Bug: v8:11989
Change-Id: Ia78d94fd33cba689267aeacd028d662bd4a37fe9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3618759
Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84961}
2022-12-20 17:25:10 +00:00
Dominik Inführ
b831775786 [heap] Enable --shared-space by default
Bug: v8:13267
Change-Id: I63c520203975397534d9942e3d78704d2c73ff5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4105024
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84960}
2022-12-20 16:52:19 +00:00
Olivier Flückiger
4a37729f24 [static-roots] Ensure only initialized memory is dumped to r/o snapshot
Eliminate 3 sources of uninitialized memory ending up in the memory
snapshot. (1) padding of sequential strings (2) unused heap space (3)
filler objects for alignment.

Bug: v8:13466
Change-Id: I139a5ebdda32b454096137e0f3bee5a6696194be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110900
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84959}
2022-12-20 16:32:51 +00:00
Dominik Inführ
5b3965374e [heap] Fix slot recording in shared DescriptorArrays
The write barrier for DescriptorArray was skipping slot recording
unless is_compacting_ was set. However, that flag only applies to
local objects but not shared objects in client isolates.

This CL fixes this by using the same logic as the regular write
barrier for deciding whether to record slots or not.

Bug: v8:13267
Change-Id: Ib7c5567615aa04cf79225fc7613a9db1d4ae0f0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118866
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84958}
2022-12-20 15:14:07 +00:00
Matthias Liedtke
4c61bb3131 [wasm-gc] Interop: Do not throw on [[Get]] and prototype retrieval
With this change property accesses on WasmObject and WasmArray return
undefined instead of throwing.
Furthermore retrieving the prototype of a WasmObject/WasmArray returns
null.

Bug: v8:13523
Change-Id: I12e3b9fb6ac9a7305f001a3b3835854068c3064f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110995
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84957}
2022-12-20 14:16:19 +00:00
Manos Koukoutos
57b17e0cf2 [wasm-gc] Add TypeGuards when optimizing away type casts
This way we do not lose type information while optimizing.

Bug: v8:7748
Change-Id: I5c25a3863e4400f2f69431e73b30fd7c0e626a27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4117071
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84956}
2022-12-20 14:15:15 +00:00
Manos Koukoutos
2f852102d9 [wasm-gc] Final types
We add final types to wasm-gc.
- We introduce a `kWasmSubtypeFinalCode` as an alternative to
  `kWasmSubtypeCode`.
- Behind a flag, we interpret types behind this code as final, as well
  as types outside a subtype definition by default.
- For final types, type checks for call_indirect and ref.test etc. are
  reduced to simple type identity checks.

Bug: v8:7748
Change-Id: Iabf147b2a15f43abc4c7d1c582f460dbdc645d66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096478
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84955}
2022-12-20 14:03:30 +00:00
Jakob Linke
605e46479a [centry] Remove the unused SaveFPRegsMode parameter
The SaveFPRegsMode::kSave specializations of CEntry were unused.
Remove this parameter to eliminate dead code.

Bug: v8:13606
Change-Id: If3d6f5382101acd477c5d9559a84c88b02a72123
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4114283
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84954}
2022-12-20 12:32:52 +00:00
Jakob Linke
dca1fbd13b [compiler] Extend --trace-opt output
- Add timing infos to TraceAbortedJob output since aborted jobs still
  take time and resources:

 [aborted optimizing ... - took 0.005, 17.757, 0.061 ms]

- Add the calling code kind to 'not marking ... for optimization'
  since it matters which tier we're currently stuck in:

 [not marking function ... (MAGLEV) for optimization: already queued]

Bug: v8:7700
Change-Id: I9a123ddaa58ed310605cd28473f53ce8ea004fd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110747
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84953}
2022-12-20 11:54:03 +00:00
Marja Hölttä
250525be1d [rab/gsab] Fix ValueSerializer error handling
Error mode: a TypedArray backed by RAB claims it's not backed by RAB.

Drive-by: disable resizability even harder when --harmony-rab-gsab is
not on.

Bug: v8:11111, chromium:1402139
Change-Id: I937c69f6124419cc8d29da0195686bc3b9a5c281
Fixed: chromium:1402139
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110751
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84952}
2022-12-20 10:38:01 +00:00
v8-ci-autoroll-builder
fd98802746 Update V8 DEPS (trusted)
Rolling v8/build: e8612da..8b3f134

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/50ee8ff..1e43416

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221218.2.1..version:11.20221219.3.1

Rolling v8/tools/clang: 7356f69..cab032b

Change-Id: I48016983878fc3ae79f8c848d76d9e3afb042771
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4117873
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@{#84951}
2022-12-20 08:13:10 +00:00
Michael Lippautz
8d4af46404 [heap] Convert unittest to avoid using deprecated APIs
- Converts tests in EmbedderTracingTest to UnifiedHeapTest
- Move EmbedderRootsHandler tests to their own file
- Adds support for CppHeap in ManualGCScope
- Drive-by fix typo

Reland: Fix issue with attaching a CppHeap while incremental marking
is already running.

This reverts commit d90a98edc1.

Change-Id: Ifafa9145df3103578c4c7f1b3b0336b4bd9f34dd
Bug: v8:13207
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110941
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84950}
2022-12-20 08:12:07 +00:00
Michael Lippautz
5373b52f01 [heap] Remove outdated map space compaction test
Change-Id: Ieb25f9f1255aa911e5d761a52b580094f15c6399
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110943
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84949}
2022-12-20 08:11:02 +00:00
Michael Achenbach
3d46a713bb Revert "[turbofan] Simplifying (x+k1)==k2 into x==(k2-k1)"
This reverts commit e9333ebd3c.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/24520/overview

Original change's description:
> [turbofan] Simplifying (x+k1)==k2 into x==(k2-k1)
>
>
> Change-Id: I234da79e1f53fa0fc15494fe6d31742d4e6eea97
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055393
> Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84947}

Change-Id: I9e86f6f9653efff0fd0da439e270df5c7da29b20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111953
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84948}
2022-12-20 07:38:49 +00:00
JianxiaoLuIntel
e9333ebd3c [turbofan] Simplifying (x+k1)==k2 into x==(k2-k1)
Change-Id: I234da79e1f53fa0fc15494fe6d31742d4e6eea97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055393
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84947}
2022-12-20 02:15:51 +00:00
JianxiaoLuIntel
99eba76742 [test] Fix RunInt64AddShift
Change-Id: I1972b65c75f08130ecda45d36edc4c1431c3ea8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100665
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84946}
2022-12-20 01:54:39 +00:00
Fanchen Kong
e967e6c46e [turbofan] Reduce BitcastWord32ToWord64 with truncated word32 input
This change reduce the TruncateInt64ToInt32 and BitcastWord32ToWord64 pair at machine operator reducer, since the upper 32 bits are not important.

With this change, a reduncant mov can be avoid e.g. at,

  // script
  function func() {
    a = [];
    for (j = 0; j < 13; j++) {
      a[j] = j + 1;
    }
    return a;
  }

  // Assembly
  // ...
  movl rdi,[r8+0xb]
  movl rbx,[r8+0xb] // can be removed
  REX.W movq r9,rdi
  sarl r9, 1
  // ...

Change-Id: I6a128d9606c093df50fe9286201c1b979900864d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115155
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84945}
2022-12-20 01:31:28 +00:00
Shu-yu Guo
b41df346db [ShadowRealm] Make CallSite#getFunction/getThis throw
ShadowRealms have a callable boundary: there cannot be any edges between
objects in the ShadowRealm and those from other realms. V8's
prepareCallStack API breaks this invariant via getFunction() and
getThis(). This CL makes those functions throw when called inside
ShadowRealms.

See also
https://docs.google.com/document/d/1aXEy4YCC9CduxLs7MGw-UOm0P4OuG7W-cScBnLG3ALI/edit?usp=sharing

Bug: v8:11989
Change-Id: I5a2b8fa735c0f10583c8cede4062645986b2d914
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4108810
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84944}
2022-12-19 20:13:27 +00:00
Toon Verwaest
ea1bac5386 [maglev] Drop values flowing into resumable loops
All IFS values of resumable loops are loop phis, so values from before
the loop can safely be dropped. In fact, if we don't drop them we might
not be able to restore them and crash in a safety check. Eagerly
dropping the values allows us to keep the safety check.

Bug: v8:7700
Change-Id: I99ef80e35db5aba965dc1c5c9d78f1d085e589fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110940
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84943}
2022-12-19 18:52:19 +00:00
pthier
0621c2d553 [string] Copy when sharing strings that are not in shared space
Usually sharable strings are automatically promoted to shared old space
and can be shared in-place.
There are currently two exceptions:
- When using a non-moving GC (e.g. minor MC)
- Strings in LO space
Account for these exceptions by copying strings to the respective shared
space when sharing them.

Bug: chromium:1400048
Change-Id: I20713b5f32f449c14febd848e289b5767530a257
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110752
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84942}
2022-12-19 16:28:22 +00:00
Michael Lippautz
d90a98edc1 Revert "[heap] Convert unittest to avoid using deprecated APIs"
This reverts commit 6a892e14f9.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20stress-incremental-marking/10329/overview

Original change's description:
> [heap] Convert unittest to avoid using deprecated APIs
>
> - Converts tests in EmbedderTracingTest to UnifiedHeapTest
> - Adds support for CppHeap in ManualGCScope
> - Drive-by fix typo
>
> Bug: v8:13207
> Change-Id: Ic50333f141ec9766c9db5250463461832dfe6d17
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110749
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84940}

Bug: v8:13207
Change-Id: I926f5b5078b8995f8352a827c946cbbe5b18a259
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4116791
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84941}
2022-12-19 16:27:19 +00:00
Michael Lippautz
6a892e14f9 [heap] Convert unittest to avoid using deprecated APIs
- Converts tests in EmbedderTracingTest to UnifiedHeapTest
- Adds support for CppHeap in ManualGCScope
- Drive-by fix typo

Bug: v8:13207
Change-Id: Ic50333f141ec9766c9db5250463461832dfe6d17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110749
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84940}
2022-12-19 15:24:10 +00:00
Vasili Skurydzin
aee5fb0990 Reland "Use BigInts in processor.mjs and related code to avoid unsafe ints in calculations"
This is a reland of commit efc1a98c53

Changes since revert:
- Handle "shared-library", "code-{deopt,move,delete}", "feedback-vector", "sfi-move" events

Original change's description:
> Use BigInts in processor.mjs and related code to avoid unsafe ints in
calculations
>
> Bug: v8:13440
> Change-Id: Ie03b831b511a49fb475b9f303ef8662189bdaf3d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4017455
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84698}

Change-Id: If45d38526cab887a59f60e3becfbcb084c3d41d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4086641
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#84939}
2022-12-19 15:15:48 +00:00
Jakob Linke
0b9fa062f0 Reland "[maglev] Fix %OptimizeOsr when called from Maglev frames"
This is a reland of commit 833731b20b

Original change's description:
> [maglev] Fix %OptimizeOsr when called from Maglev frames
>
> This (test-only) runtime function only supported unoptimized frames as
> callers. Add support for Maglev frames as well by extracting the
> relevant BytecodeArray and bytecode offset.
>
> This reverts commit 955de73ee5.
>
> Bug: chromium:1400549,v8:7700
> Change-Id: I80f80f8736ff0400d6d47e355add2a07cdc4559e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111851
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84931}

Bug: chromium:1400549,v8:7700
Change-Id: I79fadaa0a82314a3fdd4970e9429d83ab06aff09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111950
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84938}
2022-12-19 14:30:33 +00:00