Commit Graph

80157 Commits

Author SHA1 Message Date
Olivier Flückiger
a2f63f1886 [gc][static-roots] Don't access markbits on R/O pages
Markbits on read only pages are initialized BLACK and never change. For
any practical purposes they are unused.

This CL prevents any access to the markbits of these pages. This is a
precursor to removing them entirely from the page to make room for
static roots.

Bug: v8:13466
Change-Id: I61d3f6d9bbca750d0f34475859b34ff44f7fec1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212397
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85665}
2023-02-06 09:36:57 +00:00
Samuel Groß
7edcd83d1b [watchlist] Add saelo to flag-definitions.h watchlist
Change-Id: Id3c3feb2ffe4b03cd2a33816fccda0cd50c5f092
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4224013
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85664}
2023-02-06 09:28:58 +00:00
Victor Gomes
21c9163eeb [maglev] Missing ReduceResult::Fail()
Missing nullptr -> ReduceResult::Fail in refactor:
https://chromium-review.googlesource.com/c/v8/v8/+/4218731

Fixed: chromium:1413052
Bug: v8:7700
Change-Id: I93d24916b20d42a650545a11c81a369d53bd5764
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4224031
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
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@{#85663}
2023-02-06 09:07:19 +00:00
Victor Gomes
64af278b30 [maglev][inline] Refactor inner graph building to BuildInlined
Bug: v8:7700
Change-Id: Ie17aff5cff54f4640dd94f822e95e92bfd373890
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218732
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85662}
2023-02-06 08:55:24 +00:00
v8-ci-autoroll-builder
1cf95e3e49 Update V8 DEPS (trusted)
Rolling v8/buildtools: a706ef8..5408fe0

Rolling v8/buildtools/third_party/libc++/trunk: c8da880..549781a

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/123a98b..d0d703e

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230204.1.1..version:11.20230202.3.1

Change-Id: Iff001e57ead073d8ea4d292ebd8e3b3b41c7297c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4223514
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@{#85661}
2023-02-06 04:01:53 +00:00
v8-ci-autoroll-builder
6c19077e86 Update V8 DEPS (trusted)
Rolling v8/buildtools: cf6f58c..a706ef8

Rolling v8/buildtools/third_party/libc++/trunk: 7a7a3a7..c8da880

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230202.3.1..version:11.20230204.1.1

Change-Id: Ib9537912d77169308e0bb64a9e502196ff5f548e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4222419
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@{#85660}
2023-02-05 04:07:43 +00:00
Jakob Kummerow
702fdc02a2 Revert "[liftoff] Combine "InitMerge" with the actual merge"
This reverts commit 656c74218f.

Reason for revert: crbug.com/v8/13715

Original change's description:
> [liftoff] Combine "InitMerge" with the actual merge
>
> "InitMerge" did compute the state at the merge point, and a following
> "MergeStackWith" or "MergeFullStackWith" would then generate the code to
> merge the current state into the computed state.
> As every "InitMerge" is followed by an actual merge, we can combine the
> two and save one iteration over the two states.
>
> The only change in generated code is that we initialize the merge state
> after a one-armed if from the if-state instead of the else-state. This
> could potentially make the if-branch slightly cheaper and the
> else-branch slightly slower, but will not negatively impact overall code
> size.
>
> This CL should save roughly 2% of Liftoff compilation time.
>
> R=​dlehmann@chromium.org
>
> Bug: v8:13565, v8:13673
> Change-Id: Id323a15e7fd765727f46830509fbaf7f5498c229
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4203380
> Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85616}

Bug: v8:13565, v8:13673, v8:13715
Change-Id: I5342833aaa9c8665a514b3702eaf783d512dfa5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4222633
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85659}
2023-02-04 21:42:37 +00:00
Milad Fa
5275c1a407 s390: [ptrcomp] Remove the distinction of TaggedAny and TaggedPointer
Port 81aa89592b

Original Commit Message:

    Known-pointer decompression used to be distinct from any-tagged-value
    decompression, since the latter used to detect Smis and decompress them
    with sign extension. However, we got rid of this distinction when we
    introduced Smi-corrupting loads (allowing the top 32-bits of
    uncompressed Smis to be undefined), which means that the TaggedPointer
    and TaggedAny decompression is now identical.

    We can remove a bunch of duplicate code by removing this distinction.

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

