Commit Graph

80111 Commits

Author SHA1 Message Date
Jakob Linke
135b63038d Refactor RootVisitor::VisitRunningCode
The contract of passing in a Code object for builtins and
InstructionStream objects for everything else was confusing. In this
CL we change it to:

 void VisitRunningCode(FullObjectSlot code_slot,
                       FullObjectSlot istream_or_smi_zero_slot)

where we *always* pass in both parts of the composite
{Code,InstructionStream} object. The istream_or_smi_zero_slot must
equal raw_instruction_stream() of the given code_slot. We pass in
both, because it is convenient at the single call site in frames.cc.

Drive-by: extract deopt literal iteration to a Code method.

Bug: v8:13654
Change-Id: I09d658fbd8d26bf483e1c778e566a53e1817f80f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212399
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85619}
2023-02-02 13:15:23 +00:00
Nikolaos Papaspyrou
9b89942446 [heap] Add scope to object stats dumping in full GC
This accounts for a big difference between the total length of the
atomic pause (v8:gc:cycle:main_thread:full:atomic) and the sum of
the four phases, when GC stats are enabled.

Change-Id: I5d5abd1e6a8d28ae45a04739d2ca937ef54148af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217418
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85618}
2023-02-02 13:05:39 +00:00
pthier
96f5bb7be4 [regexp] Ship Unicode Sets
Advance --harmony-regexp-unicode-sets to shpping, enabling it by
default.

Bug: v8:11935
Change-Id: I5dcf2c584775f25516c7a1846ac6bc53326eefbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217412
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85617}
2023-02-02 11:53:15 +00:00
Clemens Backes
656c74218f [liftoff] Combine "InitMerge" with the actual merge
"InitMerge" did compute the state at the merge point, and a following
"MergeStackWith" or "MergeFullStackWith" would then generate the code to
merge the current state into the computed state.
As every "InitMerge" is followed by an actual merge, we can combine the
two and save one iteration over the two states.

The only change in generated code is that we initialize the merge state
after a one-armed if from the if-state instead of the else-state. This
could potentially make the if-branch slightly cheaper and the
else-branch slightly slower, but will not negatively impact overall code
size.

This CL should save roughly 2% of Liftoff compilation time.

R=dlehmann@chromium.org

Bug: v8:13565, v8:13673
Change-Id: Id323a15e7fd765727f46830509fbaf7f5498c229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4203380
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85616}
2023-02-02 11:49:47 +00:00
Omer Katz
69dd71dabe [heap] Disable concurrent allocation for new space
No concurrent allocation lock should be needed when allocating in new space.

Bug: v8:12612
Change-Id: I5242817b49564e0b786c16cee017762631de6bc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4215296
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85615}
2023-02-02 10:54:15 +00:00
Olivier Flückiger
161ff8c112 Reland "[static-roots] Use static map range checks instead of instance types"
This is a reland of commit 77d08fcde5

Original change's description:
> [static-roots] Use static map range checks instead of instance types
>
> Some instance types, or type ranges, corresponds to a range of pointers
> in the static read only roots table. Instead of loading the instance
> type of a map it can therefore be beneficial to compare the map itself
> against this range.
>
> This CL adds:
>
> * Add infrastructure to compute and output a mapping of
>   `(instance_type_first, instance_type_last) ->
>      (map_ptr_first, map_ptr_last)` for interesting ranges.
> * Extend InstanceTypeChecker to use these ranges.
>
> For single instance types that map onto a range of maps it is not
> obvious which check is faster. Checking the map range saves a load,
> whereas checking the instance type saves an additional jump.
>
> Bug: v8:13466
> Change-Id: I670fc10fad9920645c0ce0d976ae7e7a13a86e60
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4188379
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85599}

