Commit Graph

74003 Commits

Author SHA1 Message Date
王澳
4557c3f42b Revert "[call reducer] inline Array.prototype.indexOf/includes in js-call-reducer."
This reverts commit 9f9f36f875.

Reason for revert: regressed ai-astar on the M1

Original change's description:
> [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}

Bug: v8:12390, chromium:1306250
Change-Id: I91c666c2f56c30db4f43bb009ee6206ad219f51a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532399
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79511}
2022-03-17 11:39:46 +00:00
V8 Autoroll
a0204ff9ae Version 10.2.0
Change-Id: I3485e5d41cbafae1318c285bf564bc7df4a8c0f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532189
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79510}
2022-03-17 10:35:56 +00:00
Jakob Gruber
52d4ea6c09 [osr] Minor refactors in OSR-related code
- Restructure the runtime function implementation.
- Rename osr_loop_nesting_level to osr_urgency and add helpers.

The motivation for the latter: I've always struggled with the
`osr_loop_nesting_level` term; it neither matches terminology of
what it's compared against (= the loop depth), nor implies what it's
used for (= osr is triggered when `loop depth < osr nesting level`).

In this CL it's renamed to `osr_urgency` to reflect that as urgency
rises, we consider more and more loops as OSR candidates.

Bug: v8:12161
Change-Id: I194ec5a3f1f02526641af1c7796ee0956b6fd3a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528735
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79509}
2022-03-17 10:09:16 +00:00
Michael Achenbach
f7aac0cf9f Revert "[tools] Clean up py2 code"
This reverts commit 1289704aae.

Reason for revert:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release/8735/overview

Original change's description:
> [tools] Clean up py2 code
>
> Bug: chromium:1292013
> Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#79507}

Bug: chromium:1292013
Change-Id: I48c38209220b775d0caa45f487ed163f78333e0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532228
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@{#79508}
2022-03-17 10:07:38 +00:00
Michael Achenbach
1289704aae [tools] Clean up py2 code
Bug: chromium:1292013
Change-Id: Ic2c3a197005a2136bb0eda4cbb36d8eb57f42a7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523047
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79507}
2022-03-17 09:16:57 +00:00
Michael Achenbach
33bf4c4bca [test] Clean up Py2 code
Bug: chromium:1292013
Change-Id: If50c18249afe8b75154d4b111485280d158a5582
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525137
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79506}
2022-03-17 09:12:36 +00:00
Michael Achenbach
2c4133a0ce [tools] Clean up Py2 code
Bug: chromium:1292013
Change-Id: I8202fed4d59edcc98fff193f3a4b102a5c79d553
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525136
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79505}
2022-03-17 09:05:27 +00:00
Shu-yu Guo
67044edf08 [shared-struct] Support shared structs in Atomics.exchange
Bug: v8:12547
Change-Id: Ie27831b793f214368a003adac24b7c92f1a5fc11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518426
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79504}
2022-03-17 05:40:36 +00:00
Yuxiang Cao
e62f556862 [riscv64] Fix build error which is introduced by CL:3516747
Bug: v8:12707
Change-Id: I411950dc92336f73f10614e75bd64647d4137857
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3523995
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#79503}
2022-03-17 01:09:39 +00:00
Darius M
1d99ca6cd3 [compiler] More optimal code generation for patterns like "x >> 1 == 0"
CL https://chromium-review.googlesource.com/c/v8/v8/+/3514072 tried to
improve code generation for patterns like "x >> n == k" when n and k
are constant, and to generate instead "x == k << n" (with "k << n"
being computed at compile time).

However, this was also done when "x >> n" was reused later, which
caused "x" to be kept alive longer that it could have, which could
increase register pressure.

This CL thus ensures that this optimization is done only if "x >> n"
has a single use.

Bug: chromium:1305389
Change-Id: I377e120c4825e2a0deb4a5478138da838bcebc77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528987
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79502}
2022-03-16 16:42:09 +00:00
Vasili Skurydzin
7633fbc96c aix: Don't use ppc linux page size
Change-Id: I2ff012f0da2c536d78e12c7b8f02fe2d28b7b7ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3526338
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#79501}
2022-03-16 16:02:19 +00:00
Victor Gomes
03fd15956f [baseline] Don't install if debugger has call hooks
We check if debugger needs to hook into every call when we enqueue
the function to batch and when we compile, but we do not check it
when we install it (that is, set_baseline_code), which is done in
the main thread.

