Commit Graph

77487 Commits

Author SHA1 Message Date
Leon Bettscheider
a7a0c7b581 [heap] MarkingFromInternalFields write barrier bailout for MinorMC
This CL skips the MarkingFromInternalFields write barrier when
MinorMC concurrent marking is active, because we do not run Oilpan
young GCs yet.

Bug: v8:13012
Change-Id: Ib73dea8357be6d135290009258b5d172477a633b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865464
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82895}
2022-09-01 09:28:33 +00:00
Jakob Linke
25506204b8 [maglev] Don't deopt-for-osr when Turbofan is disabled
Bug: v8:7700
Change-Id: I784d28b8ee043a4fa2478dbaaf7412a0708b811c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867732
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82894}
2022-09-01 09:26:13 +00:00
Dominik Inführ
7e4293a1fe Reland "[heap] Verify client heaps during shared GC"
This is a reland of commit ddafb7a30e

CL is relanded without changes. https://crrev.com/c/3865965 and
https://crrev.com/c/3865967 fixed the failing DCHECKs that caused
this CL to be reverted.

Original change's description:
> [heap] Verify client heaps during shared GC
>
> With --verify-heap verify all client heaps before and after a shared
> GC. This ensures that the OLD_TO_SHARED remembered set is properly
> filled for each client isolate.
>
> Bug: v8:11708
> Change-Id: I1506a419c7a91c5baa87ce251da9861d8ad9e066
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857559
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82829}

Bug: v8:11708
Change-Id: I38bd6724807fee36bc47d70b0d83156b81a2b4fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865968
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82893}
2022-09-01 09:02:02 +00:00
Jakob Linke
8775410530 [maglev] Fix int overflow in SmallEnoughForOSR
Bug: v8:7700
Change-Id: Id417c068ea6df04c43823f32b60531d7588dcd1f
Fixed: chromium:1358655
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865552
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82892}
2022-09-01 08:56:31 +00:00
Leon Bettscheider
8441f26cf4 [heap] Bailout in IncrementalMarkingJob::ScheduleTask
Currently MinorMC does not suport incremental marking but uses the
IncrementalMarking class to bootstrap concurrent marking.

IncrementalMarkingJob::ScheduleTask is called from multiple call
sites which assume major incremental marking. This CL adds a bailout
to ScheduleTask on IsMajorMarking()==false to avoid erreoneously
doing incremental steps while in MinorMC mode.

Bug: v8:13012
Change-Id: I57803a8f258697478a9696716063c8c2cae1ae30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865147
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82891}
2022-09-01 08:55:11 +00:00
Leon Bettscheider
d1e696d035 [heap] Remove two DCHECKs for minor concurrent marking
This CL removes two DCHECKs which no longer hold with minor
concurrent marking.

Bug: v8:13012
Change-Id: I6f24284f0955c57deeb2fa2c300623d9aedfdd3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865463
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82890}
2022-09-01 08:51:02 +00:00
Ting Chou
dad963c84f [riscv] Separate single and double precision zero to different registers to avoid misuse.
R=yahan@iscas.ac.cn

Bug: v8:13191
Change-Id: I8c7ccb90c4e8a5b8ca5d88fc11c99fbe876621bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3831142
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82889}
2022-09-01 08:49:52 +00:00
Camillo
9526c2936d Dehandlify more code
Bug: v8:11263
Change-Id: Ia53518d52f906c96afafc084af99679bd64b46fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866177
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82888}
2022-09-01 08:40:12 +00:00
jiepan
b7c71a6d1b [no-wasm] Fix compilation of some wasm simd test
Some wasm simd unit tests are not guarded by V8_ENABLE_WEBASSEMBLY,
it will cause test failure on no-wasm build.

