Commit Graph

78303 Commits

Author SHA1 Message Date
Hao Xu
024e5fb4fa [CSA][codegen] Add BitcastElision Phase
Turbofan generates bitcast nodes like BitcastWordToTaggedSigned to
ensure the value types of definitions and uses are matched. These
nodes can be elided after MachineGraphVerifier verifying the graph.
This can avoid generating redundant instructions:

Before:
  xorl r15,r15
  cmpl [rdx+0xb],r15

After:
  cmpl [rdx+0xb],0x0

Change-Id: I84bc1b05d77ed9487001e34a93dfe14e45a7a678
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3837161
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83811}
2022-10-20 02:29:57 +00:00
Fanchen Kong
680225d17e [turbofan] Optimize call on Math.min/Math.max with JSArray of double elements
This change inline call to Math.min/Math.max like

   Math.min.apply(this, arguments_list)

to avoid packing and unpacking doubles during the optimized code execution.

Change-Id: I674476f688213df8eb13ee8c876b280c8fa47263
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3799214
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/main@{#83810}
2022-10-20 02:26:07 +00:00
Adam Klein
fafd7c5d22 [cleanup] Remove flag for Wasm threads & atomics
It's been enabled everywhere since Chrome 88, and the related
Chromium flag was removed in https://crrev.com/c/2886421.

Bug: v8:6532
Change-Id: I987a5761f9453d4e7d77d16199e8f0b3a659c70a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956131
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83809}
2022-10-19 23:05:37 +00:00
Dominik Inführ
272843757d [heap] Pause local heap concurrent marking for shared GC
In order to avoid races on updating page flags pause concurrent
marking in client for starting incrental marking and the final
atomic pause in a shared heap GC.

Bug: v8:13267
Change-Id: I592d21d3301b0bbc8551819236f3a4a12eaed756
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966433
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83808}
2022-10-19 17:30:57 +00:00
Milad Fa
564421ff7a PPC[liftoff]: Implement simd integer to integer extension
Change-Id: I06f3ed3f2099cfa26212a05c9bd3e65ee6ff34f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963696
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83807}
2022-10-19 17:20:37 +00:00
Leszek Swirski
54a8a68865 [maglev] Make sure to Safepoint in concurrent compile
Turns out the main thread isn't happy when long compiles block the GC.

Bug: v8:7700
Change-Id: Ic9d56490087c0a0c80e58c04e226a760571c8d9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963512
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83806}
2022-10-19 16:18:47 +00:00
Omer Katz
a252d60164 [heap] Drop OLD_TO_NEW remembered set when new space is empty.
This optimization is triggered a few times for Splay.

Bug: v8:12612
Change-Id: Iade5dbf829e1b13b9818264dda99cfd15b680ba6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966191
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83805}
2022-10-19 15:43:27 +00:00
Shu-yu Guo
6564fe269f [string] Load map once in String instance checkers
StringShape can check with a single test for representation type and
whether it's 1- or 2-byte.

Change-Id: Ic90fe052f1cfefafd2fb4fafeb86878d9a33a582
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963711
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83804}
2022-10-19 14:57:40 +00:00
Dave Tapuska
2f0384871f [execution] Pass microtask queue from Context to MicrotasksScope
With a unique microtask queue possibly per context we need to pass
the microtask queue for the MicrotasksScope otherwise the default one
for the isolate will be used.

BUG=chromium:961186

Change-Id: Ib085f08e20185c69760aeea335d673d9c4c72999
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3950216
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83803}
2022-10-19 14:56:37 +00:00
Nico Hartmann
c437ecdf21 [mjsunit] Fixing two test flakes due to unexpected deopts
(at least hoping to).

Bug: v8:12486, v8:13354
Change-Id: I5bd9fedde5369b5644a4e9ab36e103902ee5b2b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3964273
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83802}
2022-10-19 14:28:37 +00:00
Al Muthanna Athamina
93f3f3369e [NumFuzz] Skip processor and whitespaces test until issue is fixed
No-Try: true
Bug: v8:13397, v8:13396
Change-Id: I7fdabc5f5c165b375d150b4228ff627fc13aacc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966429
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83801}
2022-10-19 14:11:07 +00:00
Omer Katz
7a21b5b6a2 [heap] Don't finalize all of sweeping for MinorMC
For MinorMC it is sufficient to finalize new space sweeping.
Starting MinorMC will only ensure that background tasks are paused and
all new space pages are swept.

