Commit Graph

75035 Commits

Author SHA1 Message Date
Lu Yahan
07a76e3784 [riscv64] Implement emit_s128_relaxed_laneselect
Port commit bd22e3bec0

Bug: v8:12284

Change-Id: I72ba5cfe221693125c366e7fcbc31dc936d18a16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647968
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80543}
2022-05-16 09:29:06 +00:00
Dominik Inführ
34da5f5b5b Reland^3: [heap] Store size with invalidated object
This is a reland of commit 2b79eefed3

A DCHECK was using map[key] and inadvertently inserted into the map
that way.

Original change's description:
> Reland^2: [heap] Store size with invalidated object
>
> This is a reland of commit 23b2d571a7
>
> When updating pointers during a full GC, a page might not be swept
> already. In such cases there might be invalid objects and slots
> recorded in free memory. Updating tagged slots in free memory is fine
> even though not strictly necessary.
>
> However, the GC also needs to calculate the size of potentially dead
> invalid objects in order to be able to check whether a slot is within
> that object. But since that object is dead, its map might be dead as
> well which makes size calculation impossible on such objects. The CL
> changes this to cache the size of invalid objects. A follow-up CL will
> also check the marking bit of invalid objects.
>
> Reason for reverts:
>
> Revert #2: In-object slack tracking on JSObjects doesn't update the
> cached size of invalidated objects. The fix here was to stop
> invalidating recorded slots on JSObjects at all and avoid that problem
> completely (see https://crrev.com/c/3620274).
>
> Revert #1: Not all size changes go through NotifyObjectLayoutChange, so
> https://crrev.com/c/3607992 introduced NotifyObjectSizeChange as a
> bottleneck for object size changes/right-trimming. This method is
> now used to update the size of invalidated objects.
>
> Bug: v8:12578, chromium:1316289
> Change-Id: I0478d04601c0270ddb39419ca6cf98719951eb4d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623542
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Reviewed-by: Patrick Thier <pthier@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80344}

Bug: v8:12578, chromium:1316289
Change-Id: Ibcc04c209213c584860a7c473082526cb4e53c59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627635
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80542}
2022-05-16 09:25:16 +00:00
Marja Hölttä
36565f6b5c [rab/gsab] Fix memory size computations close to size_t limit
Bug: v8:11111,v8:1321980
Change-Id: I4dead5d50a2e1a9c1011c16d13aad2722598e456
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642297
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80541}
2022-05-16 09:13:38 +00:00
Clemens Backes
18eaf0172e [base] Fix compiler warning on empty FormattedString
GCC complains about empty format strings, and also clang already
required special-handling for this case.
We could either drop it, since statically empty strings are not that
useful anyway, but for completeness I fix it via "if constexpr" instead.

R=tebbi@chromium.org

Bug: chromium:1323177
Change-Id: I4d59e1b361afd1edcd552e8a9ce395759646e67f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644433
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80540}
2022-05-16 09:00:06 +00:00
Toon Verwaest
b24ac6a242 [maglev] Split GapMove in two classes, and some cleanup
Bug: v8:7700
Change-Id: If4a9293649a15816504d2a9544484b67aa2b2fa1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644791
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80539}
2022-05-16 08:56:56 +00:00
Nikolaos Papaspyrou
36610bbdd7 heap: Recalculate the object start bitmap if needed
This CL adds to the existing experimental implementation of the
object start bitmap, that is evaluated as a mechanism for resolving
inner pointers (behind the flag v8_enable_conservative_stack_scanning).

It fixes method ObjectStartBitmap::FindBasePtr to ensure that the
correct base pointer is returned, even if the bitmap is not fully
populated (e.g., with object evacuation or inline object allocation).
This method now recalculates the part of the bitmap that is
required for returning the correct result, by iterating through
objects of the page. A special constructor has been introduced to the
PagedSpaceObjectIterator for this purpose.

It also moves the existing inline methods of ObjectStartBitmap to a
new -inl.h header file, to avoid circular dependencies.

