Commit Graph

78802 Commits

Author SHA1 Message Date
Clemens Backes
8de33e292e [wasm] Enable wasm-gc for fuzzers
This will make our generic fuzzers (wasm-fuzzer, wasm-code-fuzzer,
wasm-async-fuzzer, ...) fuzz wasm-gc opcodes.
We were already fuzzing specific instructions in the wasm-compile
fuzzer, but were missing fuzzer coverage for corner cases and
instructions not supported by that fuzzer.

R=jkummerow@chromium.org
CC=manoskouk@chromium.org

Bug: v8:13496
Change-Id: Iccca96e32a64d20c11bc425fb5b1e9a1e3aa7486
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030986
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84310}
2022-11-16 20:41:36 +00:00
Marja Hölttä
0fa99183ef [testing] Flush the output before crashing w/ unreachable in Torque
Bug: chromium:1384479
Change-Id: Iee75837da6cfdb792563f1d2f1c7640f492ced6b
Fixed: chromium:1384479
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030491
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84309}
2022-11-16 19:42:46 +00:00
Frank Tang
2ada52cffb [intl] Enhance Date parser to take Unicode SPACE
This is needed to prepare for the landing of ICU72.
Allow U+202F in the Date String, which the toLocaleString("en-US")
will generate w/ ICU72.

Bug: v8:13494
Change-Id: I41b83c4094ce3d0737a72dcd6310b52c68fdcdca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027341
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84308}
2022-11-16 18:00:56 +00:00
Toon Verwaest
78bd802348 [maglev] Put verbose deopt printing behind a flag
It's a bit much

Bug: v8:7700
Change-Id: I23fd1c5f6d16e0c97c9f52e503bfd63947a959b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030988
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84307}
2022-11-16 17:46:06 +00:00
Anton Bikineev
4ac7982861 unified-young-gen: Support Oilpan tracing from minor MC
The CL adds standalone Oilpan tracing to minor MC. No cross-heap
references are currently processed. In addition, the CL removes
wrapper iteration from Oilpan Minor MC.

Bug: v8:13475
Change-Id: I3a0670e1f3431a3aa723217d5361e4e74f9b0c0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027209
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84306}
2022-11-16 17:28:45 +00:00
Victor Gomes
2f1b530dbc [maglev] Reduce FunctionPrototypeApply
Bug: v8:7700
Change-Id: Ie8a0ea4adbcc50668f4b5c14f3948c8edfdfadb1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026122
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84305}
2022-11-16 17:10:45 +00:00
Toon Verwaest
1ffbbe5969 [runtime] Make stores to existing double fields always drop const
Dedeprecation to tagged is otherwise madness.

Bug: chromium:1383976

Change-Id: I4ed16b9cc59ca113c16099895d1721e3eb0288b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030486
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84304}
2022-11-16 17:05:25 +00:00
Nikolaos Papaspyrou
9554743a0b [heap] Refactor the stack object
The stack object is primarily used for conservative stack scanning, both
by the V8 and C++ garbage collectors. This CL introduces the notion of a
"stack context", which comprises of the current stack marker (the lowest
address on the stack that may contain interesting pointers) and the
values of the saved registers. It simplifies the way in which iteration
through the stack is invoked: the context must have previously been
saved and iteration always uses the stack marker.

Bug: v8:13257
Bug: v8:13493
Change-Id: Ia99ef702eb6ac67a3bcd006f0edf5e57d9975ab2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4017512
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84303}
2022-11-16 16:21:50 +00:00
Dave Tapuska
8016f5c667 [inspector] Pass the Context into terminateExecution
Adding and removing the MicrotasksCompletedCallback should be
associated with the microtask queue of the Context. We store the
context as WeakPtr and always remove the callback when it completes
regardless of the state of the debugger.

BUG=v8:13450

Change-Id: I40d623b05952575febfb76accc15512a38d14ab9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4004602
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84302}
2022-11-16 15:44:55 +00:00
Manos Koukoutos
0861b4b658 [wasm-gc] Disallow array.new_{data, elem} as constant expressions
Additionally:
- Remove the early data-count section from module-decoder and
  wasm-module-builder.js.
- Move a test from gc-nominal.js to array-init-from-segment.js.
- Comment-out relevant tests.

Bug: v8:7748
Change-Id: I5e038e0b6227c28ce79ffe39529ada59c34187eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028144
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84301}
2022-11-16 14:44:29 +00:00
Clemens Backes
435c5d7a96 [wasm][fuzzer] Use a consistent namespace
Most wasm fuzzers live in the v8::internal::wasm::fuzzer namespace.
Thus also move the wasm-fuzzer there. Additionally
- use the C++20 syntax for declaring the namespace,
- skip unneeded full or partial classifications on types, and
- remove a redundant HandleScope.

