Commit Graph

75674 Commits

Author SHA1 Message Date
Shu-yu Guo
c8419529aa Remove TODO around now-merged upstream TA#with spec PR
Bug: v8:12764
Change-Id: I4f4d2775045878576227463f27ded769c3cef362
No-try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3691797
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80982}
2022-06-07 22:02:23 +00:00
Deepti Gandluri
2c2b094f59 [wasm-relaxed-simd] Liftoff prototypes for Arm Trunc/Sat operations
Bug: v8:12284
Change-Id: I9d4a5d7420c6650039f84b3c8fc7974e9e617ce3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687566
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80981}
2022-06-07 18:00:25 +00:00
Georgia Kouveli
2ed27bba6a [arm64] Fix GCC build issue for CFI
GCC doesn't accept 'lr' in inline assembly, specifically for the
list of clobbered registers. Change all uses to 'x30', for
consistency.

Bug: v8:10026
Change-Id: I5654fee4ca398dfdd99c34d09fc5294d169a9bd8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693701
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/main@{#80980}
2022-06-07 16:12:45 +00:00
Milad Fa
877e735205 PPC/s390: [heap] Remove write barrier builtin for incremental marking
Port e50d19cb11

Original Commit Message:

    https://crrev.com/c/3471854 already disabled the RecordWrite builtin
    specifically for incremental marking. Since this didn't regress performance as expected, we can now remove those versions of the
    builtin.

    This will simplify the barrier implementation a bit, but is also
    required for the shared heap write barrier. Unlike the generational barrier, the shared heap barrier can't be elided for map values.

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

Change-Id: Ic1a31fad3faaafeab077590d71d6d998eaddcc6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3691128
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80979}
2022-06-07 15:58:35 +00:00
Manos Koukoutos
7fd799636d [python3] Add missing python3 dependency
This is required for a V8 DEPS roll:
https://chromium-review.googlesource.com/c/v8/v8/+/3691119.

Change-Id: I65371eb7fd23b9dd13802e77bd3c14afdd592641
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688407
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80978}
2022-06-07 14:55:36 +00:00
Nikolaos Papaspyrou
edc2af0af4 cleanup: Fix some typos
Mostly in comments, again, not much to be said...

Bug: v8:12425
Change-Id: I6d6c70b4e4dba70ec6ac7574caecc77b65316050
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693698
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80977}
2022-06-07 14:43:07 +00:00
Seth Brenith
7787ed2007 Build cctest while building V8
I noticed in a recent build that C++ files from cctest didn't start
compiling until after several slow non-parallel tasks such as running
mksnapshot and linking v8_for_testing. I don't see any reason that
cctest sources should wait for those tasks, so in this change I propose
adjusting the build dependencies for more parallelism.

Change-Id: I2472117c8555ac397fa1232954c8b699d6429d38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3690170
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80976}
2022-06-07 14:05:05 +00:00
Samuel Groß
a072a429a4 [sandbox] Treat sandbox reservation failures as OOMs
When the sandbox cannot be initialized, it's either because there is not
enough virtual address space available, or because there is not enough
memory for the kernel data structures needed for the reservation (this
typically happens on Windows 7/8 where reserving virtual memory is
expensive). Both cases should be reported as OOMs, not CHECK failures.

Bug: chromium:1325302
Change-Id: I17bde9bcd4fbd6e3d54075b8891287c8fb01c1d7
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688406
Auto-Submit: Samuel Groß <saelo@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80975}
2022-06-07 13:46:05 +00:00
Liu Yu
851854c46f [loong64][mips64][heap] Remove write barrier builtin for incremental marking
Port commit e50d19cb11

Bug: v8:11708
Change-Id: Ia9a8cb9d8cd9e768fc056bc5555959e0aaeb3694
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3692435
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80974}
2022-06-07 13:27:35 +00:00
Manos Koukoutos
72c2068731 [wasm] Various small cleanups
Most notable:
- Suggest '--experimental-wasm-gc' for wasm-gc type definitions.
- Remove unused/useless fields from WasmTypeInfo.
- Put more wasm Turbofan optimizations behind '--wasm-opt'.

Change-Id: Ia298a58c2cf03964472a1445460d12ae72a5b04d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688404
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80973}
2022-06-07 13:13:45 +00:00
Milad Fa
9d0a093685 PPC [flags] Protect individual flag updates
Port: f149912f33

Drive-by: Defined EnqueueFunction under baseline-batch-compiler
for platforms without spakrplug support, currently getting
a link error when making a debug build.

Bug: v8:12887

