Commit Graph

77995 Commits

Author SHA1 Message Date
Frank Tang
39f0b4ad8a [intl] Implement DurationFormat
Spec Text: https://tc39.es/proposal-intl-duration-format
Spec Repo: https://github.com/tc39/proposal-intl-duration-format
Design Doc:
https://docs.google.com/document/d/1UMwkeeiqVyVNhNW8CS1vwN9g2cIH0AryaU16DT-vGg0/edit#


Bug: v8:11660
Change-Id: Icd14e0ee4d386a5d84ccd624fc2a8bb707cc7870
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3833436
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83503}
2022-10-04 03:18:37 +00:00
Samuel Groß
dc91addeef Reland "[sandbox] Improve the default ArrayBufferAllocator for the sandbox"
This is a reland of commit f08547afd4

All ArrayBufferAllocators now share a backend allocator which owns the
backing memory. This fixes the address space exchaustion issues.

Original change's description:
> [sandbox] Improve the default ArrayBufferAllocator for the sandbox
>
> Rather than using a page allocator and rounding all allocation request
> sizes up to the next multiple of the OS page size, we now use a
> base::RegionAllocator with a "page size" of 128 as a compromise between
> the number of regions it needs to manage and the amount of wasted memory
> due to allocations being rounded up to a multiple of that page size.
> While this is still not as performant as a "real" allocator, it does
> noticeably improve performance when allocating lots of ArrayBuffers.
>
> Bug: chromium:1340224
> Change-Id: I56d1ab066ba55710864bdad048fb620078b2d8c2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3913346
> Commit-Queue: Samuel Groß <saelo@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83396}

Bug: chromium:1340224
Change-Id: Ia52eeb695ad89cc6146807fda040281ac5fdaf59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3916640
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83502}
2022-10-03 13:21:06 +00:00
Feng Yu
0f8706ebbb [test] Migrate cctest/test-run-bytecode-graph-builder to unittests/
Bug: v8:12781
Change-Id: Idc085bee31f4388be2465fc2b5e7f3d0ca957514
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3924927
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Cr-Commit-Position: refs/heads/main@{#83501}
2022-10-03 08:44:43 +00:00
v8-ci-autoroll-builder
8e65e2949f Update V8 DEPS (trusted)
Rolling v8/build: a77d268..af6dfb7

Rolling v8/buildtools: bf023cc..1ca6866

Rolling v8/buildtools/third_party/libc++/trunk: 591c991..1821ec3

Change-Id: I43f17fd45cd5b2dc5f769aeeadba77160b20aab7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3930899
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83500}
2022-10-03 03:59:42 +00:00
v8-ci-autoroll-builder
15f44a326b Update V8 DEPS (trusted)
Rolling v8/build: 9991d6b..a77d268

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5eb0675..16eb727

Rolling v8/third_party/depot_tools: 1b8211f..a724859

Rolling v8/tools/luci-go: git_revision:78063b01b53dd33a541938207b785cc86d34be37..git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4

Rolling v8/tools/luci-go: git_revision:78063b01b53dd33a541938207b785cc86d34be37..git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4

Change-Id: I1fa9624339f999c32f5d36638dbc5fb486ba918e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3931933
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@{#83499}
2022-10-02 04:07:21 +00:00
v8-ci-autoroll-builder
526943e783 Update V8 DEPS (trusted)
Rolling v8/build: 2d24822..9991d6b

Rolling v8/buildtools: cccaf48..bf023cc

Rolling v8/buildtools/third_party/libc++/trunk: 5ee02b2..591c991

Rolling v8/buildtools/third_party/libc++abi/trunk: 5c3e02e..20a144a

Rolling v8/buildtools/third_party/libunwind/trunk: 7ff728a..08ebcbe

Rolling v8/third_party/depot_tools: e3ed6a8..1b8211f

Rolling v8/third_party/zlib: cbb6b98..6fe4ce8

Rolling v8/tools/clang: 209fff0..a5e0d72

Change-Id: Id32bfaec11f400cc68c936a2bc030b6ab16a6b64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3929848
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@{#83498}
2022-10-01 04:09:51 +00:00
Jose Dapena Paz
38f7858c6b GCC: do not pass -mmark-bti-property in GCC ARM64 control flow integrity
The ASM argument -mmark-bti-property is not supported in GNU toolchain
assembler, so it breaks the build. Only pass it for Clang.

Bug: chromium:819294
Change-Id: Ib5a485fa74fd75c88582292c8648d742fa25e709
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3930160
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83497}
2022-09-30 20:30:17 +00:00
Nikolaos Papaspyrou
415d5b1a58 [heap] Fix inner pointer resolution for incremental marking
When incremental marking has started and the scavenger is triggered,
young generation pages that end up in the "from" space may contain
unclean markbits. In this case, inner pointer resolution may return
base pointers to the start of objects that are not on the page anymore.
This is problematic if the page contents have been zapped. This CL fixes
this and improves the corresponding unit test.

Bug: v8:13257
Change-Id: I9f4a05270a66e15e86519a2d6574b4afe100a48d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925935
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83496}
2022-09-30 18:28:47 +00:00
Camillo
3cf3b818fc [bazel] Backport mksnapshot additions
Support custom suffix and target_os.

