Commit Graph

72540 Commits

Author SHA1 Message Date
Milad Fa
407922fad8 PPC [liftoff]: optimize unsigned byte reverse ops
This CL optimizes ByteReverse 16/32/64 ops on PPC<10 as
well as PPC_10_PLUS.

A 32bit sign extension is also added to `ByteRev32` in codegen.

Change-Id: I6379ac4222f3574ab226971546238142039fe977
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3298308
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78048}
2021-11-23 19:12:04 +00:00
Ng Zhi An
50c808d4b3 [cleanup] Fix -Wshadow warnings
Bug: v8:12244,v8:12245
Change-Id: I816930bfc65a2e597a41562cb115af5d0bca199b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3296147
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78047}
2021-11-23 17:32:04 +00:00
Marja Hölttä
8d0404d80b Reland [rab/gsab] Add RAB / GSAB support to DataViews
Previous version: https://chromium-review.googlesource.com/c/v8/v8/+/3259648

Fix 1: ValueSerializer <3 JSArrayBufferView
Fix 2: set flags correctly when creating DataViews via the API

Bug: v8:11111
Change-Id: I9cbfdaff29f97c7823eaa3d931689b363e1f4cf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3297708
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78046}
2021-11-23 16:48:54 +00:00
Andreas Haas
9c8a8c6d5d [wasm] Add counter for the number of cache events
With dynamic tiering, caching is triggered multiple times as there is
no single event anymore that triggers when the module should be cached.

This CL adds a counter for the number of times caching is triggered.
This counter can indicate whether our current caching heuristics are
good or should get adjusted.

R=thibaudm@chromium.org

Bug: v8:12281
Change-Id: I8ed9ed73a556d11df643c31ec6d20760a257e0d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295578
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78045}
2021-11-23 16:25:54 +00:00
Hiroshige Hayashizaki
b0c6dd86bd Allow compiled module invalidation at WasmStreaming::Finish()
This CL adds `can_use_compiled_module` parameter to
WasmStreaming::Finish() that is used by Chromium
https://chromium-review.googlesource.com/c/chromium/src/+/3282643
to invalidate compiled module bytes after SetCompiledModuleBytes().

Bug: chromium:1260939
Change-Id: Iebf0e8615c27c8622721777c664b06a53fb9ee91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3297548
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78044}
2021-11-23 16:05:34 +00:00
Jakob Gruber
a462665457 Disable --stress-concurrent-inlining in various tests
test-heap/NextCodeLinkIsWeak
test-heap/NextCodeLinkIsWeak2
test-heap/NextCodeLinkInCodeDataContainerIsCleared

These tests depends on deterministic compile job behavior.

Fixed: v8:12367
Change-Id: I47e748f18abf947a769e09df3814bd2a3443b11b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3297894
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78043}
2021-11-23 15:27:19 +00:00
Tobias Tebbi
6e978db88d [turbofan] fix typing of JSLoadProperty
Private methods use a property with symbol name that stores a context.
This is then loaded to perform the brand check. Since this uses
JSLoadProperty in Turbofan, we should not type JSLoadProperty as
NonInternal.

Bug: chromium:1269063, v8:12359
Change-Id: I920ccf46e939ab0477ff2fdb3cda6d7d94bab0af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293089
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78042}
2021-11-23 15:01:04 +00:00
Victor Gomes
ee3c9f2bf2 [bazel] Upstream Google3 changes
No-Try: true
Change-Id: I9a7be37f6f1a404fb5c3517b5fdb4008aaaec45a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295460
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78041}
2021-11-23 14:05:14 +00:00
Anton Bikineev
84c937b79f cppgc: Fix "#if" directive in logging.h
The macro may be defined but the value to it may not be assigned. The
compiler can complain about (reproduced when compiling chromium on
Windows).

Bug: chromium:1249550
Change-Id: I684997ccda7122f56c01391e7a1339fadf6589e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3297888
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78040}
2021-11-23 13:24:29 +00:00
Marja Hölttä
a68aa67276 Revert "[rab/gsab] Add RAB / GSAB support to DataViews"
This reverts commit 8f3e53b81d.

Reason for revert: Blink test failures

