Commit Graph

79100 Commits

Author SHA1 Message Date
Shu-yu Guo
bd5b3ae542 [shared-struct] Store length per-SharedArray instance
With shared space (instead of the shared isolate), the AccessorInfo
implementation of SharedArray's length property is no longer threadsafe.
Until AccessorInfos can be put into shared or RO space, go back to
storing the length field as a per-instance in-object field, which is
unfrotunately a little wasteful.

Bug: v8:12547
Change-Id: I99c1cbf26047da48a4b4c11e14ab7def7d4e4f60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4039309
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84408}
2022-11-21 22:14:15 +00:00
Dominik Inführ
96b83b8160 [heap] Remove OLD_TO_SHARED slots when shrinking large objects
Clear OLD_TO_SHARED slots in free memory after shrinking large objects.
This CL now clear all slots outside of the object and not just from
the next OS page boundary.

Since we are already here also stop clearing OLD_TO_NEW and OLD_TO_OLD
since they should already be cleared at this stage of the GC. Add
DCHECKs that this always holds. We also don't need to iterate large
code objects since we do not shrink such pages anyway.

Bug: v8:13267, chromium:1385717
Change-Id: I75f6e56a7c13974ce669bbba29262e95eb94d287
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037981
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84407}
2022-11-21 21:29:27 +00:00
Michael Lippautz
5b68765f7a [handles] More diagnosing CHECKs
Adding diagnosing CHECKs. Will be reverted after fixing issue.

Bug: chromium:1380114, v8:13372
Change-Id: I1d174b0a2b4ac5e090e54d70e70eb6ca0442f07e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042291
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84406}
2022-11-21 18:17:27 +00:00
Clemens Backes
65cf467f63 [wasm] Use parallelized validation during compilation
So far we parallelized the {WebAssembly.validate} function. After recent
refactorings, we can use the same parallelized logic for validing (only
lazy or all) functions during compilation.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: I38d48e1e48d83c8e63657abb7077aa8318cf94f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037269
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84405}
2022-11-21 18:07:57 +00:00
Samuel Groß
9a09d96873 [sandbox] Remove use of IsWindows8Point1OrGreater in initialization
From the documentation: "Applications not manifested for Windows 8.1 or
Windows 10 return false, even if the current operating system version is
Windows 8.1 or Windows 10". As such, the sandbox initialization logic
may incorrectly conclude that it is running on an older version of
Windows and fall back to a partially-reserved sandbox.
The check for the version is not really necessary: afterwards, we check
if we can create virtual memory subspaces, which will only be possible
on Windows if VirtualAlloc2 is available. That API is only available
since Windows 10, making the explicit version check redundant.

Bug: chromium:1368009
Change-Id: Id877dcfd6e384c6af94b571f37e70a115ead8dde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042290
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84404}
2022-11-21 17:32:18 +00:00
Michael Achenbach
c9bdd23fb0 [gcmole] Separate call graph from suspects collector
This factors out a call graph from the suspects collector which in
a future CL can be serialized as a partial call graph and later
merged.

Bug: v8:12660
Change-Id: Ie6f682195a900ba0711b8f828c63bf41f142f2b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035131
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84403}
2022-11-21 16:32:27 +00:00
Seth Brenith
1c90992ffc Merge with cached Script after streaming compilation
Currently, if a script is compiled on the main thread or deserialized on
any thread, and a matching Script object is found in the Isolate
compilation cache, the new content is merged into the existing Script.
This CL implements the same merging for scripts which were compiled by a
background task. I expect speed changes to be minimal, because merging
is only needed in a small minority of compilations. When needed, it
usually takes about 10% as long as the deserialization of the script,
which in turn is faster than compilation from source text.

This CL also removes some code which I added in preparation for merging
on a background thread in this case. Upon further discussion, we've
determined that the extra round trip to a background thread when the
main thread is likely just waiting for completion would do more harm
than good, and performing the compilation cache lookup from the
background thread would be quite cumbersome.