Change-Id: Ib08e133f979e492ca620191d799f641bdb0f60bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866706
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#82887}
2022-09-01 08:26:52 +00:00
Jakob Linke
7086e988e7 [maglev] Fix osr-from-ml-to-tf flake again
We've previously reset profiler ticks on ML finalization to avoid
unexpected early tierups to TF. This CL additionally avoid early TF
tierup through the `small function` reason by disabling small-function
optimization.

Bug: v8:7700
Change-Id: I57ba294af0d1d189f76c2cb1ffc31af0837b1e42
Fixed: v8:13242
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865550
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82886}
2022-09-01 08:03:22 +00:00
Leszek Swirski
3fcf167ae1 [maglev] Deopt on binops/cmpops with no feedback
Emit an unconditional deopt if a BinOp/CompareOp has insufficient
feedback, rather than emitting a generic op.

Bug: v8:7700
Change-Id: I3e47d82716a8fe7832cc179e949d689b9aef14e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867731
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82885}
2022-09-01 08:01:22 +00:00
Igor Sheludko
447feef80e [assembler] Introduce RelocInfo::NEAR_BUILTIN_ENTRY
... for PC-relative builtin calls/jumps and explicitly use near_call /
near_jump instructions.

This is a step towards
1) removing the RelocInfo::RUNTIME_ENTRY which was temporarily used
   for this purpose,
2) being able to remap embedded builtins into the code range multiple
   times.

Bug: v8:11527
Change-Id: Ife26c8bbc524be0b07f333776716f22bd4bd36aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866190
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82884}
2022-09-01 07:55:51 +00:00
Liu Yu
85f8b8bf9d [loong64][mips64][maglev] Implement Maglev-to-Turbofan OSR
Port commit ed90ea5cf7

Bug: v8:7700
Change-Id: I8cec07b2fe971287895c89b91436d0f1223cf89a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868527
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@{#82883}
2022-09-01 06:47:36 +00:00
Jakob Linke
5b7a5f4d11 [maglev] Add a --maglev clusterfuzz trial
.. and update old entries:

- Remove --no-untrusted-code-mitigations (flag no longer exists)
- Make --stress-concurrent-inlining-attach-code less likely since it
  mostly overlaps with --stress-concurrent-inlining and there haven't
  been many reports in this are lately.

Bug: v8:7700
Change-Id: Ic88ea74ca88a7c14edfc39bc0a55b846bb01e465
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867506
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82882}
2022-09-01 05:31:37 +00:00
Jaroslav Sevcik
ba14e4d062 [inspector] Introduce instrumentation pause distinction
Introduce an inspector client interface method for running an
"instrumentation pause" (when an instrumentation breakpoint is hit).
This allows the client to run a more restrictive version of message
pumping on instrumentation breakpoint hits.

If not overriden, the instrumentation pause message loop handler will
run the normal message loop. Such an implementation preserves the
behavior for existing clients.

Bug: chromium:1354043
Change-Id: Id33bb10503d73b59b24e63fd9d24631611f68dee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863256
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82881}
2022-09-01 05:22:16 +00:00
Manos Koukoutos
886cd431c7 [wasm] Inlining improvements
Changes:
- Limit how often a function can be inlined, mostly to constrain
  recursive-function inlining.
- Move call count limiting earlier (to WasmInliner::ReduceCall), and
  guard it behind the flags that are required to generate call counts.

Bug: v8:12166
Change-Id: Ie3c140daff110e08fe7103ee79393ea27ae49bb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865918
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82880}
2022-09-01 04:29:46 +00:00
v8-ci-autoroll-builder
761be17cf7 Update V8 DEPS (trusted)
Rolling v8/build: d74c524..252971c

Rolling v8/buildtools: 69f262d..c24a0d5

Rolling v8/buildtools/linux64: git_revision:5705e56a0e5856621415cfdf444432554e72c9c9..git_revision:00b741b1568d56cf4e117dcb9f70cd42653b4c78

Rolling v8/buildtools/third_party/libc++/trunk: e5670a0..42e738f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6552f9b..638d30e

