Commit Graph

78373 Commits

Author SHA1 Message Date
Leszek Swirski
37e356c9b6 [maglev] Rename empty blocks to edge-split blocks
... to distinguish them from blocks that happen to be empty, and since
they may not always be actually empty (due to interrupt budget
modification).

Bug: v8:7700
Change-Id: I5774cd5d675fbfd1acd04a8a5358e0d3a7dd1373
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952672
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83681}
2022-10-13 12:54:38 +00:00
Maya Lekova
d7b4bd26be [test] Avoid a failing check for fuzzers
Bug: chromium:1374173
Change-Id: Ia6dd6c47991904734a49e49a0f5422ac0d6d9e16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952673
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83680}
2022-10-13 12:50:02 +00:00
Darius M
73b070b74f [turboshaft] Port SelectLowering to turboshaft
Drive-by fix: reorder members of RandomAccessStackDominatorNode to
save 8 bytes on the total size of Block.

Bug: v8:12783
Change-Id: I4923490b0d2f4de22ea001eeba44c950c6451633
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893853
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83679}
2022-10-13 12:48:58 +00:00
Leszek Swirski
36366b8d3e [maglev] Fix interrupt budgets in empty blocks
We were failing to add IncreaseInterruptBudget to empty blocks, since
jumps to empty blocks aren't resolved with ResolveJumpsToBlockAtOffset.

Bug: v8:7700
Change-Id: I26243332b18551bd5228b437d9dd2ce5687c292c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952252
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83678}
2022-10-13 12:30:38 +00:00
Michael Achenbach
f09dde9fbb Revert "[resultdb] Add ResultDB indicator"
This reverts commit 237de893e1.

Reason for revert: breaks flake bisect:
https://ci.chromium.org/ui/p/v8/builders/try.triggered/v8_flako/b8800423657665797553/overview

The change added the implicit requirement to run testing with
vpython3, which is not given everywhere.

Original change's description:
> [resultdb] Add ResultDB indicator
>
> Adds a new indicator that will send every result to ResultDB (and ultimately in a bq table; to be configured later).
>
> If we are not running in a ResultDB context we introduce only a minimal overhead by exiting early from indicator.
>
> To test these changes in a luci context with ResultDB we activated resultdb feature flag via V8-Recipe-Flags. This feature got implemented in https://crrev.com/c/3925576 .
>
>
> V8-Recipe-Flags: resultdb
> Bug: v8:13316
> Change-Id: I5d98e8f27531b536686a8d63b993313b9d6f62c5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3905385
> Commit-Queue: Liviu Rau <liviurau@google.com>
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83672}

Bug: v8:13316
Change-Id: I7e55668e365475298ed46d2fc8ee0fe1282c3e8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952131
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83677}
2022-10-13 11:31:59 +00:00
Clemens Backes
be223c37dc [wasm] Disable validation for TurboFan
In production we will only compile Wasm code with TurboFan after it has
already been executed via Liftoff. Hence we know that the code is valid,
and can skip validation. This will save some binary size, and (minimal)
run time.

Under exotic circumstances (no Liftoff, Liftoff bailed out, ...) we did
not run validation yet. In that case, run it explicitly.

Note that the {kNoValidation} mode still has the validation checks as
DCHECKs, so fuzzers can find bugs in the new logic.

R=jkummerow@chromium.org

Bug: v8:13361, v8:13371
Change-Id: I2d0896bee44a80a9d09d9c273ec5fdbe9ab8da62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3941891
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83676}
2022-10-13 10:51:59 +00:00
Leszek Swirski
09ebc14fc1 [maglev] Fix same-access polymorphism
A polymorphic IC can have a single access info if all maps have the same
behaviour (e.g. the polymorphism is on subclasses but the load loads
from a shared superclass). Bail out for these cases for now, with a TODO
to handle this polymorphism in the future.

Bug: v8:7700
Change-Id: I05ae764524a741ccecace0feb469380d1e0a1917
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952130
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83675}
2022-10-13 09:58:24 +00:00
Clemens Backes
51681b9c0f [wasm] Store which functions have been validated
In order to drop validation from TurboFan, we need to know which
functions have already been validated when starting TurboFan
compilation. Under normal circumstances, that would be all of them. In a
TurboFan-only configuration, or for new code where Liftoff bails out, we
could need to run validation before TurboFan compilation though.