Bug: v8:12808
Change-Id: Ia7a14a739779ab658b505572d19df4ec489a078e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4023904
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84402}
2022-11-21 16:04:37 +00:00
Victor Gomes
7096e7a689 [bazel] Use copts -Wno-implicit-fallthrough
Upstream cl/489478120

Change-Id: Ia23ce5f7093bf0cdfff0b6a9c19828008e9bf040
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4041511
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84401}
2022-11-21 15:54:27 +00:00
Victor Gomes
fc1b4c83d4 [maglev] Fix condition check before string builtins
... by adding unsigned check conditions to
AssertCondition class.

Bug: v8:7700
Change-Id: I1b764720296483b56c7ce59878c371c254349186
Fixed: chromium:1385945
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042502
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84400}
2022-11-21 15:20:17 +00:00
Clemens Backes
e9639b550b [wasm] Use a consistent error message for validation failures
The validation paths during decoding and compilation should generate the
same error message. To achieve this, we move the {GetWasmErrorWithName}
function from the compiler to the decoder. As a drive-by, we replace the
{WasmFunction&} parameter by just an integer, because that is all we
need.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: I469dd871c7471c0f5af12c56e19b71be136557cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037268
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84399}
2022-11-21 14:43:57 +00:00
Thibaud Michaud
c0743da924 [wasm] Re-enable tail-call fuzzing
The gap resolver issue that this was blocked on is fixed now.

R=clemensb@chromium.org

Bug: chromium:1269989
Change-Id: I1aa4566190dd9705bf5688f5c551923f6273f93e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042243
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84398}
2022-11-21 14:34:07 +00:00
Matthias Liedtke
26831ff6c1 [wasm-gc] Fix ref.test / ref.cast null to none, nofuncref, noexternref
Bug: v8:7748
Change-Id: Ia2014dc93868a5712fc799abe4980c54848d2712
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042665
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84397}
2022-11-21 14:16:27 +00:00
Qifan Pan
2690e2e3a3 [turbofan] Support BigInt shift operations
This CL implements Torque builtins for BigInt left shift and right
shift and truncates shift operations when the shift amount is a
constant.

- Propagate truncation if we know the operation is a left shift.
- Lower the operation to a word64 right shift if the lhs is Signed- or
  UnsignedBigInt64 and we know the op is a right shift.

A side effect of truncating left shift is it will not throw a
BigIntTooBig exception in optimized code.

Bug: v8:9407
Change-Id: Ibd42cf897ef8a35f6addd09674faf409654d6d7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028142
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84396}
2022-11-21 14:05:07 +00:00
Manos Koukoutos
ebe19d69a5 [wasm-gc] Exit early if type validation fails in element section
Otherwise we may pass an out-of-bounds type to {IsSubtypeOf}.

Bug: v8:7748, chromium:1388938
Change-Id: Ifcbf31c68da40d7b7a365c9d756cd5fa81347291
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4040930
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84395}
2022-11-21 13:59:27 +00:00
Milad Fa
3ecadd8184 PPC/s390: [regalloc] Resolve tail-call gap moves
Port 2f4397d652

Original Commit Message:

    Tail calls generate parallel moves that don't preserve the stack
    layout, which is not always correctly handled by the current
    gap resolver algorithm. Introduce a more robust algorithm that
    handles any parallel move.

    Design doc:
    https://docs.google.com/document/d/1WbX5B4ej9MzsJ28JS4J5cF2eiJhKyX39vAUB7GSA5YE/edit?usp=sharing

    Also remove the move-splitting logic. The problem that it addresses
    (swapping aliasing FP registers of different widths on arm) is already
    handled by the new algorithm.

R=thibaudm@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I6122e9fa7543171eff91435de1804f3a788455f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035332
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84394}
2022-11-21 13:45:47 +00:00
Clemens Backes
2be56a5b4c [wasm] Pass a filter function to {ValidateFunctions}
This will allow us to reuse the function for validation only lazy
functions.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: I853ec0a39a4f383391bd7e3556c16e84d11df553
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037642
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84393}
2022-11-21 13:39:17 +00:00
Clemens Backes
14b59a4bfb [wasm][fuzzer] Use Liftoff as reference is wasm-gc is enabled
The interpreter does not implement WasmGC, hence always use Liftoff as
reference if WasmGC opcodes are enabled.