Original change's description:
> [rab/gsab] Add RAB / GSAB support to DataViews
>
> Bug: v8:11111
> Change-Id: Ice66accee734484302d499b8098056ae1c68faf3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259648
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78028}

Bug: v8:11111
Change-Id: Icaae7276dfede8c021f3ce1a7e96ed3ec13fe4fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295577
Auto-Submit: Marja Hölttä <marja@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78039}
2021-11-23 09:55:35 +00:00
Anton Bikineev
431d2bf6fa cppgc: Store the list of to-be-finalized object inlined in HoH
The list of to-be-finalized objects can grow significantly. While
running Speedometer2, the metadata that stores to-be-finalized objects
can be the second largest contributor to heap consumption (overall
taking up 2.6MB, checked with heaptrack).

The CL changes the list to be stored inlined in HoH, if cage-heap is
enabled, rather than in a separate vector.

Bug: chromium:1249550
Change-Id: I04a0c84d118655fa6ff8e2440423e802cd722842
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295448
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78038}
2021-11-23 09:15:24 +00:00
JianxiaoLuIntel
c0bc99e0f4 [heap] remove redundant branch in AllocateReadOnlyPage
Change-Id: I6411c752e3de1fb6e1547ccfe41265c5615eb421
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3296148
Auto-Submit: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78037}
2021-11-23 07:48:21 +00:00
QiuJi
4fc1d8d05d [riscv64] Re-enable test/inspector/debugger/wasm-gc-breakpoints.js
Change-Id: I7755e943674ec4128b0e5869e9ff5ea735efd162
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295309
Auto-Submit: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78036}
2021-11-23 07:17:28 +00:00
v8-ci-autoroll-builder
120c26b06f Update V8 DEPS.
Rolling v8/build: eabf027..368880d

Rolling v8/third_party/aemu-linux-x64: BsMGVIB-SMSFb0qDOwUoX0kok6z1XZdfmi4kKMOPrWYC..RGchQ75eBrFQJRPQJMv5DT7uzlwr_ttfbGI2Kqlzw0wC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8a112e2..738798d

Rolling v8/third_party/depot_tools: b6c1ed4..a29f589

Rolling v8/tools/clang: b0d8d05..649f6b9

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

Change-Id: I62d21963fa941ad4c6bee2bc4c2d48bc9e858c19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3296368
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@{#78035}
2021-11-23 03:49:58 +00:00
jiepan
96d2d90491 [wasm] Fix mnemonic of ProtectedStore operator
Change-Id: Icc245d9939649386d44ca95b9e57933b436b5cb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293414
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#78034}
2021-11-23 02:38:18 +00:00
jiepan
dc34109f4a [x64] Implement 256-bit assembler for vmov[au]p*
Bug: v8:12228
Change-Id: I21b2ee1e640ba75227a03d765bb1552eff68e3fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293415
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#78033}
2021-11-23 02:02:38 +00:00
Paolo Severini
daf8df62ac [wasm][turbofan] Re-add future implication for --turbo-inline-js-wasm-calls
Bug: chromium:1271456
Change-Id: I54b81fc8e450ba65c9895ec5e22366446098dd64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3296146
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78032}
2021-11-23 01:32:13 +00:00
Paolo Severini
9324d7fd21 [wasm][turbofan] Pass correct instance when inlining JsToWasm wrappers
It is possible to inline a JSToWasm wrapper that directly calls a
WasmToJS wrapper. In this case we need to make sure that the instance
we pass is a WasmApiFunctionRef, not a WasmInstanceObject.

Bug: chromium:1271456
Change-Id: I684a769922895860a43c73ba43c2598c9bda4b64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293423
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78031}
2021-11-23 00:47:59 +00:00
Omer Katz
d315657ef5 heap: Mark EmbedderHeapTracer::GarbageCollectionForTesting as deprecated
Bug: v8:12407
Change-Id: Iedf6154796423267fdb32125a408e580bb3c205b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295349
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78030}
2021-11-22 23:15:28 +00:00
Anton Bikineev
39cd76ce7a cppgc: Free up memory taken by SweptPageState
For large working set, the sweeper metadata can significantly increase.
Currently, the backing of swept_unfinalized_pages never gets freed,
which causes about 300KB of memory be occupied (checked on
Speedometer2). The CL makes sure to shrink (actually free) the backing
after each GC cycle.