R=ahaas@chromium.org

Bug: v8:13496
Change-Id: I31d948af449efd9708aa6b27f35e8f3c9280a3f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030579
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84300}
2022-11-16 14:38:18 +00:00
Victor Gomes
076e7554da [maglev] Avoid clobbering value register in StoreIntDataViewElement
... if element size > 1.

Bug: v8:7788
Change-Id: I5b6364dae8ec0ce02716e402c3ddff4a2b089af9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030496
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84299}
2022-11-16 14:04:57 +00:00
Thibaud Michaud
cd89980624 [wasm] Compute precise stack segment start
StackMemory::base() returned an approximate value for the root stack.
Ensure that it returns the exact value reported by the OS, so that
conservative stack scanning can use this method to determine the bounds
of each segment in a uniform way.

R=ahaas@chromium.org,nikolaos@chromium.org

Bug: v8:13493
Change-Id: I9f267a568494a7744882d148fd65fe42f7b119af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030316
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84298}
2022-11-16 13:52:07 +00:00
Clemens Backes
3af74a2e04 [wasm] Disable write protection by default
Now that lazy compilation is shipped, we effectively overwrite the
default (true) via the weak negative implication anyway. Hence switch
the default to false to avoid confusion.

R=ahaas@chromium.org

Bug: v8:12852
Change-Id: Idd662992930db8a5df565b967a6820d662681ec6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030480
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84297}
2022-11-16 13:04:47 +00:00
pthier
50932b5750 [regexp] Decouple handling of text elements from the rest of the parser
Create RegExpTextBuilder as a separate class to handle creation of text
elements in the regular expression parser.
The main motivation is to re-use the text builder for StringDisjunctions
in unicode sets mode (to be implemented).

Bug: v8:11935
Change-Id: Ice5f035f1638bb6d9c58f62ce2a133882da736ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3967901
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84296}
2022-11-16 12:41:37 +00:00
Clemens Backes
0431a2575c [liftoff] Use root register instead of instance field
The isolate root is stored on the Wasm instance but also available
directly in the root register. Save (at least) one load and use the root
register directly.

R=jkummerow@chromium.org

Bug: v8:13449
Change-Id: I7426c6d2295e443e4971eea097b849ee50bf09c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026123
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84295}
2022-11-16 11:47:47 +00:00
Andreas Haas
63fc14c68b [wasm] Add --no-wasm-lazy-compilation to nooptimization
With shipping lazy compilation, we lose the test coverage for eager
compilation. This is bad, because with PGO, eager compilation may have
a comeback. With this CL we enable eager compilation in the
nooptimization test variant. This variant seems to be the best fit, as
there are no conflicts with existing flags. The --liftoff flag is not a
problem, because Liftoff was anyways the default for eager compilation.

R=clemensb@chromium.org

Bug: v8:12852
Change-Id: I002ecb2a31ad2e2335a0469fdf5e3d5bda3b33bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027004
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84294}
2022-11-16 11:42:17 +00:00
Clemens Backes
bb717e6f29 [wasm] Refactor native module cache API
Refactor the API to avoid passing in a pointer to a {shared_ptr}. In the
caller it's not always obvious that this can change the object that the
{shared_ptr} points to, which again can lead to UAF bugs.
Passing in a {shared_ptr} and receiving back a potentially updated
{shared_ptr} makes this more obvious.

R=ahaas@chromium.org, thibaudm@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Change-Id: Ib209c3c223df07446f0cd4472bc3f68f3897919f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020230
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84293}
2022-11-16 11:39:37 +00:00
Andreas Haas
2528312195 [wasm] Unconditionally register the caching callback
So far the callback was not registered when the module got loaded from
the code cache.

R=clemensb@chromium.org

Bug: chromium:1384530
Change-Id: I9477ad50a2642e2268bfacf97a2eacda6610b25d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027927
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84292}
2022-11-16 11:07:45 +00:00
Leszek Swirski
3a6d0ba8dd [maglev] Make sure constants are tagged in exception handling
Don't re-use the same mechanism for non-tagged constants as we do for
tagged ones, since then we end up with untagged values in exception
phis.

Instead, emit constants along with other non-tagged materialisations --
however, avoid unnecessarily Push/Popping them on the stack, or calling
Builtin::kNewHeapNumber, but embed them directly as tagged values in the
code.

