Commit Graph

73215 Commits

Author SHA1 Message Date
Tobias Tebbi
dc0a6365b6 [torque] add WasmInternalFunction to TaggedWithIdentity
Change-Id: I92479fe32ff4f55a0cf33c1d0898740e3f3cd5ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3406752
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78723}
2022-01-21 16:55:25 +00:00
Michael Lippautz
77be1c6027 factory: Move FeedbackVector construction to type
Drive-by: Avoid unnecessary memset and clean up Init().

Bug: v8:12559
Change-Id: I6a79f42dd62b47397d70f92efec3b569ca664c3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404097
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78722}
2022-01-21 16:20:36 +00:00
Andreas Haas
0a4081318f [wasm] Support externref returns in the generic wrapper
Externref does not need a translation from WebAssembly to JavaScript.
The return value can therefore just be forwarded to JavaScript.

R=thibaudm@chromium.org

Bug: v8:12565
Change-Id: I3b3ae37578c2793f6c09d1345f4ee555b40c853d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404779
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78721}
2022-01-21 16:04:35 +00:00
Clemens Backes
3643b9e7c5 [compiler] Fix spilling of SIMD registers on merge
This is similar to the previous SIMD spilling fixes, but this time at
block merges. The logic is similar to the existing cases, but not quite
the same. I did not find a nice way to unify the different locations
where we check for SIMD register overlap.

R=thibaudm@chromium.org

Bug: chromium:1283395, v8:12330
Change-Id: I5ab9b6831368cbce40b8368e4ec7954e985bff96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404780
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78720}
2022-01-21 15:59:36 +00:00
Andreas Haas
ca092440f3 [wasm] Deserialization should trigger FinishedTopTierCompilation event
The C-API does not support dynamic tiering and still waits for top-tier
compilation to finish before serializing code when the explicit
serialize() function gets called. This means that serialize() can only
finish if the kFinishedTopTierCompilation event was triggered first.
With this CL the kFinishedTopTierCompilation event is also triggered
after deserialization so that serialize() can work after
deserialization.

R=clemensb@chromium.org

Bug: v8:11024
Change-Id: I3dd14e37087e3cbfbc28cb5625c9f3715f6c236b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404773
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78719}
2022-01-21 13:21:36 +00:00
Marja Hölttä
d3dbd42615 [rab/gsab] RAB/GSAB support for TA.p.map
Bug: v8:11111
Change-Id: Ia84fe23c85b193bc7e31349eddc3705447795c33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400960
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78718}
2022-01-21 12:12:12 +00:00
Michael Lippautz
40db472a32 api: Remove deprecated write barrier API
Bug: v8:12356
Change-Id: Ib9e99c8b05e24a8983c5ff3d36ca534a262738a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404774
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78717}
2022-01-21 11:36:48 +00:00
Marja Hölttä
5ddf102904 [web snapshot] Serializer: construct the minimal source code
We used to serialize the full source code of the script being
serialized. This CL makes the source code maximally minimal (only
including the needed outer functions) while maintaining the "inner
function is textually inside its outer function" relationship.

Bug: v8:11525
Change-Id: Ic42772f7ecb76744bc11b97fa1784d847558e1f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401864
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78716}
2022-01-21 11:12:39 +00:00
Thibaud Michaud
999a791fe2 [wasm] Suspend wasm continuation
Save the PC in the jump buffer and implement the suspend builtin.

R=ahaas@chromium.org
CC=​fgm@chromium.org

Bug: v8:12191
Change-Id: I1a6d965d7864dce0a572f6c8d7102046dad190fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3345006
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78715}
2022-01-21 11:07:06 +00:00
Paolo Severini
7f26cbd291 [fastcall] Add Wasm entry for Fast API calls
Allow Wasm to generate calls directly to Fast API C functions.
This massively reduces the overhead of these calls (~300%).
Currently options parameter is not supported.