Rolling v8/third_party/depot_tools: b0fb8d5..5084800

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220830.2.1..version:9.20220831.2.1

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Ic2b31700344a5e433521362408949fa382ae0d2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865743
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@{#82879}
2022-09-01 04:22:16 +00:00
Lu Yahan
7370cb9775 [riscv]Port [wasm] Keep call_indirect index on the stack
Port commit ed90ea5cf7
Port commit ed90ea5cf7
Port commit ab5db111d0329cb0954c110a8cc67b9793b2bb8f

Change-Id: I7981793d7f38d3769a1c9fdca23b7607d7772089
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867138
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@{#82878}
2022-09-01 01:51:45 +00:00
Liu Yu
295911112b [loong64][mips64][sparkplug] Allow sparkplug->ignition deopt in func entry
Port commit af62c4f0e5

Bug: chromium:1246907, chromium:1357554
Change-Id: Ia54fd08719827a2d58ff81ef7e243a3a365ffb55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867135
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Liu Yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#82877}
2022-09-01 01:41:16 +00:00
Shu-yu Guo
57b777ff92 [heap] Don't get the ForegroundTaskRunner in shared isolate
This CL removes dependence on the ForegroundTaskRunner in the shared
isolate because the shared isolate doesn't have one associated with it.

There are 3 places:

1. The memory reducer is no longer allocated on the shared isolate.

2. The WasmEngine is no longer initialized for the shared isolate, which
   never executes user code.

3. Ability to post non-nestable tasks is no longer required on the
   shared isolate. This is required for FinalizationRegistry, and
   the shared isolate never executes user code.

Bug: v8:11708
Change-Id: I4b0cf2c8dc8686ccc7b7d24e6c9e12eb4b9d03d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3864275
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82876}
2022-08-31 23:37:35 +00:00
Deepti Gandluri
247b33e921 Cleanup some macros
Change-Id: Ife29e300d51058a19e4b568cb8d335f26a7556e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863806
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82875}
2022-08-31 19:31:55 +00:00
Frank Tang
d42f2801db [Temporal] Unskip fixed tests.
We fixed the test earlier but forgot to remove the SKIP.

Bug: v8:11544
Change-Id: I6594dc2ad07fe88fdc2ed9bfaa0f0715bc14930b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867132
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82874}
2022-08-31 17:05:10 +00:00
Dominik Inführ
5c84002aa2 [heap] Add test for old-to-shared slot recording for page promotion
Add test for ensuring that page promotion records old-to-shared slots
during a full GC.

Bug: v8:11708
Change-Id: Id2eb77a623c84586cad61d72bb80479ef69e3b29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866176
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82873}
2022-08-31 16:02:55 +00:00
Marja Hölttä
b1553b9188 [interpreter] Omit calling default ctors
If we see a default ctor, walk up the constructors until we find a non-
default one.

Default ctors can only be skipped if there are no class fields / private
brands.

This CL implements the Ignition parts; Sparkplug, Maglev and TF will
be implemented as follow ups. (This is fine, since this feature is
behind a flag.)

Bug: v8:13091
Change-Id: Ie8ca8aedb01bd4b13adf1063332a5cdf41ab358a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804601
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82872}
2022-08-31 15:45:26 +00:00
Matthias Liedtke
168fcef9b0 [wasm-gc] Support Table<struct|array index>
Bug: v8:7748
Change-Id: I4057a9288fe3d2dc0df308ce51be92e417572bd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865483
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82871}
2022-08-31 15:35:35 +00:00
Shu-yu Guo
d855d7f7b1 [shared-struct] Rework ValueSerializer::Delegate::SupportsSharedValues
This CL has two changes:

1. Remove ValueDeserializer::Delegate::SupportsSharedValues. Only
   ValueSerializer::Delegate needs to report whether it supports
   serializing shared values. The ValueDeserializer::Delegate should
   DCHECK if it gets a shared object tag but it doesn't support it.
   This better mirrors what happens with SharedArrayBuffer transfers
   currently.