Bug: v8:13466
Change-Id: I0317a7b88e391e0a7502cc056a2fe691d294fba1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4217131
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85614}
2023-02-02 10:43:34 +00:00
Camillo Bruni
dee91eea61 [execution] Add not-terminating DCHECK in InvokeWithTryCatch
Bug: chromium:1393272
Change-Id: Id377fd048403bd9d901edfd72786b1f2bd7124c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4215298
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85613}
2023-02-02 10:25:07 +00:00
Clemens Backes
8dfd2ce708 [base] Fix SmallVector's move constructor
The move constructor left the "other" (source) vector in an
unpredictable state, depending on the size: For "big" small-vectors
(using dynamically allocated storage) we would reset it to an empty
vector. "Small" small-vectors on the other hand were not reset.

Fix this to make it possible to reuse a SmallVector after moving its
content to another SmallVector. This also flushes out a bug more easily,
see https://crrev.com/c/4215292.

R=dlehmann@chromium.org
CC=​thibaudm@chromium.org

Change-Id: Ia188c3639e9104dfbeb589bfc49e3228f4cbeda7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4215297
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85612}
2023-02-02 10:24:04 +00:00
Daniel Lehmann
e0790d35d1 [liftoff] Fix CacheState::Steal to move, not copy
CacheState::Steal didn't actually call the move assignment operator,
even though it should (and unlike what the comment says in its body).

The reason is the incompatible const-qualifier, such that the move
assignment operater wasn't selected during overload resolution.
Due to C++'s operator overloading, the compiler silently used the copy
assignment operator instead. That works, but is naturally slower.

This actually gave `Steal` the exact same behavior as `Split` until now,
which masked yet another bug, where we called `Steal` but should have
called `Split`.

This CL fixes both issues.

Bug: v8:13673
Change-Id: I940eb0fed383d78244f497bc6f7b67730038de42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4215292
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85611}
2023-02-02 10:23:01 +00:00
Victor Gomes
ff1dba398d [codegen] Merge Turbo and Macro assemblers
There is no real difference between MacroAssembler and TurboAssembler
anymore. Initially the idea was to differentiate thread-safe
operations, but it got out of hand. With LocalHeaps we could ensure
differently by passing a local_isolate.

In this CL:

TurboAssemblerBase was renamed to MacroAssemblerBase
The file containing it also renamed from turbo-assembler to macro-assembler-base.

TurboAssembler and MacroAssembler were merged into MacroAssembler
in each of the architectures.

turbo-assembler-unittests-arch were included in
macro-assembler-unittests-arch

tasm renamed to masm

Bug: v8:13707
Change-Id: I716bbfc51b33ac890c72e8541e01af0af41b6770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212396
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85610}
2023-02-02 09:27:45 +00:00
Camillo Bruni
7eff3cee05 [perf-jit] Don't use 0xFF for repeated script names
This was never supported to start with and can cause invalid script names.
This CL partially reverts https://crrev.com/c/3513892

Drive-by-fix: Dehandlify more code.
Change-Id: I96cf4c1244d9f00dc47738cd481b440e6bed0541
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174074
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85609}
2023-02-02 08:42:02 +00:00
v8-ci-autoroll-builder
972d103e4e Update V8 DEPS (trusted)
Rolling v8/base/trace_event/common: 68e6038..05a225a

Rolling v8/build: e0df145..d112664

Rolling v8/buildtools: 295c6e5..9ad5f9f

Rolling v8/buildtools/third_party/libc++/trunk: 59bae40..bd44075

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5a468cc..2d3ccea

Rolling v8/third_party/depot_tools: 3d072ab..8361a9b

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230131.1.1..version:11.20230201.0.1

Rolling v8/third_party/instrumented_libraries: 09ba70c..63d81e4

Rolling v8/tools/luci-go: git_revision:c41d94e382727fc5276cd2771741990543fce337..git_revision:46eca1e3a280c340bf58f967aaded13c87ca3859

Rolling v8/tools/luci-go: git_revision:c41d94e382727fc5276cd2771741990543fce337..git_revision:46eca1e3a280c340bf58f967aaded13c87ca3859