Bug: v8:12851
Change-Id: Iabd0df020bee3bb63ef9d4888591b25d24d79dd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641179
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80538}
2022-05-16 08:48:56 +00:00
Camillo Bruni
f6c8cd8dac [log] Rename LogEventDispatcher to Logger
Next steps: Move general code from V8FileLogger to Logger

Bug: v8:12795, chromium:1316443
Change-Id: I66e0d7d3908a2a24cd1cf3858834bd57314754b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637795
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80537}
2022-05-16 07:35:16 +00:00
Lu Yahan
fc2b353c65 [riscv64] fix build error
Change-Id: Ifaaa87234ab48869e828ba99e96de0d372538e81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647967
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80536}
2022-05-16 04:01:07 +00:00
Michael Lippautz
008c488889 [api] Advance deprecations around global handles
Forward deprecations of methods that are not supported anymore.

Bug: v8:12819
Change-Id: I304ff159fa7e3936b5b12a5e43bb2a580576dd4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644792
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80535}
2022-05-15 19:45:15 +00:00
Simon Zünd
9ca7491b35 Reland "[inspector] Re-enable Debugger#restartFrame"
This is a reland of commit 8278cb5015

The reland adds the RestartFrameTrampoline to the list of
builtins that the deoptimizer is allowed to return from for
control flow integrity.

Original change's description:
> [inspector] Re-enable Debugger#restartFrame
>
> Doc: https://bit.ly/revive-restart-frame
>
> This CL "undeprecates" Debugger#restartFrame and adds a new optional
> "mode" parameter for back-wards compatibility. Moreover, the return
> values are all deprecated. They were never actually used in the
> DevTools frontend and the same information is available from the
> Debugger#paused event that fires once execution stops at the
> beginning of the restarted function.
>
> The CL also re-baselines all the restart-frame inspector tests that
> now run successfully.
>
> R=bmeurer@chromium.org, kimanh@chromium.org
>
> Bug: chromium:1303521
> Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80491}

Bug: chromium:1303521
Change-Id: I13e2f8b5011795a38e541310622b8333a3d08049
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644624
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80534}
2022-05-14 09:32:14 +00:00
Clemens Backes
16d948312f Fix MSVC compilation of FormattedStringTest
MSVC does not implicitly convert the std::array iterator to a char*,
hence explicitly use the {data()} accessor instead of {begin()}, which
is cleaner anyway.

R=mlippautz@chromium.org

Bug: chromium:1323177
Change-Id: I65c6836889eb57a18b655cb9e6c98008a8fbcaac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644794
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80533}
2022-05-13 17:46:23 +00:00
Camillo Bruni
1fcfc6a6d9 [arm][arm64] Fix --trace-osr
Read only a single byte of FLAG_trace_osr in assembly builtin code to
make asan happy in the simulator.

Bug: chromium:1324042
Change-Id: I002cea0b4917af3780d6bdedfb0ec55008e146c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644793
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80532}
2022-05-13 17:38:24 +00:00
Leszek Swirski
e0d0fa2dec [maglev] Disable on TickLines test
This test tests the interpreted/baseline and optimized behaviour of cpu
profiler ticks. We should eventually support this for maglev too, but
for now just disable it.

Bug: v8:7700
Change-Id: Iba89ab2c718025ebf90c86a84ed937c2d1d0af7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647363
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80531}
2022-05-13 16:25:34 +00:00
Samuel Groß
6f5f5662cc [sandbox] Turn V8_SANDBOX into V8_ENABLE_SANDBOX
This is more consistent with similar features, for example
V8_ENABLE_WEBASSEMBLY or V8_ENABLE_MAGLEV.

Drive-by: remove V8_SANDBOX_IS_AVAILABLE as it's no longer needed.

Bug: v8:10391
Change-Id: I8658c5b0c331a4c73892737083b2c2f9b8f84056
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/+/3647355
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80530}
2022-05-13 16:23:23 +00:00
Clemens Backes
fa8c5950e0 [base] Introduce FormattedString
This introduces a class which can be used for formatting dynamic values
into a constant-size, stack-allocated array. You get ostream-style code
but printf-style performance, and in particular no dynamic allocation.
This makes this class also suitable to be used in OOM or other fatal
situations where we cannot rely on dynamic memory allocation to still
work.