Bug: v8:7700
Change-Id: I8db1314c274104cec292178d37fac58ef45d769f
Fixed: chromium:1385271
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030477
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84291}
2022-11-16 10:57:39 +00:00
Leszek Swirski
5443787221 [maglev] Move use marking to input visit
Allow nodes to be considered dead as soon as they are visited during
input assignment, by updating uses immediately (rather than waiting
until all inputs are assigned). This helps the case of clobbered
registers, which now know whether they need to be saved or not.

Also, disallow using existing blocked registers when assigning clobbered
inputs, so that a clobbering input doesn't accidentally clobber a
non-clobbering one.

Bug: v8:7700
Change-Id: I9b91b66ac159f0dd20c9554a860fdbf2545c400d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020508
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84290}
2022-11-16 10:56:20 +00:00
Michael Lippautz
c71ace71d3 [handles] Temporarily add CHECKs for node consistency
Adding diagnosing CHECKs. Will be reverted after fixing issue.

Bug: chromium:1380114, v8:13372
Change-Id: I33a7f3886de9440be9a94e542697fc7bc9f649cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028644
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84289}
2022-11-16 10:55:08 +00:00
Leszek Swirski
c7c8a5ce4e [maglev] Use tagged_alternative for Float64 EnsureTagged
EnsureTagged for Int32 and Uint32 uses NodeInfo::tagged_alternative, but
Float64 was still using the old "check next node" approach. Update this
to be inline with the others.

Bug: v8:7700
Change-Id: I682c48828753d98b740df0f6ac21ae1c6bda722c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4022708
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 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@{#84288}
2022-11-16 10:43:58 +00:00
Leszek Swirski
8ecc4ccc61 [maglev] Drop opcode DCHECKs in From(U)Int32ToTagged
The interesting cases are already covered by !is_conversion() and
representation checks, so all these DCHECKs give us at this point is
clusterfuzz false positives.

Bug: v8:7700
Change-Id: I5d6b194ba57da2378f5b2eb3e71f520a53d6b5da
Fixed: chromium:1384318
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028146
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84287}
2022-11-16 09:56:37 +00:00
Maya Lekova
6ed26ef882 [test] Handle NaNs in a test callback
Bug: chromium:1382071
Change-Id: I5f48c09f198468a21506a2e6ef238df4dbea926b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4025742
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84286}
2022-11-16 09:41:47 +00:00
S. Ganesh
0fe2597dd0 Use std::remove_if to implement erase_if
I needed to do something similar in crrev/c/4024485.

Change-Id: I99c97b4bb1739fcc453659b10b378d1a04f18c8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4022374
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: S Ganesh <ganesh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84285}
2022-11-16 09:22:18 +00:00
Anton Bikineev
9b92249200 unified-young-gen: Fix stats collector unmarking scope
Before we start unmarking, notify the stats collector about it as
otherwise it would assume that no GC is in progress and fail on a
DCHECK. In addition, fix standalone unmarking.

Bug: v8:13475
Change-Id: I028dadda60ab82b8a8769d84679d8e066f196da0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026897
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84284}
2022-11-16 09:15:40 +00:00
Dominik Inführ
80a83d92dd [heap] Verify shared spaces in HeapVerifier with --shared-space
shared_space() and shared_lo_space() weren't verified so far when
using --shared-space.

Bug: v8:13267
Change-Id: Ibe956d3f506651576815b3a3d84d531019419a3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027208
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84283}
2022-11-16 09:10:47 +00:00
Darius Mercadier
a8d0f63a9d Revert "[turboshaft] Port BranchElimination to turboshaft"
This reverts commit f3917347b2.

Reason for revert: breaks numfuzz (https://crbug.com/v8/13492).

Original change's description:
> [turboshaft] Port BranchElimination to turboshaft
>
> Bug: v8:12783
> Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84258}

Change-Id: I0020ef3952b7273555d98c50366261a945f51058
Fixed: v8:13492
Bug: v8:12783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028938
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84282}
2022-11-16 08:54:19 +00:00
JianxiaoLuIntel
ae042381b9 [turbofan] Reduce redundant ChangeInt32ToInt64
If Int64Constant[value] can be casted from an Int32Constant(value>=int32_min and value<=int32_max), we can reduce the redundant Int32ToInt64:
-------------------------------------------------
Int64LessThan(Int32ToInt64(a), Int64Constant[value])
====>
Int32LessThan(a,Int32Constant[value])
-------------------------------------------------

Otherwise, if value<int32_min:
-------------------------------------------------
Int64LessThan(Int32ToInt64(a), Int64Constant[value])
====>
# Always false
Int32Constant[0]
-------------------------------------------------