Change-Id: I4fc8584ef09ad024280f7e40554a5e73a207b64f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688474
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80972}
2022-06-07 12:46:55 +00:00
Liu Yu
4903f94cff [loong64][mips64] Optimizing the swap between FPStackSlot and FPStackSlot
Use doubleword load/store to swap values in FPSackSlots instead of word
load/store.
Besides, fix error in gap resolver.

Change-Id: I57e9d577a6001bc970ce6b56b6f890eb3e4d196c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688325
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80971}
2022-06-07 12:02:39 +00:00
Manos Koukoutos
c202e30109 [wasm-gc] Add missing types to Int64Lowering
Drive-by: Make the code less verbose my returning the input node from
SetInt32Type.

Bug: v8:7748, chromium:1332385
Change-Id: I2fde9c2168af1365e305e7e8d894b03487e8a8d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687692
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80970}
2022-06-07 11:27:07 +00:00
Patrick Thier
886838b9cd Allow in-place internalizable strings in non-shared old space
It is now considered best effort, that in-place internalizable strings
are promoted into the shared old space instead of non-shared old space.
This was previously an invariant, but it doesn't hold if the whole page
containing the shared string is promoted instead of individual objects.
In addition with conservative stack scanning individual objects won't be
moved.

Bug: v8:12007
Change-Id: I7474738b02b0c18080cb2e82268a02bf9b480c40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688512
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80969}
2022-06-07 11:20:05 +00:00
Dominik Inführ
a10004fbe9 [heap] Remove all leftover uses of v8_enable_atomic_marking_state
This build flag was removed in https://crrev.com/c/3314864.

Bug: v8:12470
Change-Id: I365a1914ff096d07ae41d8bf35150615a9c91736
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676853
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80968}
2022-06-07 10:30:57 +00:00
Nico Hartmann
46ed47e66a [turbofan] Fix inconsistent typing of NumberFloor(NumberDivide(...))
In typed-optimization, Turbofan optimized NumberFloor(NumberDivide(...))
patterns where both inputs are known to be of Unsigned32 type, but the
replacement couldn't be typed consistently. This CL introduces a new
operator Unsigned32Divide, which has the same semantics, but can be
typed consistently and thus allows the simplified lowering verifier to
validate the graph correctly.

Bug: v8:12619
Change-Id: Iad77154d3d840c94edfd3ab91ffa37c840da0bc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644790
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80967}
2022-06-07 10:11:49 +00:00
Dominik Inführ
e50d19cb11 [heap] Remove write barrier builtin for incremental marking
https://crrev.com/c/3471854 already disabled the RecordWrite builtin
specifically for incremental marking. Since this didn't regress performance as expected, we can now remove those versions of the
builtin.

This will simplify the barrier implementation a bit, but is also
required for the shared heap write barrier. Unlike the generational barrier, the shared heap barrier can't be elided for map values.

Bug: v8:11708
Change-Id: I44bc6ee79006a5be8c1b593dee7fc30c3b9cfa85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683341
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80966}
2022-06-07 07:57:05 +00:00
Igor Sheludko
f7b33be7ed [rwx][mac] Add missing scopes in ConcurrentAllocator
Bug: v8:12797
Change-Id: Ide50026c7dc35197876e66cc53a7936acb765aa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687735
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80965}
2022-06-07 07:32:26 +00:00
Gabriel Charette
cd6afec260 [v8] Fix data race in TRACE_EVENT macros in cppgc
Mirrors a Chromium change @
https://chromium-review.googlesource.com/c/chromium/src/+/3680123
and a v8 change @
https://chromium-review.googlesource.com/c/v8/v8/+/3687370/

Bug: chromium:1330114
Change-Id: I61b1e34d54a496dda25936efbcd339fa35e64fb1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3686476
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80964}
2022-06-07 00:40:25 +00:00
Gabriel Charette
1abf6972a4 [v8] Fix data race in TRACE_EVENT macros.
Mirrors a Chromium change @
https://chromium-review.googlesource.com/c/chromium/src/+/3680123

Bug: chromium:1330114
Change-Id: I6fdfd93264e669965245f5ba696fb5b605e417fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687370
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80963}
2022-06-07 00:19:05 +00:00
Luis Fernando Pardo Sixtos
2b32409c8a Plumb Isolate through ElementsAccessor* Get functions
Currently the Isolate is gotten off of the object that the operation is
being performed on. Shared objects return the shared Isolate, which is
incorrect as it shouldn't be used to run JS, nor does it have
HandleScopes open. Plumb the executing Isolate through.