Change-Id: I6117ab86974518aeb868dab101204e091830f4bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921516
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83495}
2022-09-30 16:47:08 +00:00
Simon Zünd
16cfe9ffae [debug] Implement re-usable locals block list calculation
This CL implements local blocklist calculation as described in the
linked design doc below.

The main characteristics between the new, re-usable block lists and
the current implementation are:

  - Block lists for a scope store the "outer" stack-allocated
    variables, not "inner" variables.

  - A block list contains all outer stack-allocated variables of all
    outer scopes up to (and including) the next outer scope that
    needs a context.

  - It's not enough to only calculate blocklists between scopes that
    require contexts, but we also need to calculate blocklists
    for all function scopes. Future pauses may pause in outer
    functions and we want to also re-use the blocklists for those.

R=jarin@chromium.org

Doc: https://bit.ly/chrome-devtools-debug-evaluate-design
Bug: chromium:1363561
Change-Id: I8af02424de8007f388faa82983337218bec87ed9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925195
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83494}
2022-09-30 10:09:56 +00:00
Tobias Tebbi
222007bc11 [arm64][x64] support 64bit mul high
This will be used for lowering 64bit division by a constant.

Change-Id: I79153b81fe58757feeffb6c6c170f6f62fdd2a60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872268
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83493}
2022-09-30 06:38:24 +00:00
v8-ci-autoroll-builder
33541f53f5 Update V8 DEPS (trusted)
Rolling v8/build: 9868184..2d24822

Rolling v8/buildtools: f9d0f84..cccaf48

Rolling v8/buildtools/third_party/libc++/trunk: 71619e7..5ee02b2

Change-Id: I6c80e8d366556fb4f656563242615f769594c082
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925913
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@{#83492}
2022-09-30 03:51:45 +00:00
Frank Tang
3cb6627f20 [test262] Roll test262
465cf4a5c..58b7a2358

Bug: v8:7834
Change-Id: Ic735cb2d1c05a74bb2b6b3dc24818afb813c8428
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3928062
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83491}
2022-09-29 19:07:35 +00:00
Matthias Liedtke
fd43005037 [wasm-gc] Add new ref.test null taking any reference
ref.test null is a variant of ref.test (commit
e4828a364e) which treats null as success
(returning 1).

Bug: v8:7748
Change-Id: Ib2ce7d5b4b73b3d1a995333d5a477c0c982de415
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925975
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83490}
2022-09-29 15:26:45 +00:00
Dominik Inführ
616c922eb8 [heap] Support code space sweeping on background threads
Since code space is now swept concurrently as well, background threads
can now sweep code pages on allocation failures as well.

Change-Id: I493eb9bd8b1a95f58ddb96a5ced7f87d9397da47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3929038
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83489}
2022-09-29 14:08:17 +00:00
Stephen Roettger
be3d6a3791 Cleanup: replace RO embedded_constant_pool flag with value
The flag is used inside const expressions so it's impossible to change
it at runtime. There's no reason that this is a command line flag.

Change-Id: I983aeabe8ed276599b28add4ab883546edc7039e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925197
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Stephen Röttger <sroettger@google.com>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83488}
2022-09-29 13:18:16 +00:00
Dominik Inführ
ff5b2b5991 [heap] Fix live byte accounting with ConcurrentAllocator LABs
When freeing a LAB, the black area needs to be destroyed as well. This
is in order to keep live byte accouting accurate.