Change-Id: Ib741905e09c929806cf3f584c356a4a5187df270
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4221514
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85658}
2023-02-04 16:39:29 +00:00
v8-ci-autoroll-builder
e652f5a34a Update ICU (trusted)
Rolling v8/third_party/icu: 2c51e5c..266a469

On iOS do not use minimal ICU data when use_blink is set (Dave Tapuska)
https://chromium.googlesource.com/chromium/deps/icu/+/266a469

Revert "[config] Declare the args conditionally" (Filip Filmar)
https://chromium.googlesource.com/chromium/deps/icu/+/2cce76f

Revert "[fuchsia] Limit the visibility of ICU targets" (Filip Filmar)
https://chromium.googlesource.com/chromium/deps/icu/+/d8b44f9

Change-Id: If14dee279645be30fc9fa65d420af6379b3b187a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219570
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@{#85657}
2023-02-04 04:25:17 +00:00
v8-ci-autoroll-builder
e940b92707 Update V8 DEPS (trusted)
Rolling v8/build: f7baf4b..d0fad16

Rolling v8/buildtools: 9ad5f9f..cf6f58c

Rolling v8/buildtools/third_party/libc++/trunk: bd44075..7a7a3a7

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7b05da8..123a98b

Rolling v8/third_party/depot_tools: 79499cf..ef2d011

Change-Id: I52157d8daeaa7f2517a01456ed280c3cbdc7ef9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219568
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@{#85656}
2023-02-04 04:17:03 +00:00
Shu-yu Guo
d14d17300b [test262] Roll test262
f00d4118d..e7364ea7d

Bug: v8:7834
Change-Id: Ie10ed625cea9f11167f1a8808404339eb0e3d5cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219942
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85655}
2023-02-03 20:31:41 +00:00
Choongwoo Han
d5784303a1 [v8windbg] Fix curisolate() again
The last CL miscalculated the address of Isolate object. We should find the thread_local base address using `_tls_index_`. And, instead of calculating the address manually, all the location information is already available in `Location`. So, we can simply use the Location object to create a typed object.

Also, adding a testcase for `curisolate()` function.

Bug: v8:13394
Change-Id: I1da55bdf43a3b6100d141917eb97a1793939dca8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4220104
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#85654}
2023-02-03 20:04:07 +00:00
Omer Katz
f18065a3ca [heap] Fix bug in external strings table cleaning
After a MinorMC we iterate over the set of young external strings,
finalize the unmarked ones, and clear their slots.
Since MinorMC no longer updates the young string set (to avoid iterating
over the set during evacuation) it may now contain an old string.
If after promoting an external string from young to old,  we get another
MinorMC cycle before we get a full GC (that will "reset" the young and
old string sets), the next MinorMC cycle may treat the promoted string
as unreachable. This is because the string is in old space are is
therefore left unmarked.

Bug: chromium:1412669, v8:12612
Change-Id: I1cacc25b74d9d3dd221c0cc1f0d8b4c4eb83a04d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219106
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85653}
2023-02-03 18:21:44 +00:00
Dave Tapuska
0253c3a979 [ios] Fix an additional build failure on iOS.
- Adjust an is_mac to is_apple

Bug: chromium:1411704
Change-Id: I2456f8b4f793b37f4b64782e8403dd4fc84b0807
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4221871
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85652}
2023-02-03 17:55:42 +00:00
Victor Gomes
8263a03f12 [maglev][inline] Fix always deopting inlined functions
Also creates a Result wrapper,

Bug: v8:7700
Change-Id: I6a78e9ae5ee2af60dae2e62ca0a876701890de78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218731
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85651}
2023-02-03 17:34:25 +00:00
Mikhail Khokhlov
051df31aec Reland "Reduce build size when building with Perfetto SDK"
This is a reland of commit 0d4200055b

gn complained about headers that are only included behind the
v8_use_perfetto build flag. Added "nogncheck" to suppress this
warning.

Original change's description:
> Reduce build size when building with Perfetto SDK
>
> Building Chromium with full Perfetto SDK included increases build time
> significantly. We can reduce this overhead by including only those
> parts that are required. See b/266913150 for context.
>
> Change-Id: I0cde5cb7df7b6151ec686e993488d8467c416fac
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212390
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
> Cr-Commit-Position: refs/heads/main@{#85603}

Change-Id: Ifdcc9983230b5e7bab5f66a37f193d2cee698400
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4221573
Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85650}
2023-02-03 17:03:11 +00:00
Nico Hartmann
79efc8f090 Revert "[wasm-gc] Introduce wasm null object"
This reverts commit 2e357c4814.

