Commit Graph

78426 Commits

Author SHA1 Message Date
Matthias Liedtke
1688cad47f [wasm-gc] Add new ref.cast null taking any reference
This extends crrev.com/c/3948663 (ref.cast) by adding the new
"ref.cast null" which only behaves different for null for which
it doesn't trap but instead casts the null value to the target
(null)type.

Bug: v8:7748
Change-Id: I3ac85d83cc06c95af8830c1c60ae2f28414e2570
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960329
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83934}
2022-10-26 15:06:50 +00:00
Victor Gomes
c9e8be7cd3 [maglev] Remove overzealous DCHECK
It looks like a map can become a migration target between
graph building and codegen.

Bug: v8:7700
Change-Id: I88562d69ae62ce5e6c168c73d8ad5eb19099c03b
Fixes: v8:13419
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3982113
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83933}
2022-10-26 13:47:16 +00:00
Victor Gomes
5e99228909 [maglev] Add an InternalizedString known type
Bug: v8:7700
Change-Id: Iea926696fec0a0289322e5c9bc72b86225c57b23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3980256
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83932}
2022-10-26 13:22:20 +00:00
Samuel Groß
5571f9973c Fix incorrect DCHECK in ExternalPointerTable::Mark
The DCHECK is not correct: if we're marking a not-fully-initialized
object, then the handle can change from its uninitialized value (zero)
to a valid handle prior to this DCHECK, therefore causing it to fail.
This scenario is fine though, since the new entry will already be marked
as alive as it has just been allocated.
To fix that, the DCHECK now allows the two values to mismatch iff the
handle is zero.

Bug: v8:13297
Change-Id: If640d457da1d78a3d1666ffa930c27116a6080c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981553
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83931}
2022-10-26 12:43:09 +00:00
Victor Gomes
77da3d0dcd [maglev] Fix negative char code in StringFromChar
In the constant branch, we need to check if char code is
bigger than zero.
In the generic branch, we do the `andl` before the
comparison.

This also fixes issues with aliasing the code char with
the result register.

Bug: v8:7700
Change-Id: I41a8a22a1acf3feabdee34a61d77c53bcda6892b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981276
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83930}
2022-10-26 12:23:59 +00:00
Toon Verwaest
f51fa7ddd8 [maglev] Insert and keep track of empty unstable map sets
They do have a meaning as well: there are no unstable maps. When we need
to clear unstable maps (and drop related stable maps), we can avoid
doing this for empty unstable map sets since no unstable maps can have
transitioned to new stable maps.

Bug: v8:7700
Change-Id: Ie74f62b6bff81dff8118a46e22a2ea81550d09c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981278
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83929}
2022-10-26 11:51:54 +00:00
Michael Lippautz
b835d86cd4 Revert "[heap] Update young nodes of traced handles"
This reverts commit 31edec6406.

Reason for revert: Crashes on GPU bots

Original change's description:
> [heap] Update young nodes of traced handles
>
> Fix regressions caused by
>   https://crrev.com/c/3966952
>
> Update and clear the list of young nodes which would otherwise be
> repeatedly processed during Scavenge and full GCs.
>
> Bug: v8:13372, chromium:1378097
> Change-Id: I1b302f75f970385e9e0259fa4b1719d9262c1f2a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981273
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83922}

Bug: v8:13372, chromium:1378097
Change-Id: Id2b4f565e2a92d01a54942630627cb8aebec06d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981493
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@{#83928}
2022-10-26 11:01:11 +00:00
Omer Katz
20b395a8ef Reland "[heap] Fix racy OOM in new space concurrent sweeping"
This is a reland of commit 95eece3068

Original change's description:
> [heap] Fix racy OOM in new space concurrent sweeping
>
> Some tests are flakily failing due to a timing issue between new space
> concurrent sweeping and allocations.
> When new spaces and other spaces are also swept, each concurrent thread
> will take one new space page. If a young allocation happens right after
> the atomic pause finished, it's possible that all new space pages are
> held by concurrent threads. The main thread will try to contribute to
> sweeping but get no pages, and fail to allocate.
>
> Fix by restoring the round robin order of sweeping, such that not all
> threads start with new space.
>
> Bug: v8:12612, v8:13413
> Change-Id: I3b448199b4678c339f9e59f7ca31d9e1e0e76011
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976043
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83918}