Change-Id: Ic6f881cd4d017cb85797bdfcb70fa06752ddce41
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4214886
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@{#85608}
2023-02-02 03:49:40 +00:00
Liu Yu
327065bc8b [loong64][mips64][turbofan] Implement ChangeInt32ToInt64
After TruncateInt64ToInt32 elided, ChangeInt32ToInt64 must be
implemented to convert int32 to int64.

This is a temporary fix for crrev.com/c/4100664, and does not
fix all problems.

Change-Id: Iece6f5753c775bd59354e34926fb1eff1506eb6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4206968
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#85607}
2023-02-02 02:47:36 +00:00
Deepti Gandluri
44324c1fc1 Revert "Reduce build size when building with Perfetto SDK"
This reverts commit 0d4200055b.

Reason for revert: Breaks integration bots, and blocks API changes : https://ci.chromium.org/ui/p/v8/builders/try/v8_linux_chromium_gn_rel/83678/overview

Original change's description:
> Reduce build size when building with Perfetto SDK
>
> Building Chromium with full Perfetto SDK included increases build time
> significantly. We can reduce this overhead by including only those
> parts that are required. See b/266913150 for context.
>
> Change-Id: I0cde5cb7df7b6151ec686e993488d8467c416fac
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212390
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
> Cr-Commit-Position: refs/heads/main@{#85603}

Change-Id: I88210ada35e0d7e68a0dbccad518cf6177303430
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4216171
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85606}
2023-02-02 00:12:31 +00:00
Omer Katz
806edfa6ea [heap] Release invalidates slots set in MinorMC.
Bug: v8:12612, chromium:1411746
Change-Id: I6c06e6c924f9f548cb2014172d467ed19a5abbc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208940
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85605}
2023-02-01 19:52:53 +00:00
Victor Gomes
a5eb40d90d [liftoff] Use cross-platform conditions
Bug: v8:11461
Change-Id: I4434cb68e3d7f1cb700f9f8db7b4bf3477e6b4da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212404
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85604}
2023-02-01 19:24:16 +00:00
Mikhail Khokhlov
0d4200055b Reduce build size when building with Perfetto SDK
Building Chromium with full Perfetto SDK included increases build time
significantly. We can reduce this overhead by including only those
parts that are required. See b/266913150 for context.

Change-Id: I0cde5cb7df7b6151ec686e993488d8467c416fac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212390
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
Cr-Commit-Position: refs/heads/main@{#85603}
2023-02-01 19:23:08 +00:00
Leszek Swirski
2b01466c93 [ic] Improve printing of polymorphic feedback
... in particular, for keyed loads that have names in the feedback.

Also make InstanceType printing more robust against invalid instance
types.

Change-Id: Ib4bef4646c3a18643291d0bb517ef3470b7497cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4213911
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85602}
2023-02-01 19:22:06 +00:00
Leszek Swirski
d54ce968c4 [maglev] CheckValue strings by contents
Add a CheckValueEqualsString node which compares strings by contents,
not just by reference, to avoid deopt loops from comparing
uninternalized to internalized strings in name-feedback keyed loads.

Bug: v8:7700
Change-Id: If64e54e6e4a4c89824e6ab1f3f3cf3b4a25f2a51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212405
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85601}
2023-02-01 19:21:01 +00:00
Deepti Gandluri
11bc0f61b7 Revert "[static-roots] Use static map range checks instead of instance types"
This reverts commit 77d08fcde5.

Reason for revert: compile failures on Arm64 bots https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Arm64%20-%20builder/24010/overview

Original change's description:
> [static-roots] Use static map range checks instead of instance types
>
> Some instance types, or type ranges, corresponds to a range of pointers
> in the static read only roots table. Instead of loading the instance
> type of a map it can therefore be beneficial to compare the map itself
> against this range.
>
> This CL adds:
>
> * Add infrastructure to compute and output a mapping of
>   `(instance_type_first, instance_type_last) ->
>      (map_ptr_first, map_ptr_last)` for interesting ranges.
> * Extend InstanceTypeChecker to use these ranges.
>
> For single instance types that map onto a range of maps it is not
> obvious which check is faster. Checking the map range saves a load,
> whereas checking the instance type saves an additional jump.
>
> Bug: v8:13466
> Change-Id: I670fc10fad9920645c0ce0d976ae7e7a13a86e60
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4188379
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85599}

