Commit Graph

74570 Commits

Author SHA1 Message Date
Michael Lippautz
cb92ed0922 [api, heap] Remove resurrecting finalizers
Removes V8-internal support for resurrecting finalizers in the garbage
collector.

The APIs have already been removed in http://crrev.com/c/3596174

Bug: v8:12672
Change-Id: Ia507e74659b61a2c8c08281d7f395aee51e3fe17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3584115
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80078}
2022-04-21 10:48:57 +00:00
Leszek Swirski
c0a63243e9 [maglev] Start implenting inlining
Add a --maglev-inlining flag, and add some half-baked support for
inlining functions when there is call feedback.

When the flag is enabled and there is call feedback, we create a nested
MaglevGraphBuilder for the current graph, and pause building the graph
of the outer function. We manually set up its prologue to set up its
frame with the arguments pass into the call, build the body with the
nested graph builder. This inner builder knows that it is building an
inlined function, and all Return bytecodes will instead emit a Jump to a
single merge block at the end of the function, where execution of the
outer function can resume.

These inner function basic blocks are wired into the outer graph with
new JumpToInline and JumpFromInline control nodes. The idea is that
subsequent passes will know what the inline function is, and will use
these to manage the function stack (particularly for codegen and
especially deopts).

Bug: v8:7700
Change-Id: I4e9b153f8cf4d06c56e7be6365e7a18b86a773c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585958
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80077}
2022-04-21 10:43:35 +00:00
Leszek Swirski
f98e1f4db9 [maglev] BitwiseNot has one input
Bug: v8:7700
Change-Id: Ieecdd66e7e540ad27aaa05cf13f270e42377b15e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599471
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80076}
2022-04-21 10:35:06 +00:00
Leszek Swirski
50304f87ac [csa] Add "Iterate" helper to IteratorBuiltinsAssembler
"Iterate" takes an iterable and a function of TNode<Object>, and
implements the iterator protocol to iterate the iterable, applying the
function to each element.

It handles exceptions thrown during iteration and closes the iterator as
appropriate -- the hope is that if the body of the iteration has no
exception-throwing nodes, TurboFan can dead-code eliminate this close.

In the future, we may want to add an array fast-path to this method;
centralising the implementation means that this fast-path will then be
used by all callers of Iterate.

Change-Id: I9fe2f862b78619fe21ea7cb6469ed7ba93f14a30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3581770
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80075}
2022-04-21 10:08:45 +00:00
jameslahm
056f7e526c [test] Move cctest/test-array-list to unittests
... /objects/array-list-unittest.

Bug: v8:12781
Change-Id: I8bf50cd6680b6a875fb7029a6767eebc39ed8b13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596444
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80074}
2022-04-21 09:49:26 +00:00
Benoît Lizé
63b3d33245 [builtins] Embedded builtins don't depend on RAM on Android
So don't test it.

This was changed in
https://chromium-review.googlesource.com/c/v8/v8/+/3596164, breaking
this test on low-RAM ARM64 Android devices.

Bug: v8:12814
Change-Id: I25caf748607c33f5f632eb5236643ea5e327f867
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596129
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80073}
2022-04-21 08:27:21 +00:00
Michael Lippautz
7a96ceccb8 [heap] Run cleaning of string table in parallel to other cleaning
Bug: v8:12813
Change-Id: I27bbf5190165a0d919f021bbcf089e203dfed83f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3592955
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80072}
2022-04-21 08:10:25 +00:00
Dominik Inführ
d0c147ab10 [heap] NotifyObjectLayoutChange invalidates slots in OLD_TO_SHARED
When an object changes layout, OLD_TO_SHARED slots need to be
invalidated for it as well.

Bug: v8:11708
Change-Id: I28ea181012955fddef986e8f8806a7477307df28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596175
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80071}
2022-04-21 07:14:05 +00:00
Michael Lippautz
2ae2aa92b1 [api] Remove APIs for resurrecting finalizers
Removes support for specifying weak handles with finalizers that allow
for object resurrection.

This CL removes the public facing APIs. Internal support will be
removed in a follow up.