Bug: v8:12612, v8:13413
Change-Id: Idbd5cbb53c9f43290e02d10d85ee4199ea9a4136
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3980756
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83927}
2022-10-26 10:26:23 +00:00
Toon Verwaest
199304b26b [maglev] Fix typecheck in load from constant folding
Bug: v8:7700
Change-Id: I3de3245502340283c323d98191623c1fcaf646a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3980758
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83926}
2022-10-26 10:25:19 +00:00
Tobias Tebbi
db83e72034 [turbofan] do not optimize any stores for field type None
Fixed: chromium:1378239
Change-Id: If9d05ed391175a7a3923ab2108231759e649bb44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981277
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83925}
2022-10-26 09:57:43 +00:00
Kim-Anh Tran
1e029c0694 [inspector] Remove left-over definition used for instrumentation breaks
Bug: none
Change-Id: Ia25afe2251088dfa59a8b6b03496c444c82dc74d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981274
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83924}
2022-10-26 09:47:50 +00:00
Victor Gomes
539d2b7dc3 [maglev] Stable maps can become stale after a side effect
Unstable maps can transition to stable ones after a side effect,
therefore we cannot trust the set of stable maps. The CL nukes
from the set from stable_maps, equivalent of setting it to
the universal set.

Bug: v8:7700
Change-Id: I457f76efd48ec7eec747233ec063ebe265d3085a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3978169
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83923}
2022-10-26 09:39:59 +00:00
Michael Lippautz
31edec6406 [heap] Update young nodes of traced handles
Fix regressions caused by
  https://crrev.com/c/3966952

Update and clear the list of young nodes which would otherwise be
repeatedly processed during Scavenge and full GCs.

Bug: v8:13372, chromium:1378097
Change-Id: I1b302f75f970385e9e0259fa4b1719d9262c1f2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981273
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83922}
2022-10-26 09:17:56 +00:00
Matthias Liedtke
ae4280faa3 [wasm] Fix potential deadlock on profiling runs
The deadlock occurs when the Isolate is destroyed before a wasm compile
job is finished causing the `WasmEngine::LogCode` to deadlock itself
when the TaskRunner is already in the terminated state.

Change-Id: I36dc68aecbcb2054d7da61d22defd0eff3130f62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976515
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83921}
2022-10-26 09:13:06 +00:00
Omer Katz
4d95ff1a21 [heap] Prevent new space from allocation small LABs
Update the free list implementation for new space to set a larger
minimum size and skip redundant step in the allocation logic.

Bug: v8:12612
Change-Id: I480fe99cf4cfad7c25d687540b7841cd56d41d47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976508
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83920}
2022-10-26 09:12:04 +00:00
Omer Katz
158de3ef88 Revert "[heap] Fix racy OOM in new space concurrent sweeping"
This reverts commit 95eece3068.

Reason for revert: Broke single generation bot

Original change's description:
> [heap] Fix racy OOM in new space concurrent sweeping
>
> Some tests are flakily failing due to a timing issue between new space
> concurrent sweeping and allocations.
> When new spaces and other spaces are also swept, each concurrent thread
> will take one new space page. If a young allocation happens right after
> the atomic pause finished, it's possible that all new space pages are
> held by concurrent threads. The main thread will try to contribute to
> sweeping but get no pages, and fail to allocate.
>
> Fix by restoring the round robin order of sweeping, such that not all
> threads start with new space.
>
> Bug: v8:12612, v8:13413
> Change-Id: I3b448199b4678c339f9e59f7ca31d9e1e0e76011
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976043
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83918}

Bug: v8:12612, v8:13413
Change-Id: Id65358e55721b98d10f6737adaf057482aef103b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3981275
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83919}
2022-10-26 09:01:10 +00:00
Omer Katz
95eece3068 [heap] Fix racy OOM in new space concurrent sweeping
Some tests are flakily failing due to a timing issue between new space
concurrent sweeping and allocations.
When new spaces and other spaces are also swept, each concurrent thread
will take one new space page. If a young allocation happens right after
the atomic pause finished, it's possible that all new space pages are
held by concurrent threads. The main thread will try to contribute to
sweeping but get no pages, and fail to allocate.