R=manoskouk@chromium.org

Bug: v8:13496, chromium:1387316
Change-Id: I29f496ebc1921c727c216dda763c1e9a63d6597b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042288
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84392}
2022-11-21 13:20:07 +00:00
Andreas Haas
98415ed67a [wasm] Add test exception for serialization test with multiple isolates
The test fails with multiple isolates because with the NativeModule
cache the second isolate can create an unexpected state for the first
isolate.

R=clemensb@chromium.org

Bug: v8:13503
Change-Id: Ic83d374c61703fdeb570b65b3c444ab0ae3cef8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4040929
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84391}
2022-11-21 13:01:20 +00:00
Victor Gomes
5171527f11 [maglev] Fix debug-pos-offset in GeneratorStore
When creating the generator object, Ignition includes the
header object size.
The uses of debug-pos-offset, such as isolate.cc:AppendAsyncFrame,
expect that.

Bug: v8:7700
Change-Id: Idbe31802ac3ad6cbac7c5f7f7bd731132c358b61
Fixed: chromium:1387883
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042664
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84390}
2022-11-21 12:23:47 +00:00
Darius M
1d90a41cf2 [turboshaft] unpark scope when tracing reductions
Bug: v8:12783
Change-Id: I950c3a882c7a848d71f6ca5cd3da445b9c370823
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042662
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84389}
2022-11-21 12:06:42 +00:00
Hao Xu
2c3b02cc91 [csa] Support Loop Unrolling
Allow CSA to build unrolled loop by CodeStubAssembler::BuildFastLoop.
Currently this optimization is only applied to small loop to avoid
increasing code size significantly.

Before:
=========================================
  LoopHeader
  LoopBody
  Branch(cond, LoopHeader, Exit)
  Exit
=========================================

After:
=========================================
  LoopHeader
  LoopBody1
  LoopBody2
  Branch(cond, LoopHeader, AfterLoop)
  AfterLoop
  GotoIfNot(iteration_count_is_odd, Exit)
  LoopBody3
  Exit
=========================================

Change-Id: Ic519b24a3e161260e73447a1367a2e160b427369
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4022363
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84388}
2022-11-21 12:05:37 +00:00
Manos Koukoutos
6aeec9e513 [wasm-gc] Make expressions non-constant
Bug: chromium:1391736, v8:7748
Change-Id: I120bc5b8b95a599205760593dc1103d743b5dfa8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042283
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84387}
2022-11-21 11:53:59 +00:00
Clemens Backes
7856857b56 [wasm][fuzzer] Implement default ref arguments
This adds an implementation for the {kRef} case in
{MakeDefaultArguments}.

R=jkummerow@chromium.org

Bug: v8:13496, chromium:1391168
Change-Id: I4c0e85b46c50f766816f799e80cf1afbe6fa258a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042663
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84386}
2022-11-21 11:52:56 +00:00
Leszek Swirski
821c385e1e Reland "[maglev] Support call speculation disabling"
This is a reland of commit 00db0fff8c

Fix missing update_feedback_count setting, and adding update feedback to
lazy deopt.

Original change's description:
> [maglev] Support call speculation disabling
>
> Add a FeedbackSource to DeoptInfo which allows the caller to specify
> that this deopt is part of call speculation, and that call speculation
> should be disabled for this call when the speculation fails. This is a
> mechanism to prevent deopt loops, also used by TurboFan.
>
> Bug: v8:7700
> Change-Id: I59b5db3956e074ec808b218c00ae85796455742e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030438
> 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@{#84332}

Bug: v8:7700
Change-Id: I3dee2108495776d37417982ad593f6daa460919e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042661
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84385}
2022-11-21 11:40:56 +00:00
Clemens Backes
a765588a42 [wasm] Make parallelized validation a separate function
Move the {ValidateAllFunctions} method out of the
{ModuleDecoderTemplate} and provide it as a separate function. This will
allow us to reuse it for validation during compilation.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: Ie72b5e0a531eecc298e515646320ad83a3f6b9ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035979
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84384}
2022-11-21 11:09:16 +00:00
Darius M
00107cb412 [turboshaft] Disable BranchElimination
BranchElimination is currently broken in turboshaft, because when
duplicating a block that contains operations with multiple outputs
(OverflowCheckedBinop, Call, Change), if a Projection for this
Operation is in a later block, then the projection input won't be
alive, because we can't merge those operations with multiple outputs.