R=jkummerow@chromium.org

Bug: v8:13361, v8:13371
Change-Id: Ia59bdb1c25e4fc4300ca3d8cfe3ac3caf4985fa1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942090
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83674}
2022-10-13 09:41:58 +00:00
pthier
058cb75b05 [regexp] Indicate no more work to be done after an error
After an error is encounterd during RegExp parsing, indicate that there
is no more work to do.

Bug: chromium:1374042
Change-Id: Ib547a06de855028e862933897930d8ba78f8f320
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3950294
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83673}
2022-10-13 09:39:58 +00:00
Liviu Rau
237de893e1 [resultdb] Add ResultDB indicator
Adds a new indicator that will send every result to ResultDB (and ultimately in a bq table; to be configured later).

If we are not running in a ResultDB context we introduce only a minimal overhead by exiting early from indicator.

To test these changes in a luci context with ResultDB we activated resultdb feature flag via V8-Recipe-Flags. This feature got implemented in https://crrev.com/c/3925576 .


V8-Recipe-Flags: resultdb
Bug: v8:13316
Change-Id: I5d98e8f27531b536686a8d63b993313b9d6f62c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3905385
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83672}
2022-10-13 09:34:09 +00:00
Clemens Backes
fb3321ea27 [wasm] Store local types in a plain array
After the let instruction was removed again, the number and types of
locals stays constant throughout the decoding of a function. Hence store
it in a plain array instead of a ZoneVector. This makes the decoder
smaller and saves bounds checks for the "safe libc++".

R=thibaudm@chromium.org

Bug: chromium:1358853
Change-Id: Iad69aa0cfdc254710e1c2219cfb2c972241ef473
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3944929
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83671}
2022-10-13 09:24:42 +00:00
Omer Katz
a480c90950 [heap] Fix full GC name in --trace-gc output
Replace "ms" and "Mark-Sweep" with "mc" and "MarkCompact" respectively.

Bug: v8:12612
Change-Id: Idb06b908ccc4dcc281a9a0e814c5827069bd0ff3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3950293
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83670}
2022-10-13 09:23:38 +00:00
Clemens Backes
f65a3184ba [ic] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=jkummerow@chromium.org

Bug: v8:12887
Change-Id: Iaf36c486f73ec4c4d18cacd912cd92d37c155cc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3941711
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83669}
2022-10-13 09:15:18 +00:00
Tobias Tebbi
c96cd2eb81 [turboshaft] fix bug in MachineOptimizationAssembler
Bug: chromium:1373869
Change-Id: Id7a75d0deb1996111bed3f68b997b8b791e63bdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948587
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83668}
2022-10-13 09:12:18 +00:00
Victor Gomes
3a8b7d62e6 [maglev] Use ElementAccessInfos to build element access
... instead of LoadHandler, similar to TF.

Bug: v8:7700
Change-Id: I0460cce154fff1ecfb9dc1d45ecc98dc3b5e87e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3951911
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83667}
2022-10-13 08:52:12 +00:00
Liu Yu
145c1c7508 [loong64][mips64][builtins][masm] Move hot flags to the beginning of IsolateData
Port commit 8a56da4459

Bug: v8:11880
Change-Id: I00a918a586c6f80736f1ebd7a6ced6d55f830dbd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945812
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#83666}
2022-10-13 08:23:48 +00:00
Simon Zünd
07cc86889c [debug] Re-use block lists across multiple local debug-evaluates
This CL implements the heavy lifting for re-using block lists:

  - On local debug-evaluate, we check if the paused function already
    has a block list. If not, we do a full re-parse, calculate the
    block lists and stash them in the global map.

  - On a context lookup, we do the lookup slightly differently. The
    block lists now store "outer" locals, so we need to check the
    block list before we advance to the next context, not before we
    do the lookup in the current context.