Fix by restoring the round robin order of sweeping, such that not all
threads start with new space.

Bug: v8:12612, v8:13413
Change-Id: I3b448199b4678c339f9e59f7ca31d9e1e0e76011
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976043
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83918}
2022-10-26 08:24:49 +00:00
Simon Zünd
5d0b8b0ff1 [debugger] Throw exception if 'var x' fails in debug eval in module
This is an extension to the fix landed in https://crrev.com/c/3295348.

We should also throw the exception when we are paused in a module.
This is a constellation that can only happen with debug-evaluate as
'eval's in modules are always indirect, whereas debug-evaluate uses
direct, sloppy eval.

R=bmeurer@chromium.org, leszeks@chromium.org

Bug: chromium:1352303
Change-Id: I7373462dc6ae419e0a1a05a385ab81f204ff03ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976510
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83917}
2022-10-26 05:39:32 +00:00
v8-ci-autoroll-builder
92b138b160 Update V8 DEPS (trusted)
Rolling v8/build: 35368b6..adcb306

Rolling v8/buildtools: 32851f2..4c4e17b

Rolling v8/buildtools/reclient: re_client_version:0.69.0.458df98-gomaip..re_client_version:0.81.1.0853992-gomaip

Rolling v8/buildtools/third_party/libc++/trunk: 166132d..0487904

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/cf46d16..2f63d55

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221024.1.1..version:10.20221025.2.1

Rolling v8/third_party/instrumented_libraries: 459048b..f764ffc

Rolling v8/tools/clang: bc55ae7..863e4bb

Change-Id: I512c7139152f29e67a8b7c665b67bdd5eca5a96a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3978533
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@{#83916}
2022-10-26 04:02:42 +00:00
Zequan Wu
91ffb88d4e Mark Data constructor deleted.
Because Data's ctor is not defined, debug info optimization will
generate empty debug info for it. Adding standalone_debug attribute for
it to have complete debug info for this class.

Bug: 
Change-Id: I0ca023518b1f5142a63686ba5a41007ac067c1f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963719
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Zequan Wu <zequanwu@google.com>
Auto-Submit: Zequan Wu <zequanwu@google.com>
Cr-Commit-Position: refs/heads/main@{#83915}
2022-10-25 23:02:10 +00:00
Ilya Rezvov
57db447bf2 Revert "Reland "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews""
This reverts commit 05bd7d9cd6.

Reason for revert: Still looks like a reason for rollout tests failure https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1179312/overview

Original change's description:
> Reland "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
>
> This reverts commit 4b28d53011.
>
> Original change's description:
> > [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
> >
> > This CL adds TurboFan optimizations for length and element access
> > of TypedArrays and DataViews that are rab/gsab-backed.
> >
> > To enable this optimization, this CL builds the necessary machinery
> > required to allow machine operators at the front of the pipeline
> > (before simplified lowering). Some key changes to allow this are:
> >  - Introduce Type::Machine() to allow the typer and the verifier to
> >    provide a type to those machine operators in parts of the pipeline
> >    that require nodes to be typed.
> >  - Add EnterMachineGraph and ExitMachineGraph operators that define
> >    the boundary between early machine graphs and the normal graph with
> >    JS semantics.
> >  - Give Branch operators a BranchSemantics parameter to distinguish
> >    between machine branches (condition is a machine level value) and
> >    JS branches (condition is a JS boolean value) and have phases that
> >    handle branches decide on the branch's semantics based on this
> >    parameter instead of the position in the pipeline.
> >  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
> >    machine graphs. In particular, constants required special handling,
> >    because they are cached in the graph but they may have uses in both
> >    a machine and the JS graph, which prevents consistent typing of
> >    them.
> >  - Moved lots of logic from JSCallReducerAssembler into
> >    [JS]GraphAssembler such that functionality can be shared between
> >    different phases (e.g. JSNativeContextSpecialization and
> >    JSCallReducer need to generate logic to compute a TypedArray's
> >    byte length). Extended assembler interface in general with
> >    additional TNode<> overloads.
> >
> >
> > Bug: v8:11111, chromium:1358505
> > Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#83881}
>
> Bug: v8:11111, chromium:1358505, v8:13412
> Change-Id: I61664e18a9dba1741bcb70ec22ba6342521f500a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976512
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83904}

Bug: v8:11111, chromium:1358505, v8:13412
Change-Id: I960a34cfdb861feddf51cbcd759218f39b26cd56
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3980313
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Ilya Rezvov <irezvov@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83914}
2022-10-25 22:37:08 +00:00
Shu-yu Guo
52a72050c7 [test262] Roll test262
c15d4bef..ade328d5

Bug: v8:7834
Change-Id: I968776bb40ff981f57333a2901f57a100e4b626f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3979148
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83913}
2022-10-25 18:44:07 +00:00
Dominik Inführ
34d6823f8b [heap] Rename safepoint scopes
This CL simplifies safepoint scopes, there are now three kinds of
safepoint scopes:

1) IsolateSafepointScope - performs an isolate local safepoint
2) GlobalSafepointScope - a global safepoint across multiple isolates
3) SafepointScope - chooses based on condition between local/global

This CL is not supposed to change current safepointing behavior in
any way. The CL renames the current SafepointScope to
IsolateSafepointScope and changes GlobalSafepointScope to always
perform a global safepoint. It then also introduces the new
SafepointScope and makes use of it for snapshotting and in heap.cc.

Bug: v8:13267
Change-Id: Ie7e1f81b6158c98d3d98552ba735cc73c9b869c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3973310
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83912}
2022-10-25 16:32:55 +00:00
Milad Fa
6cd8c58097 PPC: Add r15 to the list of liftoff cache registers
kLiftoffFrameSetupFunctionReg is using r15 which needs it
to be part of the LO cache registers.

Change-Id: I5b2510124d8c5a688decd3874b2fa8c85d40d728
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3975382
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83911}
2022-10-25 16:20:14 +00:00
Victor Gomes
51bcc50fca [maglev] Use precalculated indices before TryInlineBuiltin
Bug: v8:7700
Change-Id: I4316ff51401c8dae5ef0345936e66211d1466f44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3978010
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83910}
2022-10-25 15:34:14 +00:00
Leszek Swirski
5537dc9c20 [maglev] Introduce load elimination
Keep track of simple field loads and stores in NodeInfo, and try to
reuse them where possible instead of recalculating them.

Bug: v8:7700
Change-Id: I1f5eb3cb37ac76bcbc1ce75f243a36a31e71c907
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974888
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83909}
2022-10-25 15:26:44 +00:00
Victor Gomes
1ac9d34c42 [maglev] Fix maps union in merge
We need to update the ZoneHandleSet reference.

Bug: v8:7700
Change-Id: I7908f033170b8d698383bddc10ac55f7bbc7d25e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976042
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83908}
2022-10-25 15:03:04 +00:00
Toon Verwaest
6d6bd7ca2e [maglev] Fold constant loads
If the lookup-start-object is a constant and we're loading a constant
property, return a constant.

Bug: v8:7700
Change-Id: I260cbb0c69e362bef7ccad3ec8d2ada55fb56bfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976514
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83907}
2022-10-25 14:09:34 +00:00
Michael Achenbach
c33edebc8b [infra] Improve shards on slow bots
Improve testing shards on windows, which is the second slowest
configuration.

On the slowest config (linux32) we can't do much as the bottleneck
is gcmole. But the collection of gcmole data is now moved to the
end, which should save ~30 seconds per build at least. That's what
it costs to collect the other tests that run before.

Bug: v8:11428
Change-Id: I0a4f484b37396d4883b4f1d937a476e125c84c00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3978090
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83906}
2022-10-25 14:05:05 +00:00
Victor Gomes
84cc145f98 [maglev] Fix StringFromCharCode inlined builtin
- Fixes the operand index for the first argument of the builtin.
- Adds fast paths for constant code point.