Bug: v8:13466
Change-Id: I88afb05948d934d15f8512bcd37d56429aac23a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4214812
Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85600}
2023-02-01 19:17:10 +00:00
Olivier Flückiger
77d08fcde5 [static-roots] Use static map range checks instead of instance types
Some instance types, or type ranges, corresponds to a range of pointers
in the static read only roots table. Instead of loading the instance
type of a map it can therefore be beneficial to compare the map itself
against this range.

This CL adds:

* Add infrastructure to compute and output a mapping of
  `(instance_type_first, instance_type_last) ->
     (map_ptr_first, map_ptr_last)` for interesting ranges.
* Extend InstanceTypeChecker to use these ranges.

For single instance types that map onto a range of maps it is not
obvious which check is faster. Checking the map range saves a load,
whereas checking the instance type saves an additional jump.

Bug: v8:13466
Change-Id: I670fc10fad9920645c0ce0d976ae7e7a13a86e60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4188379
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85599}
2023-02-01 16:27:48 +00:00
Matthias Liedtke
811d50b9c1 [wasm-gc] Allow Js -> Wasm wrapper inlining for (non-null) ref extern
This is a follow-up to https://crrev.com/c/4204032 which allowed
wrapper inlining for the nullable externref type.

Bug: v8:7748
Change-Id: I5a82c37b7cf0cfcbcacbe399f8b3119176c3bba4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212394
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85598}
2023-02-01 16:09:31 +00:00
Clemens Backes
8082a8f51a [liftoff] Add some more assumptions
In particular, {CountTrailingZeros} can skip a dynamic check if it knows
that the input is not zero.

R=ahaas@chromium.org

Bug: v8:13565, v8:13673
Change-Id: I46d4fea2952d22f57b0695f5db690d6fefd7c1ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212401
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85597}
2023-02-01 15:41:29 +00:00
Jakob Linke
d29a0c4e9b [bazel] Fix the icu build and buildifier warnings
.. introduced by crrev.com/c/4196117.

- Move src/builtins/builtins-intl-gen.cc to the v8_initializers_files
  target.
- Prefix unused variables with '_'.

Bug: v8:13629
Change-Id: Ib82cc581cfba1f2dab728bb6e08dfce3bf6f1561
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212392
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85596}
2023-02-01 15:00:23 +00:00
Michael Lippautz
e4a9f0a5f2 [heap] Remove PostponeInterruptScope from mark compact GCs
The GC doesn't handle interrupts at this level and all callbacks that
would execute user code are invoked before entering the marker.

Bug: v8:12612
Change-Id: I13c7dab1f69c51d1dbe66721b3422d8ebf48c1c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212398
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85595}
2023-02-01 14:35:50 +00:00
Clemens Backes
8b231d80ca [wasm] Remove deprecated CPU timings in metrics
The fields were deprecated in https://crrev.com/c/4079227; remove them
now.

R=mlippautz@chromium.org

Bug: v8:13565
Change-Id: I02429bd050fde42873fc77de9151337cccb16411
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4083069
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85594}
2023-02-01 14:29:41 +00:00
Michael Lippautz
d2c4ae10c9 [heap] Make scope for finishing Minor MC incremental marking optional
Bug: v8:12612
Change-Id: I1b8be498c08f379a65087d1264eb6739e4c83e0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212395
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85593}
2023-02-01 13:59:49 +00:00
Liviu Rau
9b46fb9d7d Support pushing additional files to Android in tests cases
Drive-by refactoring: Make it evident that currently we upload additional files only for Android platform.

Bug: v8:13686
Cq-Include-Trybots: luci.v8.try:v8_android_arm64_n5x_rel
Change-Id: I8081c1185d6a92dfdcef82e697e301f3e7838dc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4205916
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#85592}
2023-02-01 13:36:47 +00:00
Michael Lippautz
fb1c8489f6 [heap] Rework external callbacks in PerformGarbageCollection
- Bail out of callbacks bottlenecks if there's no registered callbacks
  without emitting scopes.