Bug: chromium:1249550
Change-Id: I7c7e5248983960a498afc252a344fa71cb1444c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295347
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78029}
2021-11-22 21:26:40 +00:00
Marja Hölttä
8f3e53b81d [rab/gsab] Add RAB / GSAB support to DataViews
Bug: v8:11111
Change-Id: Ice66accee734484302d499b8098056ae1c68faf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259648
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78028}
2021-11-22 19:04:58 +00:00
Frank Tang
094a762316 [temporal] Temporally Turn OFF tracking for Temporal
Reduce unnecessary size during development

Bug: chromium:1260432
Change-Id: I690e511900abf0f8218f6ece8a5d1f144947b584
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3292484
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78027}
2021-11-22 18:50:18 +00:00
Ng Zhi An
85aa276bc7 [wasm-relaxed-simd][arm64] Enable relaxed swizzle tests
No implementation needed, since relaxed swizzle is already handled in
wasm-compiler, and is visited by VisitI8x16Swizzle, and on arm64 we
generate the same code (TBL).

Bug: v8:12284
Change-Id: I446632101de26bb2f28c3f3ed60f209e81600dec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272643
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78026}
2021-11-22 18:23:18 +00:00
Ng Zhi An
f3ad100a11 [wasm-relaxed-simd][arm64] Implement relaxed trunc
Bug: v8:12284
Change-Id: Ia5dd40ffd1854ed8f1d6138a1bf40d8f2ca79793
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272642
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78025}
2021-11-22 17:41:31 +00:00
Ng Zhi An
caddd5ee65 [cleanup] Fix a bunch of -Wshadow
Bug: v8:12244,v8:12245
Change-Id: I49326278fa43cd07c17a01b70253303d2e861b06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3291558
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78024}
2021-11-22 17:27:38 +00:00
Victor Gomes
180839cff9 [bazel] Adds cppgc/memory.cc
ASAN builds on Google3 depends on NoSanitizeMemset

No-Try: true
Change-Id: Ia03c2b3cea4a063806e799eb0ba0f38408a18d99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295743
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78023}
2021-11-22 16:31:09 +00:00
Omer Katz
05f0aed1ff Missing call to PatchValue
Change-Id: Id592b919b307637a0dab1ce1a7d9ec931836650c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295458
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78022}
2021-11-22 15:52:41 +00:00
Clemens Backes
0580829fb5 [codegen] Avoid unused fields in safepoint table
Many safepoint tables do not contain any deoptimization info and/or no
callee-saved registers. Do not emit empty fields for all entries in this
case.
This often shrinks the size of the encoded safepoint table by more than
50%.

Drive-by cleanups:
- Rename fields of the safepoint table entries to clarify their meaning
("tagged slots" instead of "bits", "tagged register indexes" instead of
 "register bits").
- Include the PC in the decoded {SafepointEntry} to make it the single
source of truth.

R=jkummerow@chromium.org

Bug: v8:12401
Change-Id: If5c24a688a434842ed3b6427f5f1f3ea9232173a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289173
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78021}
2021-11-22 15:44:18 +00:00
Andreas Haas
9a13c49fd4 [wasm] Add trace event for Liftoff compilation after caching
With dynamic tiering, not all functions get compiled with TurboFan,
and not all functions can therefore get cached. With this metric we
want to keep track of the time needed to compile missing functions with
Liftoff.

R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: I1f2de3e1f6b004477985df5d2116f69371528c3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289178
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78020}
2021-11-22 14:34:41 +00:00
Nico Hartmann
226995aebf Revert "Reland "[fastcall] Enable float support on arm64 simulator""
This reverts commit d7c3f1cd8a.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Android%20Arm64%20-%20debug%20builder/22043/overview