Bug: v8:7700
Change-Id: I0bf398a7b6410f900b602218c79558af73f42e66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976509
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83905}
2022-10-25 13:21:54 +00:00
Nico Hartmann
05bd7d9cd6 Reland "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
This reverts commit 4b28d53011.

Original change's description:
> [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
>
> This CL adds TurboFan optimizations for length and element access
> of TypedArrays and DataViews that are rab/gsab-backed.
>
> To enable this optimization, this CL builds the necessary machinery
> required to allow machine operators at the front of the pipeline
> (before simplified lowering). Some key changes to allow this are:
>  - Introduce Type::Machine() to allow the typer and the verifier to
>    provide a type to those machine operators in parts of the pipeline
>    that require nodes to be typed.
>  - Add EnterMachineGraph and ExitMachineGraph operators that define
>    the boundary between early machine graphs and the normal graph with
>    JS semantics.
>  - Give Branch operators a BranchSemantics parameter to distinguish
>    between machine branches (condition is a machine level value) and
>    JS branches (condition is a JS boolean value) and have phases that
>    handle branches decide on the branch's semantics based on this
>    parameter instead of the position in the pipeline.
>  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
>    machine graphs. In particular, constants required special handling,
>    because they are cached in the graph but they may have uses in both
>    a machine and the JS graph, which prevents consistent typing of
>    them.
>  - Moved lots of logic from JSCallReducerAssembler into
>    [JS]GraphAssembler such that functionality can be shared between
>    different phases (e.g. JSNativeContextSpecialization and
>    JSCallReducer need to generate logic to compute a TypedArray's
>    byte length). Extended assembler interface in general with
>    additional TNode<> overloads.
>
>
> Bug: v8:11111, chromium:1358505
> Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83881}

Bug: v8:11111, chromium:1358505, v8:13412
Change-Id: I61664e18a9dba1741bcb70ec22ba6342521f500a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976512
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83904}
2022-10-25 13:01:38 +00:00
Simon Zünd
f44d43de74 [inspector] Land regression test that now succeeds
With the blocklist re-use experiment we now handle locals near the
script/global scope correctly.

This CL lands the regression test of @bmeurer since it passes now.

R=bmeurer@chromium.org

Fixed: chromium:1209117
Change-Id: I2cb0ec1689b4fd32501886cc8bdd49486beef4dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976513
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83903}
2022-10-25 12:53:04 +00:00
Clemens Backes
55960080c3 [wasm] Remove EmptyImmediateObserver
Replace the template parameter by a parameter list, so we can also pass
zero observers.
This removes nullptr checks and the {EmptyImmediateObserver}
implementation.

R=jkummerow@chromium.org

Change-Id: Ia10bf319039c2b3af9376deb6613b9b683c40d11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3973268
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83902}
2022-10-25 12:28:21 +00:00
Juan José Arboleda
69ad9552b2 [profiler] add Serialize to v8::CpuProfile
Support JSON serialization in `v8::CpuProfile`

Bug: v8:13291
Change-Id: I638cf2c1f7acba9c5b8a2932d84c9882d968c90d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3905128
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83901}
2022-10-25 10:49:04 +00:00
Matthias Liedtke
0486ef3727 Reland "[wasm] ref.call: Consume sig index immediate"
Follow-up to commit 6168782925
With this change 0x14 now also consumes a sig index immediate.
This will allow users to switch from 0x17 back to 0x14 without
breaking changes. After another grace period, 0x17 can be removed.

Reland of commit I65fe8b5bceb70323dd5e6450ec7bcc02696b15fa adapted by the concurrent changes in 35cc93aa42.
(This reverts commit 01379ba6d65371b70908da8e8386a9d9993aa2f9.)

Change-Id: I699095afb85d460e1fef8bd88abfd4c748090eda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3977828
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83900}
2022-10-25 09:39:13 +00:00
Qifan Pan
7eb43bf494 [turbofan] Decompose CheckBigInt64 and make it precise
This CL solves two problems:

- Eliminating redundant CheckBigInt/CheckBigInt64 by decomposing
  CheckBigInt64 to CheckBigInt and CheckedBigIntToBigInt64.