This is a reland of
https://chromium-review.googlesource.com/c/v8/v8/+/3364356
with a fix to a data race.

Bug: chromium:1052746
Change-Id: I8c1c255419496d03a94ec2b443329842469586d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398394
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78714}
2022-01-21 11:03:45 +00:00
Frank Tang
c987cf88fc [Temporal] Implement getters forwarding to calendar
Bug: v8:11544
Change-Id: I1a942badc31c0428e8eb07b7e2884f0aab803676
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3373930
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78713}
2022-01-21 05:15:48 +00:00
Dominik Inführ
116ca00f20 [execution] Move v8::Locker::WasEverUsed() flag into Isolate
So far this flag was process-global, so if one isolate used v8::Locker
all isolates were forced to use v8::Locker. With the shared isolate
now being a thing that routinely gets migrated between different
threads, all users of the shared isolate would be forced to use
v8::Locker. So we now store that flag on the isolate such that using
v8::Locker for the shared isolate does not affect other isolates.

Deprecate v8::Locker::WasEverUsed() at the same time.

Bug: v8:11708
Change-Id: I60531f084cc1b1b113620c46f5bed20511f52c26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401595
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78712}
2022-01-20 19:08:49 +00:00
Maya Lekova
3221e74a2e [test] Disable test timing out on gc_stress bot
Bug: v8:12561
Change-Id: I6910723a3a85df7ba3d49816e5e800cd4ee6bad6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404732
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78711}
2022-01-20 18:37:24 +00:00
Junliang Yan
065d2ee263 s390x: [baseline] Add scratch register to avoid overflow
Change-Id: I0d72b9c72e3a2244409dee6f4694c92ecb3d41b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3403043
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78710}
2022-01-20 18:29:59 +00:00
Junliang Yan
9cba145a41 s390x: [baseline] update JumpHelper
Change-Id: I6e20fa4ae24db6b799d854aef2ef98e7a8e1e552
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3403041
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78709}
2022-01-20 18:09:19 +00:00
Samuel Groß
4a3e41c5ca [sandbox] Implement GC for the external pointer table
The external pointer table is now managed by the GC, which marks entries
that are alive during major GC, then sweeps the table afterwards to free
all dead entries and build a free list from them. For now, only major GCs
are supported, Scavenger GCs do not interact with the external pointer table.

In more detail, garbage collection of the external pointer table works
as follows:

1. The external pointer table now reserves a large region of virtual
   address space for its backing buffer and is then never reallocated,
   only grown in place until the maximum size is reached.
2. When the GC's marking visitor marks a HeapObject with an external
   pointer as alive, it also marks the corresponding external pointer
   table entry as alive. This can happen on a background thread.
3. For that, it uses the MSB of each entry in the table to indicate
   whether the entry has been marked or not. This works because the MSB
   is always cleared during the AND-based type check performed when
   accessing an external pointer.
4. After marking, the external pointer table is swept while the mutator
   is stopped. This builds an inline, singly-linked freelist of all
   newly-dead and previously-free entries.
5. When allocating an entry from the table, the first entry on the
   freelist is used. If the freelist is empty, the table grows,
   populating the freelist with the new entries.
6. Every newly-allocated entry is marked as alive, and every store to an
   existing entry also automatically marks that entry as alive (by also
   setting the MSB). This simplifies the design of the table GC with
   regards to concurrency (See ExternalPointerTable::Mark).

Bug: v8:10391
Change-Id: I8877fdf5576af3761bde65298951bb09e601bd14
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3359625
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78708}
2022-01-20 17:39:49 +00:00
Liviu Rau
dc97b45058 Version 10.0
Change-Id: I5114f6975563a59c586c9a28711034cdd35a9b31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401870
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78707}
2022-01-20 17:18:59 +00:00
Nico Hartmann
362e265d4c Revert "[Torque] Generalize Torque literals to larger size"
This reverts commit 757830b02b.