Using FormattedString will automatically compute the format string
depending on the types. It also computes the maximum size of the output.
Last but not least, it makes the code a lot more readable than
traditional printf style printing.

R=mlippautz@chromium.org

Bug: chromium:1323177
Change-Id: I47228b3603c694c1fa23516dd3f1c57e39c0ca35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644622
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80529}
2022-05-13 16:20:43 +00:00
Dominik Inführ
119443fc9f [heap, deoptimizer] Do not invalidate slots in materialized objects
We initialize the JSObject in the payload of a ByteArray, so we know
that no slots were recorded there. This also means we don't need to
remove any recorded slots and thus invalidation isn't required.

With this change only strings use object slot invalidation on
String::MakeExternal.

Bug: v8:12578
Change-Id: I009635c2a61ae8ff2b9e2480cb7d374451a8cc7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644614
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80528}
2022-05-13 16:15:03 +00:00
Toon Verwaest
30efa3150b [maglev] Don't spill constants but load them on-demand
This avoids unnecessary spill moves and reduces register pressure.

Bug: v8:7700
Change-Id: I3f2c35f2b6c0a3e64408b40d59696d924af8a9b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647365
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80527}
2022-05-13 14:48:23 +00:00
Andy Wingo
59518b083a [stringref] Add stringref type, section, feature flag definitions
Bug: v8:12868
Change-Id: I69e149aa607ee77dd00267a0bbe4e5828dceb75e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647350
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80526}
2022-05-13 14:28:43 +00:00
Leszek Swirski
8bba185fe5 [maglev] Initialize loop merge to uninitialized predecessor
Explicitly initialize the loop merge's back-edge predecessor to a
specfic "uninitialized" value, distinct from nullptr (which marks dead
loops) and done in both debug and release modes.

Bug: v8:7700
Change-Id: I6a845cc4dbd7da75954f78607e69a5d4e2ec1ec7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645114
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80525}
2022-05-13 14:08:24 +00:00
Clemens Backes
dd74a0232c Replace STATIC_ASSERT with static_assert
Now that we require C++17 support, we can just use the standard
static_assert without message, instead of our STATIC_ASSERT macro.

R=leszeks@chromium.org

Bug: v8:12425
Change-Id: I1d4e39c310b533bcd3a4af33d027827e6c083afe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647353
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80524}
2022-05-13 13:46:27 +00:00
Andy Wingo
94ba69011e [stringref] Add tests that stringrefs are unsupported by default
Bug: v8:12868
Change-Id: I9008da5f89c4c18ea45ddbe44cae832087c76b01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647349
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80523}
2022-05-13 13:44:24 +00:00
Andreas Haas
3970c447de [wasm] Fix loop condition in serialization
JobDelegate::ShouldYield() should not be called anymore after it has
already returned true. This CL changes the deserialization of
WebAssembly to remember when ShouldYield() returned for the first time,
and does not call ShouldYield() afterwards anymore.

R=thibaudm@chromium.org

Bug: chromium:1277962
Change-Id: Ie84abf30b20d302a19f3192c3859796be1cccd97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647361
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80522}
2022-05-13 13:08:43 +00:00
Anton Bikineev
2c40f3af4f cppgc: Speed up pointer decompression
With this CL, the decompression simply becomes:
       movsxd  rax, edi
       add     rax, rax
       and     rax, qword ptr fs:[base@TPOFF]

Bug: chromium:1325007

Change-Id: I931e4e667a9b9697671bccf14575420f8cb705e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629871
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80521}
2022-05-13 12:38:43 +00:00
Marja Hölttä
24286b8e24 Revert "[rab/gsab] Temporarily stage --harmony-rab-gsab to enable fuzzing"
This reverts commit b8f88be06e.

Reason: disabling an experimental feature in release branch