Reason for revert: Speculative revert for https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux%20MSAN%20no%20origins/33231/overview

Original change's description:
> [wasm-gc] Introduce wasm null object
>
> We introduce a wasm null object, separate from JS null. Its purpose is
> to support trapping null accesses for wasm objects.
> This will be achieved by allocating a large payload for it (larger than
> any wasm struct) and memory-protecting it (see linked CL). The two null
> objects get mapped to each other at the wasm-JS boundary.
> Since externref objects live on the JS side of the boundary,
> null-related instructions in wasm now need an additional type argument
> to handle the correct null object.
>
> Bug: v8:7748
> Change-Id: I06da00fcd279cc5376e69ab7858e3782f5b5081e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200639
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85648}

Bug: v8:7748
Change-Id: Ie53febf49b946217e0057959c757d811a97ca1eb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219105
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85649}
2023-02-03 16:57:44 +00:00
Manos Koukoutos
2e357c4814 [wasm-gc] Introduce wasm null object
We introduce a wasm null object, separate from JS null. Its purpose is
to support trapping null accesses for wasm objects.
This will be achieved by allocating a large payload for it (larger than
any wasm struct) and memory-protecting it (see linked CL). The two null
objects get mapped to each other at the wasm-JS boundary.
Since externref objects live on the JS side of the boundary,
null-related instructions in wasm now need an additional type argument
to handle the correct null object.

Bug: v8:7748
Change-Id: I06da00fcd279cc5376e69ab7858e3782f5b5081e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200639
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85648}
2023-02-03 16:06:12 +00:00
Leszek Swirski
81aa89592b [ptrcomp] Remove the distinction of TaggedAny and TaggedPointer
Known-pointer decompression used to be distinct from any-tagged-value
decompression, since the latter used to detect Smis and decompress them
with sign extension. However, we got rid of this distinction when we
introduced Smi-corrupting loads (allowing the top 32-bits of
uncompressed Smis to be undefined), which means that the TaggedPointer
and TaggedAny decompression is now identical.

We can remove a bunch of duplicate code by removing this distinction.

Change-Id: Id66671497d63ed885f9e537494c011317dfd4788
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4221398
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85647}
2023-02-03 15:46:34 +00:00
Jakob Kummerow
1c162c83b1 [turbofan] Fix types of reduced Int64Div/Uint64Div
When folding constants in the MachineOperatorReducer, we should be
careful that arithmetic instructions producing int64 outputs aren't
replaced with booleans represented as int32.

Fixed: chromium:1407384
Change-Id: Ib536a53084b12bbb205308c642ee32c0f2e1e418
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219023
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85646}
2023-02-03 14:30:44 +00:00
Samuel Groß
65e87d962d Introduce --experimental
This flag, together with the DEFINE_EXPERIMENTAL_FEATURE macro, allows
declaring features as "experimental", implying that they are expected to
contain bugs and are not yet ready for fuzz testing for example.

Change-Id: I1288b6c2d28ef20d19d388bf56c57c44a25ba19b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4181025
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85645}
2023-02-03 13:44:03 +00:00
Thibaud Michaud
df0e9dca39 [test] Fix Handle dereference issue in move fuzzer (bis)
Another instance of:
https://chromium-review.googlesource.com/c/v8/v8/+/4066541

R=dmercadier@chromium.org
CC=machenbach@chromium.org

Bug: v8:13544
Change-Id: Id9046bf9c5ea09aff45b4531b5f1ad03307fd100
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4221571
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85644}
2023-02-03 12:36:40 +00:00
pthier
1885a16551 [test][inspector] Add inspector test for RegExp v-flag
Bug: v8:11935
Change-Id: Idf667b07398f3a740cc210ed52769199e9622e38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219017
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85643}
2023-02-03 11:34:10 +00:00
Victor Gomes
49f1450b3f Reland "[maglev] Check for strings in polymorphic loads"
This is a reland of commit 7f4a04671a

- Add heap number check.
- Use object_map in range instance check.