Bug: v8:12672
Change-Id: Ia6ea269093aaa128caadb7508aca2e5a1254923c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596174
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80070}
2022-04-21 07:05:25 +00:00
v8-ci-autoroll-builder
b25adddb90 Update V8 DEPS.
Rolling v8/build: 3dce554..28bea73

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e356f14..960c656

Rolling v8/third_party/zlib: be2c378..a0906c7

Rolling v8/tools/clang: 7d4922a..4dd2e32

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Ief025d20148a03362b05f27c63741eb7c6ce3188
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595972
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@{#80069}
2022-04-21 03:55:05 +00:00
Shu-yu Guo
0e9be2c2c7 Revert "[test] Move tracing cctest to unittests"
This reverts commit a7d6bf9662.

Reason for revert: GN breakage preventing lkgr: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Blink%20Linux/16971/overview

Original change's description:
> [test] Move tracing cctest to unittests
>
> Bug: v8:12781
> Change-Id: Idc50a20f17de3af25372833b28cb16ac9a0e6485
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3574552
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80065}

Bug: v8:12781
Change-Id: Icb295f7203cec4aef4bda491d08a39ce0c66fa0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3597242
Auto-Submit: Shu-yu Guo <syg@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@{#80068}
2022-04-20 22:35:14 +00:00
Shu-yu Guo
9eb426cb2e Fix #if -> #ifdef in platform-unittest.cc to unblock roll
See https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-rel/1172178/overview

Change-Id: I97d25fd36c4b5fce4eb1d86c423443c2395af793
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598030
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80067}
2022-04-20 20:58:06 +00:00
legendecas
c779a08f7c [builtins] Handle broken promises in AsyncGenerator.prototype.return
As ecma262 normative change https://github.com/tc39/ecma262/pull/2683,
exception thrown on PromiseResolve the broken promises need to be caught
and use it to reject the promise returned by
`AsyncGenerator.prototype.return`.

AsyncGeneratorReturn didn't handle the exception thrown by Await. This
CL add an exception handler around it and pass through the caught
exception to the returned promise and resume the generator by
AsyncGeneratorAwaitResume if the generator is not closed, otherwise
reject the promise by AsyncGeneratorReject and drain the queue.

Bug: v8:12770
Change-Id: Ic3cac4ce36a6d8ecfeb5d7d762a37a2e0524831c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3581158
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#80066}
2022-04-20 17:14:14 +00:00
Leszek Swirski
a7d6bf9662 [test] Move tracing cctest to unittests
Bug: v8:12781
Change-Id: Idc50a20f17de3af25372833b28cb16ac9a0e6485
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3574552
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80065}
2022-04-20 16:53:44 +00:00
Marja Hölttä
c071cc96b3 [web snapshots] Add a JS API for deserializing Web snapshots
This enables downloading web snapshots with XMLHttpRequest and
deserializing them.

Bug: v8:11525
Change-Id: I498f1e99795d474a1715fce9aa1d8c1a34651c42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585961
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80064}
2022-04-20 16:02:20 +00:00
Junliang Yan
3b1c1cab1a ppc64: [baseline] fix register conflict
Change-Id: I55a68f23106d4fed8a8f3ea7fc29c31a1aeba711
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596126
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80063}
2022-04-20 15:58:45 +00:00
Liu Yu
7aa4cc4bae Reland "[loong64][mips64][fastcall] Enable float support on loong64 and mips64"
Besides, enable float support on simulator.

Port commit 098f31f495
Port commit a6da816119

As defined in
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_procedure_calling_convention
Loongarch calling convention uses GP to pass floating-point
arguments when no FP is available.

Bug: v8:12614, chromium:1052746

Change-Id: I33d4115674604604b2b7e9178a306efb6000222b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3448195
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yu Liu <liuyu@loongson.cn>
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80062}
2022-04-20 15:56:05 +00:00
Junliang Yan
77306a03a4 ppc64: [baseline] implement AddToInterruptBudgetAndJumpIfNotExceeded
Change-Id: If7588aed75d12a12d5a125f95ccc3db9743e4a00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596170
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80061}
2022-04-20 15:52:34 +00:00
Michael Lippautz
d7be7f15e2 [objects] Update comment for zombie state on AllocationSite
Change-Id: Iac90033d689111e8a2384bee357e7f282cc33db7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596168
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80060}
2022-04-20 15:41:23 +00:00
Junliang Yan
c6988630fb ppc64: [baseline] implement baseline descriptor
Change-Id: I57eac5fdeddd49ecf8b45e293fbe9f98f068b86b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3597310
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80059}
2022-04-20 15:28:08 +00:00
Camillo Bruni
1920426b13 [tools][gcmole] Add run_gcmole.py --help and drop env vars
- Use explicit options when running gmcole.py from run-gcmole.py
- Use gcmole.py-relative paths to find the default V8 root dir for
  maximum convenience when running locally