The CL also duplicates the debugger test that checks most of these
shadowing edge cases. While we keep working on the new feature
we still want to check both configurations, but the feature is too
small to warrant a separate bot. Note that the file with the flag
enabled has one additional test case that fails with the old
implementation. Unfortunately it's non-trivial to fix in the old
implementation.

This CL drastically improves performance for conditional breakpoints
as they use local debug-evaluate under the hood. The worst case
example (https://crbug.com/1072939#c15) improves from 6.5 seconds
to 100ms.

R=jarin@chromium.org

Bug: chromium:1363561
Change-Id: I85f3d908d246f0d2e31ed272f4db6a852b9dbc39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3941584
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83665}
2022-10-13 07:44:59 +00:00
Michael Lippautz
a74dfea7ab Remove histogram for GCMainThreadMarkingThroughput
The histogram is not useful anymore.

Bug: chromium:1373158
Change-Id: Iea3ed31e088d8778cd3354ba2acfa94a9c8d31ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948907
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83664}
2022-10-12 20:38:14 +00:00
Milad Fa
6a99330709 PPC: group binary simd ops requiring a scratch register
Change-Id: Ifba7200d409e2a95cd12f978233ed32040807c2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948610
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83663}
2022-10-12 19:16:01 +00:00
pthier
175bcb15ed [regexp][cleanup] Rename CharacterClass to ClassRanges
... and ClassSet to ClassSetExpression to match the spec (changed with
the introduction of unicode sets).

Bug: v8:11935
Change-Id: I73b50de0a3436df7b2282c6168410ee2f7045978
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3929039
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83662}
2022-10-12 17:21:55 +00:00
Qifan Pan
b3e243c53b [turbofan] Fix missing checks for UnsignedBigInt64
Output of type UnsignedBigInt64 can be out of the range of small
BigInts. This CL inserts necessary conversion and checks for it.

Bug: chromium:1371935, v8:9407
Change-Id: I2553679452caa63111b97c89d072dd5fcc98aa7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3939668
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#83661}
2022-10-12 17:03:51 +00:00
Nico Hartmann
aa388de13d [turbofan] Move UseInfo to its own file
Change-Id: Idbd61bf934b08c4e9afdfc7e939787f842952f65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948786
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83660}
2022-10-12 16:19:10 +00:00
Victor Gomes
bdfefe302a [maglev] Use PropertyAccessorInfo for Stores
Uses the same infrastructure from Loads to implement property stores.

Drive-by: PropertyAccessInfo cannot be invalid in BuildPropertyLoad.

Bug: v8:7700
Change-Id: Ib30498a2a0c60722b0308b11a82c91ad027a803a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948666
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83659}
2022-10-12 16:04:04 +00:00
jameslahm
da7faab710 [json-parse-with-source] Remove GCCallback before internalize
Bug: v8:12955,chromium:1373770
Change-Id: I9cde54426b89cf901a6691a71c8b427f0e93e969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3949210
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83658}
2022-10-12 16:03:01 +00:00
Omer Katz
72b8dbf8b2 [heap] Fix wrong scopes
Bug: v8:12612
Change-Id: I77a74a09a44c1b89982010539d5723aa7d126c16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948608
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83657}
2022-10-12 15:23:01 +00:00
Michael Lippautz
cbb37fc04f cppgc-js: Gracefully handle v8::TracedReference::Reset() calls from dtor
Reset() calls from the destructor of an Oilpan object were not
supported. There was no check that would prohibit such a call though
which would yield in a memory corruption.

Going forward, we support bailing out on such Reset() calls in a
graceful way, i.e., such calls are nops and merely reset the pointer
to the global handle. A subsequent GC would clean up unused nodes.

Bug: chromium:1371512, v8:13372
Change-Id: Icc86b442183fc2ab9ecd83b9a675266719acdad4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3941890
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83656}
2022-10-12 14:50:11 +00:00
Dominik Inführ
3a31566759 [heap] Make client heaps iterable for shared space isolate GC
New space of all client isolates need to be iterable in a shared GC.
With Minor MC sweeping for new space might need to be finished as
well. In addition, iterating OLD_TO_SHARED remembered sets might
conflict with concurrent sweeping in all client isolates.