Fixing this will require re-thinking a bit how Call, CatchException
and CheckLazyDeopt work. For now, disabling BranchElimination is a
reasonable temporary solution.

Fixed: v8:13514, chromium:1391696, chromium:1386287
Change-Id: I71e8b6cc20701749e0c26638ac8c354393c8d426
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042543
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84383}
2022-11-21 10:54:17 +00:00
Clemens Backes
6aaab3291b [wasm] Clean up decoder constructor(s)
1) Pass {WasmFeatures} by value, it's a single word.
2) Pass a {base::Vector} instead of {start} and {end} pair.
3) Remove a redundant constructor (just pass an empty wire bytes vector
   instead).

R=thibaudm@chromium.org

Change-Id: I337c3c86960505ae23c88cb6adc5646a61111f76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030434
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84382}
2022-11-21 10:42:57 +00:00
Manos Koukoutos
ced7875a08 [wasm] Do not load-eliminate limit for stack checks
Change-Id: I2576e6b87d0de025cc91d37cea79e6e6f80909e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042284
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84381}
2022-11-21 10:06:57 +00:00
Michael Achenbach
3afea88feb [gcmole] Make wrapper backwards-compatible to gcmole modes
In a follow up we want to introduce a mode for just collecting or
processing. In the infrastructure however, we still call the wrapper
script with old arguments on release branches. This ensures that
we stay backwards compatible.

Bug: v8:12660
Change-Id: I08da713719d10cb58c2cd5ea7f711570bd57572c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035976
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84380}
2022-11-21 09:45:04 +00:00
Camillo Bruni
f7196c26ca [tools] Fix helper.mjs
Add missing semicolon that broke code with the auto-formatter.

Change-Id: I2bb792bc5c676f82f27501aec49748c213000b6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042441
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84379}
2022-11-21 09:44:00 +00:00
Lu Yahan
e048faa0f5 [riscv] Implement target_builtin_at func
Refer commit
447feef80e

Change-Id: Ib881597ac1d9e8ac7e4173d32956b8344cb50988
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4031878
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#84378}
2022-11-21 09:04:10 +00:00
Michael Achenbach
9b49b05f1c Instrumented libs: Add release to archive names in preparation for Focal
This ports:
https://crrev.com/c/4026927

This fixes the msan builders in CI.

Bug: chromium:1260217
Change-Id: Iabc978d65b534679be27054f005158c154c3de23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042241
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84377}
2022-11-21 07:59:56 +00:00
Lu Yahan
9fab8195c9 [riscv][regalloc] Resolve tail-call gap moves
Port commit 2f4397d652

Change-Id: I0e2e9fc743ff6d0e1a5270e39ded68a6c70e103a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4041646
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@{#84376}
2022-11-21 07:06:27 +00:00
Wez
b940024323 Revert "Skip protecting data memory on fuchsia"
This reverts commit ef88cefa23.

Reason for revert: Fuchsia now supports changing permissions through
nested VMARs, so this call should now succeed.

Original change's description:
> Skip protecting data memory on fuchsia
>
> The {vmar.protect} API used for {SetPermissions} fails when called on
> data memory with error -10 (ZX_ERR_INVALID_ARGS).
> Skip fuchsia until we figure out the right API to use there.
>
> R=​cbruni@chromium.org
>
> Bug: v8:13194
> Change-Id: I20754f7212a892b8440f29658bf3db40f7745fe9
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3833820
> Auto-Submit: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82494}