Original change's description:
> Reland "[fastcall] Enable float support on arm64 simulator"
>
> This is a reland of b9ddcbc86f
>
> The original CL was reverted due to an MSAN issue, that is fixed by
> moving the signature mapping onto the Isolate (instead of having
> per-thread storage, which got invalid on multithreaded compilation).
>
> This CL also contains fixes for the Bazel config and for a data race
> when obtaining the PerIsolateSimulatorData.
>
> Original change's description:
> > [fastcall] Enable float support on arm64 simulator
> >
> > This CL adds support for handling calls to C functions with arbitrary
> > signatures on the arm64 simulator. It adds infrastructure for
> > encoding the signature data from CallDescriptor and FunctionInfo
> > classes into a compact representation, stored in the simulator and
> > called EncodedCSignature.
> >
> > Design doc:
> > https://docs.google.com/document/d/1ZxOF3GSyNmtU0C0YJvrsydPJj35W_tTJZymeXwfDxoI/edit
> >
> > This CL is a follow up on the native support added in
> > https://chromium-review.googlesource.com/c/v8/v8/+/3182232
> > and is partially based on the previous attempt:
> > https://chromium-review.googlesource.com/c/v8/v8/+/2343072
> >
> > Bug: chromium:1052746
> > Change-Id: I0991b47bd644b2fc2244c5eb923b085261f04765
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060486
> > Commit-Queue: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#77744}
>
> Bug: chromium:1052746, chromium:1267854
> Change-Id: I89bbd01e33fb1080543d98bcfd4c2d17b5c76861
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270541
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78018}

Bug: chromium:1052746, chromium:1267854
Change-Id: Ia8f10d085d13990b331f306957f95ecf3e003cfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295453
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78019}
2021-11-22 14:14:48 +00:00
Maya Lekova
d7c3f1cd8a Reland "[fastcall] Enable float support on arm64 simulator"
This is a reland of b9ddcbc86f

The original CL was reverted due to an MSAN issue, that is fixed by
moving the signature mapping onto the Isolate (instead of having
per-thread storage, which got invalid on multithreaded compilation).

This CL also contains fixes for the Bazel config and for a data race
when obtaining the PerIsolateSimulatorData.

Original change's description:
> [fastcall] Enable float support on arm64 simulator
>
> This CL adds support for handling calls to C functions with arbitrary
> signatures on the arm64 simulator. It adds infrastructure for
> encoding the signature data from CallDescriptor and FunctionInfo
> classes into a compact representation, stored in the simulator and
> called EncodedCSignature.
>
> Design doc:
> https://docs.google.com/document/d/1ZxOF3GSyNmtU0C0YJvrsydPJj35W_tTJZymeXwfDxoI/edit
>
> This CL is a follow up on the native support added in
> https://chromium-review.googlesource.com/c/v8/v8/+/3182232
> and is partially based on the previous attempt:
> https://chromium-review.googlesource.com/c/v8/v8/+/2343072
>
> Bug: chromium:1052746
> Change-Id: I0991b47bd644b2fc2244c5eb923b085261f04765
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060486
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77744}

Bug: chromium:1052746, chromium:1267854
Change-Id: I89bbd01e33fb1080543d98bcfd4c2d17b5c76861
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3270541
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78018}
2021-11-22 13:59:37 +00:00
Leszek Swirski
e518a2b203 [debugger] Throw exception if var x fails in debug eval
There are cases where DeclareEvalVar can fail to create a variable, in
particular when the declaration scope is not extensible. Throw an error
in such cases.

Fixed: chromium:1145119
Change-Id: I6260f570570c4d7801231bdb5f6724f3734444fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295348
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78017}
2021-11-22 13:35:29 +00:00
Marja Hölttä
b65810bd21 [web snapshot] Fix the case with several exported objects
Bug: v8:11525
Change-Id: I4e4ba332611e3feedc70b32c39f4270cdb0e11cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295446
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78016}
2021-11-22 13:08:21 +00:00
Omer Katz
084de665de heap: Introduce Isolate::RequestGarbageCollectionForTesting with stack state
Once CppHeap moves away from EmbedderHeapTracer, it can no longer be
returned by Isolate::GetEmbedderHeapTracer. Blink currently uses
GetEmbedderHeapTracer to trigger GCs. This CL introduces a variant of
Isolate::RequestGarbageCollectionForTesting to replace that.

Bug: v8:12407
Change-Id: I099989f55291a0daab7d2051072dedddef58dd40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293413
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78015}
2021-11-22 12:32:48 +00:00
Dominik Inführ
6a2cf92302 [snapshot] Pass GlobalSafepointScope to Snapshot::Create
Instead of just DCHECKing that we are in a safepoint in
Snapshot::Create, pass the GlobalSafepointScope as argument.