Therefore we simply invoke MakeHeapIterable() on each client heap. We
might be able to relax this in the future by e.g. pausing sweeping
instead of finishing it completely.

Bug: v8:13267
Change-Id: I6c4cc100c207e996ba6099bfd5e628e2c123917b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942387
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83655}
2022-10-12 14:33:21 +00:00
Anton Bikineev
83fdcb45cc cppgc: Add pretty-printers for (cppgc|blink)::Members
No need to use 'cpcp' or 'cpm' now, simple 'print' shall work:
Instead of:
  {
    <cppgc::internal::MemberBase> = {raw_ = {value_ = 2300193596}},
    <cppgc::internal::DisabledCheckingPolicy> = {<No data fields>},
    <No data fields>
  }
the output becomes:
  cppgc::Member<GCed> pointing to 0xbbbbbbbb12345678

Bug: chromium:1373391
Change-Id: I72645d372ee830e20ec02b991ddff94851c4a49f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948607
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83654}
2022-10-12 14:15:14 +00:00
Omer Katz
51aef72aeb [heap] Various MinorMC refactorings
Bug: v8:12612
Change-Id: I9b63815f361c2bf5bd858ef3364903c48053060f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948664
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83653}
2022-10-12 14:14:11 +00:00
Dominik Inführ
5d65f133c1 [heap] Move allocation logic from PagedSpace into ConcurrentAllocator
Move PagedSpace::RawAllocateBackground into the ConcurrentAllocator.
This removes most allocation logic in PagedSpace. The eventual goal
is that PagedSpace only provides free list allocation and all the
additional logic around it (e.g. supporting sweeping or growing the
space) will be implemented by the allocator.

Bug: v8:13375
Change-Id: Ied21d6253e78406633154258eb491a522b1cfd3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945051
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83652}
2022-10-12 13:52:00 +00:00
Simon Zünd
2348c5a35f [debug] Add new 'ReparseStrategy::kScriptIfNeeded' for ScopeIterator
This CL hides the blocklist calculation logic in the ScopeIterator.
The blocklists can only be calculated when the iterator reached
the closure_scope_. We shouldn't expose this fact to callers. Lets
have a new "Reparse" strategy that makes this a bit more explicit.
Creating the ScopeIterator with the new strategy guarantees that the
blocklists are calculated after iteration and we skip re-parsing the
whole script if blocklists are already present.

R=kimanh@chromium.org

Bug: chromium:1363561
Change-Id: Ia55a8ae81147cf7fe7b4850fc74495235f13cadc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3944918
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83651}
2022-10-12 13:30:30 +00:00
Seth Brenith
f762bca3fc In SamplingHeapProfiler, treat minor MC like scavenger
The SamplingHeapProfiler allows the caller to configure whether it
should retain samples for objects which were collected by major or minor
GC cycles. There is not a separate option for minor mark-compact cycles.
Currently, objects collected by minor MC are reported as collected by
major GC. In this change, I propose that such objects should be reported
in the minor GC category instead, since minor MC has "minor" in the
name. I believe that this change will also fix a test which is flaky
when minor MC is enabled.

Bug: v8:13369
Change-Id: I0314dc22c816aae57fc9cd4db35c0b2baa4b91d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3946898
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83650}
2022-10-12 13:28:40 +00:00
Pierrick Bouvier
9f2bbbaf1b Missing constexpr qualifier (fix build for msvc)
Error message was:
v8\v8\src/compiler/turboshaft/representations.h(206): error C3615: constexpr function 'v8::internal::compiler::turboshaft::WordRepresentation::WordRepresentation' cannot result in a constant expression
v8\v8\src/compiler/turboshaft/representations.h(208): note: failure was caused by call of undefined function or one not declared 'constexpr'
v8\v8\src/compiler/turboshaft/representations.h(208): note: see usage of 'v8::internal::compiler::turboshaft::RegisterRepresentation::IsWord'

Change-Id: Ia72d00abf2d79cd579983452c27f17a8b7abe315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948604
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83649}
2022-10-12 12:55:30 +00:00
Victor Gomes
e109d6c702 [maglev] Finish TryBuildPropertyLoad
Implement all PropertyAccessInfo kind for property load.