This CL also removes merging of LABs as this is an optimization that
only happens on the background thread and not on the main thread
where most allocations occur.

Bug: v8:13267, v8:13343
Change-Id: I60dfdaec9697755ddbdb0939000afe34cd33d5fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3928745
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83487}
2022-09-29 13:15:56 +00:00
Igor Sheludko
82d8d41e85 [builtins] Ensure IteratorClose is executed
... when iteration over fast array is aborted. This change affects
JSCollection constructors.
According to the iteration protocol the iterator must be properly
closed in case the element can't be added to the collection.

Bug: chromium:1357318
Change-Id: I30cff249449dbb5ac0f48111a681caedcf37e326
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3928743
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83486}
2022-09-29 11:55:05 +00:00
Qifan Pan
fced4e9e35 [turbofan] Use BigInt64 feedback in BigInt addition
With BigInt64 feedback, SpeculativeBigIntAdd can be lowered to
CheckedBigInt64Add with type checks for input. Deopt is triggered if
the result overflows or the input is out of range.

A unit test is added to make sure there is no deopt loop.

Bug: v8:9407
Change-Id: I61a25737208c81a9619d959961fc5ab10e069546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921521
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83485}
2022-09-29 09:00:25 +00:00
Simon Zünd
fe879ebfdc [objects] Make ScopeInfo hashable
This CL implements a `Hash` function for ScopeInfo based on position
information. If no position information is available, we fall back to
the type and number of context variables.

Note that this is far from ideal, especially when no position info is
available. But, the hash is only used to store scope-related debug
information in the `LocalsBlocklistCache` hash table. This table is
only ever filled on debug pauses or debug-evaluates, so we don't
care that much if we produce many hash collisions.

R=jarin@chromium.org, leszeks@chromium.org

Doc: https://bit.ly/chrome-devtools-debug-evaluate-design
Bug: chromium:1363561
Change-Id: I70b7f2702693e2d930ed0080506ed94ac44e9124
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925434
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83484}
2022-09-29 07:59:25 +00:00
Shu-yu Guo
9a98f96b6d [symbol-as-weakmap-key] Stage the feature
Bug: v8:12947
Change-Id: I0a151a6b301ee93675cc9f87a4fa24cb1be76462
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3928061
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83483}
2022-09-29 06:56:57 +00:00
v8-ci-autoroll-builder
f223f1b32e Update V8 DEPS (trusted)
Rolling v8/build: 4f7a8d7..9868184

Rolling v8/third_party/depot_tools: 9ef048c..e3ed6a8

Change-Id: I23ee68ab63ef0839278465603b8a82e086dffe4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3923483
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@{#83482}
2022-09-29 03:49:27 +00:00
Shu-yu Guo
e259adc4c7 Ship Array grouping
I2S with 3 LGTMs at
https://groups.google.com/a/chromium.org/g/blink-dev/c/hSnGUOXTXPE/m/IcP21RpVCAAJ

Bug: v8:12499
Change-Id: I495885485297bf8440e653efce45df86a4c8afce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3911376
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83481}
2022-09-28 20:58:40 +00:00
Paolo Severini
9a2dd870e5 [profiler][etw] Dynamically turn on/off ETW tracing
Refactor ETW tracing code to make sure ETW tracing sessions is
correctly started/stopped when a ETW controller (like Windows
Performance Recorder) start/stops a tracing session.

The goal is to enable support for ETW tracing by default making sure
that it does not cause any performance regressions.

Bug: v8:11043
Change-Id: I90085183a1c3f4d35ec7e964dbe4b38243aed0d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3905922
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83480}
2022-09-28 16:17:46 +00:00
Dominik Inführ
d32b5ab97c [heap] Fix data race when setting COMPACTION_WAS_ABORTED page flag
When evacuation gets aborted due to OOM we used to set the
COMPACTION_WAS_ABORTED page flag immediately. However other evacuation
threads might check the page flags of that exact page concurrently
while recording slots in migrated objects.

We can delay setting the COMPACTION_WAS_ABORTED page flags until
processing aborted evacuation candidates. At that point there are
no more concurrent evacuation threads running anymore.