2. When attempting to serialize a shared object (shared struct, shared
   array, Atomics.Mutex, or Atomics.Condition) when
   !SupportsSharedValues(), throw instead of assert. This is for better
   ergonomics.

Bug: v8:12547
Change-Id: I2bb66830393526578016813c4e3488859dd07073
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866302
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82870}
2022-08-31 15:27:55 +00:00
Patrick Thier
f03dd79562 [interpreter] Rename bytecode operand flag accessors in assembler
Rename BytecodeOperandFlag to BytecodeOperandFlag8. The methods in
interpreter-assembler were missed in https://crrev.com/c/3857561.

Change-Id: I09383531e4d16e6e428a56feb76192156211dc81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867515
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82869}
2022-08-31 14:36:17 +00:00
Samuel Groß
541d4080ca [sandbox] Fix DCHECK failure in EPT entry allocation
When an entry is allocated from the freelist, is is not correct to
`DCHECK(entry.IsFreelistEntry())` before the compare-and-swap succeeds:
another thread may have allocated the same entry in the meantime,
thereby turning it into a regular entry. However, in that case the CAS
will fail and then entry allocation will be retried.

Drive-by: factor out the common logic from AllocateAndInitializeEntry
and AllocateEvacuationEntry into a new TryAllocateEntryFromFreelist.

Bug: v8:13246
Change-Id: Idf16b67a2ca5ddeef16620a4d6f4a8a6c07d917b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865864
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82868}
2022-08-31 14:35:15 +00:00
Tobias Tebbi
6e8d4f55ed [turboshaft] add operation use counts
Some optimizations need to know if an operation has multiple uses,
for example to avoid extending live-ranges.
However, maintaining full use-lists is expensive memory-wise and
not really needed in this case, where we only need to distinguish
between 1 or more uses.
Therefore, we only count the number of uses. To save even more memory,
we use the 1 byte currently left for alignment padding in the
operation header and put the count there.
With a single byte, we cannot count beyond 255, but for the use-case
at hand, this is enough. When reaching 255, we no longer track the
use-count.
Nodes with so many uses should be rare and their use-count will usually not go down to 1 again, so this does not loose much precision.

Another possible future use of these counts is reserving memory for
full use-lists.

This CL also removes mutable access to node inputs, as this would need
to update use-counts and is not actually needed currently.

Bug: v8:12783
Change-Id: Idd2035c6f8ced6317e3aec0c42eecd1383e86248
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863266
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82867}
2022-08-31 13:39:38 +00:00
Samuel Groß
a27a527b75 [sandbox] Sandboxify Foreign external pointers
Bug: v8:10391
Change-Id: I567f94800119a9afd3f684134a6f4885026f813e
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/+/3859347
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82866}
2022-08-31 12:42:38 +00:00
Tobias Tebbi
9bbc13bd40 [turboshaft] faster hash for GVN
Bug: v8:12783
Change-Id: I97f6a28bfef7c9aed679c84f33d60a71cf467718
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3859327
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82865}
2022-08-31 12:33:13 +00:00
Jakob Linke
f6a1f55c3b [maglev] Enable concurrent compilation for maglev variant
Bug: v8:7700
Change-Id: I7bdb64c5a8c73aefd19c972337d488de2103ad13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865320
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82864}
2022-08-31 12:32:11 +00:00
Patrick Thier
d3ba602ff2 [regexp][interpreter] Extend RegExp-Flags to 2 Bytes
In preparation for the new `v`-flag, extend RegExp flags from 1-byte to
2-byte.

Bug: v8:11935
Change-Id: I2dacb5e8dba889947054aa5c155708b8d315b898
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857561
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82863}
2022-08-31 12:31:05 +00:00
Jakob Linke
46d54b0233 [maglev] Scale OSR heuristics in presence of Maglev code
OSR is triggered based on the condition:

 bytecode_size <= x + profiler_ticks * y