Reason for revert: Speculatively revert due to a number of
performance regressions

Original change's description:
> [Torque] Generalize Torque literals to larger size
>
> Previously, literals in Torque were stored as double values, which
> made it impossible to precisely represent 64 bit integer values.
> This CL replaces the old literal expression with an integer and
> floating point literal expression that are unbounded in size. We
> allow implicit conversion of these literals to arbitary integer
> and floating point types respectively and insert a corresponding
> bounds check into generated CSA.
>
> Bug: v8:7793
> Change-Id: I46c231aab92bc2f0c26955d1876079f306b358c6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3329792
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78671}

Bug: v8:7793
Change-Id: I9896e28b3c69b8cf2488bf93e993ec320d8c5d2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401866
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78706}
2022-01-20 17:13:39 +00:00
Camillo Bruni
bbe2ef4cfd [web snapshot] Fix error reporting when running snapshots in d8
Bug: v8:11525
Change-Id: I5bc01779cbc7edf4f50377bc55a26dca1f96f5b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401587
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78705}
2022-01-20 16:52:59 +00:00
Nico Hartmann
abebfa68b3 Revert "[Torque] Fix compile error in integer-literal.h"
This reverts commit 83bf662901.

Reason for revert: Have to revert dependent CL

Original change's description:
> [Torque] Fix compile error in integer-literal.h
>
> Bug: v8:7793
> Change-Id: I88e6ea24909ba1dde8cada90d7b195b6f6ecc783
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400958
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78678}

Bug: v8:7793
Change-Id: I4e62d8d121c0585df15f47653c44569d0f6b5606
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401597
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78704}
2022-01-20 16:13:49 +00:00
Lutz Vahl
1d95b0b897 Revert "Version 9.10.0"
This reverts commit 519ee9d66c.

Reason for revert: Need to adjust to 10.0

Original change's description:
> Version 9.10.0
>
> Change-Id: I1be4d945e1ba2c1816b5fd335e7fe08eb4aca4c1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404534
> Reviewed-by: Lutz Vahl <vahl@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78702}

Change-Id: I2f6f8b64123d477f7c982e2623aca43fc8b245ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404771
Auto-Submit: Lutz Vahl <vahl@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78703}
2022-01-20 15:55:49 +00:00
V8 Autoroll
519ee9d66c Version 9.10.0
Change-Id: I1be4d945e1ba2c1816b5fd335e7fe08eb4aca4c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404534
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78702}
2022-01-20 15:50:29 +00:00
Dominik Inführ
9ec7c67c06 [heap] Split MarkCompactCollector::PrepareRecordRelocSlot
Split method into ShouldRecordRelocSlot and ProcessRelocInfo.
ProcessRelocInfo can then be reused in the write barrier and in the
future for the OLD_TO_SHARED remembered set. SlotTypeForRelocInfoMode
got moved into ProcessRelocInfo.

In addition rename and document SlotTypes. This CL does not change
behavior.

Bug: v8:11708
Change-Id: Iff712e7e6f5d3a4da64510b67b604b9e04998361
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400968
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78701}
2022-01-20 14:15:49 +00:00
Maya Lekova
a4dfe37785 [test] Disable slow mozilla tests on Windows
Bug: v8:12558
Change-Id: Ib615c192a0ec6bc7c8ee8b0ee0f393092a5dedb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401590
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78700}
2022-01-20 13:45:29 +00:00
Milad Fa
e71892a747 heap: fix endianness issue with PopulateEmbedderDataSnapshot
Need to reverse the index on big endian platforms due to
this previous change: https://crrev.com/c/1508572

