This method has a lot of call sites, but is rarely called, so mark it
preserve_most to make caller code slimmer (and faster).
R=dlehmann@chromium.org
Bug: v8:13565
Change-Id: I6c1b1ee78895fbcffbbd0d47d904d97930d5d90f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136715
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85297}
Request from Wasm tools team for testing. This is only available when
not --fuzzing.
Change-Id: I88cde5ecdcae6724b56c2f89c9d81c6f054f68d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4159854
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85295}
SeqStrings have up to kTaggedSize-1 bytes of padding, due to
allocation sizes being rounded up to kObjectAlignment. This CL ensures
that all (non-external) sequential strings on the heap have (and keep)
this padding set to all zeroes.
The approach is to unconditionally zero the last tagged word of the
uninitialized allocation of string objects.
Change-Id: I32ee4a53e25fa470f79562a71b8c648c7205523f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4143019
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85294}
The {read_leb_slowpath} method is not called most of the time, so we
make it preserve most registers. This makes callers slimmer and faster.
Since the "preserve_most" attribute is currently broken for functions
with return values, we need to change two functions to return the result
via output parameter.
R=dlehmann@chromium.org
Bug: v8:13565
Change-Id: I2c41a37e8e8a86bee4e29ec04a2623cc887eb9e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136713
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85293}
Optimizations introduced in
https://chromium-review.googlesource.com/c/v8/v8/+/1776079
are currently defeated since Address is not a pointer type.
Clang does not seem to carry over alignment information as range
information when casting to ints.
Using __builtin_assume we can restore the same effect.
Reland of half of
https://chromium-review.googlesource.com/c/v8/v8/+/4156060
Bug: v8:9353
Change-Id: I35e3afcb1b8e7faa0cb7ab5573f0e475c045e0c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162929
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85292}
Reload the map after the TryMigrateInstance runtime call.
Bug: v8:7700
Change-Id: Ifabbfaec733989002361ca73e50f1a57cbbfb87f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165091
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85291}
We previously did not check for stack overflow when recursively nesting
functions and class declarations, with no statements in between.
Fixed: chromium:1404863
Change-Id: I00ec90ed4ac48ae7996a2d54201732bcaebc9757
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162925
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85289}
Port 177b6be920
Original Commit Message:
There is no reason to keep the CodeT dispatch (which switches
between `CodeT = CodeDataContainer` and `CodeT = Code`) around. Using
CodeDataContainer doesn't actually depend on anything from v8_enable_external_code_space, so let's use it unconditionally and
simplify our codebase.
In this first step, update the
`v8_enable_external_code_space = false` configuration to use
`CodeT = CodeDataContainer` as well and remove all support for
`CodeT = Code`.
Upcoming CLs will remove the CodeT alias type, and rename
the Code/CodeDataContainer pair to something more intuitive.
R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: Id50007e4af51974e3e666e98ffbc7d74e1224c59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162297
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85288}
The comment about loop phis not needing to extend their inputs'
lifetimes to the end of the outer loop was... wrong. Of course the input
into a inner loop phi needs to be kept alive for subsequent iterations
of the outer loop.
Bug: v8:7700
Change-Id: I4e5de510a7f0188524dd3206f9369b473c128019
Fixed: chromium:1406733
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165088
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85287}
This is a reland of commit ec4f19d530
Original change's description:
> [turbofan] Properly perform range check for array access
>
> Turbofan optimized array access returned incorrect values in some cases
> when a negative index was provided. This CL fixes this by changing the
> way those bounds checks are performed in JSNativeContextSpecialization.
>
> Bug: chromium:1320641
> Change-Id: Id1f06680ccf7964994d179f7fb44199a0b1245b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4147622
> Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85207}
Bug: chromium:1320641, chromium:1382948
Change-Id: I45e38598b97e2e997fc75d272dba470669e835c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4164680
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85286}
The method to grow the capacity for the value stack is rarely called.
Make it preserve most registers. This makes callers slimmer and faster.
R=dlehmann@chromium.org
Bug: v8:13565
Change-Id: If4bb8cbd7a61852af1d07b83d0881110c5e91528
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4136714
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85285}
kDataViewGetVariableLength has JS linkage, and so it has a strong
requirement to what should be in the stack and in the registers
(including having a JSFunction for kDataViewGetVariableLength).
These were missing before, which would crash when checking the frame.
Fixed: chromium:1406727
Bug: v8:7700
Change-Id: Iad878cbc06d46403e21162dfdfd3bcd1a2a063d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162926
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85284}
Explicitly state that the error message in ExistsUseWithoutDefinition
displays the LifetimePosition and also provide the instruction index.
Change-Id: I21f810ea694a9f4832c150e2479d1d3097d9f629
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165082
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85282}
This is to see if a reported regression stems from the fact that
decompressing static roots on arm64 takes two instructions -- as opposed
to loading it from the roots array with one move.
Bug: v8:13466
Change-Id: I03f5f2c6a5436d06da0a9dfb9c9d214e10fac896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162923
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85281}
Additionally to the inlining budget that limits inlining into large
functions / functions that have already inlined a lot, the new flag
limits the maximum size of any inlining candiate. Any function larger
than that will not be inlined independent of the inlining budget.
Also adapt the current limits to be less aggressive on inlining.
Bug: v8:7748
Change-Id: I338a0e7ee1c4a2dfae86ff2016a0c16d5284a54c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161770
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85280}
This is a reland of commit c74c9e63e1.
Types have been fixed to make MSVC happy.
Original change's description:
> [wasm][test] Remove useless macro
>
> Remove the BUILD macro, call a function with an initializer list
> instead. This makes the code slightly shorter, but most importantly it
> avoids an unnecessary macro, which improves maintainability and
> debuggability.
>
> R=jkummerow@chromium.org
>
> Bug: v8:13312
> Change-Id: I904ccf8e5b98c4d2f487c0cedc865db1386321c6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152482
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85259}
Bug: v8:13312
Cq-Include-Trybots: luci.v8.try:v8_win64_msvc_rel
Change-Id: Ie3ca8dcd295ec22385b5d40262c2cb03bfcfeda4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162932
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85278}
These are no longer relevant now that CodeT is an unconditional alias
for CodeDataContainer.
Bug: v8:13654
Change-Id: Ia283f735cad380d1b97606715cc3b99768e49464
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161762
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85276}
This is a reland of c6e96cf622
Various bugs have been fixed since the revert and we're ready to try
again.
Original change's description:
> [maglev] Test maglev on Mac Arm64 bots
>
> Also remove unnecessary maglev runs on x64 FYI bots, since maglev runs
> on the main waterfall's x64 bots already.
>
> Bug: v8:7700
> Change-Id: I5bb23c3ba7696b48f2fe1af4036a3de8c5b1801a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128092
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85174}
Bug: v8:7700
Change-Id: I969e6ae7bd01adb12da0f1240e152232cca00f33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156056
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85275}
Some trivial removals to avoid bouncing in and out of the tree with
larger changes.
No-try: true
Bug: v8:13207
Change-Id: I7d9a6eec0e9a1b047d4684b1cd2477a6a4314dbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156477
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85274}
The termination check must happen before the DCHECK.
Fixed: chromium:1406177
Change-Id: I1c79473c8d5f8440ec5033f00cda25a945a25524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161768
Reviewed-by: Samuel Groß <saelo@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85273}
When TruncateInt64ToInt32 is owned by Word32Op, it can be elided
because Word32Op automatically truncate int64 to int32.
Change-Id: Ia9dd4405f2b9b28710093dbc4c0471ea58df4e12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100664
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#85272}
Rolling v8/build: d57dd8d..24fbcb5
Rolling v8/buildtools: 6409ca9..a1adda9
Rolling v8/buildtools/third_party/libc++/trunk: ccb0d32..cf80323
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8f4c5d6..a172c91
Rolling v8/third_party/depot_tools: 4f3b322..e38d195
Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230110.3.1..version:11.20230112.1.1
Change-Id: Icb60e4dfa70c7e38bf4984580e3e75fab8e3d166
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162300
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@{#85271}
This is a reland of commit 969fb7796a
No changes since revert. Failing test unrelated and will be fixed in
https://chromium-review.googlesource.com/c/v8/v8/+/4150087
Original change's description:
> [flags] Remove --harmony-class-static-blocks
>
> The class static blocks proposal has shipped since M91.
>
> Bug: v8:11375
> Change-Id: Icec89ea7e4bbef325f2b12b5f7f829840d3f4575
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4144630
> Auto-Submit: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Adam Klein <adamk@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85162}
Bug: v8:11375
Change-Id: I48cd4935378c82e952f129b4d07b2998714d67f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4151381
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85269}
This will allow embedders to build the snapshot file without building
all of v8.
Bug: chromium:1402705
Change-Id: I5049c18a803fd664e10036adcaef93503f013304
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4157273
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85268}
This reverts commit 77de44e1c4.
Reason for revert: Seems fuchsia doesn't like this improvement: https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-arm64-rel/68601/overview
Original change's description:
> [ptr-compr] Improve ptr compression/decompresion in C++
>
> Optimizations introduced in
> https://chromium-review.googlesource.com/c/v8/v8/+/1776079
> are currently defeated since Address is not a pointer type.
> Clang does not seem to carry over alignment information as range
> information when casting to ints.
>
> Using __builtin_assume we can restore the same effect. Additionally
> we can help the compiler remember that when compressing the removed
> bits are actually the cage base. This helps e.g. with
> `decompress(compress(..))`.
>
> See https://godbolt.org/z/5r68G5qa6 for details.
>
> Bug: v8:9353
> Change-Id: Ief016fce0788f2bef6b684a18b104ada6e6d3856
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156060
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85246}
Bug: v8:9353
Change-Id: I1fd6f36667302490f12d19c1fc8f64ca181c006b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162933
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85266}
Otherwise monotonicity of ToObject is violated, as a WasmObject is
currently a Receiver but *not* a DetectableReceiver.
Bug: v8:12185
Change-Id: I04ac78f7635ed54cf7d433231455fc207aa10109
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4150087
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85265}
Biggest change: do not use a top-level switch in {JSToWasmObject}.
Change-Id: I8e8fab228c07e83d2acc261b779eea6de4fcf645
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161767
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85264}
If the debugger is enabled while we compile a new Wasm module, we were
still eagerly adding baseline compilation units for all functions. This
is inconsistent with what we do if the module is already created when
the debugger is enabled. It's also inconsistent with the default
compilation strategy, which is lazy nowadays.
Thus this CL removes the outdated code. The runtime function for lazy
compilation already has all necessary logic in place to generate debug
code lazily.
R=ahaas@chromium.org
Bug: v8:13224
Change-Id: I30bebeb751e1a4c7f03a93844f9263bf0e8692df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152950
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85263}
This reverts commit 48fee7d232.
Reason for revert: Compile error: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20debug%20builder/6918/overview
Original change's description:
> Use preserve_most calling conventions for Zone::NewExpand
>
> The zone uses bump allocation in the fast-path, and falls back to
> allocating a new segment if there is not enough space.
> Since this is rarely executed and zone allocations happen a lot, we
> should mark `Zone::NewExpand` as "preserve_most" to make
> `Zone::Allocate` as fast and slim as possible.
>
> R=bikineev@chromium.org, leszeks@chromium.org
>
> Change-Id: I0d592a35440bc3d61ca04425fc2f98c8a8bbbaae
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4146436
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85258}
Change-Id: Id5d89bc8ae4f09b7bcd52e530b4ec69da550d683
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4162871
Auto-Submit: Clemens Backes <clemensb@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@{#85261}
We have been manually disallowing subtypes of anyref, as well as null
types, at the JS boundary, although the infrastructure to handle them
was basically in place. This CL removes this restriction.
Drive-by: Handle null correctly for typed functions in {ToJS}.
Bug: v8:7748
Change-Id: I51df2159ff4e6eea5a1ba401fa87920db9c4f2aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4154413
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85260}
Remove the BUILD macro, call a function with an initializer list
instead. This makes the code slightly shorter, but most importantly it
avoids an unnecessary macro, which improves maintainability and
debuggability.
R=jkummerow@chromium.org
Bug: v8:13312
Change-Id: I904ccf8e5b98c4d2f487c0cedc865db1386321c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152482
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85259}
The zone uses bump allocation in the fast-path, and falls back to
allocating a new segment if there is not enough space.
Since this is rarely executed and zone allocations happen a lot, we
should mark `Zone::NewExpand` as "preserve_most" to make
`Zone::Allocate` as fast and slim as possible.
R=bikineev@chromium.org, leszeks@chromium.org
Change-Id: I0d592a35440bc3d61ca04425fc2f98c8a8bbbaae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4146436
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85258}
There is no reason to keep the CodeT dispatch (which switches
between `CodeT = CodeDataContainer` and `CodeT = Code`) around. Using
CodeDataContainer doesn't actually depend on anything from v8_enable_external_code_space, so let's use it unconditionally and
simplify our codebase.
In this first step, update the
`v8_enable_external_code_space = false` configuration to use
`CodeT = CodeDataContainer` as well and remove all support for
`CodeT = Code`.
Upcoming CLs will remove the CodeT alias type, and rename
the Code/CodeDataContainer pair to something more intuitive.
Bug: v8:13654
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_no_pointer_compression_dbg,v8_linux64_no_pointer_compression_rel,v8_linux64_arm64_no_pointer_compression_rel;luci.node-ci.try:node_ci_linux64_rel
Change-Id: I58e4d510924f685ef0f2403220a2c33651c3c864
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4138254
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85257}
We introduce high-level typed load elimination for wasm. It is based
on CSALoadElimination. It operates on wasm struct.set/get and
array.length operators (with array operations pending). Wasm types are
used to refine the may-alias analysis ran for stores.
Drive-by:
- Type more nodes in wasm-compiler and wasm-gc-operator-reducer.
- Remove an unsafe-cast test which now hits an Unreachable Turbofan
node.
Bug: v8:7748
Change-Id: I309e4af4d9f9c584e27ff79804a776666b5dc3c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4146430
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85255}
Change the calling convention for the slow write barrier call to allow
callers to avoid saving caller-saved registers.
Bug: chromium:1406464
Change-Id: I314bdacb235727e0e78a192ed7cbff09e9bc6b4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156476
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85254}
We start to host PGO profiles for builtins on a GCP bucket. This script supports various workflows to download profiles for tagged git versions.
In a first step, we provide profiles for tagged git versions only. The script identifies this version from the current checkout and downloads (or validates the existence of) the profiles to a directory where they'll be used during build time.
We introduce `checkout_v8_builtins_pgo_profiles` to the DEPS file (defaults to False). If set, we call the new helper script to download the profiles within the gclient sync step.
The profile download is added to the Chromium project in crrev.com/c/4131525.
Bug: chromium:1382471
Change-Id: I74ba4f3c102a85e230be7ef17b9c87621a1eab14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111528
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85253}
Use SmiToInt32 instead of SmiUntag to get a zero extended value in
CheckedObjectToIndex.
Bug: v8:7700
Change-Id: I034039781d8db106713e54ebaf72672c261b8fc1
Fixed: chromium:1406573
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161759
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85252}
Instead of pushing 2 arguments at the same time, we push 1 argument
together with padreg (to ensure alignment) and overwrite padreg
afterwards.
That way we can re-use scratch registers used for the first argument
to materialise the second one.
Bug: v8:7700
Change-Id: I6d32b61f6e75ec488b4cf4128ced966bcf0ed1bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4161758
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85251}
This is a reland of commit 1e3dd39d09
and commit e5dbd05dcf
The fix is in https://chromium-review.googlesource.com/c/v8/v8/+/4094755/3..6
Original change's description:
> [heap] Iterate promoted pages during sweeping
>
> Promoted pages are iterated to record slots containing old to new and
> old to shared references. This takes a significant amount of time during
> the atomic pause.
> Instead we offload this task to the concurrent sweepers, record slots to
> a local cache, and merge it when finalizing sweeping.
>
> Array buffer sweeping depends on iteration of promoted pages, so it is
> frozen until iteration is done.
>
> See design doc at https://docs.google.com/document/d/1JzXZHguAnNAZUfS7kLeaPVXFfCYbf5bGCtyKgyiMDH4/edit?usp=sharing
>
> Bug: v8:12612
> Change-Id: Icdc79a7a70c53352e3a1b3961cfe369e8563b65b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4062041
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Auto-Submit: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84706}
Bug: v8:12612
Change-Id: I67bbf4753e9fa8b9194367996797aa103e58c16f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4094755
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85250}
Turbofan uses the feedback vectors created by liftoff during
compilation. It is assumed that for any given function liftoff and
turbofan use same-sized feedback vectors.
Calls in unreachable code don't allocate entries in the feedback vector.
Therefore it is required that turbofan and liftoff have the same
understanding of which parts of the code are treated as unreachable.
This is achieved by moving the unreachable handling from liftoff
into the decoder that is also used for the turbofan compilation.
Bug: chromium:1403398
Change-Id: I113726c1a0d773ea9483c80d8e3c3084be423ca2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152477
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85248}