- Unify blocks for external callbacks

Change-Id: I30744ef8b2f537ecb84b22babcae6df1442018bf
Bug: v8:12612
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208930
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85591}
2023-02-01 12:49:42 +00:00
Victor Gomes
12ecfa78cd [maglev] Remove BaselineAssembler dep from Maglev
We should not mix Baseline vs Maglev ScratchScope. x14 is considered
an extra-scratch register in arm64 for Baseline, but not for Maglev,
which has a more comprehensive way to allocate extra scratches.

Bug: v8:7700, chromium:1410970
Change-Id: Ia7eb77ff7fffc3c91d572931aa2ea001c90c1ffc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212388
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85590}
2023-02-01 12:36:52 +00:00
Matthias Liedtke
caa93f9618 [wasm-gc] Allow Js -> Wasm wrapper inlining for externref
Bug: v8:7748
Change-Id: If2045d900e272ae254ef22914a39ded3696f17e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4204032
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85589}
2023-02-01 12:16:02 +00:00
Juan José Arboleda
958f02bbc1 [builtins] Update Array.p.toLocaleString to follow ECMA402
In JavaSCript implementations that supports ECMA-402,
`Array.prototype.toLocaleString()` must invoke the `toLocaleString` method of
each non-undefined, non-null elements witch exactly two (2) arguments.
See: https://tc39.es/ecma402/#sup-array.prototype.toLocaleString step 6.c.i.

V8 appears to provide no arguments when locale is undefined and to not provide options when options is undefined.

Bug: v8:13564
Change-Id: I655917210554d20d2eaebe2ac333421dd5d157ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4184564
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Auto-Submit: Juan José <soyjuanarbol@gmail.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85588}
2023-02-01 12:07:02 +00:00
Jakob Linke
8509ab482e [bazel] Support v8_enable_turbofan
.. similar to the way the build works in BUILD.gn:

- When TF is enabled, TF is compiled into both v8_library("v8") and
  v8_binary("mksnapshot").
- When disabled, TF is compiled into mksnapshot, but not
  v8_library("v8").

This required splitting torque-generated files into (object)
definitions and initializers; definitions are always included,
initializers only in mksnapshot.

Bug: v8:13629
Change-Id: I987f02ad809cce3b922e3b0568d9695b16776e26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4196117
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85587}
2023-02-01 11:25:11 +00:00
Tobias Tebbi
993c2b45be [turboshaft] refactor assemblers/reducers to enable IDE autocomplete
Bug: v8:12783
Change-Id: I237f470cea6be265475fec6c4301f3bf60bcb118
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208931
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85586}
2023-02-01 10:45:36 +00:00
Toon Verwaest
7d8ca951ec [maglev] Don't check smi overflow after int32 unary/binop
This means TurboFan might not see what Maglev did, and it might make
different decisions, but if we deopt we'll learn in Ignition anyway and
won't make the same mistake later. At the same time this avoids a lot of
unnecessary operations that impact tight loops.

Bug: v8:7700
Change-Id: I6fada2ed0218b0b97fc8c9d9ba10fb2218cd71d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4200631
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85585}
2023-02-01 10:27:33 +00:00
Simon Zünd
3ff97ec329 [cleanup] Simplify logic in Debug::ProcessCompileEvent
Script::IsSubjectToDebugging() returns true for "Normal" and
"WebAssembly" scripts. This is exactly when we want to notify the
debug delegate. We can remove the round-about way this is currently
checked.

R=pfaffe@chromium.org