Change-Id: I12e0230d929f5f16ecd2300a49970f92b0d3be50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3402363
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78699}
2022-01-20 13:36:10 +00:00
Jakob Gruber
0a6c1a778a Remove the turboprop implementation
Bug: v8:12552
Change-Id: I99e4d8e8aeba5460f11e54cc1b2bcaea98a5276d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400964
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78698}
2022-01-20 12:31:39 +00:00
Samuel Groß
f82b30cef9 [base] Introduce fast path for AddressSpaceReservation::Allocate
In case the requested permissions are kNoAccess, nothing needs to be
done as the mapping backing an AddressSpaceReservation is always
mapped kNoAccess. This fixes a performance regression on macOS.

Bug: chromium:1287599
Change-Id: I77d80489caf477e29434f9d0a06899746cb9403f
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398144
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78697}
2022-01-20 12:30:29 +00:00
Liviu Rau
cab1c91c3e Consolidate arguments that change together on branch cut
Bug: v8:12405
Change-Id: I00f727ad5172d08f430b5dc2b7a348cbec344c4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401721
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78696}
2022-01-20 11:20:09 +00:00
Jochen Eisinger
d4dd9cd68b Reassign some old TODOs to folks currently working on the respective code
Change-Id: I8fd11742c4ea13cfd5cd3864e167785b97f1383a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404274
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78695}
2022-01-20 10:44:39 +00:00
Maya Lekova
ff2005b72f [test] Disabling js1_5 tests timing out on Windows
Bug: v8:12558
Change-Id: If5f8048d1a48719329c257282195f5096e101512
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401586
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78694}
2022-01-20 10:42:19 +00:00
Samuel Groß
972e226543 [base] Fix bugs in AllocateInternal on Fuchsia
This CL fixes two issues:

1) When the specified vmar_offset was zero, the previous logic would
   incorrectly conclude that no target address was specified, and would
   potentially place the allocation elsewhere in memory, not at the
   desired address. This CL now passes both the target address and the
   VMAR base address to AllocateInternal, which can then correctly
   determine whether a target address was supplied.

2) When the root_vmar was used and a hint specified, the previous logic
   would incorrectly use nullptr as base address of the root_vmar, which
   appears to be incorrect. The new logic now obtains the actual base
   (apparently 2MB) through zx_object_get_info during initialization.

Bug: v8:10391
Change-Id: Ia8215440a790b4a2a0c8d33f623d3ecb6a731a97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398506
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78693}
2022-01-20 10:36:23 +00:00
Jakob Gruber
2edff88402 [regexp] Standardize handling of stack overflow crash in ToNode
Use the FatalProcessOutOfMemory function such that tooling recognizes
these crashes as OOM's.

Drive-by: Skip one more test that leads to such stack overflows.

Fixed: v8:12555, chromium:1288456
Bug: v8:12472
Change-Id: Ib9203a4aa0487744f7cea9a212aeeffda579ae23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401861
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78692}
2022-01-20 09:04:59 +00:00
Lu Yahan
5218f60962 [riscv64][cleanup] Remove condition based on kJSArgcIncludesReceiver
Port commit db9f6bff77

Bug: v8:11112

Change-Id: I6c69e0501cae6c46e723d847bf56e69bb4835bec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398260
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#78691}
2022-01-20 08:50:20 +00:00
v8-ci-autoroll-builder
b1cf441bc1 Update V8 DEPS.
Rolling v8/base/trace_event/common: 7f36dbc..d115b03

Rolling v8/build: f3be6e8..841e388

Rolling v8/buildtools/third_party/libc++abi/trunk: 94855f7..7d79126

Rolling v8/buildtools/third_party/libunwind/trunk: 57e4aff..efb2cbd

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f92a0a2..8bc3659

Rolling v8/third_party/depot_tools: cb340f5..a657331

Rolling v8/third_party/googletest/src: c9643a2..100f6fb

Rolling v8/tools/luci-go: git_revision:d1e877e2b3e5a05a5cd34c4a340fedba14a16c2b..git_revision:5b02a4aaeb5fd78d6fe41d6d54d1cb58da17f192