Bug: v8:11111,v8:12870
Change-Id: I6fbd6bdb318c0d25e69c04db208a0d5f2b9ebbd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647357
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80520}
2022-05-13 12:28:53 +00:00
Leszek Swirski
270c2d7169 [maglev] Keep BytecodeArray alive via deopt literals
Do the same trick as TurboFan, keeping the BytecodeArray alive by
holding it strongly in the deopt literals.

Bug: v8:7700
Change-Id: I8f8472674b08df3ca18aff58172e7ba83d09a620
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647358
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80519}
2022-05-13 11:54:04 +00:00
Anton Bikineev
19b6e5f468 cppgc: Introduce pointer compression based on thread-local base
With caged heap enabled, we can halve Member<> by storing only the least
significant half. The base of the heap is stored in a thread local
variable. The feature has therefore an implication that only single heap
is allowed per thread.

The feature is gated by the new GN arg:
  cppgc_enable_pointer_compression.

Bug: chromium:1325007

Change-Id: Ic7f1ecb7b9ded57caad63d95bbc8e8ad6ad65031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739979
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80518}
2022-05-13 11:15:43 +00:00
Clemens Backes
5d48c41f42 Remove redundant (internal) FatalProcessOutOfMemory
Use V8::FatalProcessOutOfMemory directly instead.

R=mlippautz@chromium.org

Bug: chromium:1323177
Change-Id: Ib1efd9e8099c76cd9ae0ac412b2e37307a698f4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641176
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80517}
2022-05-13 11:04:13 +00:00
Patrick Thier
d7e08eb3b8 Enable --always-use-string-forwarding-table behind --future
We temporarily enable the StringForwardingTable for all ThinString
transitions behind --future to get coverage and performance numbers from
future bots.

Bug: v8:12007
Change-Id: Ia59bd6c40df2fd413867f6fc2aa7f69d099b5377
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637799
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80516}
2022-05-13 10:17:33 +00:00
Al Muthanna Athamina
ad126104f1 Skipping benchmarks/octane/typescript on NumFuzz until the issue is fixed
NOTRY=true

Bug: v8:12445
Change-Id: I67bd72e2369ffc0e4afc75e0436d80d3c5c0fae2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632101
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80515}
2022-05-13 09:45:18 +00:00
jameslahm
557cc8a464 [web snapshot] Add support for double array
This CL adds serialization and deserialization for
packed double array and holey double array.

Bug: v8:11525
Change-Id: Idce22e1c5d707e45127ae972587c6b7808ca2cda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640751
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80514}
2022-05-13 09:22:45 +00:00
Frank Tang
4819584a2c [Temporal] Implement the iso8601 part of Calendar.prototype.era(Year)?
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.era
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.erayear

Notice this only implement the "iso8601" calendar and we will implement the
code for other calendar later by calling ICU with other Calendar methods.
This CL reduce the differences of testing result between ALWAYS and no_i18n
because the code in no_i18n will not call Calendar era or eraYear and therefore
passed the test even w/o this CL but the ALWAYS tests will cause Temporal
object to internal call era and eraYear and therefore fail if w/o this CL.

Bug: v8:11544
Change-Id: I921fbfbbd26473c238024161eb58b096c38b881b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641938
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80513}
2022-05-13 09:01:23 +00:00
Leszek Swirski
a9f802859b [maglev] Add marker for maglev frames
Doesn't do much at the moment beyond not being a baseline frame. Fixes a
DCHECK in tiering that checks the frame type, by removing the frame
lookup there (which wasn't necessary anymore).

Bug: v8:7700
Change-Id: Icecfe27771923d380a7d1dc1c29aa9c5c9dfbf0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644618
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80512}
2022-05-13 08:49:05 +00:00
Dominik Inführ
e0fa71643b [heap] Only mark object immediately when invalidating slots
We use the invalidate_recorded_slots argument to signal to NotifyObjectLayoutChange whether a particular object layout change
could cause a tagged pointer to be replaced with an untagged value.
In such cases we need our snapshot protocol in order to allow marking
such objects concurrently.