- Changes if-chain to a switch to make it clear we implemented all
PropertyAccessInfo kinds.
- Adds StringLength to do a Int32 field load.
- Adds UnsafeSmiTag to tag StringLength, since we know it fits in a Smi.

Bug: v8:7700
Change-Id: I671b98ead141efa22beab86094e901c9f0c29928
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948605
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83648}
2022-10-12 12:25:40 +00:00
pthier
a169bab6f7 [regexp] Unicode Sets: Implement parser changes and set operations
- Adapt parser for /v.
- Implement set operations (union, intersect, subtract).
- String disjunctions not implemented yet.

Bug: v8:11935
Change-Id: I1c3a6785500664dacc5d6562f49d7deed73ac15f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921517
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83647}
2022-10-12 12:20:00 +00:00
Victor Gomes
316dd0326c [maglev] Use PropertyAccessInfo to generate property loads
Using PropertyAccessInfo will allows us to encapsulate property
monomorphic/polymorphic load/store logic similar to TF.

Bug: v8:7700
Change-Id: I63099e39c7696e85adea801f953717a30786783d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948622
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83646}
2022-10-12 12:18:22 +00:00
Michael Lippautz
a8f64a54ee Remove unused histogram GCIncrementalMarkingFinalize
Bug: chromium:1373157
Change-Id: Ic2acda4db0bf0013959a034d0a1c925b01a7e4a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948623
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83645}
2022-10-12 12:10:30 +00:00
Leszek Swirski
c62038f98c Revert "[maglev] Box Float64s as Smis if possible"
This reverts commit 6e358ed06d.

Reason for revert: Regresses performance on a couple of benchmarks (e.g. Box2d)

Original change's description:
> [maglev] Box Float64s as Smis if possible
>
> Bug: v8:7700
> Change-Id: I085b561330cf827df3a31371d39b1cee0f77f32e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3938037
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83608}

Bug: v8:7700
Change-Id: I7e0a9a37e841dabe3c4234413a60054a88f1e69b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948707
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83644}
2022-10-12 11:45:00 +00:00
Leszek Swirski
7ec149ab05 [maglev] Remove return_label from deferred code
A lot of deferred code doesn't want to return, or jumps to a different
label than the return_label. Remove this from the interface and require
callers to pass in an explicit ZoneLabelRef for the return label if they
need one.

Also, clean up the deferred code handling, in particular adding a static
assert that the deferred arguments match the passed function pointer to
make these errors more explicit.

Bug: v8:7700
Change-Id: I06652e56fbff790569d6c23cebe8b8dfbbafd939
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3944916
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83643}
2022-10-12 10:54:56 +00:00
Maya Lekova
fe6aad523a [test] Harden fast API annotations tests
Bug: chromium:1373332, chromium:1373339
Change-Id: I24ea70eb1c15349113f3a0e0b4be5acc2af5739b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945338
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83642}
2022-10-12 10:03:25 +00:00
Dominik Inführ
555d150280 [heap] Switch to LinearAllocationArea in ConcurrentAllocator
Switch to LinearAllocationArea instead of LocalAllocationBuffer for
tracking the LAB in ConcurrentAllocator.

Eventually this should make it easier to replace the spaces LABs with
the ConcurrentAllocator class since those use LinearAllocationArea
as well.

Bug: v8:13375
Change-Id: I4574a30d54fa74b054c5bab2e8a2ab398112c028
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942256
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83641}
2022-10-12 10:02:23 +00:00
Leszek Swirski
c090428634 [maglev] Allow deferred code to defer code
Emit deferred code in a nested loop, until all deferred code is emitted,
to allow deferred code to additionally defer code. Otherwise, trying to
emit deferred code from deferred code invalidates the deferred code
vector iterator.

Bug: v8:7700
Change-Id: Ida5c801a678273eae738bac7ac743d587471ff0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945020
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83640}
2022-10-12 10:01:20 +00:00
Leszek Swirski
1cc36d515a [asm] DCHECK that addr_of is valid
Simplify catching code access errors (e.g. binding Labels that fell off
the stack) by checking that addr_of(pos) is within the generated code
range.