Accounting becomes more complicated since we can have minor sweeping
and full sweeping running at the same time. To support that, new space
sweeping is split to a separate sweeping scope. Also, the
Notify*SweepingCompleted methods are updated for the possibility of
nested sweeping. The distinction is that Notify*SweepingCompleted
knows what kind of sweeping we want to finalize, but not what kind
is currently running.

Bug: v8:12612
Change-Id: If46fa3bc036080d4231171e613fa3aefe7400246
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945098
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83800}
2022-10-19 13:51:40 +00:00
Maya Lekova
51ef09078e [fastcall] Disable Clamp lowering with SSE4 disabled
Lowering the Clamp annotation relies on float rounding, which is
only supported with SSE4 enabled. Thus disabling generating the
fast call path if such arguments are present and SSE4 is disabled.

Bug: chromium:1374745
Change-Id: I14438902946d4744521dac8d8d314af51a722da5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960410
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83799}
2022-10-19 13:33:57 +00:00
Matthias Liedtke
02de5c49cb [tools] linux-perf-d8.py: Add option to skip pprof
Change-Id: I2ee7c6feeae8f410ae6b9a1214bf387f321c25e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963274
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83798}
2022-10-19 13:13:57 +00:00
Dominik Inführ
48bc3505f0 [heap, snapshot] Fix String::MakeThin for background deserialization
During background deserialization strings are inserted into the string
table. When a string was internalized already it needs to be
transitioned into a ThinString using String::MakeThin.

String::MakeThin invokes NotifyObjectSizeChange which will update
the object size cached in the invalidated_slots map. Since this
operation is unsynchronized this is only allowed on the main thread.

However deserialization may also happen on a background thread. In
this case we know that the just allocated object wasn't recorded in
invalidated_slots yet, so UpdateInvalidatedObjectSize can be skipped
for deserialization.

This CL adds an additional argument to String::MakeThin which enables
the caller to skip invoking UpdateInvalidatedObjectSize.

Bug: chromium:1375228
Change-Id: I6291e6844294dfdc5040da9af6486df6d4120888
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966188
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83797}
2022-10-19 12:39:37 +00:00
Leszek Swirski
ef0d2f5ca1 [maglev] Move BytecodeAnalysis to graph builder
Avoid performing BytecodeAnalysis on the main thread, by moving the
BytecodeAnalysis class and constructor to the graph builder.

To support this, remove CheckIsLoopPhiIfNeeded from the interpreter
frame state -- this was a DCHECK that is more awkward to wire up now
that the bytecode analysis is on the graph builder and not the
compilation unit, and the frame state stuff has been stable long enough
now that it's probably not worth re-wiring.

Bug: v8:7700
Change-Id: I210cb88f575ca34efb85a3bf88b9f0e2303d92ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963037
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@{#83796}
2022-10-19 12:01:57 +00:00
Thiabaud Engelbrecht
81cbf67f5f Reland "Reland "[v8] Use |AllocateAtLeast| for resizing v8 zones.""
This is a reland of commit 2a7f86edcb

Original change's description:
> Reland "[v8] Use |AllocateAtLeast| for resizing v8 zones."
>
> This is a reland of commit 4444874cdf
> This fixes a failure on the UBSan bots caused by assuming |Realloc| is always in-place if the new size is <= the value of |malloc_usable_size|.
>
> Original change's description:
> > [v8] Use |AllocateAtLeast| for resizing v8 zones.
> >
> > This is part of an ongoing effort to reduce fragmentation in Chrome.  Partition alloc shows v8 zones are a large user of memory in Renderer processes, and that there is fragmentation from these allocations. This CL will reduce this fragmentation by allowing v8 to use all allocated memory for its zones.
> >
> > Bug: v8:13193, chromium:1238858
> > Change-Id: Ibeac8bdba9d0e7ff66b14a3dde10e7c87d3cf953
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3889361
> > Reviewed-by: Adam Klein <adamk@chromium.org>
> > Commit-Queue: Thiabaud Engelbrecht <thiabaud@google.com>
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#83235}
>
> Bug: v8:13193, chromium:1238858
> Change-Id: I923bcbce8403dd7d84642340fd7202087b8a4440
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3910268
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Thiabaud Engelbrecht <thiabaud@google.com>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83372}