Bug: v8:12547
Change-Id: I2f500cbb707b3ce2e8a78203df9920374c190d28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3691967
Commit-Queue: Luis Fernando Pardo Sixtos <lpardosixtos@microsoft.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80962}
2022-06-06 23:40:14 +00:00
Shu-yu Guo
8ae1188644 Correctly skip unittests
Not all V8 build configs support JS shared memory features. Trying to
create a new shared Isolate on such a config DCHECKs at runtime. Make
the shared Isolate test fixture conditionally initialize the shared
Isolate. Users must explicitly check for support.

Bug: v8:12547
Change-Id: I3df1ce7eb5ae9a3c136f88ea8f44c650cc0408ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687565
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80961}
2022-06-06 23:29:54 +00:00
Frank Tang
5828eb4254 [Temporal] Add ZonedDateTime.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.subtract

Bug: v8:11544
Change-Id: If4e1f71a05a0d1e88829bf219d4f90bd7a343877
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617392
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80960}
2022-06-06 21:15:55 +00:00
Frank Tang
6d33cb89a4 [Temporal] Add Instant.(compare|prototype.equals)
Also implement AO: CompareEpochNanoseconds
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.instant.compare
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.equals

Bug: v8:11544
Change-Id: I953a890250ff0bf29cd24e4638bf17ceb5f9bb2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3382057
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80959}
2022-06-06 17:44:42 +00:00
Frank Tang
8436df4b68 [Temporal] Add ZonedDateTime.prototype.hoursInDay
Also add AOs: AddISODate, RegulateISODate

Change the return type of GetISO8601Calendar from MaybeHandle to Handle since it will never throw exception.

Spec Text:
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.hoursinday
https://tc39.es/proposal-temporal/#sec-temporal-addisodate
https://tc39.es/proposal-temporal/#sec-temporal-regulateisodate

Bug: v8:11544
Change-Id: Id0b59e2818a095ee9390de2302501888fd93ca2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3564937
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80958}
2022-06-06 15:57:56 +00:00
Frank Tang
7627b400c9 [Temporal] Add PlainTime.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.subtract

Bug: v8:11544
Change-Id: I0d684eec9eebfd26eceb6bb4c360025a33bd4c3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617390
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80957}
2022-06-06 15:56:54 +00:00
Frank Tang
9b4b64c282 [Temporal] Add PlainDateTime.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.subtract

Bug: v8:11544
Change-Id: Ib76b090a62a932931ab48cb5814ce1f1050fae10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617391
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80956}
2022-06-06 15:55:44 +00:00
Frank Tang
88b644717f [Temporal] Add PlainDate.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.subtract

Bug: v8:11544
Change-Id: Iacb4b9ba7d481005d14e2e4d42e2422133f5ab42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617389
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80955}
2022-06-06 15:49:55 +00:00
Liu Yu
242bc1947c [loong64][mips64][regalloc] Fix some errors in gap resolver
Related to commit 2b6cbda0b4

Bug: v8:5210, chromium:1269989, chromium:1313647
Change-Id: I0046bdb3fe76a3eaf45e773b1fab87b65476cc1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3690457
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80954}
2022-06-06 10:20:54 +00:00
Fanchen Kong
e344bf94a4 [x64][wasm-simd] Pattern match on packed byte to dword zero extend like shuffle
When a 8x16 shuffle matches a packed byte to dword zero extension,
1. input1 is S128Zero after canonicalization,
2. the indices {0,4,8,16} are consecutive value in the range [0-15] and
other indices are in the range [16-31],
the shuffle can be matched to packed byte to dword zero extend. These
shuffles are commonly used in image processing.

Change-Id: I14d1e35401dbc5ecd91f67c46ea9762628835d01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3547667
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/main@{#80953}
2022-06-06 03:15:12 +00:00
Liu Yu
86ca80bb78 [loong64][mips64][wasm-simd] Prototype relaxed integer Dot product instructions
Port commit a52b44f093

Bug: v8:12908
Change-Id: Ifcafab2f29d416f39fa48082e86c3c3b72508bad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3690453
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80952}
2022-06-06 03:11:32 +00:00
Lu Yahan
3af7f6add6 [riscv64][wasm-simd] Prototype relaxed integer Dot product instructions
Port commit a52b44f093

Original Commit Message:

    Prototype the instruction on the interpreter, and Arm64. Details of
    instruction lowerings on all relevant architectures can be found at:
    https://github.com/WebAssembly/relaxed-simd/issues/52

