Commit Graph

74032 Commits

Author SHA1 Message Date
v8-ci-autoroll-builder
0e15601464 Update ICU
Rolling v8/third_party/icu: 1fa4e39..8a5b728

Add af and ur to common ICU (Trevor Perrier)
https://chromium.googlesource.com/chromium/deps/icu/+/8a5b728

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

Change-Id: I313ca3e905c578ecaa6a55916f9011fb67516e6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3526720
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@{#79490}
2022-03-16 08:55:26 +00:00
Jakob Gruber
697a1aa3ee [maglev] Towards concurrent Maglev compilation
This CL implements most parts of the concurrent maglev pipeline.

- MaglevConcurrentDispatcher: controls concurrent jobs.
- MaglevCompilationInfo: holds job-global data, controls handle
  fiddling between the main isolate and local isolates, owns
  job-global state like the Zone.
- MaglevCompilationUnit: same as before, holds per-unit data.

Still missing: job finalization.

Bug: v8:7700
Change-Id: I281178d945e79a0ba97fa2ac7023285d84a16641
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516036
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79489}
2022-03-16 08:54:23 +00:00
v8-ci-autoroll-builder
14e05cbc2e Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 9a71e5d..5704cd4

add note about wheels action to releasing docs (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/5704cd4

Change artifact download name to dist to match upload name (#1371) (Nicholas Junge)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/3eab985

Remove conditional trigger from PyPI upload job (#1370) (Nicholas Junge)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/7d6f153

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

Change-Id: I85cd3a461f2a677973064ca51963e040d3cff8dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3526719
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@{#79488}
2022-03-16 08:53:20 +00:00
Samuel Groß
fc3f2b93b6 [base] Disable CFI_ICALL for OS::CreateSharedMemoryHandleForTesting
This is necessary due to the indirect call to memfd_create. The function
is only used for testing though.

Bug: v8:12682
Change-Id: Ifb9fd855213064165fa4c2125846ff592368b625
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525534
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79487}
2022-03-15 21:28:00 +00:00
Samuel Groß
4e81f2584e [base] Only use memfd_create when available
The use of memfd_create causes V8 to require glibc 2.27 which wasn't
previously needed. This CL rewrites the affected code to check at
runtime whether memfd_create is available and otherwise use mkstemp.

Bug: v8:12682
Change-Id: I84dc3f5ab7504cec2b599bc92501ddecc2ae22cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516870
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79486}
2022-03-15 16:33:00 +00:00
Victor Gomes
f01a609814 [baseline] Enable concurrent sparkplug
Bug: v8:12054
Change-Id: I1b0ee1a9541a75412b882b259e421aa6e88317da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259658
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79485}
2022-03-15 16:12:40 +00:00
Milad Fa
46cd6c8bb4 PPC/s390: [codegen] Change RegList into a class
Port 8a0d1b6fe5

Original Commit Message:

    Modernise the RegList interface to be a proper class, rather than a
    typedef to an integer, and add proper methods onto it rather than ad-hoc
    bit manipulation.

    In particular, this makes RegList typesafe, adding a DoubleRegList for
    DoubleRegisters.

    The Arm64 CPURegList isn't updated to use (or extend) the new RegList
    interface, because of its weird type-erasing semantics (it can store
    Registers and VRegisters). Maybe in the future we'll want to get rid of
    CPURegList entirely and use RegList/DoubleRegList directly.

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

Change-Id: I997156fe4f4f2ccc40b2631d5cb752efdc8a5ad2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525084
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79484}
2022-03-15 16:09:00 +00:00
Al Muthanna Athamina
e7eac72803 Remove deprecated scripts in V8
Bug: chromium:1306416
Change-Id: I103602ed1bea71d79a17a9a37c7eaf198575d371
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521944
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79483}
2022-03-15 15:00:51 +00:00
Clemens Backes
4e983705e5 [wasm] Tweak constants for estimating code space size
It turned out that on arm and arm64 we over-estimated the code size of a
Wasm module quite a bit. This CL adds some more output for the
--trace-wasm-compilation-times flag, and adds a script to compute the
factors we use for code size estimates from that output.
I ran the script on a few benchmarks (an older Epic module, the current
Photoshop module, and the benchmark from the linked bug), and adjusted
the constants accordingly.

