There's no need to assume anything when we don't reduce the node.
R=bmeurer@chromium.org
Change-Id: Ic39b6e634c662824a72affd91318ca024f3e1055
Reviewed-on: https://chromium-review.googlesource.com/1105832
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53870}
This CL adds a constexpr int31 == operator that returns
a constexpr bool value.
It also fixes a bug that this introduces because branch generation
for ternary operators incorrectly assumed that the condition value
was bool, whereas it can also be constexpr bool now.
Change-Id: Ie7d3497c9d1112c121b4a29561fe065b5bf01fb6
Reviewed-on: https://chromium-review.googlesource.com/1106343
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53867}
This is in order to check if we can get rid of the cache.
Bug: v8:7790
Change-Id: Id6625ffc440665b090f999564b006506f947ae45
Reviewed-on: https://chromium-review.googlesource.com/1107620
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53865}
We can instead pass the deopt id in a register, where before we were passing the
deopt entry address. This removes the need for the deopt tables altogether,
saving 192kB.
Change-Id: I479d4de1a0245de328720b6b03a1955c8c63f696
Reviewed-on: https://chromium-review.googlesource.com/1076472
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#53863}
Also fix an oversight in my previous CL.
R=jarin@chromium.org
Bug: v8:7790
Change-Id: I61c783392b7b7b38ea28dc44dc1e932d15b55bc6
Reviewed-on: https://chromium-review.googlesource.com/1106170
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53862}
GCC 4.9 used on some Node.js CI machines complains when the control
reaches the end of a non-void function and no return is encountered.
R=bmeurer@google.com, ofrobots@google.com, yangguo@google.com
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I5af0192cb187eccbf34dbb60ff3ac2e4774af803
Reviewed-on: https://chromium-review.googlesource.com/1105619
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53861}
The reference to the {NativeModule} (stored in a {Managed}) should live
on the {WasmModuleObject}, not on the individual {WasmCompiledModule}
objects.
R=titzer@chromium.org
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I21dfa088c9643d36d9fd5052a145e7e2af5e47f9
Reviewed-on: https://chromium-review.googlesource.com/1106380
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53860}
The {ModuleEnv} already contains a pointer to the {WasmModule}, no need
to pass it explicitly.
R=titzer@chromium.org
Change-Id: Icf0e8ea8b25c33dd5bcaeab2a4a746376e73813d
Reviewed-on: https://chromium-review.googlesource.com/1105828
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53858}
Our tests currently don't set {WasmModule::num_declared_functions}
correctly. This CL fixes that.
This enables the use of {WasmModule::num_declared_functions} instead of
{NativeModule::num_functions_ - NativeModule::num_imported_functions_}.
Drive-by: Fix {std::vector} reservation to reserve enough space for all
functions during decoding.
R=titzer@chromium.org
Change-Id: I6d7783aed1c0de3275fc72787dec17c38ff8c73b
Reviewed-on: https://chromium-review.googlesource.com/1106166
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53857}
Port 733b7c8258
Original Commit Message:
This introduces the concept of a jump table for WebAssembly, which is
used for every direct and indirect call to any WebAssembly function.
For lazy compilation, it will initially contain code to call the
WasmCompileLazy builtin, where it passes the function index to be
called.
For non-lazy-compilation, it will contain a jump to the actual code.
The jump table allows to easily redirect functions for lazy
compilation, tier-up, debugging and (in the future) code aging. After
this CL, we will not need to patch existing code any more for any of
these operations.
R=clemensh@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG= v8:7758
Change-Id: I1a370910ffa56dbdd609be6922067842a6adf1df
Reviewed-on: https://chromium-review.googlesource.com/1105060
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53852}
This removes special casing in the handling of {RelocInfo::CODE_TARGET}
for cases where such references appeared in {WasmCode}. Such references
can only appear in real {Code} objects and also only target real {Code}
objects by now.
R=clemensh@chromium.org
Change-Id: I87c55c60cd6344bb67fa8c8d04b66fb523d07ba7
Reviewed-on: https://chromium-review.googlesource.com/1104680
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53848}
Direct jumps only work for offset up to 64 MB on arm. For longer jumps,
use indirect branches (load target from constant pool into the pc
register).
R=mstarzinger@chromium.orgCC=pierre.langlois@arm.com
Bug: v8:7758
Change-Id: I1cf66b7d1bfb62cfcd6b1619c02816909a1f651e
Reviewed-on: https://chromium-review.googlesource.com/1105996
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53847}
This makes sure we use WebAssembly runtime stubs when performing value
coercions in wrapper code that is compiled into {WasmCode}. It hence
removes the last {RelocInfo::CODE_TARGET} references in {WasmCode}.
R=clemensh@chromium.org
BUG=v8:7424
Change-Id: Ic96e541abe98f90796a6506b09ff99557743b6f7
Reviewed-on: https://chromium-review.googlesource.com/1104462
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53846}
This encapuslates some of the heap accesses done by
JSNativeContextSpecialization::ReduceJSLoadGlobal and
JSNativeContextSpecialization::ReduceJSStoreGlobal.
Bug: v8:7790
Change-Id: Ib6c63903809927d6094af22519285cb9d0bbff7a
Reviewed-on: https://chromium-review.googlesource.com/1106141
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53845}
After the removal of the --skip-compiling-wasm-funcs flag, this helper
does not help that much any more, and contains unneeded logic. This CL
just inlines the computation in the caller.
R=titzer@chromium.org
Bug: v8:7754
Change-Id: I99cf006ffe9c33d79bea2ce186354c38bc63f6af
Reviewed-on: https://chromium-review.googlesource.com/1105767
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53844}
Like Heap::InFromSpace, it doesn't use any members, so should be made
static. Also clean up call sites to not call via a heap pointer.
Change-Id: If55484ddac51351d789c73093f1f7ebf1c568bea
Reviewed-on: https://chromium-review.googlesource.com/1088618
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53842}
This CL adds the incorrect return type of the conditional expression
in 'if constexpr' conditionals to the error message displayed
if the return type is different from 'constexpr bool'.
Change-Id: I58be4c140fa6fc475dc907a9ec872005fcb7d839
Reviewed-on: https://chromium-review.googlesource.com/1105768
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53839}
This CL moves the ToBoolean function from data-view.tq to base.tq.
It used to be in data-view.tq because we couldn't call macros
from one file to the other but this has been fixed now, and it
makes more sense to have it there.
Change-Id: Id201979eacbeb4307ff7d515db48377490d5bed7
Reviewed-on: https://chromium-review.googlesource.com/1104683
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53837}
This CL enables embedded builtins to get benchmark feedback. We need
this feedback to identify and address remaining performance problems.
Bug: v8:6666
Change-Id: I8f77f218e656b55ddabe1236eb2a1d14a5ac6233
Reviewed-on: https://chromium-review.googlesource.com/1105834
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53836}
If a call to a builtin is generated at run-time (vs at snapshot time)
we don't need to tag the call/jump with relocation info, as the builtin
address will not change.
The only way to generate a builtin call at snapshot time is via
MacroAssembler::JumpToInstructionStream where we keep OFF_HEAP_TARGET.
The reloc info for builtin calls and jumps is set to NONE.
Bug: v8:6666
Change-Id: I9e8ad9f23481a2177e69352a56010084336402e7
Reviewed-on: https://chromium-review.googlesource.com/1105758
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53835}
We need to create one {WasmCompiledModule} before creating the
{WasmModuleObject}. This CL refactors the code such that the
{WasmModuleObject} itself creates the {WasmCompiledModule}. This moves
us closer to removing the {WasmCompiledModule}.
R=titzer@chromium.org
Change-Id: I9f85e47f643c39840036f4f1f92df736732c8f74
Reviewed-on: https://chromium-review.googlesource.com/1105762
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53833}
The blacklist is needed to make compilation work.
TBR=sergiyb@chromium.org
NOTRY=true
Bug: chromium:853202
Change-Id: Ie867b3605a42ddbcf02514965652ff89121be14d
Reviewed-on: https://chromium-review.googlesource.com/1105830
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53832}
This also restores some uniformity in these headers.
R=mstarzinger@chromium.org
Change-Id: Ic3a941bce287596f564ba9f87f3a8ca2c46c2ee2
Reviewed-on: https://chromium-review.googlesource.com/1105763
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53831}
This reverts commit 2c1e4aa990.
Reason for revert:
https://ci.chromium.org/buildbot/client.v8.ports/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/11591
Original change's description:
> [test] Initialize slow-dcheck runtime flag with compile time value
>
> This makes sure slow dchecks are part of the snapshot when the compile
> time flag is set. It'll also obviate the need to set the runtime flag
> in general, making configurations simpler.
>
> It's still possible to opt out at runtime for the non-snapshot dchecks
> using the negated runtime flag.
>
> Bug: v8:7853
> Change-Id: Iadfc46ed691d32e9d39717e2ea0383e784660d1d
> Reviewed-on: https://chromium-review.googlesource.com/1105050
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53819}
TBR=machenbach@chromium.org,cbruni@chromium.org,jgruber@chromium.org,szuend@google.com
Change-Id: If209aa824749f358a892218dda99c30b1a63b99d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7853
Reviewed-on: https://chromium-review.googlesource.com/1105857
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53830}
This is a reland of 733b7c8258.
The arm64 bug was fixed in https://crrev.com/c/1105051.
Original change's description:
> [wasm] Introduce jump table
>
> This introduces the concept of a jump table for WebAssembly, which is
> used for every direct and indirect call to any WebAssembly function.
> For lazy compilation, it will initially contain code to call the
> WasmCompileLazy builtin, where it passes the function index to be
> called.
> For non-lazy-compilation, it will contain a jump to the actual code.
> The jump table allows to easily redirect functions for lazy
> compilation, tier-up, debugging and (in the future) code aging. After
> this CL, we will not need to patch existing code any more for any of
> these operations.
>
> R=mstarzinger@chromium.org, titzer@chromium.org
>
> Bug: v8:7758
> Change-Id: I45f9983c2b06ae81bf5ce9847f4542fb48844a4f
> Reviewed-on: https://chromium-review.googlesource.com/1097075
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Ben Titzer <titzer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53805}
TBR=titzer@chromium.org,mstarzinger@chromium.org
Bug: v8:7758
Change-Id: I68555230c6db97e70f0b8fef784188f55ee04794
Reviewed-on: https://chromium-review.googlesource.com/1105158
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53829}
To avoid repeating code for the few places where we can call GetIsolate
and GetHeap safely.
Bug: v8:7786
Change-Id: I6c6de81488bfa79dca50cfd2b6356f432401b68e
Reviewed-on: https://chromium-review.googlesource.com/1104684
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53828}
This removes several GetIsolate calls from Map:: methods and instead
passes the Isolate in. This is a very noisy change but mostly it is just
adding Isolate to method declarations and forwarding it on.
Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I159505e50a9462d01066f14da0fcc29762bd5531
Reviewed-on: https://chromium-review.googlesource.com/1075267
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53826}
This CL changes all ArraySort benchmarks to execute the setup
function for each iteration (one run call), instead of only once for
all iterations.
Even though we now also measure the time needed to copy and prepare
the array, this is needed, otherwise we would mainly measure sorting
already sorted arrays.
R=cbruni@chromium.org, jgruber@chromium.org
Change-Id: I2e0e301b52b0288b8c825c3c8401c348c4a0dee7
Reviewed-on: https://chromium-review.googlesource.com/1105045
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53825}
TurboFan returned null handles if compilation did not succeed. This CL
changes that to a MaybeHandle to make it explicit that client code needs
to handle the error.
Bug: v8:7856
Change-Id: I6087e6263faa1150b9788213dd22c398b4a2fc2d
Reviewed-on: https://chromium-review.googlesource.com/1104688
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53824}
We want to remove GetIsolate calls, but this particular one is safe
and necessary to avoid either storing the isolate in the parser/scopes,
or passing it through as a parameter throughout the parser.
Bug: v8:7786
Change-Id: I07765f5c20b2c9925bb0b980bc9fe850c91d7811
Reviewed-on: https://chromium-review.googlesource.com/1104685
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53822}