In order to not break output of --trace-evacuation we also need a
return value for RawEvacuatePage.

Bug: v8:13336
Change-Id: I29a76af918ee4f2016ab6d7c26c2688ff6a14aae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925974
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83479}
2022-09-28 15:51:06 +00:00
Leszek Swirski
c4772b58aa [d8] Add performance.mark and performance.measure
Add simple implementations of performance.mark/performance.measure --
these aren't fully to spec, and in particular don't have the right base
class or prototype, but they're similar enough for simple use.

Additionally, log trace events for performance.measure, similar to
Chromium -- this allows us to annotate traces collected with d8's
--enable-tracing.

Change-Id: Ib4d7104ba94a261493c57334b2008956e4d89dd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3918092
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83478}
2022-09-28 14:58:17 +00:00
Dominik Inführ
65dd2f8e61 [heap] Fix setting up black area in concurrent allocation
The black area needs to be set up after the lab is fully initialized.
Otherwise the black area might not span the whole LAB.

Bug: v8:13267, chromium:1369056
Change-Id: Iee0f29c3b1a9c351df967167b5f7ed050d2a3b52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925794
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83477}
2022-09-28 13:57:46 +00:00
Maya Lekova
dd1db42d49 [test] Remove an exception from a test callback
... as such is already thrown at an earlier point of the call chain.

Change-Id: Iad28438c3b6b0d0fdc178d95701908338500eaa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921520
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83476}
2022-09-28 13:55:46 +00:00
Matthias Liedtke
e4828a364e [wasm-gc] Add new ref.test taking any reference
The new ref.test (opcode 0xfb40) takes an any reference (vs. data on
the old instruction) and expects a HeapType immediate.
The HeapType can be a concrete or an abstract type.

Bug: v8:7748
Change-Id: Iaa2010af21d3fee76e27a5f4476ae00f5ca837a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3913028
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83475}
2022-09-28 13:43:36 +00:00
Omer Katz
bc4ff7caf4 [heap] Split concurrent_minor_mc flag
Use separate flags for marking and sweeping.

Bug: v8:12612
Change-Id: I0841f531b7ea289d892b6f837e4c9ad8dbccd073
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3918550
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83474}
2022-09-28 12:36:54 +00:00
Dominik Inführ
c095dccfcc [heap] Fix incremental marking issues with the shared space isolate
This CL fixes three separate issues:

* Setting/clearing of right page flags for the shared space during
  marking.
* The marking barrier needs to mark shared objects in the shared
  space isolate.
* The scavenger needs to invoke TransferColor when promoting into
  the shared heap in the shared space isolate.

Bug: v8:13267
Change-Id: Id3abcb73c26933bc7d5e74c9c3f4489aab97d703
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921522
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83473}
2022-09-28 12:31:44 +00:00
pthier
7464985d68 [test] mjsunit: Add function to check for early errors
assertThrows catches both early errors during parse time and exceptions
thrown during runtime.
To be able to test more specificially, add assertEarlyError to check for
syntax errors during parsing and assertThrowsAtRuntime to check that
code throws while executed.

Change-Id: I61ee78c4b2beec266dfbed3999cd4df1786d0c9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925198
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83472}
2022-09-28 12:27:13 +00:00
Leszek Swirski
5bf491cfeb [runtime] Revert template cache work
This reverts the following commits:

  * [runtime] Clean up dead entries in the template cache"
    8436c0059c.
  * [runtime] Don't update template map for existing templates
    e7b9604040.
  * [runtime] Fix hash used in template cache
    caa087bb18.
  * [runtime] Hold cached template objects weakly
    5d19e724d2.
  * [runtime] Key template object cache on Script
    f3a0e8bccf.

There are gerrit UI issues which appear to be template object caching
related.

For dashboard:
This reverts commit 8436c0059c.
This reverts commit e7b9604040.
This reverts commit caa087bb18.
This reverts commit 5d19e724d2.
This reverts commit f3a0e8bccf.

Bug: v8:13190
Bug: chromium:1366900
Change-Id: I9759771441a4dece2a5dbb47e462ce0c0c01b182
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925696
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83471}
2022-09-28 11:38:01 +00:00
Marja Hölttä
ece2746346 [maglev] Omit calling default ctors
I.e., implement the Maglev handler for the FindNonDefaultConstructor
bytecode.