Change-Id: Ie0415f5c6a543517aa488a36ea5e575c6612ec0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687424
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80951}
2022-06-06 02:40:12 +00:00
Anton Bikineev
d8da11ae05 cppgc: shared-cage: Use dedicated reservations for normal/large pages
The CL splits the Oilpan giga-cage in two 2GB reservations: one for
normal pages and the other for large ones. The split enables fast
page-header lookup (assuming most objects reside on normal pages), which
is needed for:
1) the young generation project, where the remembered set will move to
   pages;
2) the shared-cage project, to find HeapBase* from page-headers.

Bug: v8:12231, chromium:1029379
Change-Id: I4ae9e8a75a307ed0dff9a2ec4f1247b80e17ebd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688519
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80950}
2022-06-05 14:32:01 +00:00
Igor Sheludko
ff64360d0a [rab/gsab] Skip slow tests on debug sim builds
Bug: v8:11111
Change-Id: I52caef43e7f2b3921ef34eeb50e41f1dedf90e32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3689570
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80949}
2022-06-04 12:59:20 +00:00
Igor Sheludko
a4d12a861b [heap] Fix race in MemoryChunk protection logic
... when allocating Code objects from background thread.

Bug: chromium:1329012, chromium:1330887
Change-Id: Ia2731ba463381c826d14591f4ba3b3fe15d15a0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688517
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80948}
2022-06-03 18:17:29 +00:00
Clemens Backes
620388b1a6 [heap] Fix GCC compilation
Using the constexpr {value()} accessor instead of the non-constexpr
implicit conversion operator makes GCC recognize the method as inlinable
again.
Before, we got (shortened):
  heap/heap-allocator-inl.h:167:18: error: inlining failed in call to
  always_inline ‘HeapAllocator::AllocateRaw’: function not inlinable

The issue was introduced by https://crrev.com/c/3683321.

R=mlippautz@chromium.org

Bug: v8:12887
Change-Id: I5879dc0afb23d1d5bb782bf9444703e9cba148f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688515
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80947}
2022-06-03 17:52:24 +00:00
Andrey Kosyakov
24a38eb386 Fix IsCBORMessage() to accept correct CBOR envelope
This was originally part of https://crrev.com/c/v8/v8/+/3662540, but
got accidentally lost during revert and re-roll.

Change-Id: I38097884e50f086e2a71319cf820c628ba736a8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687417
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80946}
2022-06-03 17:13:39 +00:00
Jakob Kummerow
11a1ac4bc2 Faster TypedArray.fill(0) and .fill(-1)
Calling memset directly is faster than std::fill for multi-byte element
types.

Change-Id: I83b997740146688f87b86901825e31d6644bc25b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687700
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80945}
2022-06-03 14:01:49 +00:00
Milad Fa
90804935b9 PPC/s390: [wasm-simd] Prototype relaxed integer Dot product instructions
Port a52b44f093

Original Commit Message:

    Prototype the instruction on the interpreter, and Arm64. Details of
    instruction lowerings on all relevant architectures can be found at:
    https://github.com/WebAssembly/relaxed-simd/issues/52

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

Change-Id: Ia42e3f7fcb77d5515ee20bb428902cc3ff033f69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688290
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80944}
2022-06-03 13:38:40 +00:00
Clemens Backes
bfe36a2eac [liftoff] Pre-reserve some space for OOL code
The {AddOutOfLineTrap} method shows up with several percent of runtime
in performance profiles. The majority of that was spent copying entries
when growing the underlying vector.
Pre-reserving space in that vector removes most of that overhead.

R=thibaudm@chromium.org

Change-Id: I1befb75b070d4f803770c2afcc5c82ffb9bfb522
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688511
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80943}
2022-06-03 13:35:19 +00:00
Milad Fa
e51b03a08a [wasm-gc] Fix LOAD_VERIFY/STORE_VERIFY on big endian
Applying the set of unittest changes from
https://crrev.com/c/3678208 to BE.

Change-Id: I02d0f2f388720e3acc35660042d5c2c76fa589e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687474
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80942}
2022-06-03 12:03:20 +00:00
Jakob Kummerow
bfd0ccf2dd [wasm] EquivalentTypes() should be symmetric
Fixed: v8:12935
Change-Id: Ib4dfdc276e6a9f465666b068bdbe31776429f359
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687699
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80941}
2022-06-03 11:16:59 +00:00
Clemens Backes
83feb80465 [wasm] Release compilation time callback earlier
As the {CompilationTimeCallback} does not react to
{kFinishedCompilationChunk}, it does not need to stay alive after a
"final" compilation event.

Drive-by: Make the enum a boolean enum.

R=jkummerow@chromium.org