Bug: v8:13193, chromium:1238858
Change-Id: Ie541f6d9cfe410e4f9c37bb5b2a5c44b7a71718e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963703
Commit-Queue: Thiabaud Engelbrecht <thiabaud@google.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83795}
2022-10-19 11:55:27 +00:00
Jakob Kummerow
a02c56694f Reland "[wasm] Allocate feedback vectors on demand"
This is a reland of commit 4804c4de31.

There are major changes since the previous attempt:
- The WasmLiftoffFrameSetup (formerly WasmGetFeedbackVector) builtin
  now performs as much of the frame setup work as possible, to reduce
  generated code size for each function.
- The WasmLazyCompile builtin/runtime function no longer allocates,
  hence gets frame type INTERNAL, and is un-handlified.

Original change's description:
> [wasm] Allocate feedback vectors on demand
>
> We previously allocated feedback vectors when instantiating the module,
> or when lazily compiling a function. That's not sufficient when there
> are multiple instances of the same NativeModule, or when we eagerly
> tier-down all code for debugging. This patch changes the "get vector from
> instance" sequence at the beginning of every Liftoff function to "get
> or allocate vector"; factored into a builtin call to avoid generating
> more code for every function.
>
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3939667
> Cr-Commit-Position: refs/heads/main@{#83610}

Bug: v8:12852
Change-Id: I58a6a02a55c3e29cae3cbdafad6cf81487faccbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942206
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83794}
2022-10-19 11:46:57 +00:00
Darius M
19b9492eb7 [turboshaft] Fix ValueNumberingAssembler bug
Bug: v8:12783, chromium:1375977
Change-Id: I092ce0698f56683eac892a87094b0de3c514556e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963081
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83793}
2022-10-19 11:27:31 +00:00
Leszek Swirski
3a1ca218b8 [maglev] Move TranslationArray building back into code-gen
TranslationArray building was split off from code-gen, as a separate
graph pass, so that it could be done on the background thread. Now that
code-gen assembly is on the background thread, we can merge the
TranslationArray building back into codegen. To keep the public
interface uncluttered, this patch adds a MaglevTranslationArrayBuilder
helper class which wraps this functionality up.

A side-effect of this is that we now need the LocalIsolate in the code
generator (for value reification). Take this opportunity to pass in the
LocalIsolate instead of the Isolate, and pass the Isolate just into
GenerateCode.

Bug: v8:7700
Change-Id: I9377f84840895147d6d524ca42b3adf5ce6055f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966189
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83792}
2022-10-19 11:25:57 +00:00
pthier
dadd5f94f5 [regexp] Fix wrong unicode case-insensitive matches
When creating a character class in unicode, case-insensitive mode we use
icu::UnicodeSet::closeOver() to add all characters that case-insensitive
match the characters in the class.
According to the spec only simple case folding shall be performed for
case-insensitive unicode matching, but closeOver() adds all characters
that are equal w.r.t full case folding.
The current approach of just removing strings from the closeOver set is
not enough, as single code point characters still remain in the set if
they were equal only by performing full case folding.
E.g. the characters \u0390 and \u1FD3 both fold to the same string
"\u03B9\u0308\u0301" via full case folding, but they don't have a simple
case folding in common.

To prevent these wrong matches, we calculate the set of all characters
with close overs that are wrong according to the spec at build time and
remove them from the set before adding case-insensitive equivalent
characters.

Bug: v8:13377
Change-Id: I0252c79143f266911691331dd0e1e27044ea8cba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952095
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83791}
2022-10-19 11:12:27 +00:00
Toon Verwaest
d7cb7b8dbe [x64] Improve cmpl with compressed immediate
This avoids loading the immediate into a register first.

Change-Id: I4bb18f80d13d6cd1389214b708785936f43538f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963063
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83790}
2022-10-19 10:34:48 +00:00
Simon Zünd
291ac7b185 [debug] Enable blocklist re-using experiment
This CL enables the blocklist re-using across multiple debug-evaluates.
This mainly benefits conditional breakpoints and repeated
debug-evaluates in large scripts.

R=jarin@chromium.org

