This is a reland of 09fa63a935
Original change's description:
> [wasm-hints] Enabled Lazy Compilation by Hint
>
> Hints for lazy compilation are now taken into consideration. If the
> custom hints section suggests lazy compilatin we do so unless the module
> consists of a single function.
>
> Bug: v8:9003
> Change-Id: Ibdc400453cee20d4d5c814733887b38fb675b220
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535827
> Commit-Queue: Frederik Gossen <frgossen@google.com>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60557}
Bug: v8:9003
No-Try: true
Change-Id: I8d6f4518aa548c815fba4e6e62d2206129336cc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547851
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60564}
In {TryAllocateBackingStore} we already have two gc-and-retry loops.
This CL adds a third one, and pulls out the gc-and-retry loop to a
helper method.
R=ulan@chromium.org
Bug: v8:8898, chromium:909723
Change-Id: I830aa86b899223825d2e6abfcbacad0ccbf3485b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547666
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60562}
This is a reland of dd07cbcfdf
Original change's description:
> PPC/S390: [heap] Clean-up keys of oldspace weakmaps during scavenge
>
> Port 6604f1826d
>
> Original Commit Message:
>
> This CL adds handling for cleaning up weakmap (EphemeronHashTable)
> keys during scavenge, even if the weakmap resides in oldspace.
>
> Change-Id: Idf8b6115e57b1229864afefe6ffee85acb5e7547
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1538320
> Reviewed-by: Milad Farazmand <miladfar@ca.ibm.com>
> Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
> Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
> Cr-Commit-Position: refs/heads/master@{#60446}
Change-Id: I8136d873cfc399c84a4daf4de9a1043f016561cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1546561
Auto-Submit: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#60560}
Lower the interrupt budget so we allocate feedback vectors earlier.
The earlier budget of 2048 causes ~3% regressions in speedometer. From earlier
experiments, there was no noticeable memory savings between 2048 and 1024.
Bug: v8:8394
Change-Id: I6327e22c4df60c262420975f2e204cdbacefb485
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547662
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60559}
This reverts commit 09fa63a935.
Reason for revert: Falkes on https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20shared/29942
Original change's description:
> [wasm-hints] Enabled Lazy Compilation by Hint
>
> Hints for lazy compilation are now taken into consideration. If the
> custom hints section suggests lazy compilatin we do so unless the module
> consists of a single function.
>
> Bug: v8:9003
> Change-Id: Ibdc400453cee20d4d5c814733887b38fb675b220
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535827
> Commit-Queue: Frederik Gossen <frgossen@google.com>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60557}
TBR=mstarzinger@chromium.org,clemensh@chromium.org,frgossen@google.com
Change-Id: I18dd424fe8cf05f220f7498bb1ebe4b9fce7d240
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547668
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60558}
Hints for lazy compilation are now taken into consideration. If the
custom hints section suggests lazy compilatin we do so unless the module
consists of a single function.
Bug: v8:9003
Change-Id: Ibdc400453cee20d4d5c814733887b38fb675b220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1535827
Commit-Queue: Frederik Gossen <frgossen@google.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60557}
It is not safe to access flags from concurrent marking visitor. We access
FLAG_flush_bytecode and FLAG_stress_flush_bytecode when visiting
SharedFunctionInfo and JSFunction to decide if we need to collect bytecode.
This cl adds a bytecode_flushing_mode which will be initialized when creating
the visitor. This way we can avoid accessing flags.
Bug: v8:9045
Change-Id: I84bf09ec2dd1543abad54bd87f8bf953830b89e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541108
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60553}
We added %PrepareForOptimization, that holds the bytecode array strongly until the
function is optimized, to test using assertOptimized. This function expects that the
function is optimized before preparing the next function for optimization. In some
tests, we may not explicitly optimize a function because it got inlined into other
functions or if it was already optimized. This cl relaxes this condition and holds
onto multiple bytecode arrays.
Bug: v8:8801, v8:8395
Change-Id: Iebccc4a798aa3f35be9ee295eb3c4917da659c22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541055
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60552}
Drive-by: make sure that Allocate node consistently take intptr
input as size (as opposed to sometimes intptr, sometimes int32).
Bug: v8:8984
Change-Id: Ida56b9788cd11b470cc866f1b7df71f03ef0075f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541037
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60551}
- We didn't take stability dependencies on the inferred maps
in case of kUnreliableReceiverMaps.
- We didn't take stability dependencies on the prototype chains.
Bug: v8:9041
Change-Id: I85418dbed219f51e7fb46c59a0cb9cbb9b499bc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541107
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60550}
It was missing a control output.
Bug: chromium:946889
Change-Id: I85f203fc6e27a60f0b86e0e2999dd798a5416dfc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547655
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60549}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in base code to 'using' declarations.
R=mlippautz@chromium.org
Bug: v8:8834
Change-Id: Ic5c3d7fa2e50938c6f43e9ff304dc2289fed1133
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547650
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60546}
Without the proper check V8 would not delegate to the embedder (Blink) for
processing wrappable objects.
Bug: chromium:946941
Change-Id: I5aa3ca85e5113ab8d28a61eca6a5e0593c62f6a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1547649
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60545}
... from Object to HeapObject, as they are never Smis.
Change-Id: I4cbe12985091ed1b1e94dab2803a977ae3e25224
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541104
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60543}
The CheckNonEmptyString lowering was the wrong way around and would
deoptimize if it doesn't see the empty string. This leads to the
creation of invalid ConsStrings and also to unnecessary deopt loops
with proper code.
Bug: chromium:947949, v8:8834, v8:8931, v8:8939, v8:8951
Change-Id: Ib2cc4e92cc9ec7e0284d94f74d14f67f8c878dec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545908
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60542}
Porting: 138d2dfcb1
Original comment:
This allows immediates to be encoded directly into instructions, rather than
mov-ing constants to registers first.
This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
this approach has been approved.
Change-Id: I8442642126555f47a47d511f0ca9d4c00ed82da1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1546050
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#60533}
That saves some bytes on the frontend side and some cycles when generating and parsing protocol JSON for stacks.
BUG=chromium:946411
Change-Id: I36b3a48b5d8246a05b877bc21f36c08803a1c304
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1542800
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60532}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in src/objects to 'using' declarations.
R=mstarzinger@chromium.org
Bug: v8:8834
Change-Id: Iec455b40e9256ee3aae867a42c0e949a338d417c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545893
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60531}
This removes a special case for eager initialization of function tables
used by asm.js modules. For such modules the table in question can never
be exported. It is used to implement asm.js function tables (for details
see section 6.3 - ValidateFunctionTable in the asm.js spec). Since such
tables are never exported, it should be beneficial to lazily allocate
the export entries.
R=ahaas@chromium.org
Change-Id: I5099d548fe1d2432584d1a09b756c136866d4a0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1539578
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60528}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in compiler code to 'using' declarations.
R=mstarzinger@chromium.org
Bug: v8:8834
Change-Id: I3baf3ecbfe2c853cb17bb479ebbf140382193b5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545896
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60527}
This fixes initialization of reference type global variables (i.e.
anyref and except_ref) based on an index of another global. It extends
the existing support to exception types, fixes the logic, and also fixes
a missing write barrier.
R=ahaas@chromium.org
TEST=mjsunit/wasm/exceptions-global
BUG=v8:8091
Change-Id: Ia91f1ea03be24fadf3023a5acdd073badb8dcd93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1539581
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60525}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in heap code to 'using' declarations.
R=mstarzinger@chromium.org
Bug: v8:8834
Change-Id: I8a9f6e1eebdd0adca4373c866e95ebab0a1e992d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545892
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60523}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in parsing code to 'using' declarations.
R=leszeks@chromium.org
Bug: v8:8834
Change-Id: I0c95f83ee6897d294bd002b7a4a6277962397e90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545897
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60522}
This is a reland of e3be96d644
The failure was due to not sign extendint the immediate for 64-bit adds on
32-bit platforms.
Original change's description:
> [liftoff] Introduce emit_{i64,i32}_add with immediate
>
> This allows immediates to be encoded directly into instructions, rather than
> mov-ing constants to registers first.
>
> This patch only changes emit_{i64,i32}_add, other emit_ functions will be changed once
> this approach has been approved.
>
> Bug: v8:9038
>
> Change-Id: I0c7306c2da0dae26f1c6e2465a9565adbf0bda84
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1524482
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60506}
Bug: v8:9038
Change-Id: I7dd1112827d037d900fd36cce71206388642605b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1543730
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60521}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in ic code to 'using' declarations.
R=ishell@chromium.org
Bug: v8:8834
Change-Id: I70c74d3f20a6c15693157de5fc40bb769ef0599d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545895
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60520}
Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in wasm code to 'using' declarations.
R=ahaas@chromium.org
Bug: v8:8834
Change-Id: Ibdce88a5cc31e0785cbc1b34088bd39aa3ec84b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545890
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60519}
In x64 we can use the macro ASSEMBLE_MOVX.
In Arm64, we force the use of registers.
B
Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng,v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977
Change-Id: I98c6a12d28acca43a38a77dc3ee7af126edb64fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545889
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60518}
In reducers, we should avoid reductions of the form
ReduceWithValue(node, replacement)
return Replace(node)
because such reduction does not kill the original node, so it may
become subject to resurrection from some side table (in the bug
referenced below it was load elimination's side table). Instead,
we should use
ReduceWithValue(node, replacement)
return Replace(replacement)
Bug: chromium:945644
Change-Id: Id210efe0d214a53241392d30b7f0eee8e7515e2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545229
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60517}