Bug: None
Change-Id: I1d3b2560043cebffb8eb3db68f58bf0a137abe06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208947
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85584}
2023-02-01 10:11:51 +00:00
Victor Gomes
de7d26908f [maglev] Support constant loads in polymorphic access
Bug: v8:7700
Change-Id: I628b2abbe10578b7ee67dfd2a32a62dd5d7d866a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208929
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85583}
2023-02-01 09:52:20 +00:00
Marja Hölttä
6c84aa8e39 [rab/gsab|turbofan] Fix JSCallReducer::ReduceDataViewAccess for RAB/GSAB
Bug: v8:11111,chromium:1412001
Change-Id: Iff5e6efbb82060a62ed55ba84809b6469da872f9
Fixed: chromium:1412001
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208945
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85582}
2023-02-01 09:47:48 +00:00
Omer Katz
3ed225c851 [heap] Add scope to heap stats dumping at the end of a cycle
Bug: v8:12612
Change-Id: I791dadc925df120ef380960462382a229c9fd55a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208944
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85581}
2023-02-01 09:31:03 +00:00
Jakob Linke
cbbdf48bab [code] Update Code names and remove obsolete functions
- Remove camel-case Code accessors like InstructionStream since
  they only make sense on Code (where we have to distinguish between
  embedded builtins and other Code).
- Remove the prefix from 'raw_'-prefixed accessors since it was
  intended to clearly disambiguate from the camel-case accessors and
  is now no longer needed.
- Remove various dead functions.
- Update comments.

Bug: v8:13654
Change-Id: Ife51e4aef502fc30ab1526c205a49e5620be96f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4205925
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85580}
2023-02-01 08:56:56 +00:00
Jakob Linke
ac99619606 [code] Remove the is_off_heap_trampoline bit
.. which no longer makes sense in today's code base. This was originally
introduced to distinguish Code objects containing the actual instruction
stream (= all non-builtin Code objects) from Code objects only
containing a trampoline with a `jmp` to the .text section (= where
instruction streams for embedded builtins are located).

Today, trampoline code no longer exists; rename the predicate to
`has_instruction_stream`, where

 has_instruction_stream == !is_off_heap_trampoline

Bug: v8:13654
Fixed: v8:13698
Change-Id: I78be1cee2e045c1944486b8a54a03eb9d1ce0c27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4205921
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85579}
2023-02-01 08:38:29 +00:00
Omer Katz
df83719d4f [heap] Skip external string table cleanup
The cleanup is in practice only needed when heap verification is active.
In all other cases it can be delayed until the next full GC.

Bug: v8:12612
Change-Id: Ic31e1011d6377c2df255554eae56bd9eed40744a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208928
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85578}
2023-02-01 08:32:35 +00:00
Lu Yahan
d2a50664c0 [riscv] Fix atomics
Port commit 76a817e03a
Also, rename the enum variable in FFlagsMask from kOverflow to kFPUOverflow to avoid redefinition due to the commit 949bd4467d.


Change-Id: I83e42d4cb0cf48d678719572adb008ef101b23e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4204830
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji.odyssey@gmail.com>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#85577}
2023-02-01 08:21:35 +00:00
Matthias Liedtke
05339e66f3 [maglev] arm64: Fix StringCharCodeAt for cons string
The load of the {second_string} field should only be
4 Byte size. In case of the object being at a page
boundary, the wrong load can trigger a segmentation
fault.
In all other cases, a wrongly loaded value will just
result in a deferred runtime call.

Bug: chromium:1411533
Change-Id: Icd22f6baa4a9625ebfced69f3b7a601adf795a5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208936
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85576}
2023-02-01 06:37:58 +00:00
v8-ci-autoroll-builder
dd5afcfffb Update V8 DEPS (trusted)
Rolling v8/build: ddbdf3a..e0df145

Rolling v8/buildtools: 7a0617e..295c6e5

Rolling v8/buildtools/linux64: git_revision:629f6be82956987c7ac10faf2acf0534b1667fa2..git_revision:84c8431f3e03cc6226c59dd49637c15ea31169a1

Rolling v8/buildtools/third_party/libc++/trunk: b93c728..59bae40

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5ba838f..5a468cc

Rolling v8/third_party/depot_tools: 94b0eb1..3d072ab

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230129.3.1..version:11.20230131.1.1

Rolling v8/tools/clang: 527cfbb..44e5e39