Bug: chromium:1363561
Change-Id: I809296a70ed89bd3bb227095d45633a335c87c94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956394
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83789}
2022-10-19 09:01:37 +00:00
Dominik Inführ
5779b10942 [heap] Fix serializer with --shared-space
This CL assigns SnapshotSpace::kOld to all shared heap objects. This
basically duplicates shared heap objects for each isolate during
deserialization.

This CL retains the same behavior we currently have for the shared
isolate with --shared-space.

Bug: v8:13267
Change-Id: I4fff7a86da11d917fbb2ed61d51cab5ab13f6974
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963119
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83788}
2022-10-19 08:40:57 +00:00
Victor Gomes
572921ad86 [maglev] Add a check number in property loads
... instead of CheckMaps for HeapNumbers, avoiding deopting in case of
Smi. This follows the same approach as in TryBuildNumberCheck.

This fixes the regression in string-upack in JetStream.

Bug: v8:7700
Change-Id: I149d79fe7bb071cb46d6f82f95e2128d9cfa1ca3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3964108
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83787}
2022-10-19 08:33:17 +00:00
Dominik Inführ
d4c1da341a [heap] Remove Heap::map_space_ field and MapSpace class
Bug: v8:12578
Change-Id: I724164405cf3ba6d433655fa0fde5b9986fe04a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959661
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83786}
2022-10-19 08:04:27 +00:00
Simon Zünd
6770f44ce7 [debug] Reset 'calculate_blocklists_' when restarting ScopeIterator
We don't need to calculate blocklists a second time when we restart
the ScopeIterator. This CL doesn't add a regression test since we
have 10 failing tests when enabling the
'experimental_reuse_locals_blocklists' without this fix.

Drive-by: Also reset the 'seen_script_scope_' member.

R=jarin@chromium.org

Bug: chromium:1363561
Change-Id: I90e272dca2efa904170f39f8e48712b2d12a7dca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959662
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83785}
2022-10-19 07:35:58 +00:00
Milad Fa
fd3a2291f9 PPC: cast enum to an integer type
Fix for the following compilation error which occurs
after this upgrade:
crrev.com/c/3961032
```
error: bitwise operation between different enumeration types
```

Change-Id: I50e59f7bda6ef0102fa5ec9619509764c9e6d909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963691
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83784}
2022-10-18 21:11:56 +00:00
Dominik Inführ
79006c639e [heap] Allow Heap::ClearRecordedSlotRange in SHARED_SPACE
When forwarding strings during GC, String::MakeThing will invoke
NotifyObjectSizeChange to right-trim the object. This in turn leads
to clearing of slots in SHARED_SPACE.

This CL relaxes a DCHECK to allow Heap::ClearRecordedSlotRange on
objects in SHARED_SPACE during a full GC.

Bug: v8:13267
Change-Id: I908f750c07494cb557958e9309eecf3c531a0ab4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963193
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83783}
2022-10-18 19:13:26 +00:00
Omer Katz
619f7b9671 [heap] Fix race getting memento for object on swept page
Concurrent sweeping for MinorMC means mementos may be swept concurrently
while the main thread is reading them (e.g. to check if there is a valid
memento present). Avoid this race by assuming that all mementos on pages
that are currently being swept are gone and bail out for pages which are
still being swept.

The exception to this rule is getting memento for GC, which happens only
in the atomic pause and may intentionally try to get the memento while
sweeping.

Bug: v8:13393
Change-Id: I7bcfb437f24d21849c755875dcf4002cdfd0385e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963120
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83782}
2022-10-18 18:36:56 +00:00
Omer Katz
36ae12f4c0 [heap] Fix pretenturing for MinorMC
Pretenuring happens at the end of the atomic pause. With MinorMC, this
maybe before sweeping is completed. Thus the allocation site updates
will remain until the next GC cycle. However, the next cycle may move
allocation sites when evacuating pages, and thus make the pretenuring
data collected invalid.
MinorMC needs to update pretenuring decision after finalizing sweeping.

Bug: chromium:1374998
Change-Id: I585bdc4a1495ae6419d01eb6d5075832366b4198
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963116
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83781}
2022-10-18 18:31:16 +00:00
Toon Verwaest
358e31a3b5 [maglev] Update maglev budget
The budget was tuned for 1/10th of TurboFan, but wasn't updated when
TurboFan started compiling more aggressively.