Change-Id: Iba0da90b99b0321129f1c4099f437c76dabb1186
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3582386
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80058}
2022-04-20 15:26:35 +00:00
Camillo Bruni
6ca0c65c44 [tools][perf] Fix linux-perf-d8.py with relative path args
We do change CWD in the script which breaks relative input paths
to d8 and .js files for instance.

Drive-by-fix:
- Show clear warning if `perf record` failed

Change-Id: Ib900ca6b53307e13be459beba1e96ddfc8ee9b79
No-try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593784
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80057}
2022-04-20 14:30:04 +00:00
Al Muthanna Athamina
e2f9c45e6d Unify naming convention for tests and filter them in TestLoader for cctest
Bug: v8:12802
Change-Id: I2573ed6b59fe51a135bbec5734ff1b7414316b0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596163
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80056}
2022-04-20 14:19:55 +00:00
Thibaud Michaud
ae9464668b [wasm-relaxed-simd] Add relaxed swizzle in Liftoff on ia32/x64
R=clemensb@chromium.org
CC=gdeepti@chromium.org

Bug: v8:12284
Change-Id: Idddb0b7648b29612fa0308520ca2fc2a3e5647f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593218
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80055}
2022-04-20 14:11:55 +00:00
Victor Gomes
fac04fbb76 [maglev] Adds double registers to Nodes
The register allocator might be able to choose between a floating
or general registers.

Bug: v8:7700
Change-Id: Ib74b8c6cd5db12ae34b7f08cd2aeb21ffd3bac33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596121
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80054}
2022-04-20 14:03:54 +00:00
Jakob Gruber
14615a8d51 [osr] Add new osr-related fields and accessors to FeedbackVector
This adds the OSR state to the FV, where the state consists of the
osr_urgency (same semantics as previously on the BytecodeArray) and a
maybe_has_optimized_osr_code bit (set if any optimized OSR Turbofan code
exists for this function).

The two are packed into one field for efficient OSR checks in generated
code (to be implemented in the followup CL).

Bug: v8:12161
Change-Id: Id4edb8f5db0bf02e0d04b87aeec8d8c53e213503
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596120
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80053}
2022-04-20 13:47:54 +00:00
Omer Katz
dd4f93c4c9 [heap] Only track allocation origins in slow path
Allocation origin tracking also implicitly disables inline allocations.

Bug: chromium:1316121, v8:12612
Change-Id: I7efecff3bb0cceef1071853e18a01effcc97243f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593116
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80052}
2022-04-20 13:32:44 +00:00
Leszek Swirski
10cae73569 [maglev] Pass MaglevCompilationInfo to more passes
MaglevCompilationInfo stores the overall compilation information (zone,
graph, labeller, etc.), while MaglevCompilationUnit stores per-function
information (function, bytecode analysis, register count, etc.).

Without inlining, these are 1:1 and we've been pretty sloppy in deciding
which to pass around. Once we implement inlining though, we want to be
careful to pass MaglevCompilationInfo where we're processing the whole
graph, and MaglevCompilationUnit where we're processing something
function-specific.

This does the pre-work of cleaning this up in preparation for inlining.

Bug: v8:7700
Change-Id: Ic50fdd97e56f6c963ab490bd419eb65fe0873688
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596162
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80051}
2022-04-20 13:28:44 +00:00
Victor Gomes
58fb7d8f25 [maglev] Add Float64 to ValueRepresentation
... and rename Untagged to Int32.