The snapshot protocol consists of two main operations:
  1) Tracing and marking the object black on the main thread before
     performing the unsafe transition.
  2) The concurrent marker needs to read such objects into a buffer
     first and is only allowed to trace it when successfully marking
     that object black.

However, in some cases we were still doing 1) on the main thread when
the concurrent marker didn't use 2) the snapshot buffer anymore. This
CL cleans up this behavior and ensures that 1) and 2) are always paired
together.

Bug: v8:12578
Change-Id: Id83b3de866a80efedf4a72e440cbc767fe3eaea6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644611
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80511}
2022-05-13 08:48:03 +00:00
Leszek Swirski
9df34f4d32 [maglev] Save registers across interrupt
The budget interrupt in maglev can clobber registers. We need to save
the caller-saved registers before making this call.

Additionally, move the interrupt call into deferred code, and only emit
the interrupt check + call for returns and backwards jumps (i.e. things
that reduce the budget).

Bug: v8:7700
Change-Id: I277e9fdf454ff0f22bf20e7cf9538e3020403c1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644619
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80510}
2022-05-13 07:59:14 +00:00
Michael Achenbach
58d930221e [build] Fix bazel build
Port GN changes in https://crrev.com/c/3596671

No-Try: true
Change-Id: I4d9571ce0d5abcae56a370986db1104e5429b348
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647347
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80509}
2022-05-13 07:16:26 +00:00
Lu Yahan
3d5e5f18e0 [riscv64] Add macro to control disassemble rvv
Change-Id: Iad4b34b1c4a85800e8e1d6c01b686dd19e8116a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600532
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80508}
2022-05-13 06:22:23 +00:00
Lu Yahan
ee1a364f0a [riscv64] Implement relaxed_i16x8_q15mulr_s
Port commit fe443a4e1f

Bug: v8:12284

Change-Id: I19ba180ecc7cd0e5a3b6e5009cc2b8c40074399a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642243
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80507}
2022-05-13 02:33:30 +00:00
Seth Brenith
c8848cf493 Refactor CompilationSubCache
CompilationSubCache has some complexity regarding generations of tables
which is only used by one subclass, CompilationCacheRegExp. This change
adjusts the class hierarchy so that classes only contain the necessary
member functions.

Bug: v8:12808
Change-Id: I4f4cf15bbf9b80c2de0c18aea82a0c238804759d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629603
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80506}
2022-05-12 22:05:53 +00:00
Tobias Tebbi
b16d2a4e2f [wasm] add experimental string/Wasm GC array conversion fast-path
This CL adds two experimental JS builtins to convert between
i16 Wasm GC and JS strings. This is a non-standard experimental
feature only available with the flag --wasm-gc-js-interop.

WebAssembly.experimentalConvertArrayToString(array, start, count)
Convert the `count`-many WTF-16 code units starting at index `start`
into a JS string. Throws a TypeError if `array` is not an i16 array,
or if `start` and `count` are not numbers or not in range.

WebAssembly.experimentalConvertStringToArray(string, sampleArray)
Convert `string` to an i16 array. The `sampleArray` parameter needs
to be an arbitrary i16 array, which is only used to extract the rtt.
Throws a TypeError if `string` is not a string or `sampleArray` is not
an i16 array.