Bug: v8:12713
Change-Id: I81ba221caed1060976e8865174d392a861f2ab24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528988
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79500}
2022-03-16 13:55:14 +00:00
Marja Hölttä
f198f35d5e [rab/gsab] Temporarily stage --harmony-rab-gsab to enable fuzzing
Please revert this CL if it causes any trouble!

Bug: v8:11111
Change-Id: I6061fdc0aed82952f093ede9ecd252be1ac99519
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528495
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79499}
2022-03-16 12:58:42 +00:00
Clemens Backes
44c02e18f6 [wasm] Fix some WASM comments and outputs
In text, we should use the properly capitalized "Wasm" instead of
"WASM". In particular for frame output, other frames typically use
CamelCase (like "JsToWasmFrame", "ExitFrame", "InternalFrame"), so Wasm
should do the same.
The "0xa" comment in some assemblers is also outdated, the current tag
we emit for StackFrame::WASM is 0x8 (0x4 shifted by one).

R=jkummerow@chromium.org

Bug: v8:12425
Change-Id: Ic3e00c401b219c28b5424c82efb0f1a9df51690f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3525195
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79498}
2022-03-16 12:57:38 +00:00
Samuel Groß
ffbac83af0 Check instance type before initializing embedder data slots
JSObject::InitializeBody now checks whether the instance type of the
object being initialized can have embedder data slots around the
initialization logic for these slots. This fixes a performance
regression on certain benchmarks.

To perform this check efficiently, a new instance type,
JSObjectWithEmbedderSlots, is introduced so that the check becomes a
simple range check.

Bug: chromium:1304139
Change-Id: I00c892bc2276e950b59602257ca1c2435c10e517
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507712
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@{#79497}
2022-03-16 11:34:54 +00:00
Samuel Groß
d16de30137 Add ObjectSerializer::VisitExternalPointer
This method now handles external pointers in HeapObjects during
serialization by encoding the representation of the external pointer
(sandboxed, raw), the origin (internal, api) and potentially the
external pointer tag. It is currently only used to handle
JSExternalObjects but could, in the future, be extended to handle all
external pointers that need special handling during
serialization/deserialization.

Bug: v8:12700
Change-Id: Ib0747d765ddc632e4ca4ee94521616d0271be0bc
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/+/3521904
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79496}
2022-03-16 11:07:30 +00:00
Frank Tang
09de56b06e [intl] NumberFormat v3 Part 4 SelectRange
Implement the Intl.PluralRules.prototype.selectRange (start, end)
of the spec
See https://tc39.es/proposal-intl-numberformat-v3/out/pluralrules/diff.html


https://chromestatus.com/guide/edit/5707621009981440

Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit

Bug: v8:10776
Change-Id: Ie9c56df7ce68199492281fdf2483c3d6f822cc9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504421
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79495}
2022-03-16 11:01:35 +00:00
Marja Hölttä
d782fd1da9 [rab/gsab] RAB/GSAB support for TA.p.sort
Bug: v8:11111
Change-Id: Id6eafbd3a70cd8edd552d06942517ffaf413f568
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497815
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79494}
2022-03-16 10:44:56 +00:00
Zhao Jiazhong
a9d185b4f5 [loong64][mips][codegen] Change RegList into a class
Port commit I3cb2a4d386cb92a4dcd2edbdd3fba9ef71f354d6

Besides, clean some useless "SafepointRegister" stuff for MIPS.

Change-Id: I85bc7592faa1a7939330bef8453ea5eff4ac7f71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3527185
Reviewed-by: Yu Liu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#79493}
2022-03-16 09:58:27 +00:00
Clemens Backes
f28cf28763 Revert "[baseline] Enable concurrent sparkplug"
This reverts commit f01a609814.

Reason for revert: Consistent TSan failures: https://crbug.com/v8/12713

Original change's description:
> [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}

Bug: v8:12054
Change-Id: Ide6bbac8c280a1373c5082bbe5356a205f3396c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3528496
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@{#79492}
2022-03-16 09:39:15 +00:00
v8-ci-autoroll-builder
fd5e26f9b7 Update V8 DEPS.
Rolling v8/build: 18a1f19..3d95907

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

Rolling v8/third_party/depot_tools: 3481645..b199f54

Rolling v8/tools/clang: 85f3c90..b60d34c

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

Change-Id: I5d2149bbec079a8127089d33f38f64f952e9e9cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3526718
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@{#79491}
2022-03-16 08:56:28 +00:00
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