Making it into more "idiomatic" Torque code (we are still defining what that means).
Template specialization on double and fast fixed arrays allowed me to cut
down on the boilerplate.
Bug: v8:7672
Change-Id: Ia35706993a9e2ea087ecc3ef93b3a5864ec97827
Reviewed-on: https://chromium-review.googlesource.com/1064054
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53246}
This was set very regularly in FillFunctionInfo, but it was almost
always set to kNoReason, because the associated SFI had no bailout
reason. Given that having a bailout reason is the rare case, we
just assume an empty bailout reason, and use the rare_data_ struct
to store the string pointer if we do need it.
This saves another pointer of space on the CodeEntry object (approx
1.4 MiB on the node server example).
Bug: v8:7719
Change-Id: I8e2272b572285ddf353ba0b303e6da095b7d5272
Reviewed-on: https://chromium-review.googlesource.com/1064370
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53244}
Long timezone names overflowed the timezone cache which had a static
length of 100. This uses dynamically allocated std::strings as backing
stores instead.
Bug: chromium:842085
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I3da474c8b7c530b0933018c6239021979c320043
Reviewed-on: https://chromium-review.googlesource.com/1064111
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53243}
We need to change WasmExportedFunction to call imported functions via
the import table, so there will be no embedded call target.
This also removes the necessity to generate an unreachable call after
the runtime call for js-incompatible signatures.
R=titzer@chromium.org
Bug: chromium:843563,v8:6668
Change-Id: I82cb31930f6b61ad59fde63a8c5ae631da3d1a14
Reviewed-on: https://chromium-review.googlesource.com/1063771
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53239}
This is to speed up slow nosnap runs. Allocation verification is covered by
running mksnapshot on other builders.
Change-Id: I9c286f7dd4abac9cf1be45be4a483a7b36d09f8a
Reviewed-on: https://chromium-review.googlesource.com/1059113
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53234}
Turn `debug::EntriesPreview` into a public API.
This is a straightforward approach to addressing
https://github.com/nodejs/node/issues/20409
(not relying on functionality behind `--allow-natives-syntax`)
in Node.js.
Refs: https://github.com/nodejs/node/issues/20409
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7021e5846012a55a82c488408ded6591f6b139e7
Reviewed-on: https://chromium-review.googlesource.com/1057467
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53226}
Without specifying what the default allocator does, using
the buffer returned from `Release()` means that one basically
had to make an educated guess on how to free it
(and that ownership actually was transferred to the caller).
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ie2ac0c91d9bdafbe91f6bce9b2263e304b2336ea
Reviewed-on: https://chromium-review.googlesource.com/1056369
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53225}
Also fixup some implementations that were lagging behind per the lack of
pure virtual not having enforced everything yet.
Also fixed recently introduced
PredictablePlatform::CallDelayedOnWorkerThread() to ignore delayed tasks
after realizing the intent is to intercept worker tasks instead of
sending them to |platform_|.
Node.js migrated off these APIs @
https://github.com/v8/node/pull/69R=ahaas@chromium.org, yangguo@chromium.org
Bug: chromium:817421
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I92171f213b5fc64ab1f21e8eec72738f5ce228bd
Reviewed-on: https://chromium-review.googlesource.com/1045310
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53223}
Currently ProfilerListener holds all the CodeEntries it ever
created during the profiling session. It is not capable of removing
entries corresponding to the code objects discarded by GC as there's
no such code event.
However it is sometimes possible to tell if a code object was GCed.
Hook up to the CodeMap code entry removal and if the entry has never
been hit by a sample we can safely delete it.
As a bonus the CodeEntryInfo size has been reduced on x64, which also
saves 8 x <number of code entries> bytes.
BUG=v8:7719
Change-Id: I988bc5b59f3fba07157a9f472cbcf68596fcd969
Reviewed-on: https://chromium-review.googlesource.com/1054346
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53222}
In the context of launching Liftoff, this will help us estimate the code
size increase and find a good value for the maximum allowed code space.
R=titzer@chromium.org
Bug: v8:6600
Change-Id: Ie76172edbf136629636911fe97c7ecdc940be86d
Reviewed-on: https://chromium-review.googlesource.com/1061497
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53220}
- Changes WASM serialization to copy misaligned code into an aligned
buffer before relocating. This extra copy will eventually go away
when code is mapped into the process.
- Serialized code buffers no longer need padding to align their
contents.
Change-Id: Ib016c69b5099a4cf039dcd3d36a48f076033227c
Reviewed-on: https://chromium-review.googlesource.com/1060471
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53219}
This CL adds the new type expression
builtin(Context, ArgType1, ...) => ReturnType
and allows to use Torque-defined builtins as values of this type, as well
as calling values of this type.
The new function pointer types are subtypes of Code.
Change-Id: Ib7ba3ce6ef7a8591a4c79230dd189fd25698d5b9
Reviewed-on: https://chromium-review.googlesource.com/1060056
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53217}
This CL adds support for inlined functions in Turbolizer. It is also a
refactoring of the Turbolizer code-base. Most importantly, handling of
source positions changed to exact source positions, and not code ranges.
This improves selection interoperability between different phase views.
A separate CL changes the Turbolizer JSON format to include inlining
information. This Turbolizer update, however, is intended to be backwards
compatible with the JSON format Turbolizer generated before the JSON
format change.
Bug: v8:7327
Change-Id: Ic67506a6f3a36fe98c012b1e76994972779c1fd2
Reviewed-on: https://chromium-review.googlesource.com/1032784
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53213}
It is possible for user code to modify fast regexp result objects
before they are used e.g. by RegExp.p.match, so we may not make any
assumptions about their contents. The only exception is when the
RegExp itself is fast.
Bug: chromium:843022
Change-Id: I14eafbdfb2b2ced609da1391b57c73cbe167f7fb
Reviewed-on: https://chromium-review.googlesource.com/1061455
Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53210}
The term memory usually refers to the wasm memory. In the
{NativeModule}, we store pools for allocated and available code space.
This CL changes naming to make clear that this is code space and not
memory.
R=titzer@chromium.org
Bug: v8:7754
Change-Id: I195bf5c9227ad246af302ae1e98f9c839a02adbf
Reviewed-on: https://chromium-review.googlesource.com/1061495
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53208}
In WebAssembly benchmarks I saw Binop instructions with 6 inputs. We
don't know how many inputs there can actually be, so we conservatively
increase the number to 8 now.
R=jarin@chromium.org
Bug=chromium:842501
Change-Id: Id087481e7e524006c2f03fc545f9e35d1cad1fe8
Reviewed-on: https://chromium-review.googlesource.com/1061114
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53207}
The CallIC class is obsolete and unused for a long time, and the
IC::FrameDepth was only there to support the additional frame
that was imposed by the CallFunctionStub. All of that is long gone, so
we don't need that here.
Bug: v8:7754
Change-Id: Ic82f68b325e3e10e285e30111053ffffd547f965
Reviewed-on: https://chromium-review.googlesource.com/1061354
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53206}
As my mum used to say: When it comes to flushing, later is better than early.
Tentative fix for Android invoke crashers with write protection code
enabled.
Bug: chromium:842862
Change-Id: Ib37115883a6fa615c9514aeb543dc3527335803a
Reviewed-on: https://chromium-review.googlesource.com/1059673
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53202}
This adds a filter option for --trace-turbo, --trace-turbo-graph
and --trace-turbo-scheduled. The filter is a pattern that matches
function names in this way:
"*" all; the default
"-" all but the top-level function
"-name" all but the function "name"
"" only the top-level function
"name" only the function "name"
"name*" only functions starting with "name"
"~" none; the tilde is not an identifier
Bug: v8:7761
Change-Id: I7e8e726023f2c72754b0dd691d790af20b022fd3
Reviewed-on: https://chromium-review.googlesource.com/1059774
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53201}