Bug: v8:13091
Change-Id: I6d9905227875fe4efd460434b650fc48d008e7bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925196
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83470}
2022-09-28 11:02:44 +00:00
Benedikt Meurer
d8990fdc76 [debug] Remove statement position from spreads in array literals.
Following up on https://crrev.com/c/3916453, we also remove the
confusing breakable and steppable positions from spreads in array
literals. These positions provide no meaningful advdantage for
developers, but just makes it annoying to step through code that
contains spreads.

Drive-by: Add similar inspector tests to ensure that the positions in
the stack are correctly inferred when stopped in the Symbol.iterator or
the next methods.

Before: https://imgur.com/jVf2JeB.png
After: https://imgur.com/u8SfNhy.png
Fixed: chromium:1368971
Change-Id: Ibf791167936c1ed28ac3240acb7c0846b11ebecb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925200
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83469}
2022-09-28 10:51:34 +00:00
Leszek Swirski
55f80c55f7 [maglev] Spill loop-extended lifetime nodes
Stop trying to be clever with reasoning around whether or not loop
lifetime extended nodes are loadable, and just spill them when they're
not.

Bug: v8:7700
Change-Id: I81389445e4479d72ea8f6b5ff7689baa7053d3d4
Fixed: chromium:1367678
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925202
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83468}
2022-09-28 10:31:14 +00:00
Adam Klein
36d38d9316 [wasm] Make stack-switching (JSPI) flag imply type reflection flag
Since JSPI doesn't work without type reflection, this ensures that
passing --experimental-wasm-stack-switching alone doesn't leave
developers (or users) in a broken state.

Bug: v8:12191
Change-Id: Idfabc39b7c9352dd20009924fda07504c4e5087b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3919913
Auto-Submit: Adam Klein <adamk@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83467}
2022-09-28 09:33:25 +00:00
Igor Sheludko
cd505b3258 Revert "[runtime] Invalidate XxxIteratorLookupChain protectors"
This reverts commit 178148045f.

Reason for revert: regresses JetStream2 a lot.

Original change's description:
> [runtime] Invalidate XxxIteratorLookupChain protectors
>
> ... when "return" property is added to respective iterator or might be
> added somewhere up the prototype chain.
>
> According to the iterator protocol the "return" callback must be
> called when iteration is aborted in the middle.
>
> Bug: chromium:1357318
> Change-Id: I36d81b90cfd40e417136ab97ec53ad7054f4df77
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3916630
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83427}

Bug: chromium:1357318, chromium:1368400, v8:13335
Change-Id: I8b14a2c47819a89d9b2c869a7bcb52e2c2457427
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925199
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83466}
2022-09-28 09:20:44 +00:00
jameslahm
031b98b25c [runtime] Clear array join stack when throwing uncatchable
... exception.

Array#join depends array_join_stack to avoid infinite loop
and ensures symmetric pushes/pops through catch blocks to
correctly maintain the elements in the join stack.
However, the stack does not pop the elements and leaves in
an invalid state when throwing the uncatchable termination
exception. And the invalid join stack state will affect
subsequent Array#join calls. Because all the terminate
exception will be handled by Isolate::UnwindAndFindHandler,
we could clear the array join stack when unwinding the terminate
exception.

Bug: v8:13259
Change-Id: I23823e823c5fe0b089528c5cf654864cea78ebeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878451
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#83465}
2022-09-28 07:40:55 +00:00
jameslahm
7f5daed62d [symbol-as-weakmap-key] Add tests to check weak collection size
... after gc.

This CL also adds a runtime test function GetWeakCollectionSize
to get the weak collection size.

Bug: v8:12947
Change-Id: I4aff39165a54b63b3d690bfea71c2a439da01d00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3905071
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#83464}
2022-09-28 07:20:24 +00:00
v8-ci-autoroll-builder
320edbee82 Update V8 DEPS (trusted)
Rolling v8/build: d344836..4f7a8d7

Rolling v8/buildtools: 7fca26a..f9d0f84

Rolling v8/buildtools/third_party/libc++/trunk: c23f69f..71619e7

Rolling v8/third_party/zlib: 8f22e90..cbb6b98

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

