This CL fixes the overlap check by using {<=} instead of {<}. This
allows us to always use {std::copy_n}, which should fall back to
{memcpy} internally (instead of the potentially slower {memmove} we
were using before).
This might also fix the regressions seen mostly on atom CPUs.
R=leszeks@chromium.org
Bug: chromium:1006157
Change-Id: Ib61048d65e99a9e7edac5ed894ceaf9e26ad4409
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1844781
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64131}
Removes CodeStubAssembler::GotoIfDebugExecutionModeChecksSideEffects and
associated test as well as the PerformSideEffectCheckForObject runtime
function.
Bug: v8:9396
Change-Id: Id7748be8fbf1d633f759fef8751ddca13a21748c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1824937
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64130}
The {GetNearRuntimeStubEntry} and {GetNearCallTargetForFunction}
functions need to find the code space that contains the current
function. This lookup requires a lock and is non-trivial. The repeated
lookup caused severe regressions.
This CL introduces a {JumpTablesRef} struct which holds information
about the jump tables to use. It can be looked up once and then used
for a whole function or even several functions within the same code
space (in {NativeModule::AddCompiledCode} which adds a whole vector of
compilation results).
This fixes the regressions.
R=ahaas@chromium.org
Bug: chromium:1004262, v8:9477
Change-Id: I50bd8327a131e3bee79d86b6d7e867a506959312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1840153
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64129}
Placing these tests in anonymous namespaces, is the suggested fix
according to the GCC documentation.
The GCC documentation states: "If a type A depends on a type B with no or
internal linkage, defining it in multiple translation units would be an
ODR violation because the meaning of B is different in each translation unit.
If A only appears in a single translation unit, the best way to silence the
warning is to give it internal linkage by putting it in an anonymous namespace as well."
Change-Id: I69a1e9b5f1789e9a7a62c762cd499809a72e0ea5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1836255
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64128}
Because of a GCC bug we needed to use a functor instead of a constexpr
function. Since we do not support gcc before version 5 any more, this
can be cleaned up now.
R=jkummerow@chromium.org
Bug: v8:9396
Change-Id: I848c5a25e1d5fa44a1497b06826f9a59b93ed695
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835543
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64127}
This CL removes the StoreBuffer and inserts slots into the
RememberedSet directly from within the RecordWrite builtin. Only calls
into C code when either the SlotSet-array or the bucket is not
allocated. This avoids filling the store buffer up with duplicates or
due to a write-heavy workload and then blocking the main thread on
store buffer processing.
The first CL (https://crrev.com/c/1815241) got reverted, because
mksnapshot was using a different size for SlotSet than the final
binary on ARM. This is fixed now, SlotSet has a standard layout.
Bug: v8:9454
Change-Id: I881641f4ee08a8b42c36fdca8733138b908096bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1842452
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64126}
This adds a fake toolchain for pointer compression, used for
correctness fuzzing. The toolchain enables us to have an extra build
with inverse pointer-compression defaults side-by-side.
The extra build is used similarly to existing x64/x86 comparisons,
except that we now compare builds with different compile-time flags.
Change-Id: I75491371262204b86eaa006ca8d04848f49121ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1829275
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64123}
The entries test262_variants and test262 are now equal after previous changes.
This switches all to test262 to prepare removing the former.
Bug: v8:9791
Change-Id: I677ea36798556e1aeed8bc11c3272804141e1eb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835539
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64122}
We reuse PACKED_OP_LIST to generate *pd instructions. Introduce a new pd
base method, similar to ps and vps.
Bug: v8:9396
Change-Id: Id9d81c22c9110935484fd929ef7bf5cc20e9ae7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834767
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64117}
... in order to improve performance of decompression code on C++ side
(because computation of isolate root from isolate pointer becomes a trivial
reinterpret cast) and measure the impact separately from other ptr-compr
changes.
Bug: v8:9353
Change-Id: I36906cef2968355411ee944d97625ecd2652646b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835550
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64115}
Now that sweeping uses its own RememberedSet, pre-freeing of empty
buckets is not necessary anymore. Mutator inserts into a different
remembered set, than the sweeper removes slots from.
Bug: v8:9454
Change-Id: I65d046926aa82aeb9eca7694e6a7eff1331d7e01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835547
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64114}
It was on JSGlobalProxyRef but in reality the property cells exist in
the global object, not in the global proxy.
Bug: v8:7790
Change-Id: Ia7bd5731c730db09602a1aec61b64b1355abf6a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1841352
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64112}
This is a reland of b271ea3c94
The failing arm64 disasm poison test was fixed.
Original change's description:
> [ptr-compr] Disable double fields unboxing
>
> Double field unboxing optimization is incompatible with pointer compression so
> we land this CL before enabling pointer compression in order to separate memory
> and performance regressions caused by disabled double field unboxing from
> pointer compression change.
>
> Bug: v8:9799
> Change-Id: Ic8118356496a3f351344215b409f9722de6c9355
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835546
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64089}
Tbr: verwaest@chromium.org
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_dbg
Bug: v8:9799
Change-Id: Ib7c126d70859537c3d0bce54a49f23909c14a6ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1840411
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64111}
Reorders the Smi check and the empty OptimizationMarker check as the
latter implies the first and means there is now just a single comparison
on the fast path.
Bug: v8:9771
Change-Id: Ibba1f322944b17186842983e227684b301ed5f31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1833683
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64110}
A slow dcheck can verify that hints are equal for the same
SharedFunctionInfo+FeedbackVector combo.
Bug: v8:7790
Change-Id: I43dcacf19c857770b609d13c310835a873c814fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835952
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64109}
Recursively serialize arguments to higher-order functions if
appropriate. This should recover all or most of the Deltablue
regression with --concurrent-inlining. It is also a prerequisite to
allowing speculation in the call reducer for these situations.
Bug: v8:7790, v8:9702
Change-Id: I1ac8ac8b8e4dc0f2e19c89aacfb45d18f2df190f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835541
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64108}
... as the smi-corrupting decompression seems to be stable enough.
Bug: v8:9706
Change-Id: I404924ec4a12b37d8bc3e521c5563aa7e6357dc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835544
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64107}
This is a reland of 35ca0abdc5.
The last known issue is fixed in https://crrev.com/c/1832178.
Original change's description:
> [wasm] Ship far jump tables
>
> This flips the --wasm-far-jump-table flag. It will allow for more than
> 128MB of code space per wasm module on arm64, and will increase the
> limit on the number of modules per process on x64 (was ~1000 before,
> because we reserved 1GB for the code space per module).
>
> R=mstarzinger@chromium.org
>
> Bug: v8:9477
> Change-Id: I870ec616f4812e38ef1e3fccf0629854a247bb4f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1815247
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Backes [né Hammacher] <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63967}
Bug: v8:9477
Change-Id: I6d7de80e874e1d51512148fc3c1f45b0fc1474ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1840151
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64105}
This deletes unresolved VariableProxy objects created for labels in the
preparser which prevents shadowed variables in enclosing scopes from
being context-allocated.
Previously this was only done in the full parser, which leads to
bytecode mismatches with lazy source positions.
Bug: chromium:1009728, v8:8510
Change-Id: If2d0c345346116a7f5aacbcd0cf3638e9f7e04cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1836258
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64104}
Do not store page_start_ in SlotSet anymore, when needed this address
can be calculated cheaply and be passed in from the caller.
Bug: v8:9454
Change-Id: I4cdb010e4126680d8df500e40ae3d0bc884cf501
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1838731
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64103}
Slots in the sweeping remembered set were not deleted when
evacuation of an evacuation candidate fails. Also introduce DCHECKs
for other usages of RemoveRange where deleting slots in the sweeping
remembered set is not required.
Bug: v8:9454
Change-Id: If809ea74e28817a9611104b1f2c6b34900e3432b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1838732
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64102}
The natives blob is deprecated and will be removed in the next
release.
Step 1 landed in https://crrev.com/c/1824944.
Step 2 (this CL) is to mark API functions as V8_DEPRECATED.
Step 3, in the next V8 release, is to remove these functions and all
other natives support in V8.
Bug: v8:7624
Change-Id: I177fa6197e06a3ca21787b4e2d74dd1689038b6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835536
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64101}
merge_to_branch.py can fail partway through for many reasons (the EDITOR
environment variable not being set being one) and on the next run this
leads to an error saying:
Exception: A merge is already in progress
It is not obvious to those doing their first merge how to get past this.
Searching the source code leads to the -f option but it should be
possible to proceed without searching the source. This change adds
"Use -f to continue" to the message.
Change-Id: Ic9d8e404e044be3308e5ae3ef3a4430e4aa3ccc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1837028
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64096}
When comparing with zero, we can generate a CBZ instruction instead of a
CMP+B. If we teach TurboAssembler::JumpIfEqual() to do it then we can do it
in code generated for binary switches.
Change-Id: I39a045ed666fd6569bf9c9f6be28c4efbeeb01a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1836254
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#64094}
This reverts commit b271ea3c94.
Reason for revert: breaks arm build:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/17575
Original change's description:
> [ptr-compr] Disable double fields unboxing
>
> Double field unboxing optimization is incompatible with pointer compression so
> we land this CL before enabling pointer compression in order to separate memory
> and performance regressions caused by disabled double field unboxing from
> pointer compression change.
>
> Bug: v8:9799
> Change-Id: Ic8118356496a3f351344215b409f9722de6c9355
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835546
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64089}
TBR=ishell@chromium.org,verwaest@chromium.org
Change-Id: Ief07d8d4b3c4a6f1439656f31b8d34ec99bf9747
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9799
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834769
Reviewed-by: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64090}
Double field unboxing optimization is incompatible with pointer compression so
we land this CL before enabling pointer compression in order to separate memory
and performance regressions caused by disabled double field unboxing from
pointer compression change.
Bug: v8:9799
Change-Id: Ic8118356496a3f351344215b409f9722de6c9355
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835546
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64089}
We already use PACKED_OP_LIST to generate AVX instructions, this change
reuses the same list to generate the SSE equivalents, by introducting a
helper assembler instruction, ps, as the actual implementation (similar
to out vps is used as the implementation for AVX packed
singled-precision floats).
Change-Id: I7dd72c2be75eb3ff5badf6d668780604cae8c684
Bug: v8:9396
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834621
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64088}
If script is not disassembled, still use the same script URL format for
consistency.
In particular, use an absolute `wasm://wasm/` prefix, like disassembled fake
scripts do, instead of just a script name which appears to be a
relative URL to devtools.
Change-Id: Ib7632f9f3587ca4961eb4f0b884482b3a1a6e1f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1833685
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
Cr-Commit-Position: refs/heads/master@{#64086}
Premonomorphic state was only used for store globals to handle contextual
store on a global object [1]. We now handle these differently and we
move to fast handlers even without going through premonomorphic state
after this cl: https://chromium-review.googlesource.com/c/v8/v8/+/1807356.
Also, with lazy feedback this would be a relatively uncommon case anyway.
So, we no longer need premonomorphic state. This cl removes this state
entirely.
[1]: https://bugs.chromium.org/p/v8/issues/detail?id=8712
Bug: v8:8394
Change-Id: I71fb918b82b0c321a9705e32c8fc44e9ec223b38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1833690
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64085}
The creator of the allocator retains ownership and is responsible
for its eventual destruction.
Change-Id: Iaf1b24bee7153b3b1a75df99974adff42c6a197f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835545
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64084}
Fix corner case where we would try to read a property when having a
pending or scheduled exception.
Re-add tests.
Bug: chromium:1006640
Change-Id: I2fc84ee0f6145db2d200a8b9abf57fdc4b12a5a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1835531
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64083}
This is a reland of 9efe315ee2 after marking
box2d slow.
Original change's description:
> Mark functions for optimization only on bytecode budget interrupts
>
> We used to mark functions for optimization on any interrupt. This sometimes
> causes functions to OSR when not needed. The implementation was such because
> we didn't have a different runtime function to distinguish bytecode budget
> interrupts from other interrupts. For lazy feedback allocation we added a
> new runtime function for bytecode budget interrupts so it makes it easier
> to actually mark functions only when needed.
>
> This also includes a fix to reduce the stack limits for interrupts when
> entering a scope that allows interrupts from a postponed interrupt scope.
>
> Bug: chromium:993061
> Change-Id: Iaf7b4dccb7a503e5b6bfcbb993bc7482aa593955
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1829218
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64048}
Bug: chromium:993061
Change-Id: I24dae03357d6c368e4173db3f071e8ab09e9d6dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1832173
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64082}