Also, simplify the API of {ReservationSize} to only return a single
number, and fail internally if we need to allocate more than the engine
supports (which would only fail for artificially large modules).

R=jkummerow@chromium.org

Bug: chromium:1302310
Change-Id: I5b2c27ff3e360fb6738cf5dd697bcee09e106b6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522067
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79482}
2022-03-15 14:41:13 +00:00
Maya Lekova
7ff9683243 [fastcall] Fix cctests failing in no-wasm config
This CL adds a missing header that was implicitly included by
"test/cctest/wasm/wasm-run-utils.h", which resulted in test failure
with v8_enable_webassembly = true.

Drive-by: Improve traceability of the fastcall cctests.

Bug: chromium:1052746
Change-Id: I4cafbce2e390958befee896782ad13a9bdfc0f30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525113
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79481}
2022-03-15 14:27:22 +00:00
Tamer Tas
3404608ee9 [infra] migrate infra/testing/PRESUBMIT script
R=machenbach@chromium.org,alexschulze@chromium.org,almuthanna@chromium.org,liviurau@chromium.org

Bug: chromium:1298869
Change-Id: Ia08f5069bacf5134ba56265d64eff527d7dd96fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525134
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79480}
2022-03-15 13:35:59 +00:00
Victor Gomes
8aa659a057 [bazel] Adds fma-instr.h
Fix compilation issue in ia32.

Change-Id: I7603a3bcebda0faf4e44d02e6c22601f7531a7aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516746
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79479}
2022-03-15 13:14:40 +00:00
Victor Gomes
dfd353d536 [bazel] Adds src/common/operations.h
Bug: v8:12709
Change-Id: Ia353ce364546fc34ca6b93a9873a20630a8085a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523045
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79478}
2022-03-15 13:09:59 +00:00
Tamer Tas
d8183521bf [infra] use format strings instead of .format
Format strings are the convention in Py3

R=machenbach@chromium.org,alexschulze@chromium.org

Bug: chromium:1298869
Change-Id: Ia660e933f07d2a592c2edadaa99df68c47adb80d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521789
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79477}
2022-03-15 11:31:40 +00:00
Michael Achenbach
6d1825e21a [release] Clean up python2 code
No-Try: true
Bug: chromium:1292013
Change-Id: Id9966157d28528b28e820d328b4941287a310209
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521790
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79476}
2022-03-15 11:09:49 +00:00
haoyuintel
a875615c69 [x64] Fix instruction selection for mov reg, Smi and TestMoveSmi
This CL fixed cmpq in TestMoveSmi by using cmp_tagged and further
optimizes Move(Register, Smi) for 31-bit negative Smi.

To move a Smi of -1 to register, the disassembly before the commit is as:
48c7c0feffffff    REX.W movq rax, 0xfffffffe

The disassembly after the commit is as:
b8feffffff        movl rax, 0xfffffffe

Bug: v8:12696
Change-Id: I6fafeec7959491ba8b084acf797c58910c2928fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3514654
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Haoyu Zhang <haoyu.zhang@intel.com>
Cr-Commit-Position: refs/heads/main@{#79475}
2022-03-15 09:01:48 +00:00
Clemens Backes
0250c874fd Revert "[serialize] copy bytes for non detachable array_buffer"
This reverts commit 6e2c9bb265.

Reason for revert: Fails layout test: external/wpt/wasm/serialization/arraybuffer/transfer.window.html

Original change's description:
> [serialize] copy bytes for non detachable array_buffer
> in WriteJSArrayBuffer when array_buffer is not in
> array_buffer_transfer_map_
>
> According to https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
> steps 13.3.2-4, should normally serialize array buffer which
> is not detachable
>
> Bug: v8:12703
> Change-Id: I4554c5d07ae85e1a96a728ebba04c6a071575f6f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518910
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79466}