- Having precise checks for SignedBigInt64 to make the range of BigInt64
  consistent in CheckedBigInt64Ops and CheckedBigIntToBigInt64.
  Otherwise, there would be semantic difference between the subgraphs
  where we keep CheckBigInt64 inbetween two CheckedBigInt64Ops (e.g.,
  the variant assert_types) and the subgraphs where we eliminate the
  checks.

Bug: v8:9407
Change-Id: I79a5c99e12eb3f3ffc7b5cbfc51191e6792f634b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960333
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83899}
2022-10-25 08:57:30 +00:00
Marja Hölttä
100fbd89f2 [compiler] Fix FrameStates after a possible lazy deopt around JSFindNonDefaultConstructorOrConstruct
Bug: v8:13091,chromium:1375073
Change-Id: I160961625c40747ca01d5cc3a50e93f5e289c940
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3967902
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83898}
2022-10-25 08:12:13 +00:00
Takuto Ikuta
2eaf21e43a DEPS: remove checkout_reclient
chromium removed the config in https://crrev.com/c/3755181.

Bug: b:255447284
Change-Id: I54a50e7035de8f7db96ab81ded74d9c63bcbecdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3977074
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83897}
2022-10-25 07:21:50 +00:00
v8-ci-autoroll-builder
cecaa443ec Update V8 DEPS (trusted)
Rolling v8/build: cb6dbd1..35368b6

Rolling v8/buildtools/linux64: git_revision:27b90626701a112217a9244022c729231ebcc3a0..git_revision:7a6231e3e43845d9aa298bb040f11dd1953e966f

Rolling v8/third_party/depot_tools: 61ef3d8..1f51102

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221023.3.1..version:10.20221024.1.1

Change-Id: I66b9e7064167e06dd1700d9768adb2f838bc853c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3975774
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@{#83896}
2022-10-25 03:42:25 +00:00
Shu-yu Guo
3129b880d5 [test262] Roll test262
eb67a768..c15d4bef

Bug: v8:7834
Change-Id: I89c1e696586a9206ce6136610e495e0f2b79bd1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3975825
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83895}
2022-10-25 00:43:29 +00:00
Michael Achenbach
01379ba6d6 Revert "[wasm] ref.call: Consume sig index immediate"
This reverts commit 8f3047531d.

Reason for revert: CL collision:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20builder/63710/overview

Original change's description:
> [wasm] ref.call: Consume sig index immediate
>
> Follow-up to commit 6168782925
> With this change 0x14 now also consumes a sig index immediate.
> This will allow users to switch from 0x17 back to 0x14 without
> breaking changes. After another grace period, 0x17 can be removed.
>
> Change-Id: I5d0039fd1ca9d62c3d42e5834fe7924de45ad7ef
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974512
> Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83890}

Change-Id: I65fe8b5bceb70323dd5e6450ec7bcc02696b15fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976029
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83894}
2022-10-24 17:37:22 +00:00
Junliang Yan
28320c74f5 ppc: [ptr-cage] allocate r27 as cage register
Change-Id: Ib7fe3f7d869f7ecd57eb38afba6428c4a8dffc9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974082
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83893}
2022-10-24 17:32:05 +00:00
Lei Zhang
3cc6fc8538 Remove unused code in swiss-hash-table-helpers.h.
This code looks like it was copied over of Abseil. However, parts of it
are not used anywhere, aside from their own unit tests, so delete them.
The unused functions are:

- MatchEmptyOrDeleted()
- CountLeadingEmptyOrDeleted()
- ConvertSpecialToEmptyAndFullToDeleted()

In turn, _mm_cmpgt_epi8_fixed() is also unused and can be deleted.

Bug: v8:11388
Change-Id: I35b84600690e6f044a1d5ab4bf41e7f67fb76d87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3965230
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83892}
2022-10-24 17:31:02 +00:00
Victor Gomes
815b33f3a4 [maglev] Inline StringFromCharCode
... as an example of a simple builtin.