Bug: v8:12899
Change-Id: Iffacd6e3d9a0f2474a51f07cf01419b2badf98c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3667083
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80940}
2022-06-03 10:52:30 +00:00
Clemens Backes
2d5c7a1517 [wasm][c-api] Avoid flag updates after initialization
There are two flag updates from the Wasm C-API. Both are unnecessary:
FLAG_expose_gc is not needed because we call the internal API for
garbage collection; this is always allowed.
FLAG_experimental_wasm_eh is enabled by default, so does not need to be
set to true in that test.

R=jkummerow@chromium.org

Bug: v8:12887
Change-Id: If56506228cd89d5452e71376e4c2f6a4ec636979
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687690
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80939}
2022-06-03 10:25:45 +00:00
Clemens Backes
f149912f33 [flags] Protect individual flag updates
Extend the effect of --freeze-flags-after-init to also protect updates
of individual flags instead of only the API.
For this, we wrap each flag in a {FlagValue} class which implicitly
converts to the value of the flag. Some cases still require the explicit
{value()} accessor though. That accessor is {constexpr}, in contrast to
the implicit conversion, because otherwise clang emits a lot of warnings
about dead code within "if (FLAG...)" scopes.

R=cbruni@chromium.org

Bug: v8:12887
Change-Id: I87d3457e49ceb317d34d6a21cf09c520d4171eb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683321
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80938}
2022-06-03 10:24:40 +00:00
Igor Sheludko
7b4721f8b8 [ext-code-space] Introduce CodeLookupResult
... as a pair of Code and CodeDataContainer.

In order to stop creating and using trampoline Code objects for
builtins we need a different way to represent an "embedded builtin"
code lookup result of builtin trampoline Code objects.
We can't switch to CodeT for this purpose because GC still needs to
be able to locate not yet evacuated Code objects in order to update
old code pointers on the stack once Code objects are moved.

Bug: v8:11880
Change-Id: I296636a6728a11c8e3220b3fee43fd12ff633c1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3684813
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80937}
2022-06-03 10:04:50 +00:00
Nico Hartmann
574b56110e [turboshaft] Blocks store graph generation for debug checks
Bug: v8:12783
Change-Id: Icf9e5b29863a1d4bfc8924ea34476d2a9998c391
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683322
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80936}
2022-06-03 09:53:59 +00:00
Marja Hölttä
efadd2d0a2 [rab/gsab] RAB/GSAB support for A.p.concat
It mostly worked out of the box. Only the dictionary mode prototype
chain walk code paths had to be updated.

Bug: v8:11111
Change-Id: Ia8336964d29304916a34e305f32bb33bb06e211a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683340
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80935}
2022-06-03 09:40:09 +00:00
Clemens Backes
40738e6c45 [wasm] Be more strict about allowed SIMD opcodes
This makes some checks a bit stricter to avoid accepting illegal relaxed
SIMD opcodes.

1) The default case in the Liftoff compiler should be UNREACHABLE,
   such that the switch case is required to cover all defined opcodes.
2) The {WasmOpcodes::IsRelaxedSimdOpcode} wrongly also returned {true}
   for opcodes like 0xfd300. We should really check nibbles 3-5 for the
   exact value 0xfd1.
3) {WasmOpcodes::Signature} was returning a non-null signatures for
   illegal opcodes like 0xfd200, because {IsRelaxedSimdOpcode} returned
   false, and then we would just use the lower bytes for the lookup in
   the SIMD signature table.

R=thibaudm@chromium.org
CC=gdeepti@chromium.org

Bug: chromium:1324081
Change-Id: Idbfde570ccd782e59b47b96e7ca8cc28fa7fae98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687309
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80934}
2022-06-03 09:24:30 +00:00
Marja Hölttä
9dcdfaec7d Revert 3 OSR-related commits
Reason: https://bugs.chromium.org/p/chromium/issues/detail?id=1331309

Reverted commits:

"[compiler] Remove the optimized OSR code if deoptimizing at inside of loop"

https://chromium-review.googlesource.com/c/v8/v8/+/3648219

"[compiler] Add condition use_ic to the removing the optimized OSR code logic"

https://chromium-review.googlesource.com/c/v8/v8/+/3679846

"[compiler] Add out of bytecode array to break condition of removing OSR"

https://chromium-review.googlesource.com/c/v8/v8/+/3686589


Bug: v8:12927, chromium:1330405, chromium:1330452, chromium:1330454, chromium:1330486, chromium:1330545
Change-Id: Idc335e1f6d236a7398b14b64c87da234106bee69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687695
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80933}
2022-06-03 09:18:00 +00:00