Bug: v8:12703
Change-Id: I548ab191ab7d0f8fa699958396a5e32e34d39568
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3524742
Auto-Submit: Clemens Backes <clemensb@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@{#79474}
2022-03-15 08:31:19 +00:00
v8-ci-autoroll-builder
f96caea60b Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 4f77cf9..9a71e5d

Add BENCHMARK_STATIC_DEFINE to the Python bindings' `cc_binary` local defines. (#1369) (Nicholas Junge)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/9a71e5d

Update LICENSE file to clearly state which file needs BSD 3 (#1366) (Vy Nguyen)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/4a1943d

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

Change-Id: Ib3d07292d03783c5c473df650011c4acb867449a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3524089
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@{#79473}
2022-03-15 05:53:30 +00:00
v8-ci-autoroll-builder
645fdabd0a Update V8 DEPS.
Rolling v8/build: 5d2dc59..18a1f19

Rolling v8/buildtools/linux64: git_revision:f27bae882b2178ccc3c24f314c88db9a34118992..git_revision:bd99dbf98cbdefe18a4128189665c5761263bcfb

Rolling v8/buildtools/third_party/libc++abi/trunk: 289d52c..a897d0f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b326cac..63a615b

Rolling v8/third_party/depot_tools: c848a4e..3481645

Rolling v8/third_party/googletest/src: ae1b7ad..ae5e06d

Rolling v8/third_party/zlib: 85bdd64..b0676a1

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

Change-Id: I7178731823e068efe7bd23b862d60b4f4f701bc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3524088
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@{#79472}
2022-03-15 03:57:36 +00:00
Milad Fa
d3a842052f [builtins] Move DCHECK under drop_jsargs
Port: c69b0c809d

Change-Id: Ie29079f976c7ab6fa14e5edc1da296a9e75b1bcf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523822
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79471}
2022-03-14 22:55:05 +00:00
Nikolaos Papaspyrou
9d6df33dae heap: Report full GC cycles when sweeping finishes
This CL moves the call to GCTracer::StopCycle for the full GC from
Heap::CompleteSweeping full, which is called to force sweeping to
finish, to GCTracer::NotifySweepingComplete, which is called as soon
as sweeping finishes --- and symmetrically to a new method
GCTracer::NotifyCppGCCompleted, which is called as soon as sweeping
of the managed C++ heap finishes. In this way, a full GC cycle is
reported as soon as sweeping is finished both for the V8 and the C++
managed heap.

The changes introduced in this CL are essentially a partial revert of
https://crrev.com/c/3456563, fixed in such a way that when the full
GC cycle is reported, the current tracer event will be the correct
one corresponding to that cycle.

Bug: v8:12503
Bug: chromium:1154636
Change-Id: Icea07cf35a9565994e798b0500e9da72cd95f9ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497318
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79470}
2022-03-14 17:57:34 +00:00
Darius Mercadier
71a9fcc950 Revert "[compiler] let InstructionSelector duplicate branch conditions"
This reverts commit 3d5d99ffd9.

Reason for revert: causes this crash: https://bugs.chromium.org/p/chromium/issues/detail?id=1303458

Original change's description:
> [compiler] let InstructionSelector duplicate branch conditions
>
> Bug: v8:12484
> Change-Id: I44c2028efadbd70e7711f01d107995e0462f05d4
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3477094
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79239}

Bug: chromium:1303458, v8:12484
Change-Id: I129467bcb2507f2fba894f5dd58304eb139f739c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522069
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79469}
2022-03-14 17:33:05 +00:00
jameslahm
dc9ed94efd [parser] clear last next_arrow_function_info tracked
strict parameters error before parse parentheses expression
in ParsePrimaryExpression

clear last next_arrow_function_info tracked strict
parameters error, avoid throw syntax error when parse
arrow function nested in a parentheses expression.