Bug: v8:7700
Change-Id: Ib206dba74432b3f1f70fd62006cb6a1222b40ed9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3584114
Reviewed-by: 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@{#80050}
2022-04-20 13:20:24 +00:00
Benoît Lizé
8d186bb453 Reland "[builtins] Remap builtins on Linux"
Reason for reland: Fixed Fuchsia build.

Original change's description:
> [builtins] Remap builtins on Linux
>
> This is a CL similar to
> https://chromium-review.googlesource.com/c/v8/v8/+/3553006, but on Linux
> rather than macOS. The goal is to allow builtins to use short builtin
> calls without paying a memory cost, by remapping rather than copying
> them.
>
> However, while macOS has a system call making this easier, on Linux we
> don't have one on most kernels. There is the recently-introduced
> mremap(MREMAP_DONTUNMMAP), which is available in 5.7, but only works on
> anonymous mappings until 5.13, which is too recent for most Android
> devices.
>
> Instead, we open() the file containing the builtins, and mmap() it at
> the desired location.
>
> Change-Id: I4524f349948b8f48c4536cf392a1cd179662a6cc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570426
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Benoit Lize <lizeb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80022}

Change-Id: I0cc8cf510bd2cb8621130bea8406d79aa209948c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596164
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80049}
2022-04-20 13:04:34 +00:00
Jakob Gruber
447bf33d78 [osr] Add JumpLoop feedback slot operand
.. which points back at the corresponding feedback vector slot for each
JumpLoop bytecode.

Bug: v8:12161
Change-Id: I95f4d013544a69e088314655af7eb1dc504a8657
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596166
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80048}
2022-04-20 12:57:44 +00:00
Thibaud Michaud
4f7d37a574 [wasm-relaxed-simd] Implement qfma in Liftoff on ia32/x64
R=clemensb@chromium.org
CC=​gdeepti@chromium.org

Bug: v8:12284
Change-Id: If78b5a86364b015483131ef321ca9e928e8ddfc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585338
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80047}
2022-04-20 12:43:24 +00:00
Simon Zünd
ec41a70e38 [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses
Doc: https://bit.ly/revive-restart-frame
Context: https://crrev.com/c/3582395 (whole feature)

This CL adds a new optional flag `canBeRestarted` to every call frame
in Debugger.paused events. As the name suggests, the flag indicates
whether we can restart a particular frame through Debugger.restartFrame
once implemented.

We are not able to safely restart all frames:
  * We don't support WASM frames
  * We don't support frames where resumable functions (async fns,
    generators) and embedder C++ frames are between the top-most
    frame and the to-be-restarted frame.

Note that from a CDP perspective the flag doesn't actually guarantee
a successful restart. CDP clients can issue
CDP commands between the Debugger.paused event and before a user
decides to restart a frame, which can potentially mess
with the stack.

The `canBeRestarted` flag tests are folded into the
Debugger.restartFrame tests. As the feature is not yet fully
implemented we short-circuit most of the tests for now and only
run them up until the first Debugger.restartFrame call fails
(except "fails-for-resumables.js").
This means the tests exercise the `canBeRestarted` flag, but not
the restarting functionality itself.

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

Bug: chromium:1303521
Change-Id: I01ab46dc3557ab8383960969fbe03e00604cc5e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596160
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80046}
2022-04-20 12:40:34 +00:00
Jakob Gruber
4679e4c0ee [osr] Allocate feedback vector slots for JumpLoop
These will soon be used to store cached OSR code.

Bug: v8:12161
Change-Id: I49b6f1cd648e1fd033ac09b2e590bc185f5461e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596165
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80045}
2022-04-20 12:04:56 +00:00
Clemens Backes
71ed79beb3 [wasm] Add regression test for 1314184
The fix is merged to all channels, add the regression test.

R=thibaudm@chromium.org

Bug: chromium:1314184
Change-Id: I7b7ca13ff34b19c3dbb727d248619dc1ff874873
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596161
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80044}
2022-04-20 11:40:19 +00:00
Clemens Backes
c31da024d6 [wasm] Remove left-over of memory masking
Memory masking was removed in https://crrev.com/c/3045704. The comment
and CHECK referred to the code to compute the memory mask, so it does
not apply any more. Thus remove it as well.

R=thibaudm@chromium.org