where x and y are constants selected in the dawn of time. Since the
presence of Maglev introduces multiple interrupt budgets for different
target tiers (which control how often profiler_ticks are incremented),
constant y must be adapted to stay somewhat close to the old OSR
timing behavior.

Bug: v8:7700
Change-Id: I0f182d28fd64a58f2f6d8346cca0d553fbeae184
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866175
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82862}
2022-08-31 12:30:01 +00:00
Dominik Inführ
f447b4cda4 [heap] Remove DCHECK not holding during shared heap verification
During shared heap verification, we might verify the client heap
from the shared heap's thread. In this case this DCHECK doesn't hold.
Since there is no strong need for that DCHECK simply remove it.

Bug: v8:11708, v8:13244
Change-Id: I90897915290f5238da2559538ce3cfe7ab4e9dff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865967
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82861}
2022-08-31 11:05:18 +00:00
Michael Achenbach
6546fcf180 [foozzie] Always include all typed-array mocks
Due to https://crbug.com/1195263, large typed arrays can have an
observable difference on the same architecture, depending on
optimization behavior.

For differential fuzzing comparisons, we previously used a proxy
for typed arrays that capped the maximum size only when comparing
different architectures - there an observable difference is WAI.

We move the capping code and make it arch-independent for now until
the bug above gets fixed, since it caused too many duplicates, which
degrade fuzzing performance.

Bug: chromium:1195263
Change-Id: Ic81c383e547413378cbe037de3c38eb900a9e5dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866173
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82860}
2022-08-31 10:48:29 +00:00
Jakob Linke
6565685935 [maglev] Reset profiler ticks on ML finalization
.. since ticks collected in lower tiers use a different budget than
ticks collected in ML code. Keeping ticks from a lower tier would lead
to earlier-than-expected TF compilation requests.

Also, remove the runtime call between loops in osr-from-ml-to-tf.js
to not give TF too much time to tier up. It should no longer happen
now that ticks are cleared, but there's also no reason for the runtime
function to between the loops.

Bug: v8:7700
Fixed: v8:13242
Change-Id: I901c636079de05cb62d2aae1c92f0285a0f8c1ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867310
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82859}
2022-08-31 10:46:41 +00:00
Leszek Swirski
8293459504 Revert "[debug] CHECK that a function's context is always available"
This reverts commit 911c7170dc.

Reason for revert: Reverting because of the revert in https://crrev.com/c/3867311

Original change's description:
> [debug] CHECK that a function's context is always available
>
> After https://crrev.com/c/3854501 has landed, we no longer have to
> handle the case that we do not find a function's context in the
> scope iterator even though the function requires one.
>
> This CL renames `NeedsAndHasContext` to `NeedsContext` since we
> always find a scope's context now. Additionally we turn this
> assumption into a dedicated check.
>
> R=​bmeurer@chromium.org
>
> Bug: chromium:1246907
> Change-Id: I6458df76689c0bfa6d6b2f8c421f9ce481855547
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865153
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82848}

Bug: chromium:1246907
Change-Id: I1c8849ce60533f5c6da99f432bf1902ade47bb8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866174
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82858}
2022-08-31 10:35:28 +00:00
Tobias Tebbi
7a61dad0db [turboshaft] some IR refactorings
- Remove TruncateInt64ToInt32 instead of translating to Turboshaft, since it has no effect. Removing it simplifies pattern-matching in optimizations.
- Change how exception handling is done in Turboshaft: The exception value is obtained as the result of `CatchExceptionOp` instead of a special projection. This simplifies projections.
- Add `TupleOp` as the counterpart to `ProjectionOp`, which is useful
  for lowerings of operations that have multiple outputs.

- Split BinopOp into WordBinopOp and FloatBinopOp because they have quite different semantics and many kinds only exist for one of them.
- rename IntegerUnary to WordUnary and other occurences of
  Integer/Integral
