Commit Graph

72874 Commits

Author SHA1 Message Date
Milad Fa
fc563c8708 Fix c++17 related warning emitted by gcc
c++17 is being enabled on some platforms:
https://crrev.com/c/3306812
which causes gcc to emit the following warning:
```
error: null argument where non-null required (argument 2)
 memcpy(storage_ + kReturnCount, param_types.data(),
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Unlike clang, gcc is not able to detect if memcpy is actually
being executed or not when src is NULL:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22179

Therefore need to disable this warning at this location.

Change-Id: I44da9f698ef724e39bb9c7d4b235d1004d52f491
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308916
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78182}
2021-12-01 13:07:20 +00:00
Clemens Backes
092b3cff35 [liftoff] Remove dead method
The {TierUpFunction} method is unused after https://crrev.com/c/3275570.

R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: I81882a6f1907ff3f4504dea8e9e307cbd674e682
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306980
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78181}
2021-12-01 13:06:18 +00:00
Adam Klein
138605e631 Fix MSVC C++17 build config
MSVC doesn't define __cplusplus appropriately, so use _MSVC_LANG instead.

Bug: chromium:1274247
Change-Id: I40ef9f42f4e55b3410f89ff23c228f1b1201c4ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308423
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Adam Klein <adamk@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78180}
2021-12-01 11:14:39 +00:00
Leszek Swirski
a858cfd3ec [interpreter] Don't emit dead try blocks
Try blocks (whether catch or finally) will unconditionally create
handler tables and start a new basic block for the exception handler.
This can accidentally resurrect a dead block when the entire try block
is dead (and hence can never enter the exception handler in the first
place).

Add a deadness check to BuildTryCatch/Finally to fix this.

Bug: chromium:1273677
Change-Id: Icda9deb1459e47de5cb83e7b636299e24c3ebe77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306555
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78179}
2021-12-01 10:44:09 +00:00
Anton Bikineev
38f97cae6b platform: Provide hooks for disabling allocation quarantining
Some performance sensitive paths in V8 (compilation/json parsing) or
paths with high allocation/freeing throughput can suffer from not being
able to reuse recently freed allocations. These paths can also
significantly increase the working set and cause large number of page
faults. For such paths (at least as an initial measure) we are planning
to disable allocation quarantining.

The CL provides a way for the embedder to hook in *Scan functions that
disable/enable quarantining. It also disables *Scan for json parsing and
compilation jobs.

Bug: chromium:1249550
Change-Id: I0274f66010435f3d4d091fe70fabcd20f46dc0d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306389
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78178}
2021-12-01 10:37:49 +00:00
Victor Gomes
95a69c6bef [bazel] Upstream arm64 fix
mksnapshot is compiled/ran in the host configuration (usually x64), we
need to propagate the flag (using bazel transitions) to tell mksnapshot
to generate code to a different architecture.

No-Try: true
Change-Id: I5923f5895872a8cbf2982925a545855a330c51fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306568
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@{#78177}
2021-12-01 10:33:09 +00:00
Nikolaos Papaspyrou
427a67993c heap: Place LABs in IsolateData
Until now, LABs were accessed from generated code via external
references, e.g., see NewSpaceAllocationTopAddress() and
NewSpaceAllocationLimitAddress().

This patch places them in the IsolateData, so they can be accessed
using Isolate-constant offsets. It affects the hot path of all TF
generated code.

Bug: v8:12428
Change-Id: I7bfd54bea4febead404829d8e0b058b6cf53a374
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303800
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78176}
2021-12-01 08:51:33 +00:00
v8-ci-autoroll-builder
48dea8d83b Update ICU
Rolling v8/third_party/icu: bf66d37..edf883a

CP pull/1948 to rm deprecated/rm header (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/edf883a

Silence C++17 deprecation warning on MSVC (Leszek Swirski)
https://chromium.googlesource.com/chromium/deps/icu/+/e80c574

icu: Check initialization result (Maksim Ivanov)
https://chromium.googlesource.com/chromium/deps/icu/+/e107bc5

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

Change-Id: Iaacec47f0594a38f02f12be412fb4d4e31d733b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310417
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@{#78175}
2021-12-01 07:47:23 +00:00
v8-ci-autoroll-builder
29c17a6325 Update V8 DEPS.
Rolling v8/build: c829343..99a1dc1

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bd8b0c2..5695a84

Rolling v8/third_party/depot_tools: 8676aa9..5deb9c9

Rolling v8/third_party/fuchsia-sdk: 1889684..5e0b0d0

Rolling v8/third_party/zlib: 2231b7c..e8c257c

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

Change-Id: Id9f1b47b5f743886e4d2e2f024e6b790aebf3a5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308834
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@{#78174}
2021-12-01 03:48:30 +00:00
v8-ci-autoroll-builder
ea837ad947 Update V8 DEPS.
Rolling v8/build: e0d5dbf..c829343

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8cf0922..bd8b0c2

Rolling v8/third_party/depot_tools: 512ca5c..8676aa9

Rolling v8/third_party/googletest/src: e2f3978..bb92160

Rolling v8/tools/clang: 9c18fde..401e727

Rolling v8/tools/luci-go: git_revision:7422359d33c606e8adb0e9cf461837eb9b49431f..git_revision:e4c95e4e4cdc987f1860e4111589606bcd3a8f32

Rolling v8/tools/luci-go: git_revision:7422359d33c606e8adb0e9cf461837eb9b49431f..git_revision:e4c95e4e4cdc987f1860e4111589606bcd3a8f32

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

Change-Id: Ia3f9d9b245812be6b54acbdff4a15bfe5c08a0d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308828
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@{#78173}
2021-11-30 23:30:18 +00:00
Frank Tang
2b352df062 [intl] Update Intl.Locale.weekInfo sync latest
Implement the changes in
https://github.com/tc39/proposal-intl-locale-info/pull/44
So weekInfo will return weekend as an array instead of weekendStart
and weekendEnd.

Bug: v8:11638
Change-Id: I775b003b36f67179943911faa7f77a323ad9f6f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307685
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78172}
2021-11-30 23:17:28 +00:00
Adam Klein
b7558540a9 [torque] Use default constructor in place of self-delegation for Symbol()
This avoids a compile error when building with GCC in C++17 mode.

Bug: v8:12449
Change-Id: I14817895d31019fb71fc71b061f2ecf576dbc711
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307102
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78171}
2021-11-30 23:03:49 +00:00
Adam Klein
6f60dea6b8 Revert "[top-level-await] Remove --harmony-top-level-await"
This reverts commit 3ee4804f83.

Reason for revert: breaks blink_unit_tests:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Blink%20Linux/15074/overview

Original change's description:
> [top-level-await] Remove --harmony-top-level-await
>
> TLA has been shipped since v8.9.
>
> Bug: v8:9344, chromium:1271114
> Change-Id: Ibebf21da8bacb1f0d212390133847495ad8553e5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307103
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78169}

Bug: v8:9344, chromium:1271114
Change-Id: I0874bcaba18fde3b48f5ef7eeae89f2fa4978d51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308422
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78170}
2021-11-30 22:14:41 +00:00
Shu-yu Guo
3ee4804f83 [top-level-await] Remove --harmony-top-level-await
TLA has been shipped since v8.9.

Bug: v8:9344, chromium:1271114
Change-Id: Ibebf21da8bacb1f0d212390133847495ad8553e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307103
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78169}
2021-11-30 20:18:48 +00:00
Bruce Dawson
7fd8019433 Require setting _WIN32_WINNT in build config files
For years win32-headers.h has "helpfully" set _WIN32_WINNT if it has not
already been set. This has caused problems because the value specified
in win32-headers.h falls behind that set in the config files. This
change removes the fallback and makes it an error to not set this macro
in the build config files.

This only affects MinGW builds where it has caused confusion.

Bug: v8:12099
Change-Id: I013aadc307376fa97afa7b7752910f4fa4a6db82
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272648
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78168}
2021-11-30 20:04:40 +00:00
Seth Brenith
4d58f8acc5 Make JSFinalizationRegistry::next_dirty weak
Currently, JSFinalizationRegistry has a BodyDescriptor that iterates
next_dirty as a custom weak field, and it has a WeakListVisitor that
cleans up any items from the list that should be removed. However, none
of that code is used, because JSFinalizationRegistry objects are created
with visitor ID kVisitJSObjectFast. This change gives them a custom
visitor ID so that next_dirty can be treated as weak.

Bug: v8:12430
Change-Id: I31c1935257ad508b13a3e684662d2ca406d8ed19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307096
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78167}
2021-11-30 18:43:38 +00:00
Michael Lippautz
d99c0dfdc9 cppgc: Bail out on sweeping on allocation when space is empty
Add an approximate bailout for sweeping on allocation to avoid
reporting scopes when no work is being done.

Bug: v8:12286
Change-Id: I7589429805af702c35d51f9a37eae596268dedc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306983
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78166}
2021-11-30 17:25:58 +00:00
Camillo Bruni
e24deb89fe [tools] Various system-analyzer fixes
- Handle empty script sources
- Fix list-panel groups, order by count

Bug: v8:10644
Change-Id: I03d3915f709d47429040b591c0271e951eca58e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289642
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78165}
2021-11-30 15:16:21 +00:00
Samuel Groß
d76dceb803 [platform] Simplify alignment logic in OS::Allocate on Fuchsia
Instead of potentially mapping a larger region than requested, then
unmapping parts of it to obtain a mapping with the desired alignment, we
now compute the ZX_VM_ALIGN_X constant corresponding to the specified
alignment and use that in the call to zx_vmar_map.

Bug: chromium:1218005
Change-Id: Ia36de6a06f3f2d625d177320d7e46fd29331f711
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307054
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78164}
2021-11-30 15:07:38 +00:00
Camillo Bruni
f237f420f3 [flags] Remove unused FLAG_randomize_hashes
Change-Id: I0df2943f246ea5dc8c56bb196c097dcdd58f1bea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308801
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78163}
2021-11-30 14:36:29 +00:00
Camillo Bruni
44166c6091 [api] V8::Initialize cleanup
- V8::Deprecate ShutdownPlatform in favor of V8::DisposePlatform
- Rename i::V8::TearDown to i::V8::Dispose
- Clean up i::V8::Initialize
- Remove needless V8::Initialize() calls in cctests
- Remove CcTest::DisableAutomaticDispose()
- Add checks to Isolate::Allocate and Isolate::Dispose that there is
  and active platform

Change-Id: Iac84f9ade9d1781e9e8b8c88ea8fe74013f51c4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306482
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78162}
2021-11-30 14:30:38 +00:00
Igor Sheludko
a421ac639d [ext-code-space] Make HeapObject::IsBlah() predicates faster
... by using cage-friendly versions of HeapObject::IsBlah(),
HeapObject::map(), HeapObject::map_word() and HeapObject::Size()
on hot paths.

Bug: v8:11880
Change-Id: I70b72e46cc867b6b2ddbc48cd5e6a74ae4208397
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308800
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78161}
2021-11-30 14:08:57 +00:00
Andreas Haas
3abe95def3 [wasm] Add missing ClearThreadInWasmScope
R=clemensb@chromium.org

Bug: chromium:1274976
Change-Id: I7878c44fcf11ef7b8b850ff50cdd1062c6e8122a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306979
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78160}
2021-11-30 13:34:18 +00:00
Clemens Backes
667187fc08 [codegen] Factor out safepoint table printing
The logic for printing a safepoint table is currently duplicated for
Wasm code and on-heap code, with slight differences.
This CL provides a central {SafepointTable::Print} method that is used
in both scenarios.
The format is slightly changed to explicitly specify which bitmap
corresponds to stack slots and which one to registers.

R=jkummerow@chromium.org

Bug: v8:12401
Change-Id: I67366b1f9a92450a6ebec4210ab4811800a54f34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306976
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78159}
2021-11-30 13:19:49 +00:00
Jakob Gruber
1976cbfb36 [compiler] Predictable compilation dependency installation
--predictable requires deterministic heap allocation sequences.
Guarantee these for compilation dependency installation by sorting the
dependency list if --predictable is enabled.

Bug: v8:12397
Change-Id: Ia4660f2249a1c3390a932ae057a5b4d4537497ab
Fixed: v8:12447
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306488
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78158}
2021-11-30 13:04:58 +00:00
Leszek Swirski
f4e02f266b [turbofan] Remove defn of constexpr vars for C++17
It's deprecated in C++17 and not needed (it was needed for static const,
but not for constexpr). It's needed in C++14, but can trigger
deprecation errors in C++17, so include it conditionally on __cplusplus.

Bug: chromium:1274247
Change-Id: I92524f377bb92ac2aa008f15830920786a1c1432
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308795
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78157}
2021-11-30 13:01:31 +00:00
Igor Sheludko
3ca76de12a [ext-code-space] Use cage-friendly HeapObject::map() in compiler
This will allow making HeapObject::IsBlah() checks faster when external
code space is enabled.

Bug: v8:11880
Change-Id: I68473ba88063c555c90330c9748462adeb35aa0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308797
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78156}
2021-11-30 13:00:28 +00:00
Igor Sheludko
391f9c25f1 [ext-code-space] Support background compilation
Bug: v8:11880
Change-Id: I557c4d6f83bc3203c115824e26fcb2ecf0473e1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308796
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78155}
2021-11-30 12:35:18 +00:00
Tim van der Lippe
f054a1916f Add explanation for DCHECK that can fire with embedder misconfiguration
While debugging, we discovered a Blink misconfiguration in the
navigator.mimeTypes object. We fixed the issue in
https://crrev.com/c/3303674, but let's also document on the V8 side when
you can hit the DCHECK and where to look next.

R=yangguo@chromium.org

Bug: chromium:1262066
Change-Id: I256331ec4296963deb152485d8c6699b75c42e37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3302804
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78154}
2021-11-30 12:07:20 +00:00
Igor Sheludko
c6ce0b25e8 [ext-code-space] Use cage-friendly HeapObject::map() in serializer
This will allow making HeapObject::IsBlah() checks faster when external
code space is enabled.

Bug: v8:11880
Change-Id: Ibee4e19859c23f11316e3cfd7961f58d8e58240a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3301478
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78153}
2021-11-30 11:40:23 +00:00
Leszek Swirski
f83320fde0 Revert "[turbofan] Remove out-of-line defn of constexpr vars"
This reverts commit 05da670871.

Reason for revert: Guess I was wrong: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20ASAN%20no%20inline%20-%20release%20builder/25729/overview

Original change's description:
> [turbofan] Remove out-of-line defn of constexpr vars
>
> It's deprecated in C++17 and not needed (it was needed for
> static const, but not for constexpr)
>
> Bug: chromium:1274247
> Change-Id: If92d7b6300493cb186ff2ade8f6b6a4820d5a264
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306429
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78149}

Bug: chromium:1274247
Change-Id: I26f8377b331895363fec5329a08261ebec3696ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306431
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@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@{#78152}
2021-11-30 11:38:34 +00:00
Michael Lippautz
dc7425b6aa heap: Replace WeakObjects Worklist with ::heap::base::Worklist
The CL converts uses of v8::internal::Worklist to heap::base::Worklist
which does not require to know the number of tasks working with the
work list upfront. heap::base::Worklist is the common implementation
for V8's heap and cppgc and should be used/optimized going forward.

Bug: v8:12426
Change-Id: Id6ef1aa05df858b01df90d653b6421a9bb68b997
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306382
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78151}
2021-11-30 11:37:31 +00:00
Camillo Bruni
5a663fd972 [api] Speed up MakeAccessorInfo
Avoid a few handle derefs for this semi-hot startup function.

Change-Id: Id61135d6031905d2bee07cadc1396b144b43df9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306428
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78150}
2021-11-30 11:25:39 +00:00
Leszek Swirski
05da670871 [turbofan] Remove out-of-line defn of constexpr vars
It's deprecated in C++17 and not needed (it was needed for
static const, but not for constexpr)

Bug: chromium:1274247
Change-Id: If92d7b6300493cb186ff2ade8f6b6a4820d5a264
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306429
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78149}
2021-11-30 11:22:28 +00:00
legendecas
25cd6f26b4 [api] Inline ScriptOrigin methods as declaration
These methods were declared as inlined functions but the implementation
were moved to api.cc.

Change-Id: I49071aca9c94e52930c362e85206dbda402ab29b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308375
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78148}
2021-11-30 10:39:28 +00:00
Clemens Backes
aadb1c97d7 [codegen] Collapse succeeding identical safepoint entries
This saves a lot of memory on bigger Wasm functions, which typically do
not contain a lot of references (and no deoptimization data). Most
entries can be collapsed there. We might also see some improvements on
JavaScript code.

R=jkummerow@chromium.org

Bug: v8:12401
Change-Id: Ia12611de52c1ccd755d0a48ea0569ceb18716884
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306975
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78147}
2021-11-30 10:07:29 +00:00
Michael Lippautz
6643c05940 Reland "cppgc: Add targeted CHECK for diagnosing Peristent issue"
This is a reland of 4997ce58dd

Original change's description:
> cppgc: Add targeted CHECK for diagnosing Peristent issue
>
> The added CHECK aims at finding problems where Peristent is used off
> the owning thread.
>
> Bug: chromium:1253650, chromium:1243257
> Change-Id: Ia0cbc6005aba38c0d98197ed18c3b40dd2dc33fd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306972
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78137}

Bug: chromium:1253650, chromium:1243257
Change-Id: I9ef72d3f649c1a4504417c4cd7728e5000675405
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306487
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78146}
2021-11-30 09:56:28 +00:00
Kim-Anh Tran
ccbe3217fa [debugger] Report hit breakpoints when stopping at a debugger statement
Previously when hitting a debugger statement we would ignore reporting
the hit breakpoints.

Bug: chromium:1229541, chromium:1133307
Change-Id: I47427a541391a27fc7783930e5e7eb41fbf2bb6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306373
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78145}
2021-11-30 06:00:38 +00:00
v8-ci-autoroll-builder
c7cb5dce1d Update V8 DEPS.
Rolling v8/build: 2386a80..e0d5dbf

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/75423c3..8cf0922

Rolling v8/third_party/depot_tools: 2ffa1bd..512ca5c

Rolling v8/tools/clang: 11ea35f..9c18fde

Rolling v8/tools/luci-go: git_revision:03f7c59feeac59c211e5b06fbbbc7405861b482e..git_revision:7422359d33c606e8adb0e9cf461837eb9b49431f

Rolling v8/tools/luci-go: git_revision:03f7c59feeac59c211e5b06fbbbc7405861b482e..git_revision:7422359d33c606e8adb0e9cf461837eb9b49431f

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

Change-Id: I605ad6a635b3ee5b1d0f46f75e351b347382a3ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308453
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@{#78144}
2021-11-30 04:27:34 +00:00
Andreas Haas
9c6c1f10e3 Reland^2 "[wasm] Update spec tests"
Change-Id: I72a9b9551bc99d94bfb41fe5174ae58844e5dedb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303802
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78143}
2021-11-30 04:14:58 +00:00
Adam Klein
5d787082b1 Revert "cppgc: Add targeted CHECK for diagnosing Peristent issue"
This reverts commit 4997ce58dd.

Reason for revert: CHECK triggers on content_browsertests, blocking V8 roll
https://cr-buildbucket.appspot.com/build/8829191878491185313

Original change's description:
> cppgc: Add targeted CHECK for diagnosing Peristent issue
>
> The added CHECK aims at finding problems where Peristent is used off
> the owning thread.
>
> Bug: chromium:1253650, chromium:1243257
> Change-Id: Ia0cbc6005aba38c0d98197ed18c3b40dd2dc33fd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306972
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78137}

Bug: chromium:1253650, chromium:1243257
Change-Id: I6b5c3d3ac0a01e1e3de31a10d5903ea26cf5ae9a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308373
Auto-Submit: Adam Klein <adamk@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@{#78142}
2021-11-30 04:09:20 +00:00
Hao Xu
f9cb3fe60c [baseline] Optimize Binop with Smi rhs
Current Baseline compiler generates calls to Binop_Baseline for both
Binop and Binop with Smi rhs. This CL make BinopSmi calls to
BinopSmi_Baseline which does not do speculation for rhs.

Bug: v8:12442
Change-Id: Ied786af028429aa0842b9b6d2a5736779f24b568
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303807
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#78141}
2021-11-30 02:11:57 +00:00
Manos Koukoutos
77f3e88a7c [wasm][test] Remove obsolete flags
--experimental-wasm-mv has been removed, and --wasm-loop-unrolling is on
by default.

Change-Id: I094870765031ef46fcec95e9071333e4e80f407b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3302805
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78140}
2021-11-29 21:16:57 +00:00
Manos Koukoutos
91ac9163d6 [wasm-gc] Fix WasmJSFunction polymorphic spec-inlining
{WasmInternalFunction::external} might return a function that is not
a WasmExportedFunction, at which point the code in ProcessTypeFeedback
fails.

See crrev.com/c/3277878 for context.

Bug: v8:12436, v8:12166
Change-Id: I09ef96df3fc051586044dd9c2ce88d6aeeb34b9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306391
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78139}
2021-11-29 21:11:27 +00:00
Milad Fa
2d34bb3de6 S390 [lifotff]: Fix endianness issue in atomic ops
result needs to byte-swapped as it's currently in machine
native order and Wasm requires LE ordering.

Change-Id: Ib29e26985b122a4c1ebba715c47a4d4477bbad54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3301460
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78138}
2021-11-29 19:56:07 +00:00
Michael Lippautz
4997ce58dd cppgc: Add targeted CHECK for diagnosing Peristent issue
The added CHECK aims at finding problems where Peristent is used off
the owning thread.

Bug: chromium:1253650, chromium:1243257
Change-Id: Ia0cbc6005aba38c0d98197ed18c3b40dd2dc33fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306972
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78137}
2021-11-29 19:50:57 +00:00
Milad Fa
fedeb2fc42 [wasm] Fix endianness issue when initializing memory
memory[1] needs to be set in LE order even on BE platforms.

Change-Id: I44620c30a25719d0d61e0f14490342ee930dbbb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3302852
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78136}
2021-11-29 19:40:57 +00:00
Nico Weber
496d95ff25 Make torque run fine in CFI builds with -std=c++17
It's not yet understood how this worked with c++14. Add the workaround,
so that we can figure this out in parallel with -std=c++17 enablement.

Bug: chromium:1273966
Change-Id: I7098d345a5df6e208dfd582eeaecab22e52fecb9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3304143
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78135}
2021-11-29 18:24:53 +00:00
Dominik Inführ
7b85e666ee [d8] Annotate global handles for realms
Annotating the global handles gives us a nice description in heap
snapshots.

Bug: v8:12198
Change-Id: Ie6385794a6b5a1d43f5730b6ff521611f1b366af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3304067
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78134}
2021-11-29 17:43:08 +00:00
Seth Brenith
3bc5db7b7d Fix some incorrect retainers in heap snapshots
JSWeakRef and WeakCell both have weak pointers, which should be marked
as such in heap profiler snapshots.

Bug: v8:12112
Change-Id: Ie7aaa2cd3e44552427679e650e462d64704725d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3299592
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78133}
2021-11-29 17:10:08 +00:00