Bug: v8:12425
Change-Id: If11af4f2179dc01003ea6b532c6ac5696d6fa475
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3592953
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80043}
2022-04-20 11:39:15 +00:00
Victor Gomes
b127c3412e [base] Lazily ensure ThreadList invariant
Since next() comes from ThreadedListTraits, the users of this class
can modify the list by modifying the next pointer. This however breaks
the invariant that `tail_` points to the last element of the list.

We ensure this invariant lazily. This should be _almost_ no effect
for users that do not manually modify the next pointer.

Change-Id: If46283ab4fc5036a81f353b25823b0fd39b3e232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3578803
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80042}
2022-04-20 09:52:17 +00:00
Tobias Tebbi
7f407650c4 Reland "Reland "Reland "[baseline] Enable concurrent sparkplug"""
This is a reland of commit 6819f75daf

Original change's description:
> Reland "Reland "[baseline] Enable concurrent sparkplug""
>
> This reverts commit 5d6a16fb64.
>
> Reason for revert: it was a flake
>
> Original change's description:
> > Revert "Reland "[baseline] Enable concurrent sparkplug""
> >
> > This reverts commit fee91f9afa.
> >
> > Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/44699/overview
> >
> > Original change's description:
> > > Reland "[baseline] Enable concurrent sparkplug"
> > >
> > > Issue that cause the revert was fixed: v8:12713
> > > https://bugs.chromium.org/p/v8/issues/detail?id=12713
> > >
> > > This is a reland of commit f01a609814
> > >
> > > Original change's description:
> > > > [baseline] Enable concurrent sparkplug
> > > >
> > > > Bug: v8:12054
> > > > Change-Id: I1b0ee1a9541a75412b882b259e421aa6e88317da
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259658
> > > > 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@{#79485}
> > >
> > > Bug: v8:12054
> > > Change-Id: Iafba22e3fa3b38eddb226db6cd5afdb7e3e6b435
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528992
> > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > > Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#79618}
> >
> > Bug: v8:12054
> > Change-Id: I3ba60433fdbb5617900c83d022e4dd6f830695f9
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550271
> > Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Owners-Override: Tobias Tebbi <tebbi@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@{#79619}
>
> Bug: v8:12054
> Change-Id: Ia0fe1df00f5e715ceda46fbcdc48aed0f0190362
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550272
> Owners-Override: Tobias Tebbi <tebbi@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79622}

Bug: v8:12054
Change-Id: I43bf2d8aa25a8dcf286c46be18c372aadfb55701
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563559
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80041}
2022-04-20 09:42:04 +00:00
Andreas Haas
6cdc42b7dc [wasm] Update spec tests
R=manoskouk@chromium.org

Change-Id: I931e8ab0847db5126c2895412b4b357d482dfeb1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593782
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80040}
2022-04-20 09:23:44 +00:00
Tamer Tas
d33013d6ba [infra] increase shards for v8_linux_rel_ng
This CL speeds up one of the slowest builders on the CQ to improve overall CQ time.

R=machenbach@chromium.org,liviurau@chromium.org,alexschulze@chromium.org

Bug: v8:12810
Change-Id: I80adfb3abdea1ef7e14abf0a8c2dc2cc2b4d77d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593134
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80039}
2022-04-20 08:28:46 +00:00
Simon Zünd
29c4cf0e3c [inspector] Move restart-frame test helpers into protocol-test.js
R=bmeurer@chromium.org

Bug: chromium:1303521
Change-Id: Iff7247fda94037ff4f9d37f334d386eb4e63ce62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595819
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80038}
2022-04-20 08:02:34 +00:00
Simon Zünd
f6cb798753 [inspector] Add disabled tests for 'Restart frame' 2/2
Doc: https://bit.ly/revive-restart-frame
Context: https://crrev.com/c/3582395 (whole feature)

This CL adds the second batch of inspector tests for the upcoming
"Restart frame" feature. Landing the tests upfront allows us to
better discuss the proposed API as well as think early about
corner cases we should test.

The tests check for the functionality of `Debugger.restartFrame`, as
well as the newly added parameter `canBeRestarted` in
the `Debugger.paused` event.

