Commit Graph

79989 Commits

Author SHA1 Message Date
Paolo Severini
11a63fa8d2 [sandbox] Reduce max size of ExternalPointerTable on Android
Bug: v8:13661
Change-Id: Iec08bc81fc2d42b728a05bbbe51c765d3982427c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173595
Reviewed-by: Samuel Groß <saelo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#85347}
2023-01-17 16:58:54 +00:00
Manos Koukoutos
0033691b2a [wasm-gc] Move and simplify AssertNotNull optimization
We used to optimize the pattern of a {WasmTypeCast} followed by an
{AssertNotNull} in the wasm typer, by moving the latter before the
former. This has caused multiple bugs in the past.
Now that we have null-trapping casts, we can simplify the optimization
by changing the return type of the type cast to non-nullable, thus
making it trap on null, and removing the explicit null assertion. We
also move it to the WasmGCOperatorReducer, which is more appropriate.

Bug: v8:7748
Change-Id: I756543090145c71e998042607437a5bad3fd19da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4172731
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85346}
2023-01-17 16:08:10 +00:00
Dominik Inführ
4abbe5deeb [test] Mark shared memory tests as unpredictable
Tests with shared memory are non-deterministic and shall not be
run with --predictable.

Bug: v8:13267, v8:13669
Change-Id: I65c9e1b273ff96ea73acd817a297c08f83ba615f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174076
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85345}
2023-01-17 15:47:36 +00:00
Clemens Backes
d2119c0b68 Annotate some SmallVector methods as V8_PRESERVE_MOST
SmallVectors are assumed to be small most of the time. Hence the {Grow}
method and others will most of the time not be called. So mark them
{V8_PRESERVE_MOST} to make caller code slimmer and faster.

R=dlehmann@chromium.org

Bug: v8:13565
Change-Id: Ia2bdcdff7e415b1d8a2717849c74604677a9dade
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168413
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85344}
2023-01-17 15:05:51 +00:00
Clemens Backes
79ed179625 [wasm] Relax a DCHECK for validation
We sometimes validate functions in the background, e.g. when inlining in
TurboFan. This had a slight chance of triggering a DCHECK when we were
validating the same function explicitly in another thread.
This would only happen in non-default configurations, if some functions
get eagerly compiled with TurboFan and other functions get lazily
compiled, and therefore validated explicitly.
Since listing all such conditions is tricky, we just return early if we
detect that a function was already validated.

R=ahaas@chromium.org

Bug: v8:13659
Change-Id: Ie75b2638e86e263406edfbc41cc4f404b3b98e68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171623
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85343}
2023-01-17 14:52:54 +00:00
Toon Verwaest
1d8f2517e3 [parser] Don't lazy compile CreateDynamicFunction functions
Bug: chromium:1407080
Change-Id: I9b0c30a9ab8fb66510e627ab276eb1c9b3146aa0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174072
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85342}
2023-01-17 14:50:21 +00:00
Michael Achenbach
2a20b228ef [gcmole] Run gcmole on bots with matching architecture
This does:
- Move gcmole runs to bots with matching arch.
- Update mb_configs to enable gcmole on the bots that run it.
- Add a GN target that extracts some compiler flags from a
ninja file of one of V8's other targets.
- Use the extracted flags in the gcmole script and remove other
hard-coded arch-specific flags.

This is done for DEFINES and includes for now. Other compiler flags
are still a TODO.

Bug: v8:9287
Change-Id: Icba9ce59e0bfffd138d9207b1c2ad64d42bf6a91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055629
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85341}
2023-01-17 13:56:18 +00:00
Victor Gomes
6350ef168c [maglev][arm64] Fix lack of scratch registers in ExceptionHandlerTrampolineBuilder
Not enough scratch registers to materialize results.

Fixed: chromium:1407928
Bug: v8:7700
Change-Id: I90c60bd4f8607d223d577344f8452fedfc6774af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173573
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@{#85340}
2023-01-17 13:49:10 +00:00
Milad Fa
e2edd1c992 [codet] Fix decoding of KindField on big endian
KindField seems to be a 2 byte value (rather than 4).
Loading 32 bits would read an incorrect value on BE and fails
runtime assertions.

Behaviour does not change on little endian as only the low-order
4 bits are used.

Change-Id: I0933a00e6fb5259785f894a838933791d411edba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168418
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85339}
2023-01-17 13:23:33 +00:00
Olivier Flückiger
0f4a6a500c [runtime] StringEqual check in larger chunks
SeqStrings are now zero padded. This allows us to check equality in
chunks of 32, or 64 bytes. Makes StringEqual about 2x as fast for
strings larger than 4-8 bytes.