Bug: v8:7700
Change-Id: Icc9662bacc8df8f7a0ee2f22c34701c176c851d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963490
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
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@{#83780}
2022-10-18 16:44:06 +00:00
Paolo Severini
93b5de0569 [wasm] Fix CWasmArgumentsPacker::TotalSize() with Ref types
CWasmArgumentsPacker stores ref types as full pointers even when pointer
compression is enabled and should calculate its buffer size accordingly.

Bug: v8:13388
Change-Id: I6c1c6b5ecd879af5ca61cbc2a31edfc660fdb036
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962030
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83779}
2022-10-18 16:42:56 +00:00
Victor Gomes
db63dd50d8 [maglev] Remove result register from snapshot
Bug: v8:7700, chromium:1375931
Change-Id: I75113ee6e9c702818b9e0c9bb5911db4fda5835e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963009
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83778}
2022-10-18 14:14:16 +00:00
Liviu Rau
5af41d8bc5 Reland "Whitespace to trigger builders."
This is a reland of commit 7746ce9962

Original change's description:
> Whitespace to trigger builders.
>
> We want to trigger CQ builders with the resultdb flag on.
>
>
> V8-Recipe-Flags: resultdb
> Bug: v8:13316
> Change-Id: I42299909504bddae51348ab1a70b43b5d8239453
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962988
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83769}

V8-Recipe-Flags: resultdb
Bug: v8:13316
Change-Id: Iafb5f5b93a34bf5f6bae6c30a19702e094ec7556
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963489
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83777}
2022-10-18 13:58:36 +00:00
Chengzhong Wu
b2e173711d [init] Print expected_next_state when state advancement failed
`next_state` is computed from the `current_state`. Print
`expected_next_state` and `current_state` instead.

Change-Id: Idd324ba66e1a20af83cf82dce6e8bd00884a3598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945811
Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83776}
2022-10-18 13:49:16 +00:00
Clemens Backes
0f751827c6 [wasm] Use FastZoneVector for the locals initializers stack
This is only used for GC, so not performance critical for now, but since
this is the last use of ZoneVector in the function body decoder, we also
switch it to a FastZoneVector.

R=jkummerow@chromium.org

Bug: chromium:1358853
Change-Id: Id469364a69ebca4384f49db59313ddb536bc1f67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960408
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83775}
2022-10-18 13:26:56 +00:00
Liviu Rau
936768b480 Revert "Whitespace to trigger builders."
This reverts commit 7746ce9962.

Reason for revert: to trigger builders once more

Original change's description:
> Whitespace to trigger builders.
>
> We want to trigger CQ builders with the resultdb flag on.
>
>
> V8-Recipe-Flags: resultdb
> Bug: v8:13316
> Change-Id: I42299909504bddae51348ab1a70b43b5d8239453
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962988
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83769}

Bug: v8:13316
Change-Id: Iafbeccdefab507c64c43b8e274f03cee1faf6292
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963488
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83774}
2022-10-18 12:53:46 +00:00
v8-ci-autoroll-builder
cb30adae59 Update V8 DEPS (trusted)
Rolling v8/build: 7e7c21a..2cf254f

Rolling v8/buildtools: 9174abb..ca6213a

Rolling v8/buildtools/linux64: git_revision:cc28efe62ef0c2fb32455f414a29c4a55bb7fbc4..git_revision:b9c6c19be95a3863e02f00f1fe403b2502e345b6

Rolling v8/buildtools/third_party/libc++/trunk: 2e91997..e6caea4

Rolling v8/buildtools/third_party/libc++abi/trunk: db2a783..685c4ad

Rolling v8/buildtools/third_party/libunwind/trunk: 08ebcbe..1111799

Rolling v8/third_party/android_platform: 04b3350..1bf9b93

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/ff03621..98d333e

Rolling v8/third_party/depot_tools: a724859..77e64ae

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220919.2.1..version:10.20221017.2.1

Rolling v8/third_party/instrumented_libraries: e09c4b6..26f2d29

Rolling v8/tools/clang: a5e0d72..2619cde

Rolling v8/tools/luci-go: git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4..git_revision:9f65ffe719f73af390727d369b342c22fa37ea54

Rolling v8/tools/luci-go: git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4..git_revision:9f65ffe719f73af390727d369b342c22fa37ea54