Bug: v8:7700
Change-Id: I4eb3479c04066cf4860d1fc28d5f7e9c758a6375
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974773
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83891}
2022-10-24 17:30:00 +00:00
Matthias Liedtke
8f3047531d [wasm] ref.call: Consume sig index immediate
Follow-up to commit 6168782925
With this change 0x14 now also consumes a sig index immediate.
This will allow users to switch from 0x17 back to 0x14 without
breaking changes. After another grace period, 0x17 can be removed.

Change-Id: I5d0039fd1ca9d62c3d42e5834fe7924de45ad7ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974512
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83890}
2022-10-24 17:28:54 +00:00
Clemens Backes
35cc93aa42 [wasm] Detemplatize immediates
The wasm decoder immediates are currently templatized by the {validate}
enum value. They do not need to be though; the only difference is in the
constructor, so the constructor should be templatized instead.

This CL implements that, and also changes the {validate} enum to be a
tag (a typename) instead. This is needed in order to enable template
parameter deduction for the constructor calls (C++ does not allow to
explicitly define the template parameter at constructor calls).

As a nice side effect, this produces nicer symbolized stack traces.
Before:
v8::internal::wasm::Decoder::read_u32v<(v8::internal::wasm::Decoder::ValidateFlag)1>
After:
v8::internal::wasm::Decoder::read_u32v<v8::internal::wasm::Decoder::BooleanValidationTag>

R=jkummerow@chromium.org

Change-Id: I013c909ebaf2c8c495f32b5ce598905f3eccc3ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3973267
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83889}
2022-10-24 17:27:49 +00:00
Michael Achenbach
4b28d53011 Revert "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
This reverts commit bd590292b3.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64%20GC%20Stress/25069/overview

Original change's description:
> [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
>
> This CL adds TurboFan optimizations for length and element access
> of TypedArrays and DataViews that are rab/gsab-backed.
>
> To enable this optimization, this CL builds the necessary machinery
> required to allow machine operators at the front of the pipeline
> (before simplified lowering). Some key changes to allow this are:
>  - Introduce Type::Machine() to allow the typer and the verifier to
>    provide a type to those machine operators in parts of the pipeline
>    that require nodes to be typed.
>  - Add EnterMachineGraph and ExitMachineGraph operators that define
>    the boundary between early machine graphs and the normal graph with
>    JS semantics.
>  - Give Branch operators a BranchSemantics parameter to distinguish
>    between machine branches (condition is a machine level value) and
>    JS branches (condition is a JS boolean value) and have phases that
>    handle branches decide on the branch's semantics based on this
>    parameter instead of the position in the pipeline.
>  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
>    machine graphs. In particular, constants required special handling,
>    because they are cached in the graph but they may have uses in both
>    a machine and the JS graph, which prevents consistent typing of
>    them.
>  - Moved lots of logic from JSCallReducerAssembler into
>    [JS]GraphAssembler such that functionality can be shared between
>    different phases (e.g. JSNativeContextSpecialization and
>    JSCallReducer need to generate logic to compute a TypedArray's
>    byte length). Extended assembler interface in general with
>    additional TNode<> overloads.
>
>
> Bug: v8:11111, chromium:1358505
> Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83881}

Bug: v8:11111, chromium:1358505
Change-Id: Ifa7b81523237ebda941cab2feed42c176846b618
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976028
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83888}
2022-10-24 17:09:09 +00:00
Andreas Haas
66ba7b54eb [wasm] Update spec tests
R=clemensb@chromium.org

Bug: v8:10994
Change-Id: I1eb84b1eb35b546473db0c843f11ac965b4f7b2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974689
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83887}
2022-10-24 14:27:58 +00:00
Maya Lekova
bf0bd4868d [fastcall] Disable fast calls with stack args on M1
Bug: v8:13171
Change-Id: I549d942d8ae24e2de0aa3202d7400b587254fb75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963995
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83886}
2022-10-24 14:23:17 +00:00
Qifan Pan
1806ad7313 [mjsunit] Fix flaky deopt loop tests
Bug: v8:13408, v8:9407
Change-Id: I2f7eefde11c63517bb59036b38ca20173a0adf03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3971367
Auto-Submit: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#83885}
2022-10-24 14:19:18 +00:00