Bug: v8:11708, v8:12377
Change-Id: Ia856c27b92223bf3a96fe6946b86e4625f3a1e0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295342
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78014}
2021-11-22 10:58:32 +00:00
Dominik Inführ
2c88cec4cf Reland "[heap] Support multiple clients in shared GC"
This is a reland of 90a9d6cb13

The original CL got reverted because of two different issues:

* The DCHECK failure on AllowGarbageCollection::IsAllowed() got fixed
  in https://crrev.com/c/3289625.
* The crash with the incremental marking job were because of a nested
  GC started from a SafepointScope. This CL adds IgnoreLocalGCRequests
  scopes to SafepointScopes in src/heap.

In addition this CL prevents shared GCs during isolate deserialization
by locking the clients_mutex_ until the isolate is fully deserialized.
The original GC used a DisallowSafepoints scope to prevent shared GCs
from interrupting isolate deserialization.

Original change's description:
> [heap] Support multiple clients in shared GC
>
> Add support for safepointing multiple isolates as described in the
> design doc (link is below). A safepoint across multiple isolates is
> considered a global safepoint to distinguish it from regular safepoints.
>
> The basic idea behind the implementation is that we reach a
> safepoint for each client. What's new is that now also main threads
> need to participate in the safepointing protocol and need to give up
> control in time. The slow paths of Park(), Unpark() and Safepoint() on
> the main thread need to be adjusted for this reason as well.
>
> This CL introduces GlobalSafepoint and GlobalSafepointScope to mirror
> IsolateSafepoint and IsolateSafepointScope.
>
> This CL adds the type IgnoreLocalGCRequests, it is used to prevent
> Park() and Unpark() from honoring the request from background threads
> to perform a local GC. This is used heap-internally to not have GCs
> (or even nested GCs) in certain locations. E.g. when initiating a
> safepoint to perform a GC we don't want a "recursive" GC to occur.
>
> Design doc: https://docs.google.com/document/d/1y6C9zAACEr0sBYMIYk3YpXosnkF3Ak4CEuWJu1-3zXs/edit?usp=sharing
>
> Bug: v8:11708
> Change-Id: I5aca8f5f24873279271a53be3bb093fc92a1a1eb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009224
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77812}

Bug: v8:11708, v8:12375, v8:12377
Change-Id: I9d1af6fbc06a3a8b6f216ec5e9027665ad071809
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283067
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78013}
2021-11-22 08:40:57 +00:00
v8-ci-autoroll-builder
fd86d20af1 Update V8 DEPS.
Rolling v8/build: 63b08e1..eabf027

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

