Commit Graph

79640 Commits

Author SHA1 Message Date
pthier
2f2e8c4024 [maglev] Fix negate 0 with smi feedback
With smi feedback, we use int32 operations for arithmetics.
When negating 0, we have to fallback to float as we can't represent -0
in int32. We can simply deopt in that case without causing a deopt loop, as a non-smi result will change the feedback to kSignedSmallInputs (from kSignedSmall).

Bug: chromium:1403102
Change-Id: Ic27c267349a1de6904639e91b1cade2c4f7d1fe2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4122829
Reviewed-by: 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@{#84998}
2022-12-22 16:36:23 +00:00
Victor Gomes
20183a7916 [maglev][arm64] Fix ToBoolean
We should compare only 32 bits for smi when pointer compression
is enabled.

Bug: v8:7700
Change-Id: I6cbc22e57e873cb8ab3c26a4b655a393e258e697
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4122831
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84997}
2022-12-22 16:28:21 +00:00
Victor Gomes
8d49029b64 [maglev][arm64] Add CheckMaps
Bug: v8:7700
Change-Id: I7d4a194be5c488ab90e3684db2e63f42a0a9738a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115759
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84996}
2022-12-22 15:07:40 +00:00
Qifan Pan
6c90e3a9b3 [turbofan] Support the rest of the BigInt comparisons
This CL introduced four more operators in TurboFan: BigIntLessThan,
BigIntLessThanOrEqual, and the corresponding speculative operators so
that all the BigInt comparisons are supported.

This CL also implemented fast paths for small BigInt inputs.

Bug: v8:9407
Change-Id: Iaa2d4dbebf68656d775a7feb65b97fb5c598ec23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111951
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84995}
2022-12-22 15:00:10 +00:00
Qifan Pan
7396b09771 [turbofan] Collect BigInt64 feedback for tagged equality
Collect BigInt64 feedback when lhs and rhs reference the same value.

Bug: v8:9407
Change-Id: I1045d839da28b432fc343cbf9c98915509b7ed71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111602
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#84994}
2022-12-22 14:48:34 +00:00
Clemens Backes
e17eee4894 [wasm] Fix printing of wasm-to-js frames
After https://crrev.com/c/3859787 those frames would be printed like
standard Wasm frames, but in the place of the WasmInstanceObject, they
have a WasmApiFunctionRef object instead.
So special-case the {WasmToJsFrame::instance()} to load the instance
properly. Also special-case the {position()} accessor for imported
functions.

R=victorgomes@chromium.org

Bug: chromium:1402270
Change-Id: I39805805a50e7a73d7d8075c63c46bdf5a373a33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4116778
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84993}
2022-12-22 13:56:23 +00:00
Manos Koukoutos
bd1562caa2 [wasm] Pass module to wrapper compilation
Pass the {WasmModule} in the {CompilationEnv} argument in
{CompileWasmImportCallWrapper} to {BuildWasmToJSWrapper}, which in
turn passes it to {FromJS}.

Bug: chromium:1401934
Change-Id: I8d689d881e4d8013cd4dcb6cfb54d663d1c4ec38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120443
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84992}
2022-12-22 13:47:35 +00:00
Olivier Flückiger
b247270178 Reland "[static-roots] Enable static roots on supported configurations"
This is a reland of commit c04ca9cc63

Original change's description:
> [static-roots] Enable static roots on supported configurations
>
> The static root values are not actually used yet.
>
> Bug: v8:13466
> Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84850}

Bug: v8:13466
Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84991}
2022-12-22 13:06:38 +00:00
Olivier Flückiger
b97130344d [static-roots] Avoid accessing uninitialized read only roots
In the future we want to be able to return statically known pointers of
read only roots. To be able to do so we must ensure that heap
initialization code does not rely on the fact that the root is not
initialized yet and the accessor returns null. Instead we must
explicitly test if the root is initialized.

Bug: v8:13466
Change-Id: Id2b93388f499a58ff26ca5fb566b4538e00916e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4106452
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84990}
2022-12-22 11:37:40 +00:00
Victor Gomes
b844614174 [maglev][arm64] Add TestUndetectable and TestTypeOf
Bug: v8:7700
Change-Id: I8212e14570481d76b26782afbd721f1884fae009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115753
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84989}
2022-12-22 10:30:47 +00:00
Victor Gomes
004fbc0196 [maglev] Share LogicalNot implementation
Bug: v8:7700
Change-Id: I67bc1ab26ec1065a6ede1ba2ada059d800adb93b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110807
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84988}
2022-12-22 09:36:49 +00:00
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