Bug: v8:13194
Change-Id: Ica7d94890eed111042d2edf10a2b0576c87744ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4031194
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84375}
2022-11-21 07:05:24 +00:00
Frank Tang
08c469719c [intl] Migrate to ICU 72
DEPS change in chromium is in
https://chromium-review.googlesource.com/c/chromium/src/+/3995549
and should be landed first.

This CL fix all the broken test in v8.

ICU72 release note https://icu.unicode.org/download/72
CLDR42 release note https://cldr.unicode.org/index/downloads/cldr-42

Key changes
1. Fix the test expectation for the formatted date string
a. use U+202f (narrow nbsp) before "PM" and "AM".
b. use U+200A (thin space) around U+2013 in date duration format.
2. Mark the test262 breakage.

Bug: chromium:1371208
Change-Id: I4e2ecc6330845a2bf86711bc4ee6fe6407f140c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4004606
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84374}
2022-11-21 07:04:20 +00:00
v8-ci-autoroll-builder
25b726493a Update V8 DEPS (trusted)
Rolling v8/build: 4f35453..bd89361

Rolling v8/buildtools: c3244c4..09154d6

Rolling v8/buildtools/reclient: re_client_version:0.85.0.91db7be-gomaip..re_client_version:0.86.0.25feac0-gomaip

Rolling v8/buildtools/third_party/libc++/trunk: b343ccb..cd0a050

Rolling v8/buildtools/third_party/libunwind/trunk: 86213b7..5870472

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/dc9aaef..b898eb3

Rolling v8/third_party/depot_tools: 7aaca94..d06e475

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221111.1.1..version:10.20221117.0.1

Rolling v8/third_party/instrumented_libraries: 7bb87a3..ecd3bd8

Rolling v8/third_party/zlib: 8bbd6c3..d866d41

Rolling v8/tools/clang: d3df9cc..ed5ed0e

Change-Id: I169e5ba775c5bcd84679e5c74b4583476ecfa964
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4039189
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@{#84373}
2022-11-19 03:53:47 +00:00
Zhi An Ng
983a1c24f5 Implement i32x4 and i64x2 lane select with blendvps/blendvpd
Change-Id: I7cd6bf9b969da41c4f710a8ada428dbb098bcb58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035091
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84372}
2022-11-18 19:12:44 +00:00
Clemens Backes
3d8db9a974 [wasm] Add test for splitting code on publishing
This adds a regression test for https://crrev.com/c/4025548.
Using {addBodyWithEnd(body)} makes the test a lot faster, and we just
skip it on known-to-be-slow variants.

In a default release build, the test takes ~0.3 seconds. In an x64 debug
build, it takes 17 seconds.

Bug: v8:13436
Change-Id: I63e2927774601b24d177b03cf075f9a8d287e934
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4031206
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84371}
2022-11-18 16:49:15 +00:00
Darius M
dd79882e54 Reland^2 "[turboshaft] Port BranchElimination to turboshaft"
Original change's description:
> Reland "[turboshaft] Port BranchElimination to turboshaft"
>
> Original change's description:
> > [turboshaft] Port BranchElimination to turboshaft
> >
> > Bug: v8:12783
> > Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84258}
>
> Bug: v8:12783
> Change-Id: I48214de33d05b7aa61a488b86bd5539fdb92e1f7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030576
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84331}

Bug: v8:12783
Change-Id: I7d217426f9ad96f586a8917d05492640f9c96af4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037762
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84370}
2022-11-18 16:38:04 +00:00
Milad Fa
4b7b95358e PPC/s390: [foozzie] Disable arm/arm64-sim debugger during differential fuzzing
Port b57bb851e0

Original Commit Message:

    If entered, the debugger hangs on readline in fuzz test cases, which
    makes differential fuzzing test cases harder to handle and repro.

R=machenbach@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ic0ebfe18ea7a50b6655087983ad02dbec60456fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037846
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/main@{#84369}
2022-11-18 16:10:44 +00:00
Victor Gomes
5d9571a7bb [maglev] Support TypedArray loads
Bug: v8:7700
Change-Id: Ib7229521143be074c904d7b34bf74979de04f3c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4027966
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84368}
2022-11-18 16:01:40 +00:00
Milad Fa
23f4346062 PPC/S390: Place SaveCalleeSavedRegisters under the .text section
Top-level inline-asm has no knowledge of its current section and
continues under whatever section that was defined before it.