Change-Id: I5d37b3b024f5da8769268becc86166d74282c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3294405
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@{#78012}
2021-11-22 03:46:37 +00:00
v8-ci-autoroll-builder
bdc8b86999 Update V8 DEPS.
Rolling v8/build: 3335020..63b08e1

Rolling v8/buildtools/third_party/libc++abi/trunk: a63bbc1..e504863

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8b575c9..8a112e2

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

Change-Id: I457b5528fce8eafbb3fc99424656554a0442ae6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3294681
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@{#78011}
2021-11-21 03:48:48 +00:00
Omer Katz
529c48f16d cppgc: Allow finalizing incremental GC when unsupported
Starting an incremental GC when it is not supported is not allowed but
trying to finalize one when it might be unknown whether it's supported
or not should be legal.
In such cases, finalization would immediately bail out since there is no
active gc.

Bug: chromium:1272076
Change-Id: If5aaaa130dc55474d3fc3afcd7039880a2c11333
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293411
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78010}
2021-11-20 09:51:46 +00:00
v8-ci-autoroll-builder
cb4b0d3bca Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 8401429..ce92bbf

remove long-defunct cli parameter (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/ce92bbf

lose some build warnings (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/88ea9d9

Disable clang-tidy (unused-using-decls) (#1287) (Vy Nguyen)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/91ed7ee

disable lint check where we know it'd fail (#1286) (Vy Nguyen)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/8722d6f

Add Setup/Teardown option on Benchmark. (#1269) (Vy Nguyen)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/b5bb9f0

Googletest renamed master to main today. (#1285) (Donald Aingworth)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/a07f6d1

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

Change-Id: I590fce794f7df0271ea97efce0ee04efd6d5d5a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3294010
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@{#78009}
2021-11-20 05:51:59 +00:00
v8-ci-autoroll-builder
2f501043f7 Update ICU
Rolling v8/third_party/icu: d3ba6ae..bf66d37

Reduce size by using lao dictionary from ICU 69. (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/bf66d37

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

Change-Id: Ibe8ce74e1cb9997f6da001e8dc445fe5656e1aca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3294011
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@{#78008}
2021-11-20 05:50:56 +00:00
Frank Tang
50ce874065 [test262] Roll test262
26f1f4567e..d52b510a

Bug: v8:7834
Change-Id: Ied739ce9ee8482cbd23ebb19b5e76c62387d8ef6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3292508
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78007}
2021-11-20 04:29:15 +00:00
v8-ci-autoroll-builder
0f5d6c7d1a Update V8 DEPS.
Rolling v8/build: 994f319..3335020

Rolling v8/buildtools/third_party/libc++abi/trunk: 81212d2..a63bbc1

Rolling v8/buildtools/third_party/libunwind/trunk: 7f068e5..038090f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e6e1eb6..8b575c9

Rolling v8/third_party/depot_tools: 1c7dec3..b6c1ed4

Rolling v8/third_party/googletest/src: 1a3e2a2..3e0e32b

Rolling v8/tools/clang: 8caa4c5..b0d8d05

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

Change-Id: I693d6a3bdac5fc1265cfa24eca70dd13dac04fa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3294008
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@{#78006}
2021-11-20 03:55:05 +00:00
Frank Tang
bd4fa32c87 [intl] Clean up
Remove two flags for feature shipped in m95
--harmony_intl_displaynames_v2
--harmony_intl_more_timezone

Bug: v8:11637, v8:11661
Change-Id: I9432865722664f64c64b5bf7fde5e05e6b324b20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3292518
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78005}
2021-11-20 03:53:26 +00:00
Ng Zhi An
a9b74cff05 [wasm-relaxed-simd][arm64] Implement relaxed min max
Bug: v8:12284
Change-Id: Iaa2b98029b46e5d22fac19bf2db5abd56f82670b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272641
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78004}
2021-11-20 00:52:36 +00:00
Ng Zhi An
835ff2bcf5 [wasm][api] Add WasmModuleObject::Compile api function
This is a partial revert of https://crrev.com/c/2033171 to bring back
WasmModuleObject::Compile, that compiles Wasm bytes into a Wasm module.

Also adding a simple test to make sure the compile works.

There are some users, e.g. Cloudflare, Halide, see bug for more details.

Bug: v8:10461
Change-Id: I199abea108311025decad793d2232a08bba05d38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3292088
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78003}
2021-11-19 22:25:15 +00:00
Milad Fa
41f99df7b2 PPC/S390 [sim]: refactor vsel on simulator
PPC and S390 implement vsel slightly differently which
is also reflected on the simulator.

Change-Id: Iec5e49bfae09d8bf15149e5ab149b82971271b24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293409
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78002}
2021-11-19 21:33:05 +00:00
Junliang Yan
75d7a95c88 s390x: [baseline] implement interface descriptors
Change-Id: I318a97a67242527c3a0f7a1dcd74b5503e5dcc55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289836
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78001}
2021-11-19 20:41:56 +00:00
Ng Zhi An
f47eec071e [ic] Fix -Wshadow by making InlineCacheState an enum class
Bug: v8:12244,v8:12245
Change-Id: Ie2b1801d7535e142774a1d912b992a203b1b8ecc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3284005
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78000}
2021-11-19 18:52:15 +00:00
Igor Sheludko
4dab3a31f7 [heap] Add instrumentation to GcSafeFindCodeForInnerPointer
... in order to ease issues debugging.

Bug: chromium:1241665
Change-Id: I3b51d3eaaa9c03cfadbdadc4e91dee35617f4b33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293090
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77999}
2021-11-19 18:04:14 +00:00