For consistency, {Object} members should only be accessed via ".".
CL https://crrev.com/c/1624209 cleaned up the code base already. This
CL removes the now dead operator.
R=jkummerow@chromium.org
Bug: v8:9183, v8:3770
Change-Id: I599dcd49d79bfc68f970fe872b64b3b2680cddd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624788
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61768}
The type of the argument makes it clear what we're internalizing, and this
allows us to choose either one based on a template parameter.
Change-Id: I6d7865e7fdef364f6cf10ff9267034df182d7539
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624212
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61765}
This CL was generated by an automatic clang AST rewriter using this
matcher expression:
callExpr(
callee(
cxxMethodDecl(
hasName("operator->"),
ofClass(isSameOrDerivedFrom("v8::internal::Object"))
)
),
argumentCountIs(1)
)
The "->" at the expression location was then rewritten to ".".
R=jkummerow@chromium.orgTBR=mstarzinger@chromium.org,verwaest@chromium.org,yangguo@chromium.org
Bug: v8:9183, v8:3770
No-Try: true
No-Tree-Checks: true
Change-Id: I0a7ecabdeafe51d0cf427f5280af0c7cab96869e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624209
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61764}
In fast mode, this CL try to avoid calling substring in @@match.
For an ATOM type regexp, hold the literal string to search for before the loop
and reuse the string instead of calling substring in the loop.
Change-Id: Ice314ebf146261cf206c21cb1530a2a44d3c42ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1618435
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61763}
Function win64_unwindinfo::RegisterNonABICompliantCodeRange() calls
LoadNtdllUnwindingFunctions() to dynamically load from ntdll a couple of
functions that are not available on Windows 7. Unfortunately there is a
race condition in LoadNtdllUnwindingFunctions() that can cause a crash
when multiple isolates are initialized concurrently.
This can be fixed using base::CallOnce().
Bug: v8:9204
Change-Id: I5c57708ab5f16e9ef9f897efce1ccdf591e2f828
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1623592
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#61757}
This is a reland of 2ce5da9a70
Original change's description:
> [wasm] Compile big functions first
>
> Add a special queue to {CompilationUnitQueues} to handle big functions
> specially. They are organized in a priority queue (ordered by their
> body size), and all threads check this queue first, before executing
> the tasks from their own queue. In some benchmarks, this shortens
> overall compilation time by 10-20 percent.
>
> R=ahaas@chromium.org
>
> Bug: v8:8916, chromium:950493
> Change-Id: I45f36a05304e2f1c4f3ce6b8821ddd4bd08fbba3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622122
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61746}
Bug: v8:8916, chromium:950493
No-Presubmit: true
Change-Id: I26c949ce6a0f5efee684561dc0b4eba44921cddf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624799
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61755}
This reverts commit a03ed62679.
Reason for revert: Fails on win32: https://ci.chromium.org/p/v8/builders/ci/V8%20Win32/21252
Original change's description:
> [tracing] Add a configurable output stream for perfetto tracing
>
> Add the ability to provide perfetto with an output stream for the JSON
> consumer rather than hardcode it. D8 will use this interface exclusively
> once the old trace controller is removed.
>
> Also add a test for scope-managed trace events and their duration - this
> was leftover from a previous CL.
>
> Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
> Bug: v8:8339
> Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61753}
TBR=ulan@chromium.org,yangguo@chromium.org,jgruber@chromium.org,petermarshall@chromium.org
Change-Id: Ie7dbe4fc5f9e496fafc8e3ad2b05011b88c9e2c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8339
Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625465
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61754}
Add the ability to provide perfetto with an output stream for the JSON
consumer rather than hardcode it. D8 will use this interface exclusively
once the old trace controller is removed.
Also add a test for scope-managed trace events and their duration - this
was leftover from a previous CL.
Cq-Include-Trybots: luci.v8.try:v8_linux64_perfetto_dbg_ng
Bug: v8:8339
Change-Id: I1c45e17e528b549a4cfdaecabd33c7ac4ab4af77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611801
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61753}
Up until now, we cached export wrappers per export index. With the
anyref proposal potentially many more functions will need export
wrappers, e.g. any function that is stored in a table, and any
function accessed by the new ref.func instruction.
With this CL, we change the caching scheme an do the caching per
signature. Thereby we can guarantee that any export wrapper which
potentially exists can be stored in the cache.
For cctests which use wasm-run-utils, we don't know the size of the
cache anymore ahead of time. However, we assume that no more than
5 signatures will be used in any cctest. If this assumption is not
true, we can just adjust the number.
The cache is now accessed in all code paths where we need an export
wrapper.
Bug: chromium:962850
Change-Id: I32df60dfa7801d1e71f7d837da091f388198af1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615247
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61752}
The core spec tests need to be generated manually for now, because our
bots don't have an ocaml installation.
This CL was created automatically by running
./tools/wasm/update-wasm-spec-tests.sh.
R=adamk@chromium.org
Change-Id: I4c6199b51f30b29f150914a9bffe6009452c8c47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624794
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61751}
This reverts commit 2ce5da9a70.
Reason for revert: Fails on several bots, e.g. https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/26607
Original change's description:
> [wasm] Compile big functions first
>
> Add a special queue to {CompilationUnitQueues} to handle big functions
> specially. They are organized in a priority queue (ordered by their
> body size), and all threads check this queue first, before executing
> the tasks from their own queue. In some benchmarks, this shortens
> overall compilation time by 10-20 percent.
>
> R=ahaas@chromium.org
>
> Bug: v8:8916, chromium:950493
> Change-Id: I45f36a05304e2f1c4f3ce6b8821ddd4bd08fbba3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622122
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61746}
TBR=ahaas@chromium.org,clemensh@chromium.org
Change-Id: Ib47b23ff878d4a561df1993d532e5eeafea64ff6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8916, chromium:950493
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624797
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61749}
Refactor-only: move the more involved EmbeddedFileWriter methods into
the .cc file.
Bug: v8:9103
Change-Id: I546c23544a0425a32cbd04cecc759f9b553b7071
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624207
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61748}
Use JSObject::FastPropertyAt instead. Also, to avoid adding an
immutable-flag to PropertyAccessInfo, use DataConstant (instead of
DataField) for properties that are immutable according to their
attributes.
This is in preparation for serializing the property value for
concurrent inlining.
Bug: v8:7790
Change-Id: Ib40059bde2e5eb14b26400bcab72d6ea6bb57666
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624790
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61747}
Add a special queue to {CompilationUnitQueues} to handle big functions
specially. They are organized in a priority queue (ordered by their
body size), and all threads check this queue first, before executing
the tasks from their own queue. In some benchmarks, this shortens
overall compilation time by 10-20 percent.
R=ahaas@chromium.org
Bug: v8:8916, chromium:950493
Change-Id: I45f36a05304e2f1c4f3ce6b8821ddd4bd08fbba3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622122
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61746}
This is in preparation for better cross-compile support in mksnapshot.
Specifically, this CL series will introduce runtime switches to select
the target platform for generated embedded.S assembly.
Each platform writer will derive from the abstract base class
PlatformEmbeddedFileWriterBase. Currently, the code remains
functionally unmodified and was just moved to
PlatformEmbeddedFileWriterGeneric. This will be split up in future
CLs.
Bug: v8:9103
Change-Id: Ie7e29bb60ba5a8ff6c0c1edec676943b80a1781b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622854
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61745}
KeyedStoreIC computes the expected transition to the map based on the
incoming receiver map, the index and the value that is being stored.
Since we already store the element into the object, the runtime would
have already computed these transitions and it is possible to use the
new map of the object instead of recomputing the map. Though we would
need additional checks to see the newly transitioned map is indeed
a more generic elements transition and not an unexpected transition.
Bug: v8:8394
Change-Id: If6819895e5d20dd76bb062c6064593bf3a920778
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621937
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61743}
This CL also removes the AdaptorWithExitFrame builtin and simplifies
respective use-sites.
Bug: v8:9183
Change-Id: I97c4e35aa551f586faedcb09cc0b2b837e5307f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624215
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61742}
FindElementsKindTransitionedMap checks if we could transition from
the source map to one of the target maps without requiring any instance
rewriting. It does this by replaying all the property transitions of the
source map on each elements kind map and seeing if it needs a instance
rewrite. Since we already know the elements kind of the target maps, we can
avoid doing this for element kinds that are not in target map.
Change-Id: Ief9ba89992a411535a0335c3b67221666647f55e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624208
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61741}
The mksnapshot-specific runtime flag --target-arch, together with
--target-os, specifies the target platform for the generated embedded.S
file.
Bug: v8:9103
Change-Id: Icb03a381101e7ab0db4a5fbbf3be8e23ed0b1a1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624165
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61739}
Since {Handle<T>::location()} just returns the value of
{HandleBase::location()}, we can just publicly expose the latter and
save some compile time and object file size.
R=jkummerow@chromium.org
Bug: v8:9183
Change-Id: I9cddba2c9f8b097c26cf1a4e7dbfbe72b03d79c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624211
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61737}
Adding the case of having a decompress and a constant (both HeapConstant
and Int64Constant).
Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977, v8:7703
Change-Id: Ic9475e9762575e7f6ca2937d832638f7c9897e1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613253
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61736}
Provide a global memory controller used to compute limits for combined
on-heap and embedder memory. The global controller uses the same
mechanism (gc speed, mutator speed) and growing factors as the regular
on-heap controller.
Rely on V8's mechanisms for configured state that stops shrinking the
limit.
Reland:
- API fixes with overrides and default versions.
- Fix of depending on uninitialized values when using the old API.
- GCTracer: Fixed issue in speed computation.
- GCTracer: Added unittests.
This reverts commit 5e043f2773.
Bug: chromium:948807
Change-Id: I0f81253b3e1a8b49a7ac107c012a15e33cb514d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622852
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61735}
Add an {ObjectRef} class to Handle which is returned by {operator->}.
Before, it returned {T} directly, and then used {T::operator->} for
the chained {operator->}.
As a drive-by, this CL also removes {HandleBase::operator*} and
implements this in {Handle<T>} directly.
R=jkummerow@chromium.org
Bug: v8:9183, v8:3770
Change-Id: I0a79fbbc393539543a62773c98a39c7bc2a84b77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624206
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61734}
Also, when --trace-heap-broker-verbose is on, we trace
bytecode-by-bytecode alterations to the environment.
Change-Id: I535a063cefd57f055711fdd7d7473cb63c963c7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622851
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61733}
This CL adjusts the tracing to print addresses of interesting
SharedFunctionInfos instead of dereferencing the handles to look
at the name.
Bug: v8:7790
Change-Id: I25d6f96728bd78d8a8becac6f2212f4f7a030c5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622969
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61732}
KeyedAccessStoreMode is used when creating store handlers to determine
which cases to handle (ex: handle cow, grow) and hence choose an
approriate builtin. It is also used to specify elements kind transitions
which is used when computing ic transitions. The store mode and the
transition mode are independent of each other and it would be cleaner to
use different enums to represent them. This also reduces the total number
of cases in each enum.
Change-Id: I96aeff7a765b312b8088e831776743c67c533bd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1619751
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61729}
This is a border case that appeared in one of our tests. It seems a good
idea to test for it. It does not seem to be common enough to handle it
specifically (i.e replacing the Word64Equal with a true bool constant)
Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977, v8:7703
Change-Id: I27e85a2493ab03b92591e788a185d6109904eef1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613252
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61726}
The HandleApiCall uses BUILTIN_EXIT frames now instead of EXIT frames,
so API calls show up in stack traces. We no longer need API builtins
and this CL removes them and the corresponding C++ macros.
Bug: v8:9183
Change-Id: Ifa2e842123ef7e96b2ff296116f46d5d799a63ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617249
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61723}
This is mainly a torque change, but as a drive-by we get rid of
kStartOfPointerFieldsOffset
kEndOfTaggedFieldsOffset
which often are used to enclose a section of pointers in an object.
Bug: v8:7793
Change-Id: I52d83d09249a3cc6a99e7e7506e154ccfca53a12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1615249
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61722}