Change-Id: I9db8099c4b5766deb080f93e8af8498f38d7109f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3923757
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@{#83463}
2022-09-28 04:06:35 +00:00
Hao Xu
a8dc9ed235 [compiler] Fix left shift of negative value
Bug: chromium:1367589
Change-Id: I1ea095bdb58c35366188e09afd5f7169b77b0667
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921058
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#83462}
2022-09-28 01:37:35 +00:00
Milad Fa
c3b18c6fb4 PPC [liftoff]: implement simd add/sub saturate ops
Change-Id: Ie3d70edf787048982f20dce1725fbfe4611b8936
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3918711
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83461}
2022-09-27 20:54:34 +00:00
Frank Tang
de1d7b33d6 [Temporal] Clean up parser
Remove unused parser function/rule
ParseTemporalTimeZoneString and ParseTemporalCalendarString
were obsoleted by PR 2385 and 2394
in https://chromium-review.googlesource.com/c/v8/v8/+/3893552
https://chromium-review.googlesource.com/c/v8/v8/+/3901196

This cl is purely unused code removal.

Bug: v8:11544
Change-Id: Ib7ff4a3860cffa09afe7c7f6866f8dc526273f34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3917039
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83460}
2022-09-27 20:38:54 +00:00
Timo Teräs
0c1457ea28 Add postmortem metadata to access inlining info
Bug: v8:13306
Change-Id: I7c1ead9b60bae79f38535b982e7c49593d14fd15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3902524
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83459}
2022-09-27 19:39:04 +00:00
Pierre Langlois
aee072cbc3 [arm64] Enable CFI by default on Android and Linux.
The `v8_control_flow_integrity` build flag was already on by default in
Chromium on those platforms, by depending on
`arm_control_flow_integrity`. We should also turn it on by default when
building V8 standalone.

Co-authored-by: Richard Townsend <richard.townsend@arm.com>

Bug: v8:10026, v8:12963
Change-Id: I361a6426f44e569c08c763cf84a687ca70b89f08
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829068
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/main@{#83458}
2022-09-27 16:15:34 +00:00
Matthias Liedtke
e002faf111 [wasm-gc] Function body decoder: Fix dcheck in case of local with invalid heap type
Bug: v8:7748
Change-Id: I9d3e2245db4d98d370291ea86d615b355f2c941a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921518
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83457}
2022-09-27 15:07:34 +00:00
Dominik Inführ
0582087685 [heap] Request GC using Heap::CollectGarbageShared
This CL moves the code for requesting a GC from a non-main thread from
LocalHeap to Heap into CollectGarbageBackground().

The CL then makes use of this method in CollectGarbageShared() to
request a GC with --shared-space.

Bug: v8:13267
Change-Id: I2946cf5068ef8eb9eb99f9d396ac466d68abc7ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3916634
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83456}
2022-09-27 14:58:36 +00:00
Benedikt Meurer
c45a214cb5 [debug] Remove confusing destructuring statement positions.
This change removes the confusing statement positions that were
previously emitted for every binding identifier within both array
and object destructurings. These statement positions were reported as
breakable positions to the debugger front-end, and during stepping, the
debugger would also stop on them. This is confusing and very different
from how other expressions work (we don't emit statement positions
within expressions normally).

Instead we emit expression positions for the binding identifiers, which
are used to construct the source positions for stack traces. As a drive
by we also add the missing position (and test cases) for sub-patterns.

In particular this aligns the stepping and breakpoint behavior around
destructuring expressions with that of Firefox DevTools.

We also remove the original test cases, introduced with
https://codereview.chromium.org/1542813003 and
https://codereview.chromium.org/1533313002, which were written as
debugger tests, with new inspector tests that also ensure that the
call positions are correct.

Fixed: chromium:1368444
Bug: v8:811
Doc: http://go/chrome-devtools:destructuring-breakpoints-design
Change-Id: I4d53ad059b5eede73abd01d9bc9fdf8263c55c9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3916453
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83455}
2022-09-27 14:19:24 +00:00
Leszek Swirski
54e5675478 [maglev] Initialise known node aspects with Clone
Fix a bug where merge point known_node_aspects was initialised with
empty aspects instead of a clone of the current state.

Bug: v8:7700
Change-Id: Ibdde32197873b4c04e5884dd55f90ead4c1199e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3921519
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83454}
2022-09-27 14:06:34 +00:00