Rolling v8/tools/luci-go: git_revision:d1e877e2b3e5a05a5cd34c4a340fedba14a16c2b..git_revision:5b02a4aaeb5fd78d6fe41d6d54d1cb58da17f192

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

Change-Id: Ic20a71114072b6240b0ba01252ed9cd562395b80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3402380
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@{#78690}
2022-01-20 03:53:13 +00:00
Seth Brenith
9b971960db Add snapshot test for JSWeakRef and FinalizationRegistry
This is a regression test for the fixes in
https://crrev.com/c/v8/v8/+/3299592 . Some of the helper functions were
copied from console-retaining-path.js in the same directory.

Bug: v8:12112
Change-Id: I3c313ad003ede5e5036f886161e1d164c98f87fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400149
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#78689}
2022-01-19 23:47:39 +00:00
Milad Fa
272e26af02 [api] Fix compilation error with gcc
enum values need to be explicitly casted to int type to
prevent the following error:
```
expects argument of type 'int', but argument 3 has type
'v8::internal::{anonymous}::V8StartupState'
```

Bug: v8:12309
Change-Id: I9515cde7d2496ca070ce4c6b751501236864730b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401398
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78688}
2022-01-19 17:56:09 +00:00
Shu-yu Guo
2afb952d30 [parser] Fix scope of super properties in heritage position
super.property accesses in heritage positions like `class C extends
super.property` should resolve super in the current scope, not C's
class scope.

Bug: chromium:1282096
Change-Id: I7ef815bc02cfff35a2898ef9f39b133d1114046c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400150
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78687}
2022-01-19 16:59:00 +00:00
Manos Koukoutos
447af8647d [wasm] Create less Handles in UpdateDispatchTables
- Do not create a new handle for {target_instance}.
- Only instantiate FunctionTargetAndRef once.

Bug: chromium:1284557
Change-Id: I42aea5750e93ef4ac578003bca323cda4753b6f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3395874
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78686}
2022-01-19 16:53:09 +00:00
Scott Violet
eb5c09c839 removes two snapshot related histograms
The experiment has been would down, so these can be removed.
This effectively reverts these two commits:

https://chromium-review.googlesource.com/c/v8/v8/+/3271389
https://chromium-review.googlesource.com/c/v8/v8/+/3256006

chrome side here:
https://chromium-review.googlesource.com/c/chromium/src/+/3399313

BUG=chromium:1257321
TEST=none

Change-Id: I5e9e4e7f56a6f19159d1c8c20c5a1fe5ed2859fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3399226
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78685}
2022-01-19 16:37:21 +00:00
Andreas Haas
d776fd9d21 [factory] Initialize bit fields in InitializeMap earlier
The method SetInstanceDescriptors accessed the bit field before it got
initialized, which is undefined behavior.

R=cbruni@chromium.org

Change-Id: Ie17e6e840a9a4278e066278d1ce81ac4b836a429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400970
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78684}
2022-01-19 15:58:26 +00:00
Dominik Inführ
0c4a512d06 [heap] host object is always non-null in PrepareRecordRelocSlot
Bug: v8:11708
Change-Id: I83c9559bb2aee062a53c1d67c293b8f6654c7d99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400965
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78683}
2022-01-19 15:21:49 +00:00
Al Muthanna Athamina
19c6fd7351 Increase shards for test262 on V8 Linux64 ASAN
Change-Id: I9499aacb4ddf4bc2afc3c72666910b4ad756cfc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400969
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78682}
2022-01-19 15:07:49 +00:00
Marja Hölttä
2eb253764f [rab/gsab] Re-enable serializing flags with ValueSerializer
Also:
- Refactor the ValueSerializer tests using raw data, so that we test all
valid versions for each test (not only one hard-coded one)
- Mark some tests as backwards compatibility tests, to make it less
likely that somebody updates them not realizing they are backwards
compatibility tests.