Bug: v8:12688
Change-Id: Ib190ff5e04c9a83329c59421e9dd44f5a5907b07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516729
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79468}
2022-03-14 17:01:44 +00:00
Victor Gomes
273d3e4bab [maglev] Missing calls to Maglev in MaybeTailCallOptimizedCodeSlot
Bug: v8:7700
Change-Id: Ib3b3f453e162e0913b8077ac8f8b9e2273deaed9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3521783
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
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@{#79467}
2022-03-14 16:40:14 +00:00
jameslahm
6e2c9bb265 [serialize] copy bytes for non detachable array_buffer
in WriteJSArrayBuffer when array_buffer is not in
array_buffer_transfer_map_

According to https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
steps 13.3.2-4, should normally serialize array buffer which
is not detachable

Bug: v8:12703
Change-Id: I4554c5d07ae85e1a96a728ebba04c6a071575f6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518910
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79466}
2022-03-14 16:12:44 +00:00
Milad Fa
e35a3a77ef PPC: Use native x64 linux page size on the simulator
Running `OS::AllocatePageSize()` on PPC simulator (which
runs on x64 Linux) will make a `sysconf(_SC_PAGESIZE)` call
which returns the native x64 Linux page size and not the PPC
specific page size.

This can cause a problem if used along side the current value of
`kPageSizeBits` which is set to use PPC value even on Sim.
As an example a newly added DHCECK under https://crrev.com/c/3497363
was failing on PPC Sim as a call to `AllocatableMemoryInDataPage`
was being made which used kPageSizeBits on Sim.

Meanwhile another function was using the `page_size_bits` value which
gets set by _SC_PAGESIZE. The mismatch caused an incorrect final value
being generated which failed the DCHECK.

Change-Id: Iaf2d9cff16bbe5f6be5f3ec6a13b99be94776f48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3519758
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79465}
2022-03-14 16:09:34 +00:00
Marja Hölttä
3a43f6552e [fuzzing] Re-enable fuzzing for staged harmony features
The fuzzers were passing the flag --es-staging which doesn't exist. This
CL updates them to pass the flag --harmony which does exist.

Change-Id: I02c83026e5b9bdf49e51e700f16702bf56cd49e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522064
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79464}
2022-03-14 16:06:04 +00:00
Toon Verwaest
7e7661a1c8 [maglev] Free a duplicate reg in FreeSomeRegister
If a value is in multiple registers, pick one of them to be freed.

Bug: v8:7700
Change-Id: I1886b977187b4d8e939ff106edde4ccf716661d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522063
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79463}
2022-03-14 16:01:35 +00:00
Victor Gomes
9694d9b61b [maglev] Generic binary operations
The CL implements binary operations bytecodes as generic nodes that
call the correspondent runtime builtin.

Bug: v8:7700
Change-Id: I82c5e20e4103d4ef367184af1242bae7f7f93fe0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3509392
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79462}
2022-03-14 14:39:06 +00:00
jameslahm
9f9f36f875 [call reducer] inline Array.prototype.indexOf/includes in js-call-reducer.
- inline Array.prototype.indexOf in js-call-reducer
- inline Array.prototype.includes in js-call-reducer

Bug: v8:12390
Change-Id: Idb5669da3019f0f56af0084fccd1d616d4c5098e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3473994
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79461}
2022-03-14 13:22:48 +00:00
Leszek Swirski
8a0d1b6fe5 [codegen] Change RegList into a class
Modernise the RegList interface to be a proper class, rather than a
typedef to an integer, and add proper methods onto it rather than ad-hoc
bit manipulation.

In particular, this makes RegList typesafe, adding a DoubleRegList for
DoubleRegisters.

The Arm64 CPURegList isn't updated to use (or extend) the new RegList
interface, because of its weird type-erasing semantics (it can store
Registers and VRegisters). Maybe in the future we'll want to get rid of
CPURegList entirely and use RegList/DoubleRegList directly.