Bug: v8:13664
Change-Id: Ic5e21bbef97b401a6d28a76bcb164a88739a68a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156058
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85338}
2023-01-17 13:15:58 +00:00
Jakob Linke
2c7272fdde Rename Code to InstructionStream
.. as part of the big Code/CodeDataContainer name shuffle.  In the
next step, CodeDataContainer will be renamed to Code.

Bug: v8:13654
Change-Id: Ia80ac984d46dd6c2a108098055a5cd60e22a837c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171628
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85337}
2023-01-17 12:45:45 +00:00
Leszek Swirski
503b56efdf [maglev] Check maps in TryBuildFastInstanceOf
Add a map check for the RHS of instanceof checks (i.e. the class) when
loading its hasInstance method. We were previously confirming the value
of the RHS, to make sure that it's a constant, but not considering the
case that the map of that class could change (e.g. because of a
prototype change or field definition).

Bug: v8:7700
Change-Id: Ia2923b99dd0524670bebcc57e4c0c209f8835d04
Fixed: chromium:1407959
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173568
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85336}
2023-01-17 12:13:38 +00:00
Matthias Liedtke
04f19e973e [wasm-gc] Module decoder: Remove template to save binary size
Bug: v8:7748
Change-Id: Ic2eb981b28b6f5af926c7f8889da8bb9a71188ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171636
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85335}
2023-01-17 11:34:49 +00:00
Alexander Schulze
b26a55b88f Revert "[test] ownership"
This reverts commit c96177a04a.

Original change's description:
> [test] ownership
>
> edit
>
> Bug: chromium:1
> No-Try: true
> Change-Id: I1b946aaf9eb47c04c18b1e8c61aa06e744bbc2b2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173576
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85333}

Bug: chromium:1
Change-Id: I5fccdc73f1e75c90e600f8947c977018f8715406
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173667
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#85334}
2023-01-17 11:28:27 +00:00
Liviu Rau
c96177a04a [test] ownership
edit

Bug: chromium:1
No-Try: true
Change-Id: I1b946aaf9eb47c04c18b1e8c61aa06e744bbc2b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173576
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85333}
2023-01-17 11:25:31 +00:00
Marja Hölttä
7be93470c7 [performance|regexp] Avoid unnecessary JSArray creation
Matches were transmitted in a JSArray, although a FixedArray is
enough.

Change-Id: I71145c6b55d57a15e330a3865f00d038e613dde3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171631
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85332}
2023-01-17 11:18:42 +00:00
Victor Gomes
9bd7c5e1bd [maglev] Fix visiting stack in StackGuard call
The RegisterInput (NewTarget) was not correctly visited by the GC.
This:
- Creates a sentinel safepoint to indicate that the stack is not
fully created (we are in the stack guard call).
- Generalises RegisterInputs (we assumed only NewTarget before) and
save them in the graph.
- Pass the register input count via tagged_register_indexes in
this case.

Fixed: chromium:1407606
Bug: v8:7700
Change-Id: I8f599f8c1a992ee6fd886eec1e289454649dfec8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171626
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@{#85331}
2023-01-17 10:27:40 +00:00
Michael Lippautz
943d82bfa9 [heap] Fix worklist segment capacity in --predictable
Actual worklist segment capacity may vary depending on allocator
internals. Varying capacity can result in different push/pop order
even in single-threaded execution which is incompatible with
--predictable.

As a fix, rely on minimum capacity for --predictable.

Bug: v8:13614
Change-Id: Icbf093b31c32f4eb20476954572b3731f5c8ef88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171641
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85330}
2023-01-17 10:04:49 +00:00
Michael Lippautz
fb8b0d2ab5 [heap] Remove LocalEmbedderHeapTracer methods for incremental tracing
Remove unused methods in the incremental marker.

Bug: v8:13207
Change-Id: I7ddb986c54e8534e46f6731ced60a82cb97d4ff9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171633
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85329}
2023-01-17 09:38:09 +00:00
Leszek Swirski
01135ec0f2 [maglev] Split element load
Split tagged and double element loads (LoadTagged/DoubleElement) into
loads of the elements array, and a load from the Fixed[Double]Array.
This will allow us to potentially re-use elements array loads, as well
as use the more generic FixedArray load for other FixedArrays.