Original change's description:
> [maglev] Check for strings in polymorphic loads
>
> Bug: v8:7700
> Change-Id: Id3d523446f5061a78a46d1c52cf8f8339566356d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212402
> 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@{#85626}

Bug: v8:7700
Change-Id: I72cfe2e2bf19141dffbb8df5c34600eca4d70594
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218508
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85642}
2023-02-03 11:07:54 +00:00
Clemens Backes
a6966097a0 [trap-handler] Rename ProbeMemory
The "ProbeMemory" functions starts showing up on stack traces for random
illegal memory accesses hit by the arm64 simulator (see e.g.
https://crbug.com/1408957 or https://crbug.com/1409124).
Thus specify an explicit symbol name that will make it easier to see
that this is a v8-internal symbol related to the simulator.

R=mseaborn@chromium.org

Change-Id: If5753170cfee399aa59b11cfcd82314589990192
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_sim_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200630
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85641}
2023-02-03 10:31:53 +00:00
Matthias Liedtke
8f93980acc [wasm-gc] Turbofan: Enable loop peeling if getCodeunit is called in loop
Loop peeling currently causes performance regressions in some cases.
To be able to gradually enable loop peeling in loops that would benefit
from it, as a first step loop peeling is enabled iff the loop contains
a PrepareStringForGetCodeUnit IR instruction.

Bug: v8:7748
Change-Id: I2c04101b9cd342e35a016e59da085cbb481bdbe1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200642
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85640}
2023-02-03 10:21:36 +00:00
pthier
5080c7727a [regexp] Add UseCounter for invalid regexp with /v, but valid with /u
Some patterns that were valid with /u are invalid with /v.
This CL adds a UseCounter for such usages in /u to get an idea how often
they are used in the wild.
This is important information w.r.t the proposal to use /v instead of /u
for the pattern attribute (http://go/gh/whatwg/html/pull/7908).

Chromium CL: https://crrev.com/c/4221395

Bug: v8:11935
Change-Id: Idc023ceba9ce03eee578d6c387ce8a8f37db292f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212393
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85639}
2023-02-03 09:49:49 +00:00
Clemens Backes
d3a3d73384 [wasm][test][cleanup] Use more base::Vector
The {CallWasmFunctionForTesting} function currently receives arguments
as a pair of {int} and {Handle<Object>*}. Encapsulating this as a
{base::Vector} makes the relation more clear and improves readability at
call sites.

R=ahaas@chromium.org

Change-Id: I884f8d0dc1c33389b60cc53750f2e3bfcaf644a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218353
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85638}
2023-02-03 09:37:34 +00:00
Leszek Swirski
2c9f7ac40d [maglev] Change PushDeferredCode to return a Label
Change PushDeferredCode into MakeDeferredCode, and have it return a
Label*. This allows it to be passed in directly to functions expecting a
Label, e.g.

    JumpToDeferredIf(cond, [](){...});

could be replaced by

    JumpIf(cond, MakeDeferredCode([](){...}));

and we don't need to add "ToDeferred" overloads for the other Jump
helpers (JumpIfSmi etc.).

Bug: v8:7700
Change-Id: I716468030601964fba828666fde6aa4f2ed29c3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218392
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@{#85637}
2023-02-03 08:56:03 +00:00
Liu Yu
7b86d3c7ec [mips64] Remove duplicate BranchShortMSA
Change-Id: I134188f29f7f0d0a2e61fa2a95a8bf59bdc2e1ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4220973
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@{#85636}
2023-02-03 06:49:05 +00:00
v8-ci-autoroll-builder
bd65850167 Update V8 DEPS (trusted)
Rolling v8/build: d112664..f7baf4b

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2d3ccea..7b05da8

Rolling v8/third_party/depot_tools: 8361a9b..79499cf

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230201.0.1..version:11.20230202.3.1

Change-Id: Ia6eb714430c94a0a24a6778bb2918fe548c6a2ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4220672
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@{#85635}
2023-02-03 03:44:49 +00:00
Clemens Backes
e33c3a09b3 Disable the use of preserve_most on arm64 Windows
We see crashes on arm64 on Windows. Disable the use of preserve_most
there, until we figure out (and fix) the root cause.

R=mlippautz@chromium.org

Bug: chromium:1409934
Change-Id: Ic913039d36d158fb5ad368915d95c250d8724a07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218354
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85634}
2023-02-02 16:37:59 +00:00
Matthias Liedtke
14f1ec8cdd [wasm-stringrefs] Add string.hash instruction
Bug: v8:12868
Change-Id: I12ee551fbffc25c591d618f1957bbabbceff255e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217413
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85633}
2023-02-02 16:35:44 +00:00
Dominik Inführ
31654be902 [heap] Fix --code-stats with code cache
During deserialization all allocated objects are preinitialized with
Smi 0. During code cache deserialization GCs may happen. When
--code-stats is enabled as well, code stats are collected during GC.
In such situations crashes may happen because of fields in
BytecodeArray objects not being deserialized at the time of GC.

This CL introduces new raw_* getters for --code-stats which allows
accessing these fields while they still contain 0.

Bug: v8:13704
Change-Id: I767714ca1c936a031d71f3eb53d6401030ccce7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212406
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85632}
2023-02-02 16:31:43 +00:00
Samuel Groß
de4e49260f [base] Fix use of deprecated function getsectdatafromheader_64
Instead use getsectiondata for both the 32 bit and 64 bit use case.