Change-Id: I3cb2a4d386cb92a4dcd2edbdd3fba9ef71f354d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516747
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79460}
2022-03-14 12:59:48 +00:00
Samuel Groß
5a968b08b3 Refactor ExternalObjects
Instead of implementing ExternalObjects as plain JSObjects with a single
EmbedderDataSlot pointing to a Foreign containing the actual raw
pointer, this CL now creates a new JSExternalObject type that directly
contains the external pointer.

As a side-effect of this refactoring, nullptr values are now no longer
valid for ExternalObjects.

Change-Id: Ic8ff334681c966e823ca70f34dd1efaaa21a0789
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/+/3513234
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79459}
2022-03-14 10:50:58 +00:00
Marja Hölttä
bed5bc495f [web snapshots] Fix empty map handling
Bug: v8:11525
Change-Id: I582f17d6ecfa47394bc29692f788c5119aac5ce9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516745
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79458}
2022-03-14 10:04:28 +00:00
v8-ci-autoroll-builder
5c7b790407 Update V8 DEPS.
Rolling v8/build: 43a4f0e..5d2dc59

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/271796d..b326cac

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

Change-Id: I1c8b08d850885bbadbd471a770211f1e98f8ba21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517971
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@{#79457}
2022-03-14 03:53:08 +00:00
JianxiaoLuIntel
ade314aeed [ic] Ensure state of bitwise binary operation always progresses
This CL fixes a deopt loop that might happen in case of mixing
Number with BigInt in bitwise binary operations.

Bug: v8:12693
Change-Id: Ib6a08d0c74a954ade3719bd6bd49ca2988d88e69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3505542
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Cr-Commit-Position: refs/heads/main@{#79456}
2022-03-14 02:27:13 +00:00
v8-ci-autoroll-builder
1f5e222a79 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 705202d..4f77cf9

Fix float comparaison and add float comparison warning (#1368) (Bensuperpc)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/4f77cf9

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

Change-Id: Ibe4d4953920ea1415fadaca1a636750f9590c881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3520366
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@{#79455}
2022-03-13 05:46:57 +00:00
v8-ci-autoroll-builder
250e4d28b2 Update V8 DEPS.
Rolling v8/build: 6bce1d6..43a4f0e

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

Change-Id: I03b8c3002da073209e092ba1204646ad7f856aeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3520362
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@{#79454}
2022-03-13 03:48:27 +00:00
v8-ci-autoroll-builder
fb39eec368 Update V8 DEPS.
Rolling v8/build: 797674d..6bce1d6

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

Change-Id: I9f375f81935d563070e636468cf483b9fff66f46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517461
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@{#79453}
2022-03-12 03:53:56 +00:00
Liu Yu
49c95bd95b [liftoff][loong64][mips64] Implement Atomic ops and ConvertSat ops
Change-Id: I4378e4f99c6b034f7b29782218896d5485178109
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3514656
Auto-Submit: Yu Liu <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@{#79452}
2022-03-11 10:51:46 +00:00
Lu Yahan
a2ea2cd0b1 [riscv64] Keep the type consistent in in_range
Change-Id: I23b76ec7bdf0f1997815f4928d903a9807413129
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516829
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#79451}
2022-03-11 09:21:55 +00:00
v8-ci-autoroll-builder
7284aab7a2 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: a25f3cd..705202d

Add PyPI upload job to wheel building workflow (#1359) (Nicholas Junge)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/705202d

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

Change-Id: Ib5833d20ced99bd3b949e2df848a300511087df1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517453
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@{#79450}
2022-03-11 06:49:46 +00:00
Lu Yahan
818d73ca18 [riscv64][register-alloc] Implement vector register independently allocating
vector register has different register file from float register in Risc64 rvv extension.
So this cl add third FPalising kind INDEPENDENT to allocate independently simd register.

Bug: v8:11976

doc: https://docs.google.com/document/d/1UwmUwOI3eeIMYzZFRmeXmfyNXRFHNZAQ4BcN0ODdMmo/edit?usp=sharing

Change-Id: I0fb8901294b4bc44b0bee55e630b60460e42bef2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383513
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#79449}
2022-03-11 05:07:45 +00:00
v8-ci-autoroll-builder
30974f9257 Update V8 DEPS.
Rolling v8/build: ea42de6..797674d

Rolling v8/buildtools/linux64: git_revision:46f94b5a7f5527b5d7ef57271d3e9447a65e22ac..git_revision:f27bae882b2178ccc3c24f314c88db9a34118992

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5b79b29..271796d

Rolling v8/third_party/depot_tools: 37db69d..c848a4e

Rolling v8/tools/clang: 548c235..85f3c90

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

Change-Id: I296568003a80edfc45f05bd7af9ccf1715df1103
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517449
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@{#79448}
2022-03-11 04:13:05 +00:00
jameslahm
65ffd616b0 [interpreter] create array literal boilerplates for spread calls
when BuildCreateArrayLiteral

In spread calls, create array literal boilerplates for
BuildCreateArrayLiteral rather than emit array literals
without any boilerplates

Bug: v8:11582
Change-Id: Ia0538bd043eab040c3059440e982c7f0037d1a3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507126
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79447}
2022-03-10 16:29:05 +00:00
Dominik Inführ
09090299e2 [heap] Fix GCC build because of undefined CHAR_BIT
Explicitly #include climits header for CHAR_BIT.

Bug: v8:12691
Change-Id: I9d7a28543883a5387e006c4b6ee4491243a06207
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516925
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79446}
2022-03-10 14:48:45 +00:00
Jakob Gruber
6f082e305b [heap] Update CodePageCollectionMemoryModificationScope docs
The scope can be (and is) used by compiler threads, i.e. not just by the
main thread; update the comment.

Change-Id: Ifbeb414761cee4ab12dd953f0cd544f35c92fc8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3516037
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79445}
2022-03-10 14:14:05 +00:00
Dominik Inführ
ba4326fe19 [heap] Store total committed physical memory in SemiSpace
Store the total committed physical memory in
SemiSpace::committed_physical_memory_ and keep it up-to-date when
adding/removing pages from it, similar to the PagedSpace.
So far we were iterating all pages in the SemiSpace to calculate this
value.

Bug: v8:12691
Change-Id: Iaf3c5eadd60db561a6ddb06014f82703b0df6873
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513836
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79444}
2022-03-10 14:00:05 +00:00
Darius M
dca3b16e90 Reland [compiler] Improve code generated for patterns like "x >> 1 == 0"
This is a reland of 2dc4037049

Original change's description:
> [compiler] Improve code generated for patterns like "x >> 1 == 0"
>
> Change-Id: I79575ba61a3bdea93468f48d66a3cb3edd0e1442
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506504
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79419}

Change-Id: Iad111f8d4bb40a295903dd67f66c8ecd9c4eadd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3514072
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79443}
2022-03-10 12:55:25 +00:00
Michael Lippautz
cf25b3bc53 cppgc: Rework prefinalizers
Move the check for whether an object is live or dead out of the
prefinalizer trampoline. Moving it into the backend allows for
inlining the check which avoids a call to the trampoline for live
objects.

On catapult benchmarks (e.g. cnn:2021, nytimes:2020), there's often
~2k finalizers registered. In order to avoid memory overhead in the
range of a few KB, we store the fact whether the object points to the
base object payload in the LSB of the pointer. For caged builds this
is replaced with just storing the index into the cage for both object
and base object payload.

Locally saves around ~10% of atomic sweeping processing time which is
in the order of .05ms.

Bug: v8:12698
Change-Id: I198205a6b1d57fc2df821ee4e73e53dc6f825ff5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497764
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79442}
2022-03-10 12:53:32 +00:00
Marja Hölttä
4f3dd3db80 [web snapshots] Support elements in objects
Bug: v8:11525
Change-Id: I0580787252ab235222e9b9fb2d677015794207eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3506485
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79441}
2022-03-10 12:52:28 +00:00