Bug: chromium:1303521
Change-Id: Ie9dda100cdc5217a4e4cc2f0cf7019a33d124120
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585947
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80037}
2022-04-20 06:55:35 +00:00
Camillo Bruni
80f9d34685 [isolate] Rename member from logger_ to v8_file_logger_
Bug: v8:12795, chromium:1316443
Change-Id: Ib4cbbad42da80dfb566e559e70db30a670cc4326
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593221
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80036}
2022-04-20 05:21:46 +00:00
v8-ci-autoroll-builder
89f541c8e7 Update V8 DEPS.
Rolling v8/build: 7aeed11..3dce554

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/28b8ede..e356f14

Rolling v8/third_party/depot_tools: 7d2693a..89ccf4a

Rolling v8/third_party/zlib: a6d209a..be2c378

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I27acb5fb4e6158fc69c0ec5b0ea225e1227a4782
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595619
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@{#80035}
2022-04-20 03:51:34 +00:00
Milad Fa
2dbffca74a PPC/s390: Remove the Dummy interface descriptor
Port 4ae5a813c7

Original Commit Message:

    Having it around is an invitation to use it in new places. This CL
    removes the generic Dummy descriptor and replaces it by other existing
    descriptors if possible, and defines specialized dummies otherwise.

    In the future, every builtin should have a real descriptor. Especially
    new ASM builtins should define descriptors and use them in their
    implementation (use Descriptor::FooRegister() instead of documenting
    the calling convention as comments).

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

Change-Id: Ied285739f8ab017f17341c9c3bbbb1217be947e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3594539
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80034}
2022-04-19 18:29:19 +00:00
Omer Katz
4d9d256ead [heap] Use allocation fast path for code and map spaces
Bug: chromium:1316121, v8:12612
Change-Id: I83d1b580e2bfd03ed36b174ff4503976c8bd1922
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593115
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80033}
2022-04-19 16:24:18 +00:00
Clemens Backes
f1b6092c52 [liftoff] Move more options into LiftoffOptions
{LiftoffOptions} already contains many (optional) parameters for Liftoff
compilation, but not all of them.
This CL moves the function index and the {for_debugging} field also into
that struct, to further reduce the number of parameters to
{ExecuteLiftoffCompilation} and to improve readability by having a
factory-like initialization of the {LiftoffOptions} struct.
That struct is now also passed down to the LiftoffCompiler directly
instead of unpacking the fields again.

R=thibaudm@chromium.org

Bug: v8:12809
Change-Id: I8824a1908f214cbf4c21f113934fef3ece1bf88b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513894
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80032}
2022-04-19 16:21:21 +00:00
Alexander Schulze
f3add21d3d [infra] Add Mac Arm64 config
Bug: v8:12793
Change-Id: Ic5e414b5081f4eff95c34910f97dccbb16a9339b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593785
Auto-Submit: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80031}
2022-04-19 16:13:58 +00:00
Jakob Gruber
4ae5a813c7 Remove the Dummy interface descriptor
Having it around is an invitation to use it in new places. This CL
removes the generic Dummy descriptor and replaces it by other existing
descriptors if possible, and defines specialized dummies otherwise.

In the future, every builtin should have a real descriptor. Especially
new ASM builtins should define descriptors and use them in their
implementation (use Descriptor::FooRegister() instead of documenting
the calling convention as comments).

Change-Id: Ib577aa03b5e5a522460d1084cc9605c55cd29d6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585945
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80030}
2022-04-19 16:01:22 +00:00
Tobias Tebbi
6bf7e04e20 Revert "[turbofan] Support additional operators in SLVerifier"
This reverts commit dec4bb0629.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20(NVIDIA)

Original change's description:
> [turbofan] Support additional operators in SLVerifier
>
> This CL extends SimplifiedLoweringVerifier by a few additional operators.
>
> It fixes the missing type on a LoadElement node generated during
> js-typed-lowering, that was detected by the verifier.
>
> Bug: v8:12619
> Change-Id: I14e3ece15f6a90e6906c140696dcd2e6b74a2527
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557510
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80014}

Bug: v8:12619
Change-Id: I79caa97bba1f29b549d494a747d0f65a85d60315
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593135
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80029}
2022-04-19 15:39:58 +00:00