Bug: v8:13428
Change-Id: I1efeb3bb69862ad11008a6a4a3fb08581ab7cd2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218733
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85631}
2023-02-02 15:23:45 +00:00
Jakob Kummerow
3656b47035 [turbofan] Fix ECL::LowerChangeTaggedToTaggedSigned
The EffectControlLinearizer should use accurate representations
for the values it creates.

Fixed: chromium:1412099
Change-Id: I9b6d3d1aeb11e5a4863d82fd2e1bc5b7ce777742
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218734
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85630}
2023-02-02 15:21:53 +00:00
Clemens Backes
99936e2de9 [liftoff] Outline spilling and reloading code
The assumption is that {PopToRegister} most often finds a register stack
slot (this is backed by data). Hence put all spilling-related code
behind no-inline and preserve_most functions.
Also, annotate some methods that are supposed to be inlined with
V8_INLINE. This is not needed (they were already inlined before), but
this documents the intend better.

This saves some binary size and seems to also slightly improve
performance.

R=ahaas@chromium.org

Bug: v8:13565, v8:13673
Change-Id: Ib4b8bd361ee19c29221263f6383034933fe7dff5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212407
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85629}
2023-02-02 15:20:49 +00:00
Jakob Kummerow
c07d8535f8 [stringrefs] Optimize get_codeunit
This patch doubles the performance of iterating over a stringview_wtf16.
It does this by:
- changing string.as_wtf16 to flatten any Cons strings; in TF this
  is represented by a new operator
- introducing a Turbofan operator PrepareStringForGetCodeunit that
  inspects the given string's internal representation and retrieves
  the pointer to the actual characters
- adapting the code emitted for `get_codeunit` to consume the output
  of this operator
- improving WasmLoadElimination to deduplicate both new operators for
  peeled loops, so that as much work as possible only needs to be done
  once.
This patch was authored about half-and-half by manoskouk@chromium.org
and jkummerow@chromium.org.

Bug: v8:12868
Change-Id: If9cf4c3ffeb5e1ca08b864cbc0bf868656ca2dec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4198142
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85628}
2023-02-02 15:15:06 +00:00
Nico Hartmann
994c2a575d Revert "[maglev] Check for strings in polymorphic loads"
This reverts commit 7f4a04671a.

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

Original change's description:
> [maglev] Check for strings in polymorphic loads
>
> Bug: v8:7700
> Change-Id: Id3d523446f5061a78a46d1c52cf8f8339566356d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212402
> 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@{#85626}

Bug: v8:7700
Change-Id: I87473a0cef092d457391d84c051becf06014703b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219091
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85627}
2023-02-02 15:03:59 +00:00
Victor Gomes
7f4a04671a [maglev] Check for strings in polymorphic loads
Bug: v8:7700
Change-Id: Id3d523446f5061a78a46d1c52cf8f8339566356d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212402
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@{#85626}
2023-02-02 14:38:35 +00:00
Milad Fa
31487e43a6 PPC/s390: [liftoff] Use cross-platform conditions
Port a5eb40d90d

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

Change-Id: I0429a643658ac513c32587d71b4f4dceb65cfdf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4214882
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85625}
2023-02-02 14:27:34 +00:00
Clemens Backes
a5192ac12f [wasm][fuzzer] Print information about exceptions
We sometimes get non-reproducible exception mismatches in the fuzzers.
This might come from OOM exceptions.
This CL makes us print some information about them, so we learn more
from the occasional fuzzer reports. In a follow-up we can then handle
OOM exceptions better, if that turns out to cause this.