Change-Id: Ie07081ffa0b5c8512313ab1ba1915788c2a2e5bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3961032
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83773}
2022-10-18 12:37:46 +00:00
Clemens Backes
b8627f5133 [wasm] Switch back to base::SharedMutex
Since base::SharedMutex is now implemented via std::shared_ptr on Mac
(https://crrev.com/c/3870465), we do not need this special handling any
more.
As std::shared_ptr has slower performance than pthread_rwlock_t on
Android (see Runtime_WasmCompileLazy), we switch back to
base::SharedMutex.

This reverts commit f2faee8519.

R=ishell@chromium.org

Bug: v8:13256, chromium:1375009
Change-Id: Iebcff53a9b51f219ca4f12e0a539506781c94734
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959745
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83772}
2022-10-18 12:21:36 +00:00
Omer Katz
102d61d66b [heap] Fix check-header-include failures
Inlined virtual methods that are declared in *.h file but defined in
*-inl.h prevent generating a vtable for the type when only the *.h
file is included.

Bug: chromium:1374227
Change-Id: I01ff41248137ad69ec1ce23f4254e69c043d80ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959621
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83771}
2022-10-18 12:18:26 +00:00
Clemens Backes
eda81e2c68 [wasm] Use a plain array for storing initialized locals
This avoids some more OOB checks, saving binary size. Note that without
Wasm GC, this code is dead, so we can't expect performance wins from
this in production code, only binary size savings.

R=jkummerow@chromium.org

Bug: chromium:1358853
Change-Id: I426ce318c900322c9fcfc9d22a24c03855ddd885
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959736
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83770}
2022-10-18 12:07:46 +00:00
Liviu Rau
7746ce9962 Whitespace to trigger builders.
We want to trigger CQ builders with the resultdb flag on.


V8-Recipe-Flags: resultdb
Bug: v8:13316
Change-Id: I42299909504bddae51348ab1a70b43b5d8239453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962988
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83769}
2022-10-18 11:46:46 +00:00
Qifan Pan
0c177366dd [turbofan] Support feedback for arithmetic BigInt operations
Collect feedback for small BigInt division and modulo operation in
the interpreter and use feedback for BigInt subtraction,
multiplication, and division in turbofan except modulo operation
because it is not supported yet in turbofan.

Bug: v8:9407
Change-Id: I931cf9f70778c866599611474f1834417f023a74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948787
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83768}
2022-10-18 10:46:26 +00:00
Omer Katz
30708892ef [heap] Enable concurrent sweeping for MinorMC
Remove the dedicated MinorMC sweeping flag and merge with the
general concurrent sweeping flag.

Bug: v8:12612
Change-Id: I278f274e293a7160839259df38b4a2951df31e91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3936272
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83767}
2022-10-18 10:26:26 +00:00
Victor Gomes
6443c81024 [maglev] Fix context register when calling kStringCharCodeAt
A generic DCHECK (in builtins-utils.h) checks if the content in
kContextRegister is properly a context.

Bug: v8:7700, chromium:1375932
Change-Id: Ib5e6ac7d331678faf1a6ec5737d93bbf555c3870
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959819
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83766}
2022-10-18 09:50:36 +00:00
Darius M
50f7bff422 [turboshaft] Fix MachineOptimization bug on 32-bit archs
Bug: v8:12783
Change-Id: Iae206bd2837a37a09fe90abc4d48786db2f8f211
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959665
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83765}
2022-10-18 09:35:26 +00:00
Matthias Liedtke
f418b5bc01 Fast path for String.p.toLocaleUpperCase
Use fast path for locales that don't need special handling.
Related CL for toLocaleLowercase: crrev.com/c/3952317

Change-Id: I400df77c8101715681c7f741581545924dbbfc57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3958915
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83764}
2022-10-18 09:30:36 +00:00
Simon Zünd
7c23f097c9 [inspector] Remove 'live_edit_top_frame' experiment flag
The feature landed in M105 so we can remove the kill switch with
M109. We haven't seen any crashes related to this feature.

R=bmeurer@chromium.org

Bug: chromium:1334484
Change-Id: I5e238d350b383c1b71781de750b634a891c5b0c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959818
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83763}
2022-10-18 08:39:46 +00:00
Leszek Swirski
c056493e26 [build] Disable deprecation warnings on gcc
They are blocking enabling C++20.

Bug: chromium:1374227
Change-Id: Idaf7a109e8c67e8628bd0781a6bca94afb7e562d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959663
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83762}
2022-10-18 08:31:18 +00:00