`src/heap/base/stack.h` in this case is defining some global
constant values and as a result the previous section in this case
is `.rodata`, hence we may be placing instructions in a (potentially
not properly aligned) read only data section (which happens to become executable).

This CL forces the assembler to place these in the .text section and
gives them a correct alignment.

Change-Id: Ie9288b6c024f6ff0f399620169e5f777986e96c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035887
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84367}
2022-11-18 15:50:34 +00:00
Thibaud Michaud
2f4397d652 [regalloc] Resolve tail-call gap moves
Tail calls generate parallel moves that don't preserve the stack
layout, which is not always correctly handled by the current
gap resolver algorithm. Introduce a more robust algorithm that
handles any parallel move.

Design doc:
https://docs.google.com/document/d/1WbX5B4ej9MzsJ28JS4J5cF2eiJhKyX39vAUB7GSA5YE/edit?usp=sharing

Also remove the move-splitting logic. The problem that it addresses
(swapping aliasing FP registers of different widths on arm) is already
handled by the new algorithm.

Bug: chromium:1269989
Change-Id: I575d5b56e0d949e3226388e06052292680b66044
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030580
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84366}
2022-11-18 15:44:54 +00:00
Anton Bikineev
cd731db4b3 unified-young-gen: Implement V8->Oilpan remembered set
The CL implements an old-V8-to-young-Oilpan remembered set together with
a generational barrier.

Bug: v8:13475
Change-Id: I5f09f7c6db397f2a49cb0c47fd758a1604af4e83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030433
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84365}
2022-11-18 15:03:44 +00:00
Thibaud Michaud
94d83955c4 [profiling] Do not instrument the End block
The End block is not necessarily the last one in the RPO. Iterate
until the end but skip the end block.

Bug: chromium:1381131
Change-Id: I5e1cd19c1b3bea4cbe565319631a7686ed2352fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4017313
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84364}
2022-11-18 14:54:34 +00:00
Victor Gomes
d741b80e58 [maglev] Avoid unecessary lookups in FindRootIndex
Bug: v8:7700, chromium:1385659
Change-Id: I0840c3ea14272b0d6fa3e77b2648db24fd2d7978
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035553
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84363}
2022-11-18 14:45:27 +00:00
Samuel Groß
147abe0e25 [sandbox] Remove heap sandbox bots
The sandbox-future configuration (used by these bots) is now equivalent
to the default configuration, so they are no longer needed.

Bug: v8:10391
Change-Id: I3c4995f68a270b9f94161bbb9b4f90fd5ccade93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4034168
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84362}
2022-11-18 14:44:24 +00:00
Michael Achenbach
8c37a1a8bc [gcmole] Add tests for suspect collector
This adds tests of the GCSuspectsCollector and its relevant usages
in GCMole. The relevant logic has now 100% code coverage, which
prepares refactoring of the code and serialization of only partially
collected suspect data in a future CL .

No-Try: true
Bug: v8:12660
Change-Id: I0b0cc6f8a5e65f14084e80cda50400232e0d2c45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4031052
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84361}
2022-11-18 14:31:28 +00:00
Samuel Groß
06aaa9625f Remove support for unsandboxed ExternalPointers
Now that the external pointer sandboxing rollout has completed, the
machinery to support unsandboxed external pointers is no longer needed.

Bug: v8:10391
Change-Id: I5cec4b9bfca41a7db670b93d984f3cfc5a2adbfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4034166
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84360}
2022-11-18 14:29:54 +00:00
Victor Gomes
1098f4bc44 [maglev] Fix hasInstance call
... to ReduceCall without casting the target to a JSFunction

Bug: v8:7700
Change-Id: I7408ca58422f5920526d29f1fa077a7364392a14
Fixed: chromium:1385673
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4036967
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84359}
2022-11-18 14:02:44 +00:00