If value>int32_max:
-------------------------------------------------
Int64LessThan(Int32ToInt64(a), Int64Constant[value])
====>
# Always true
Int32Constant[1]
-------------------------------------------------

Change-Id: Id0de1dacad99d1f17b8e652472c2f4bc9ae79c15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3967835
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84281}
2022-11-16 08:28:19 +00:00
Marja Hölttä
ad46317053 [rab/gsab] Fix the destination being resizable in TA.p.slice
Bug: v8:11111,chromium:1384474
Change-Id: I4a8e272a95992244e3871ca826a65f542335fb13
Fixed: chromium:1384474
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028559
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84280}
2022-11-16 08:22:27 +00:00
Andreas Haas
c4d6c92186 [wasm] Delete liftoff-specific test
These tests were needed when missing features were implemented in
Liftoff, and the in-progress implementation was disabled by default.
Since the Liftoff code is enabled by default now, the test copy can be
deleted.

R=jkummerow@chromium.org

Bug: v8:12926
Change-Id: Iecdf02645a63e93a51f6ce297d168e149d68be26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027928
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84279}
2022-11-15 21:20:50 +00:00
Milad Fa
5c2eb9d801 PPC[liftoff]: Implement simd select
Change-Id: I469fecbbe8ef739d7eb25789369edd6d02900008
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4029096
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84278}
2022-11-15 20:12:40 +00:00
Milad Fa
55e4b60393 PPC: align inline asm to 4 bytes
Otherwise compilation could fail with this error:
```
{standard input}: Error: instruction address is not a
multiple of 4
```

Note the number parameter specifies the log base 2.

Change-Id: I2571bc5ba58e90ccc45e1c3f34da768b82d91b3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027072
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84277}
2022-11-15 16:50:11 +00:00
pthier
dd92fe999b [regexp] Fix wrong match of lone surrogates
A surrogate pair split by an "always succeeding" backreference
(backreference capturing undefined, because it hasn't captured anything
yet) was incorrectly combined into a surrogate pair, resulting in
incorrect matches.

Bug: v8:13410
Change-Id: I2faf9ca5f9fcfd55cd6933a1ea038c88f8d3f524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013159
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84276}
2022-11-15 15:43:15 +00:00
Anton Bikineev
9174d25829 unified-young-heap: Add calls into CppHeap from MinorMC
The CL add no-op hooks into MinorMC that calls into CppHeap young gen.
The unified-young-gen is gated behind the --cppgc-young-generation flag,
which implies --minor-mc.

The CL also removes then call into standalone CppHeap::RunMinorGC().

Bug: v8:13475
Change-Id: I854efdac29642a0667ccd18451807e9bfab6777e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020435
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84275}
2022-11-15 15:42:13 +00:00
Manos Koukoutos
3e406d6f39 [wasm-gc] Fix typo in WasmGCOperatorReducer
Bug: v8:7748
Change-Id: I3ee6f43452dd2beb43b28a0ba0d1c639f818cf70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028237
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84274}
2022-11-15 15:39:09 +00:00
Michael Lippautz
841969dbdc [handles] Left over refactorings from TracedHandles
- GlobalHandleMarkingVisitor -> ConservativeTracedHandlesMarkingVisitor
- Encapsulate the acquire load into TracedHandles::Mark

Bug: v8:13372
Change-Id: I00277be4e87aff75419837d40b46bc376ea9a881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028107
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84273}
2022-11-15 15:35:09 +00:00
Jakob Kummerow
9fb0e4a9bb [wasm-gc] Initialize internal_functions list with zeroes
Since crrev.com/30c19f3292fed9c499dd5a8f852bc76a481d6368, we always
allocate the wasm_internal_functions array on WasmInstanceObject
creation. This patch initializes that array with zero bits, so we
can use a Smi check (instead of a comparison to Undefined) to check
whether a given slot has been initialized already. This makes the
code generated for `ref.func` slightly smaller and more efficient.

Bug: v8:7748
Change-Id: I9d2b8fba4dc61d27e96b6e917c77133519af43ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028561
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84272}
2022-11-15 15:29:19 +00:00
Victor Gomes
6b7538a4b5 [maglev] Canonicalise root constants
... and create Is{RootIndex} methods.

Bug: v8:7700
Change-Id: I078b07d22091fcad0b08d2b51daae08add62a82b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026768
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84271}
2022-11-15 15:26:29 +00:00
Leszek Swirski
2bd3dd392b [maglev] Partially fix inlined builtin deopt loops
Speculation during builtin inlining doesn't have associated feedback,
so failures of speculation in such inlined builtins can cause deopt
loops.