R=ahaas@chromium.org

Bug: chromium:1412084
Change-Id: Ic0bf3880fe733320c2532c0f69d8f88fe9c9ff5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217417
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85624}
2023-02-02 13:56:21 +00:00
Anton Bikineev
d469a70049 cppgc: Fix CombinedWriteBarrierSlow()
The function relied on passed pointers always being compressed, which
is no longer the case with subtle::UncompressedMember<>.

Bug: chromium:1412021, chromium:1412221

Change-Id: I531e41d24fcab34e527db99f8047123f254e8a74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217411
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85623}
2023-02-02 13:38:39 +00:00
Marja Hölttä
28771bf519 [rab/gsab|turbofan] Add missing DataView tests
Bug: v8:11111
Change-Id: I03fd90900fae521cb3e738f011fb0832770ff04a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218351
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85622}
2023-02-02 13:34:59 +00:00
Camillo Bruni
87ab6f5500 [tools] Better arm64 support for update-compile-commands.py
- Mac Arm64 doesn't like cross-compiling to 32bit platforms
- Build the language server and torque files for the host platform
  (x64, arm64) by default

No-Try: true
Change-Id: I4df68d416c58f58335fecc52b802c4bfe4ce2f24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218352
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85621}
2023-02-02 13:30:43 +00:00
pthier
4001e14901 [strings] Support shared LO space in externalization
We have a shared large object space now. This CL supports
externalization of strings in shared LO space.

Bug: v8:12957
Change-Id: Ic540aed4d3e99248ef27bdccb525a0bc8ff7b28b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217416
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85620}
2023-02-02 13:22:21 +00:00
Jakob Linke
135b63038d Refactor RootVisitor::VisitRunningCode
The contract of passing in a Code object for builtins and
InstructionStream objects for everything else was confusing. In this
CL we change it to:

 void VisitRunningCode(FullObjectSlot code_slot,
                       FullObjectSlot istream_or_smi_zero_slot)

where we *always* pass in both parts of the composite
{Code,InstructionStream} object. The istream_or_smi_zero_slot must
equal raw_instruction_stream() of the given code_slot. We pass in
both, because it is convenient at the single call site in frames.cc.

Drive-by: extract deopt literal iteration to a Code method.

Bug: v8:13654
Change-Id: I09d658fbd8d26bf483e1c778e566a53e1817f80f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212399
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85619}
2023-02-02 13:15:23 +00:00
Nikolaos Papaspyrou
9b89942446 [heap] Add scope to object stats dumping in full GC
This accounts for a big difference between the total length of the
atomic pause (v8:gc:cycle:main_thread:full:atomic) and the sum of
the four phases, when GC stats are enabled.

Change-Id: I5d5abd1e6a8d28ae45a04739d2ca937ef54148af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217418
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85618}
2023-02-02 13:05:39 +00:00
pthier
96f5bb7be4 [regexp] Ship Unicode Sets
Advance --harmony-regexp-unicode-sets to shpping, enabling it by
default.

Bug: v8:11935
Change-Id: I5dcf2c584775f25516c7a1846ac6bc53326eefbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217412
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85617}
2023-02-02 11:53:15 +00:00
Clemens Backes
656c74218f [liftoff] Combine "InitMerge" with the actual merge
"InitMerge" did compute the state at the merge point, and a following
"MergeStackWith" or "MergeFullStackWith" would then generate the code to
merge the current state into the computed state.
As every "InitMerge" is followed by an actual merge, we can combine the
two and save one iteration over the two states.

The only change in generated code is that we initialize the merge state
after a one-armed if from the if-state instead of the else-state. This
could potentially make the if-branch slightly cheaper and the
else-branch slightly slower, but will not negatively impact overall code
size.

This CL should save roughly 2% of Liftoff compilation time.

R=dlehmann@chromium.org

Bug: v8:13565, v8:13673
Change-Id: Id323a15e7fd765727f46830509fbaf7f5498c229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4203380
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85616}
2023-02-02 11:49:47 +00:00