If the optimized code is deoptimized and the deoptimized exit offset is
inside of the optimized OSR code related loop, the optimized OSR code is
also out of date, remove the optimized OSR code, it will avoid hit the
optimized OSR code and soon later deoptimization of the optimized OSR
code.
This CL will reduce deoptimization. E.g. Deoptimization of JetStream2
case navier-stokes function addFields is reduced from twice to once.
Change-Id: I5bbf3039e916c3736b5b967d1f36b6ea90cfd40b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3648219
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Tao Pan <tao.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#80826}
This is a reland of commit c8848cf493
This change was reverted due to a problem in a preceding change. This
relanded version differs in its implementations of the
CompilationCacheScript member functions Lookup, Put, and Age, because
the intent is to not change any behavior.
Original change's description:
> CompilationSubCache has some complexity regarding generations of tables
> which is only used by one subclass, CompilationCacheRegExp. This change
> adjusts the class hierarchy so that classes only contain the necessary
> member functions.
>
> Bug: v8:12808
> Change-Id: I4f4cf15bbf9b80c2de0c18aea82a0c238804759d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629603
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#80506}
Bug: v8:12808
Change-Id: Ib0621b7de8da86a89752c66907f6a56adff9075d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3665936
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80825}
Allow fast branches in the case the accumulator's live range doesn't
extend beyond the branch test. Previously we were more restrictive and
only allowed fast branches the test itself didn't use the accumulator
register.
Bug: v8:7700
Change-Id: Iec98028b3ddb04eeb51e98436a0bdc48f22920ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663744
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80819}
NativeContexts are always allocated in old space and thus cannot die
or move during minor GCs.
Bug: v8:11708
Change-Id: I01ec7775aa1186d91ca620c464f570f24ac9f215
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3666617
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80818}
The number of fields gets huge, and we get a lot of repetitive code. Use
a macro to simplify things.
R=jkummerow@chromium.org
Bug: v8:12425
Change-Id: I5282d03724fb7fe966ac9b281398adabfd339dcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3667505
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80817}
Get some test coverage before restarting the map space compaction finch
again. This should test whether slots in invalidated objects are now
properly ignored when the invalidated object is dead.
Bug: v8:12578
Change-Id: I5b6f30b97c2db895183216ae5d5dbd4e5fa9d0c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676855
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80814}
... when external code space is enabled.
Since we are using near jump/call instruction only for [tail]calling
builtins, we can increase the code range as long as we can guarantee
that the remapped builtins are always reachable. We can do that by
remapping embedded builtins into the middle of the code range.
Bug: v8:11880, v8:12689
Change-Id: I69901634586df3c35618ea7bd5311102e4675f6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669107
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80810}
Mostly in comments, again, not much to be said...
Bug: v8:12425
Change-Id: I75b4b244e6fa259a29f6cf28bd8258b035af4be6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673536
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80808}
Similar to https://crrev.com/c/3634781, this switches some {BitVector}s
in the regular top-tier register allocator to {SparseBitVector}. For
functions with a huge amount of virtual registers, this would save a
significant amount of memory, and also performance.
For small number of registers though we probably introduce a slight
regression, because there is one more dynamic check to be performed
before accessing the bits.
R=mslekova@chromium.org
Bug: chromium:1313379, v8:12780
Change-Id: Ib65d22ad0a8e2c933f7178f4fefc36e500be623c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650602
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80806}
This CL adds a moving GC-safe, JS-exposed mutex behind the
--harmony-struct flag. It uses a ParkingLot-inspired algorithm and
each mutex manages its own waiter queue.
For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing
Bug: v8:12547
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80789}
This refactors ConvertToRelativeIndex into a clamping version and a
version that takes OOB labels for the upcoming implementation of
Array#with and TypedArray#with.
Also gets rid of the the "to" in the name, because these macros are
actually converting _from_ a relative index to an absolute one, not
the other way around.
Bug: v8:12764
Change-Id: I8bf1c16ce73008164acbd6b849f4259fb9315274
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669655
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80786}
We want to use llvm-ml to assemble files on Windows, but it only
recognizes .asm files as input files. See
https://chromium-review.googlesource.com/c/v8/v8/+/3668287.
Change-Id: I34ff6d2693a34653c8e22a7c2d093853505cd455
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672420
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80782}
This cleanup is expected to have no observable effects.
This is a partial reland of https://crrev.com/c/3597106
Bug: v8:12808
Change-Id: I6b3846f84b804b4a82b2b8601b4c6c93e2779084
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3664015
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80781}
Without this fix, the byte length for GSABs is probably serialized
wrong. A failing test is omitted since it would be pretty involved
(currently this code path is only hit with --stress-snapshot).
Bug: v8:11111
Change-Id: If7df98263cec9f82766c2fa6ba095b98b53a6fde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657431
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80780}