Bug: v8:7700
Change-Id: I382132585a709ab1351666fd820156148b35bc42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168414
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85328}
2023-01-17 08:51:31 +00:00
Lu Yahan
b692796f75 [riscv][codet] Remove the CodeT=Code implementation
Port commit 177b6be920
Port commit 651d4d9748
Port commit dd38db94df
Port commit 3e43010abb

Change-Id: I88cf4fb58e53f8ab2f3c0a26a0886b8c172ca1b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4166713
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@{#85327}
2023-01-17 07:45:47 +00:00
v8-ci-autoroll-builder
44b8ca4eab Update V8 DEPS (trusted)
Rolling v8/build: 396e122..8eddf35

Rolling v8/tools/clang: 9f2d780..c042194

Change-Id: I39091f29ea1959d8602f8e13ca923cbc17e366db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4172487
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@{#85326}
2023-01-17 04:02:55 +00:00
Jakob Linke
dd38db94df [codet] Remove the CodeT type alias
.. now that it unconditionally refers to CodeDataContainer. All
previous references to 'CodeT' (the type and as part of names) are
now updated to 'CodeDataContainer', including 'codet', 'CODET', etc.

Bug: v8:13654
Change-Id: I7abbba040091eddf3ef09028a891aed460363929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165619
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85325}
2023-01-16 16:25:02 +00:00
Liviu Rau
dab4bb5ccc Add instrumenter builders for PGO
Bug: chromium:1382471
Change-Id: Iacb0eb5275d48a2ce4bef1783c55bef9bbb598db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171629
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#85324}
2023-01-16 15:52:56 +00:00
Olivier Flückiger
f813dd4d34 [static-roots] Use static roots in C++
Use the static root pointers to generate better code for C++ builtins.

First, comparisons like `IsUndefined` should only consider the
compressed pointer. The change ensures that comparisons compile to:

```
; IsUndefined
cmp    DWORD PTR [rbx+r14*1],0x22e1
```

Further, storing into a tagged field should be just one instruction as
well. To avoid complicating stores we opt for ensuring clang can
optimize `compress(decompress(cage_base, 0x42)) -> 0x42`. To that end
`DecompressTaggedPointer` has to be slightly rewritten, as
using the base as `Address` makes clang ignore the specified alignment
(see https://godbolt.org/z/f1ajneW1P).

With this optimization also stores are compiled to one instruction:

```
; map.set_prototype(roots.null()):
DWORD PTR [rax+0x13],0x22c5
```

Bug: v8:13466
Change-Id: I5355dc21cf7cb459f5dc3718f8facefc1d04e229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4130075
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85323}
2023-01-16 15:27:17 +00:00
Dominik Inführ
aa7b01698a [d8] Terminate workers before quit() in shared space isolate
Bug: v8:13267, chromium:1406471
Change-Id: I58aebcde81568837372463ec1a7cc0888ba22dc4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161763
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85322}
2023-01-16 15:05:23 +00:00
yangwenming
7df371b2d5 [parser] Avoid function declarations being covered.
In some cases, a declaration of a function may be covered by
variables with a same name and thus bound to one parameter. This
CL records variables which should not be bound to the parameter,
are skipped when inserting shadowing variable binding initilizers.

Bug: v8:13459
Change-Id: Id7d147392450b177d219bfd04245b47d9e58c20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4130416
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85321}
2023-01-16 14:11:43 +00:00
Michael Lippautz
0c64368134 [heap] Remove some LocalEmbedderHeapTracer accessors
Support the following through CppHeap:
- ShouldFinalizeIncrementalMarking()
- SupportsIncrementalEmbedderSteps()

Bug: v8:13207
Change-Id: I22db34aa9e98f6d61f66cbf3042409688175f434
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165618
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85320}
2023-01-16 14:09:39 +00:00
Dominik Inführ
e7a336d72b [objects] Use NotifyObjectSizeChange for BigInt right-trimming
Use the bottleneck for right-trimming of objects also for BigInts.

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

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

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

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

R=thibaudm@chromium.org

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

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

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

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

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

R=clemensb@chromium.org

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

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

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

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

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

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

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

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

More bugs have been fixed.

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

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

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

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

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

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

Port commit 177b6be920
Port commit 651d4d9748

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

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

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

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

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

Rolling v8/third_party/depot_tools: e38d195..1757677

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

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

Bug: chromium:1402705
Change-Id: I95ff828393cec4e1e388776ed2e6be09c67b1e30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4157274
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85298}
2023-01-13 21:16:45 +00:00