Change-Id: I34b96bc49a79ecc0b68a2d580eb8d6bcfeb8b5f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3944917
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83639}
2022-10-12 08:58:30 +00:00
Omer Katz
9ee2cbf1d4 [heap] MinorMC shrinks during sweeping/evacuation
MinorMC cannot shrink the space while concurrent sweeping is active.
This results in races between sweeping empty pages concurrently and
releasing them on the main thread.

Without concurrent sweeping, MinorMC sweeps all empty pages, then
preallocates more pages if needed, then shrinks by releasing some of
those empty/new pages.

MinorMC can instead shrink during sweeping/evacuation in the atomic
pause, before concurrent sweeping is active.
This resolves the conflict between concurrent sweeping and shrinking and
generally reduces the amount of work the GC has to do (i.e. don't
sweep/preallocate pages that will then be released by shrinking).

Bug: v8:12612
Change-Id: If898e5111c65b0b11d6ee9ee5dcd45751024650b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3933056
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83638}
2022-10-12 07:32:00 +00:00
Shu-yu Guo
dbc6180e29 [interpreter] Remove AsyncGeneratorYieldNoAwait
AsyncGeneratorYieldNoAwait is equivalent to AsyncGeneratorResolve with
the constant false passed as the last argument. Remove it in favor of
calling AsyncGeneratorResolve directly.

Bug: v8:13275
Change-Id: Ie6a47e1f152285bccdc00ec1b7140e82460caf31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3947530
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83637}
2022-10-11 23:48:17 +00:00
Dominik Inführ
764bc36ff7 [heap] Add debug information to background allocation failures
The linked test sometimes fails with an OOM failure. In order to
investigate such failures more easily, we can log more information
about in what way allocation failed.

Bug: v8:13329
Change-Id: Idecddaa20f8f49a44d1eb3f32ae171e68352270a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945498
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83636}
2022-10-11 20:10:24 +00:00
Shu-yu Guo
59d838ad2a Reland "[strings] Fix dictionary forwarded string hash lookup"
This is a reland of commit ed8953b695

Changes since revert:
- Work around recorded slot bug for external strings.

Original change's description:
> [strings] Fix dictionary forwarded string hash lookup
>
> Strings forwarded to external resources have their real hashes stored in
> the forwarding table. Dictionary mode lookups currently do not correctly
> load the hash for these tables, causing misses for properties that are
> in fact in the object.
>
> Bug: v8:12007
> Change-Id: I60ca4c084db7ddf6d2b7f7be8f63519c9cf3bc73
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3935218
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Patrick Thier <pthier@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83577}

Bug: v8:12007
Change-Id: Ifef5f99a46c239b2113aefa4efcdda1df1b4b6a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3940294
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83635}
2022-10-11 18:25:53 +00:00
Milad Fa
2488755c4d PPC/s390: Support Int64MulWithOverflow
Port 78570f7826

Original Commit Message:

    This CL implemented Int64MulWithOverflow on x64 and arm64
    to support type feedback collection for BigInt64 multiplication.

R=panq@google.com, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ieda7f5f3619c9280bc777f21bab1a66716d8e36e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945132
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83634}
2022-10-11 15:48:43 +00:00
Anton Bikineev
45106e33d0 cppgc: Add gdb printers for compressed pointers
This CL adds the following gdb commands:
 cpcp <compressed-pointer>  # prints compressed pointer
 cpm <member>  # prints member value

Bug: chromium:1373391
Change-Id: If5cc121883afbe64f4b95965a48b52647179b9f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945108
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83633}
2022-10-11 15:02:17 +00:00
Shu-yu Guo
1fada6b36f [symbol-as-weakmap-key] Fix DCHECKs when clearing JS weakrefs
Bug: chromium:1372500, v8:12947
Fixed: chromium:1372500
Change-Id: Id6330de5886e4ea72544b307c358e2190ea47d9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942586
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83632}
2022-10-11 14:55:03 +00:00