Change-Id: I7e12e35e78b1b7528c64560f3a30b407e0296b9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4210695
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@{#85575}
2023-02-01 03:47:33 +00:00
Choongwoo Han
f2305b3beb [v8windbg] Find Isolate by checking g_current_isolate_
After this commit:
ce2cded47e

The Isolate object for the current thread is stored in `g_current_isolate_` using `thread_local` instead of using `isolate_key_`.

Bug: v8:13394
Change-Id: I9ac1054cb7beea49c69a9990147321b68a1b80f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4211050
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#85574}
2023-02-01 01:00:25 +00:00
Rezvan Mahdavi Hezaveh
f891b0697d [v8:13321] Add a flag and a builtin for Array.fromAsync.
Added a flag to implemet Array.fromAsync behind it,
and added a builtin in builtin-array.cc for the implementation
of the feature.

Bug: v8:13321
Change-Id: I5498f5bbc4616594efdcf9be8f74dd46afe7a0b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4204827
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85573}
2023-01-31 23:12:59 +00:00
Dominic Farolino
04b766ad80 Console: Fix namespace class string
Per the WebIDL specification, objects that are namespaces must have the
their class string value set to their identifier name [1]. Since per
spec, console is defined as a namespace [2], console's class string must
be "console".

However, since the console object in Chromium/v8 is directly implemented
inside of v8, it doesn't adhere to the WebIDL binding norms. Its
implementation manually had its @@toStringTag set to "Object", which is
incorrect. This CL corrects it to "console" and adjusts test
expectations accordingly.

Unfortunately, this CL will have web-exposed changes to Chromium that
are not tested anywhere, specifically because console's implementation
of namespace did not adhere to the WebIDL spec. Separately,
https://crrev.com/c/4193348 fixes Chromium's web-exposed tests and
stable test expectations, to manually treat console as a namespace
(despite its broken implementation) so that the global interface listing
tests properly enumerate attributes/methods on the console object.
Once this CL lands, those expectations will need to be changed.

The motivation for this change is to ensure that all console attributes
and methods are properly accounted for in the usual Blink webexposed
stable tests that are owned by the Blink API OWNERs. This is because
recently, v8 shipped a new console method (createTask()) that entirely
bypassed the Chromium launch process:
https://www.chromium.org/blink/launching-features/, because no files
needed to be approved by Blink API OWNERs.

[1]: https://webidl.spec.whatwg.org/#ref-for-dfn-class-string%E2%91%A8
[2]: https://console.spec.whatwg.org/#console-namespace

Change-Id: I0bbd05242fc815945cce40c65d74995950d64115
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4193308
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85572}
2023-01-31 20:35:36 +00:00
Deepti Gandluri
ff748cb6a4 Revert "[heap] Move the likeliest case of GcSafeTryFindCodeForInnerPointer up"
This reverts commit 9901a04144.

Reason for revert: Crashes on the CFI bots https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20cfi/38573/overview

Original change's description:
> [heap] Move the likeliest case of GcSafeTryFindCodeForInnerPointer up
>
> It's much more likely to find the code object in CODE_SPACE than in LO
> space (or the THIRD_PARTY_HEAP). Also, remove an obsolete and misleading
> comment.
>
> Bug: v8:13654
> Change-Id: Ia6c2a28a8eb5b0fb3f5951a9018fac0c0683a96e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4205914
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Jakob Linke <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85564}

Bug: v8:13654
Change-Id: Id2941c5b98289fdcc30efb47172d266bfd43de0e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4210628
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85571}
2023-01-31 19:12:59 +00:00
Shu-yu Guo
15cc02b4e8 [shared-struct] Disallow property redefinition
Shared objects have fixed layout (i.e. immutable maps) and start off
sealed. Ordinary JS objects allow writable properties to be redefined to
be non-writable. This violates the fixed layout invariant and needs to
be disallowed.

Also contains a drive-by fix removing
@highestInstanceTypeWithinParentClassRange, which is unneeded.

Bug: chromium:1407595, v8:12547
Change-Id: I0257fa19f59ccfaaf0e07cb42aeedd71e132d21a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4190525
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85570}
2023-01-31 18:42:46 +00:00