The proper way of handling this is disabling speculation for these
calls, but a workaround is to not speculate and rely on type inference
for the inlined builtins (which is mostly sufficient for the ones we
have so far).

Bug: v8:7700
Change-Id: I6d88885fb13f744013c3b68508ec34d3022914cb
Fixed: chromium:1384428
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028238
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84270}
2022-11-15 13:52:40 +00:00
Igor Sheludko
70e65f8961 [ext-code-space] Change compression scheme for Code pointers
Unlike the default scheme the ExternalCodeCompressionScheme allows
the cage to cross 4GB boundary at a price of making decompression
slightly more complex. The former outweighs the latter because it
gives us more flexibility in allocating the code range closer to
the .text section in the process address space. At the same time
decompression of the external code field happens relatively rarely
during GC.

Bug: v8:11880
Change-Id: Ia62bedd318f88c2147534ff000ab9fad354777f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899307
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84269}
2022-11-15 13:39:20 +00:00
Darius M
8abf7a1ec9 [turboshaft] fix incorrect 32-bit comparison
32-bit comparisons were sometimes done on 64-bit. This was an issue in
cases where the upper 32 bits contained invalid bits, such as after a
Bitcast.

Fixed: chromium:1383204
Change-Id: Ie930dd579c01297b5717da8407fd9765586306ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020422
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84268}
2022-11-15 13:16:00 +00:00
Manos Koukoutos
6578f7fc29 [wasm][turbofan] Do not propagate signalling NaN
When optimizing wasm code with MachineOperatorReducer, the
{allow_signalling_nan} flag should be off, as all wasm floating point
operations are specified to return quiet NaN.

Change-Id: I54c0bb1dfaec645ae2031f4448de5daa6dc55301
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4026063
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84267}
2022-11-15 12:57:00 +00:00
Jakob Kummerow
cd5322de13 [stringrefs] Faster string.new_wtf16_array
By moving it from a runtime function to Torque.

Bug: v8:12868
Change-Id: Iede756af683d97c720040144a4ec02872da4c453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020425
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84266}
2022-11-15 11:45:51 +00:00
Marja Hölttä
cf3f222543 [valuserializer] Add a hard fail mode
Invariant in the normal mode:
- If the data is invalid, we'll fail gracefully (no crash, no DCHECK
failures)

Invariant in the hard fail mode:
- If the data is invalid (in a way we can detect), a CHECK fails at the
earliest location where we detect the inconsistency

Bug: chromium:1381404
Change-Id: Icae077a5c76329018fdb759122297134ae70b897
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013142
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84265}
2022-11-15 11:28:39 +00:00
Daniel Lehmann
7c6f2cba36 [wasm] Test disassembler for Wasm GC
This adds a separate test module and output expectation for Wasm GC.
This covers the new types and instructions from
https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md

Unlike the previous disassembler tests, one cannot easily create the
module bytes with WABT's `wat2wasm` from the expected text output (at
least right now), so I used Binaryen's `wasm-as` instead to generate
the module from a separate input file (not included here, because it
uses folded expressions, which the debugger doesn't.)

Change-Id: Id0205b2788fd7be5ea7696242cbe8a74a4bca892
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013265
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84264}
2022-11-15 11:21:00 +00:00
Jakob Kummerow
51b1c9f76f [tools] Fix update-vscode.sh
Apparently the server-provided information changed, so we need to
work a little harder to find the latest release.

No-Try: true
Change-Id: Idc030fb648e39039175133dc0cb052c296193b94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4023861
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84263}
2022-11-15 11:15:10 +00:00
Igor Sheludko
2c5faac922 [ext-code-space] Change representation of FreeSpace::next field
... to make it independent of the pointer compression scheme used for
the main cage and for code cage.

When external code space is enabled the next pointer is encoded as
Smi values representing a diff from the current FreeSpace object
address in kObjectAlignment chunks. Terminating value is stored as 0.
Such a representation has the following properties:
a) it can hold both positive an negative diffs for full pointer
   compression cage size (HeapObject address has only valuable 30 bits
   while Smis have 31 bits),
b) it's independent of the pointer compression base and pointer
   compression scheme used for main cage and code cage.

When external code space is not enabled the old encoding is used:
it's either 0 or tagged pointer to the next FreeSpace "object".

Bug: v8:11880
Change-Id: Ie7bcd97964c52cce178bfc49355378dded465830
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4023083
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84262}
2022-11-15 11:08:30 +00:00
Darius M
5384b89103 [compiler] add dmercadier@ to OWNERS
Change-Id: I670a3c44a956874947f8f22bafa1bdad7a10ba74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028062
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84261}
2022-11-15 10:27:59 +00:00