Split out all the headers from v8_compiler/v8_compiler_opt and
v8_base_without_compiler into v8_internal_headers since the headers
have inter-dependencies that otherwise make it impossible to satisfy gn
check.
Also adds new v8_header_set torque_runtime_support that exports
src/torque/runtime-support.h separately from the generated headers.
This reduces the number of gn check failures from 169 to 59.
Bug: v8:7330
Change-Id: Ie7ebc894910b7efa02011a74da964e11995c7f4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712569
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73104}
Using Parameter has some crashes on arm64. The other Parameters are
also using UncheckedParameter so let's use that.
Bug: v8:6949
Change-Id: Ia802b4edd6d57fb87de5c58415e9569b4824fc6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2470566
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73101}
This CL removes the includes of src/wasm files from the API if Wasm is
disabled (v8_enable_webassembly=false). This will allow to later
remove the whole src/wasm directory from compilation.
Since we do not want to modify the exposed API in a no-wasm build, we
instead make all Wasm-related functions fail.
R=ulan@chromium.org
Bug: v8:11238
Change-Id: I61038e75ac62871758351eb01f299fe68d478c82
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726504
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73100}
This CL is part of a series that adds the C++ implementation of
SwissNameDictionary, a deterministic property backing store based on
Swiss Tables.
This CL adds an in-place version of Rehash and a small change to
HeapObject::HeapObjectShortPrint.
Bug: v8:11388
Change-Id: I578ef8f5638a6201111602ffef7f2d4a5a257bcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720305
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73099}
We got a TSAN
warning because of the non-atomic store of the code pointer in
a JSFunction in the interpreter builtin (when the pointer is
discovered in the FeedbackVector). However, we know this store is
safe because we guarantee a release store into the
FeedbackVector. However, TSAN can't recognize this interesting
triple relation. Therefore, we mark the fields we need to read
from TurboFan as relaxed.
Bug: v8:11501, v8:7790
Change-Id: I20652216294db540bf9c20e5067a6362fea07dc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2721762
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73098}
Add a flag that crashes the process instead of gracefully handling the
abortion of evacuation. The goal of this CL is to check whether we could
get away with simply reporting OOM instead of handling this case.
Change-Id: I6a561ed007c76a111cfb85c454f7f025f07ab9cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724272
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73097}
During loop exploration implemented for wasm loop unrolling, we can exit
early if we already know that the loop is too large to unroll.
Bug: v8:11298
Change-Id: I213edef995b58500d07d428f1f1a725132dd44e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726501
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73095}
For adding stack checks in optimized code, we compute a conservative
estimate of the frame size in the case of a deoptimization. Earlier we
included the size of arguments adaptor frames used when actual arguments
didn't match formal parameter count. Though we don't have an explicit
adaptor frame, we should still include the size of these additional
arguments when computing the frame size.
Bug: chromium:1181240
Change-Id: Ib977c5492bb824762fe62aac5e4ffb1c2c233b86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2723252
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73094}
Calls >4gb may have pretty bad performance on 64bit processors that use
32bits to encode branch prediction. By passing in a function in the
binary as a hint to mmap it's more likely we'll be given an address
close to the binary. This may significantly improve performance on many
types of 64bit cores, especially those without hyperthreading.
Change-Id: Ia1f712a3a029e10cb0c6a0d1e2c4919bbb2854f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726500
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73093}
This CL sets it so that the actual object size is reported only when
cppgc_enable_object_names is set to true. Otherwise the heap snapshot
merges nodes and the sizes don't make sense.
Also, this will resolve a web test failure for the library.
Bug: chromium:1056170
Change-Id: I32f6552560bdfad4b64c67b21292543978042a81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726499
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73092}
To improve performance of parking, keep the thread state in an atomic
variable instead of protecting it with a mutex.
However the mutex was used e.g. to force Unpark() to block while the
safepoint operation was still running. Therefore the safepoint algorithm
has to change as well.
Park() and Unpark() use CAS operation to transition the state.
Safepoint() uses a relaxed load for checking whether a safepoint was
requested. Since Safepoint(), Park() and Unpark() all have a slow path,
there is no need for busy-waiting on the main thread.
We need two more ThreadStates:
* SafepointRequested: This state is set by GlobalSafepoint to force
Running threads into the slow path on Safepoint() and Park(). This
state also replaces the separate atomic<bool> safepoint_requested_
field we used before.
* ParkedSafepoint: This state is set by GlobalSafepoint as well to force
parked threads into the slow path on Unpark().
When stopping all threads, GlobalSafepoint transitions states from
Running --> SafepointRequested and Parked --> ParkedSafepoint to force
the slow path for all three methods. After performing the transition
for each thread we know the exact number of Running threads and wait
until each of them either reached a safepoint or parked itself.
Design doc: https://docs.google.com/document/d/1p9klWyqT_AScAnK_PdHZTcNhZGzoBiYWPkUciIh2C58/edit?usp=sharing
Bug: chromium:1177144, v8:10315
Change-Id: I8697da915c7d18e2fb941f1bedf6181226408feb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704075
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73089}
Fixes a problem with the inlining of JS-to-Wasm call wrappers into a
surrounding exception handler and re-enables this case.
Bug: v8:11092
Change-Id: I4937838c2b4a199e21f5ac90bee5b8e8de2470be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2678341
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73086}
Add GetOptionsObject/CoerceOptionsToObject for ECMA402 2021
Change Intl.ListFormat / Intl.DisplayNames and Intl.Segmenter
to use GetOptionsObject and keep old API under CoerceOptionsToObject
based on https://github.com/tc39/ecma402/pull/538/files
Test262 tests need to be changed per
https://github.com/tc39/test262/issues/2950
Bug: v8:11466
Change-Id: I5cb9b7aba0556effc76b4005e95c90db1e59d41f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2705696
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73082}
This is a reland of eb4536797e
Original change's description:
> cppgc: Rework testing GC infrastructure
>
> Instead of moving the stand-alone logic to the base heap, allows
> specific heaps to override their stand-alone GC behavior. This allows
> CppHeap to reuse the unified heap bottlenecks and visitors for
> testing. This works as long as any v8 references are empty as there is
> no Isolate attached to the heap in this case.
>
> - Reverts parts of https://crrev.com/c/2716291
> - Relands parts of https://crrev.com/c/2718146
>
> In addition, add tests covering v8::CppHeap and cppgc::Heap.
>
> Bug: chromium:1056170
> Change-Id: I47dc88c7f0e4961a1aadd60da9b05bff4dcfb27a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718612
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73077}
Bug: chromium:1056170
Change-Id: I415c837a7cf275c636172485dc4101c237a7d76b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2723253
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73081}
These were prototyped and not merged into the SIMD proposal.
Bug: v8:10983
Change-Id: I5c30a0e9955ee5602e05d473f0f85be59d124205
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718761
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73080}
Optimize extadd_pairwise when AVX is supported. If SSE4_1 is available,
we can use the SSE version of the same code sequence. However, there is
a potentially better lowering that only requires SSE2, which has less
instructions, but will only work better if we have rip-relative
constants (otherwise even using ExternalReference it would be 2 moves).
Bug: v8:11086,v8:11349
Change-Id: Iac6f31cf8052161846ff5242b4c18c638c83e0f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2719298
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73079}
This reverts commit eb4536797e.
Reason for revert: Breaks MSAN: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/37053
Original change's description:
> cppgc: Rework testing GC infrastructure
>
> Instead of moving the stand-alone logic to the base heap, allows
> specific heaps to override their stand-alone GC behavior. This allows
> CppHeap to reuse the unified heap bottlenecks and visitors for
> testing. This works as long as any v8 references are empty as there is
> no Isolate attached to the heap in this case.
>
> - Reverts parts of https://crrev.com/c/2716291
> - Relands parts of https://crrev.com/c/2718146
>
> In addition, add tests covering v8::CppHeap and cppgc::Heap.
>
> Bug: chromium:1056170
> Change-Id: I47dc88c7f0e4961a1aadd60da9b05bff4dcfb27a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718612
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73077}
Bug: chromium:1056170
Change-Id: Ieda44c07d08f837a6632f96b8db6d5bec87dd521
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2723216
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73078}
Instead of moving the stand-alone logic to the base heap, allows
specific heaps to override their stand-alone GC behavior. This allows
CppHeap to reuse the unified heap bottlenecks and visitors for
testing. This works as long as any v8 references are empty as there is
no Isolate attached to the heap in this case.
- Reverts parts of https://crrev.com/c/2716291
- Relands parts of https://crrev.com/c/2718146
In addition, add tests covering v8::CppHeap and cppgc::Heap.
Bug: chromium:1056170
Change-Id: I47dc88c7f0e4961a1aadd60da9b05bff4dcfb27a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718612
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73077}
Port 52cc7ba9bc
Original Commit Message:
This renames more fields holding "ValueKind" or methods operating on
"ValueKind" to contain "kind" instead of "type".
It also renames "is_reference_type" to "is_reference" on both ValueType
and ValueKind, as the "_type" prefix is kind of implicit from the
argument.
R=clemensb@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: I3ab73b31b401ed1e9788df33d998b067280cb52c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2723251
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73076}
Drive-by cleanups to merge macro lists which now have the same
instruction selector requirements.
Bug: v8:11384
Change-Id: Id49c43dce897685d5ced19509f390274805739aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716069
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73075}
Using an out-parameter for the SFI data type in
GetSharedFunctionInfoCode() avoids loading the CodeKind in
CompileLazy().
Bug: v8:11429
Change-Id: Ib8eccdf6d169cce28a9ff50bb415447b61ad71a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715197
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73073}
We experimentally globally enable loop unrolling for wasm code. This
might be reverted based on the results of perf bots.
Additional change: Add LoopExitValue to Int64Lowering, plus a small
simplification.
Bug: v8:11298
Change-Id: Iaf2829e80f948d70c5fb6ed7c974db7f59265fa3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718611
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73072}
Wasm tests and wasm fuzzers should not be compiled (and run) if
v8_enable_webassembly=false.
R=machenbach@chromium.org
Bug: v8:11238
Change-Id: I78bbb1d1d98179cac315411b8c2c2ecaee8ede91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2721761
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73071}
This renames more fields holding "ValueKind" or methods operating on
"ValueKind" to contain "kind" instead of "type".
It also renames "is_reference_type" to "is_reference" on both ValueType
and ValueKind, as the "_type" prefix is kind of implicit from the
argument.
R=manoskouk@chromium.org, jgruber@chromium.org
Bug: v8:11477
Change-Id: I7809f1af6e983aebca96e03fe1fbc6ccaa22db72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718063
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73070}
In https://crrev.com/c/2707170, Liftoff was changed to only store the
ValueKind instead of the ValueType, because we only need to know kind
for code emission. For debugging though, the whole type is useful.
This CL changes the debug sidetable back to store the full type, and
retrieves this information from the decoder.
R=jkummerow@chromium.org
Bug: v8:11477
Change-Id: I08a512d24cdf0955c95f3b9261d68a02a39b9b4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720302
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73068}
Simd unsupported in simulator and some machines on mips.
Original Commit Message:
As of https://crrev.com/c/2629465, Simd tests cannot pass on
architectures without Simd support. Tests will need to be
re-enabled once Simd support is fully implemented on PPC.
Port: aaacffa1e0
Change-Id: Ic7451211cbe2bfa13952b994ea440189620579cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717158
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#73067}
This was causing DevTools to crush whenever I took a heap snapshot.
Bug: chromium:1056170
Change-Id: Ice7b3039c21a3f902f242299939e92ba0e393c9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720307
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73065}
This CL adds WasConservativeGC to HeapState which reports whether the
last GC was finalized conservatively. The state is updated at the end of
marking atomic pause.
Currently the library integration in Blink ignores the stack state when
scheduling a forced GC for testing. That means that we always schedule
another GC after a forced GC.
This causes a crash in web_tests which assume no GC is happening
between forced GCs if the thread is not idle and no new allocations
happen.
Usage CL: https://crrev.com/c/2720201
Drive by: Fix stack state for MarkingVerifier in CppHeap.
Bug: chromium:1056170
Change-Id: I6ad23ed7c1a53fae96425b968bc4b3eb18ce80b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720279
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73064}
- cppgc_headers: Do not depend on any internals but merely expose the
public API interface.
- v8_libbase: Do not depend on v8_headers but merely on
v8_config_headers as src/base should be independent of general V8.
Bug: chromium:1056170
Change-Id: I06d1a4ea20f243bae8e994deba9d76f07993ed4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720303
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73060}
This CL also adds and makes use of the __int128 data type to help
with vector loads and stores.
Change-Id: I0d02eddcedfe17d12eadd214e205b693fa7ebe53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720459
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73059}
This instruction is not in the final SIMD proposal.
Bug: v8:6020
Change-Id: Ifef1b3d58bf660f2d30784f587aed85f327825ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716073
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73058}