Change-Id: I7ac2f6bd89b8f638427f61da1bb01ccba90d735b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642301
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80505}
2022-05-12 20:12:53 +00:00
Deepti Gandluri
334cc5f8d6 [wasm-relaxed-simd][liftoff] Enable relaxed LaneSelect on Arm/Arm64
Bug: v8:12284
Change-Id: Ica2564e8b34f8edd9492ef379cf3a3eb5575633d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642948
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80504}
2022-05-12 19:49:33 +00:00
Omer Katz
8a83325cfe [heap] Split NewSpace::Verify
Bug: v8:12612
Change-Id: Ib24496c1a3789ced50431818874e27886e92a909
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644616
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80503}
2022-05-12 18:31:53 +00:00
Deepti Gandluri
6a9c8553f9 [wasm-relaxed-simd] Enable relaxed swizzle tests on all platforms
Bug: v8:12284
Change-Id: I7f6a4a5182ad61dfdc13faf2ced99fba7d64c9c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640926
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80502}
2022-05-12 18:25:52 +00:00
Chong Gu
2eaf6205ed [Fuchsia] Deprecate fuchsia_package_runner
Change-Id: Id6c520cd3cc6218fb32fea2c82b0ff8985e2b58e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627012
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Chong Gu <chonggu@google.com>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80501}
2022-05-12 18:07:18 +00:00
Jakob Kummerow
8f3581125a [wasm-gc] Fix instantiation of modules with no types
Fixed: v8:12866
Change-Id: Icba2ffc7837bf4942fd4bc741abeb7c98694c2d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644607
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andy Wingo <wingo@igalia.com>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80500}
2022-05-12 17:48:17 +00:00
Junliang Yan
26d0ca4112 ppc64: [baseline] replace GetSharedFunctionInfoBytecode
Change-Id: I933301cf9b81ef6a5cc5ec891611464a1e0a1e48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645029
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80499}
2022-05-12 17:22:43 +00:00
Omer Katz
f00727d2d0 [heap] Make PagedSpace::Verify* methods const
Bug: v8:12612
Change-Id: I47bf134a9ff57a5c4ace9d35bf023a1c5e248896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644615
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80498}
2022-05-12 16:54:53 +00:00
Deepti Gandluri
8709819285 [wasm-simd][Arm]Prototype Relaxed Rounding Q-format Multiplication
Bug: v8:12284
Change-Id: I9d8f9da8ed736d5119e7af4354e1ddd8a255713d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640925
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80497}
2022-05-12 16:40:21 +00:00
Igor Sheludko
83f03eef26 Revert "Reland "[rwx][mac] Enable fast W^X on Apple Silicon (M1)""
This reverts commit 411a015758.

Reason for revert: crbug.com/1324829 (Canary crashes)

Original change's description:
> Reland "[rwx][mac] Enable fast W^X on Apple Silicon (M1)"
>
> This is a reland of commit e8cac3776e
> Broken jitless mode is fixed in a separate CL.
>
> Original change's description:
> > [rwx][mac] Enable fast W^X on Apple Silicon (M1)
> >
> > Bug: v8:12797
> > Change-Id: I53bb803dd77db5bdd42b1a1b4b568e63857adf31
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598861
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Igor Sheludko <ishell@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#80396}
>
> Bug: v8:12797
> Change-Id: I5436ceced5d4673f3b80d9cacdb3d6e84012c6e7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635720
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80450}

Bug: v8:12797
Change-Id: If776ccb6ce9f41a84b94409ec5cae91c0915f129
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644620
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80496}
2022-05-12 16:39:19 +00:00
Francis McCabe
c31105569f Revert "[inspector] Re-enable Debugger#restartFrame"
This reverts commit 8278cb5015.

Reason for revert: breaking https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20CFI/10778/overview

Original change's description:
> [inspector] Re-enable Debugger#restartFrame
>
> Doc: https://bit.ly/revive-restart-frame
>
> This CL "undeprecates" Debugger#restartFrame and adds a new optional
> "mode" parameter for back-wards compatibility. Moreover, the return
> values are all deprecated. They were never actually used in the
> DevTools frontend and the same information is available from the
> Debugger#paused event that fires once execution stops at the
> beginning of the restarted function.
>
> The CL also re-baselines all the restart-frame inspector tests that
> now run successfully.
>
> R=​bmeurer@chromium.org, kimanh@chromium.org
>
> Bug: chromium:1303521
> Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80491}

Bug: chromium:1303521
Change-Id: Ibc33328c31a4b6ea736d07ce5e5ee109039eec8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645767
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80495}
2022-05-12 16:38:03 +00:00
Jakob Kummerow
2f8f536b55 [wasm] Properly reject modules with unknown sections
The IsValidSectionCode function shouldn't include internally-used
numeric identifiers of well-known optional sections.

Fixed: v8:12867
Change-Id: I9d894ee57157455e92a17ddcde94f32f05fb038d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644612
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80494}
2022-05-12 15:08:02 +00:00