Bug: v8:11111, v8:12532
Change-Id: I670849de07742c8d442249ef4f013781e4ee9255
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386802
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78681}
2022-01-19 12:45:39 +00:00
Al Muthanna Athamina
b601d6bbc0 Increase shards for test262 on V8 Linux64 - debug
Change-Id: I47ff2062a8f9fbb52f1760a47ebfdc0d2c035900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400963
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78680}
2022-01-19 12:36:50 +00:00
Camillo Bruni
518d217a0e [api] Ensure correct startup and shutdown order
The startup and shutdown order is as follows:

  v8::V8::InitializePlatform(platform);
  v8::V8::Initialize();
  v8::Isolate* isolate = v8::Isolate::New(...);
  ...
  isolate->Dispose();
  v8::V8::Dispose();
  v8::V8::DisposePlatform();

Bug: v8:12309
Change-Id: I043c19173e36b08b02677081a8f14c2b313f6891
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300129
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78679}
2022-01-19 12:19:19 +00:00
Nico Hartmann
83bf662901 [Torque] Fix compile error in integer-literal.h
Bug: v8:7793
Change-Id: I88e6ea24909ba1dde8cada90d7b195b6f6ecc783
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400958
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78678}
2022-01-19 10:45:49 +00:00
Manos Koukoutos
069d62ebb8 Reland "[wasm] Various small cleanups/fixes"
This is a reland of f1c2a2089d

Changes compared to original:
Revert test change which used simd and caused problems in multiple test
configurations.

Original change's description:
> [wasm] Various small cleanups/fixes
>
> Changes:
> - Fix a bug in objects-printer where array elements were not treated as
>   tagged pointers.
> - Fix a few TODOs, mainly in the wasm interpreter.
> - Improve documentation, small refactorings.
>
> Change-Id: I1d70ad454b3a0693b9b784b17395434d81d01b61
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383136
> Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78656}

Change-Id: I91f4fed5fbc91acb8b42413a6f40a8202bd43096
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3398111
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78677}
2022-01-19 10:40:44 +00:00
Simon Zünd
1f53cbf197 [inspector] Add Runtime#getExceptionDetails CDP method
CDP has a "ExceptionDetails" structure that is attached to various
CDP commands, e.g. "Runtime#exceptionThrown" or "Runtime#evaluate".
The stack trace in the "ExceptionDetails" structure is used in
various places in DevTools. The information in the "ExceptionDetails"
structure is extracted from a v8::Message object. Message objects
are normally created at the exception throw site and may augment
the error with manually inspecting the stack (both to capture a fresh
stack trace in some cases, as well as to calculate location info).

The problem is that in some cases we want to get an "ExceptionDetails"
structure after the fact, e.g. when logging a JS "Error" object in
a catch block. To help in this case, this CL introduces a new
CDP method "Runtime#getExceptionDetails" that behaves exactly as
advertised: It provides a populated "ExceptionDetails" structure
from a JS Error object.

R=bmeurer@chromium.org

Doc: https://bit.ly/runtime-get-exception-details
Bug: chromium:1278650
Change-Id: I084be10c1d852d3b7cac8d88e7f820e867be4722
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3337258
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78676}
2022-01-19 09:38:31 +00:00
Dominik Inführ
1511a19d5a [heap] Verify skipping of write barriers for maps
We recently landed write barrier verification in
https://crrev.com/c/3386803. This CL adds verification to
set_map_no_write_barrier and similar methods as well.

Bug: v8:12544
Change-Id: I54844b0323731281b4f41fd1502acdd44557a2c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3395561
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78675}
2022-01-19 08:29:28 +00:00
Frank Tang
261ad0d5c2 [Temporal] Implement getters which forward to timeZone
get Temporal.ZonedDateTime.prototype.(hour|minute|*second)

Bug: v8:11544
Change-Id: I5f3d20f371db4898365876483c49df73d96f3728
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3373927
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78674}
2022-01-19 06:51:20 +00:00