- rename ChangeOp::Kind::kUnsignedFloatTruncate` to `kJSFloatTruncate`
  because it actually has JS wrap-around semantics.
- move/add representation DCHECKs to operation constructors.
- add some convinience helpers to `AssemblerInterface`.

- Add a mechanism to check which operations are supported by the machine.

Drive-by fix: Abort current block in OptimizationPhase::VisitBlock if
  we lower to a block-terminator.

Bug: v8:12783
Change-Id: Ib738accccd22fb1606d9dab86f57ac1e739fcec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857449
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82857}
2022-08-31 10:13:47 +00:00
Victor Gomes
156c302fda [cleanup] Fix frame mismatch for WasmToJs functions
There are 2 kinds of WasmToJs code: one uses a WasmFrame and the other
a simple TypedFrame TF frame. This CL introduces WasmToJsFunctionFrame
(as a simple TypedFrame) to dfferentiate from the WasmFrame counterpart.

This was not an issue before
https://crrev.com/c9c490891ab3d63fc790770cb1c76f8013ba963f
since we used to use a single master function for pointer iteration.

No-Tree-Checks: true
Bug: v8:13243
Change-Id: I97f7e8c897159ca3cafa65ff6ddf836c5ef7b76e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865969
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@{#82856}
2022-08-31 09:58:58 +00:00
Leszek Swirski
5e6278b2bd Revert "[debug] Immediately step-in for 'stack check triggered' debug breaks"
This reverts commit 3297ccca23.

Reason for revert: V8 roll is failing https://luci-milo.appspot.com/ui/inv/build-8804330987023399745/test-results?q=DevToolsTest.TestPauseWhenScriptIsRunning

Original change's description:
> [debug] Immediately step-in for 'stack check triggered' debug breaks
>
> This CL changes debug breaks that are triggered via interrupts (i.e.
> via stack check). One client of this behavior is the `Debugger.pause`
> CDP method.
>
> The problem is that when we pause so early, the JSFunction didn't have
> time yet to create and push it's context. This requires special
> handling in the ScopeIterator and makes an upcoming change unnecessary
> complex.
>
> Another (minor) problem is that local debug-evaluate can't change
> context-allocated local variables (see changed regression bug). Since
> the context is not yet created and pushed, variables are written to
> the DebugEvaluateContext that goes away after the evaluation.
>
> The solution is to mirror what `BreakOnNextFunction` does. Instead
> of staying paused in the middle of the function entry, we trigger
> a "step in" and pause at the first valid breakable position instead.
> This ensures that the function context is already created and pushed.
>
> Note that we do this only in case for JSFunctions. In all other cases
> we keep the existing behavior and stay paused in the entry.
>
> R=​jgruber@chromium.org
>
> Fixed: chromium:1246907
> Change-Id: I0cd8ae6e049a3b55bdd44858e769682a1ca47064
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3854501
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82817}

Change-Id: I0c34b7b4a788572a73ca380b3d767223fb6e7ea1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867311
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82855}
2022-08-31 09:37:34 +00:00
Dominik Inführ
22485d7c45 [heap] Avoid creating handles in heap verification
Use raw_native_context().normalized_map_cache() to avoid handle
creation in a safepoint.

Handles have all kinds of DCHECKs that may not hold during heap
verification.

Bug: v8:11708, v8:13244
Change-Id: I3f9ceae6533059c119287b833d5795f8fa67f9d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865965
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82854}
2022-08-31 09:11:18 +00:00
Shu-yu Guo
5576ef617f [Object.hasOwn] Remove flag
Object.hasOwn has shipped since 9.3.

Also drive-by removing other removed feature flags from test262 config.

Bug: chromium:1213927, v8:13220
Change-Id: I3d11298e1348adf5b26d63a23a6606a4ad22892c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3863807
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82853}
2022-08-31 08:41:11 +00:00
Jakob Linke
6904a8120b [cleanup] Remove --stress-opt remnants
.. mostly mentions in mjsunit `Flags:` lines and in comments.

Bug: v8:10386
Change-Id: If79dfdc448d0a3f19883ef1f816e77e750cb4061
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865964
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82852}
2022-08-31 08:37:44 +00:00
Matthias Liedtke
ad52bf8a4e [wasm-gc] Cleanup: Rename remaining '_static' op codes
Bug: v8:7748
Change-Id: Ie94e8f7f5afdaea7b4406bf8c57b294bf8f5733c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865959
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82851}
2022-08-31 08:35:38 +00:00
Liu Yu
c728b8a5aa [loong64][mips64][wasm] Keep call_indirect index on the stack
Port commit c2d46fe966

Bug: chromium:1350384
Change-Id: Id1cfb2dbb69093799658f366ade3b422a6b68f07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867134
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#82850}
2022-08-31 08:05:28 +00:00
Dominik Inführ
8e32d8f35d [heap] Stop concurrent marking tasks in Heap::StartTearDown
Concurrent marking jobs were only joined in Heap::TearDown and
therefore may still update counters while DumpAndResetStats() emits
stats.

This CL stops concurrent marking tasks in Heap::StartTearDown when
also stopping other concurrent tasks like sweeping or unmapping of
pages.

Bug: v8:13175, v8:12775
Change-Id: Iccddbfce5e30002e0db63ba0bdea5ea6b2d5cc40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827869
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82849}
2022-08-31 06:17:38 +00:00
Simon Zünd
911c7170dc [debug] CHECK that a function's context is always available
After https://crrev.com/c/3854501 has landed, we no longer have to
handle the case that we do not find a function's context in the
scope iterator even though the function requires one.

This CL renames `NeedsAndHasContext` to `NeedsContext` since we
always find a scope's context now. Additionally we turn this
assumption into a dedicated check.

R=bmeurer@chromium.org

Bug: chromium:1246907
Change-Id: I6458df76689c0bfa6d6b2f8c421f9ce481855547
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865153
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82848}
2022-08-31 05:21:28 +00:00
v8-ci-autoroll-builder
251d737443 Update V8 DEPS (trusted)
Rolling v8/build: adc338f..d74c524

Rolling v8/buildtools: cf8185c..69f262d

Rolling v8/buildtools/third_party/libc++/trunk: 26e3467..e5670a0

Rolling v8/third_party/depot_tools: bbb66d7..b0fb8d5

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220826.3.1..version:9.20220830.2.1

Rolling v8/tools/clang: ad4caa4..b72e51a

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I642b0da0a35c541f74246b668c86b4448ce3dc09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3866212
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@{#82847}
2022-08-31 03:59:03 +00:00
Frank Tang
89655531ff [Temporal] Sync PR 2219 to use OrdinaryObjectCreate(*null*) impact add/subtract
Sync to https://github.com/tc39/proposal-temporal/pull/2219
Also sync the MergeLargestUnitOption to latest spec

Change some of the type from JSObject to JSReceiver based on the code
change.

Change AOs: MergeLargestUnitOption, PrepareTemporalFields,
AddDurationToOrSubtractDurationFromPlainYearMonth
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal-mergelargestunitoption
https://tc39.es/proposal-temporal/#sec-temporal-preparetemporalfields
https://tc39.es/proposal-temporal/#sec-temporal-adddurationtoorsubtractdurationfromplainyearmonth

Change the parameter or return from type Handle<Object> to Handle<JSReceiver> in
DifferenceISODateTime, PrepareTemporalFieldsOrPartial,
PrepareTemporalFields, PreparePartialTemporalFields,
MergeLargestUnitOption

Bug: v8:11544
Change-Id: I30e997521f0ed644f5ec50d0982acf1e12f2977d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3855977
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82846}
2022-08-31 00:49:13 +00:00