Commit Graph

3206 Commits

Author SHA1 Message Date
Leszek Swirski
0621eaff2c Revert "Reland "Reland "[static-roots] Enable static roots on supported configurations"""
This reverts commit 4bbbb521f4.

Reason for revert: Speculative revert for broken roll.

Original change's description:
> Reland "Reland "[static-roots] Enable static roots on supported configurations""
>
> This is a reland of commit b247270178
>
> But with static roots disabled on non-external code space builds.
>
>
> Original change's description:
> > Reland "[static-roots] Enable static roots on supported configurations"
> >
> > This is a reland of commit c04ca9cc63
> >
> > Original change's description:
> > > [static-roots] Enable static roots on supported configurations
> > >
> > > The static root values are not actually used yet.
> > >
> > > Bug: v8:13466
> > > Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > > Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#84850}
> >
> > Bug: v8:13466
> > Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> > Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84991}
>
> Bug: v8:13466
> Change-Id: Id1f55c1cf8d349338fd49f6cb0ed7dc2e1054a72
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123534
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85037}

Bug: v8:13466
Change-Id: I54a9d68871e0ce2c0faeb49fd9947921073a6873
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128090
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85055}
2023-01-02 14:20:19 +00:00
Olivier Flückiger
4bbbb521f4 Reland "Reland "[static-roots] Enable static roots on supported configurations""
This is a reland of commit b247270178

But with static roots disabled on non-external code space builds.


Original change's description:
> Reland "[static-roots] Enable static roots on supported configurations"
>
> This is a reland of commit c04ca9cc63
>
> Original change's description:
> > [static-roots] Enable static roots on supported configurations
> >
> > The static root values are not actually used yet.
> >
> > Bug: v8:13466
> > Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84850}
>
> Bug: v8:13466
> Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84991}

Bug: v8:13466
Change-Id: Id1f55c1cf8d349338fd49f6cb0ed7dc2e1054a72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123534
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85037}
2022-12-29 09:19:11 +00:00
Shu-yu Guo
5c7fca4a61 [string-iswellformed] Implement String#{is,to}WellFormed
Bug: v8:13557
Change-Id: I6fa772c70d8307eca047fd839058279ce244f0e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118066
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85002}
2022-12-22 18:04:40 +00:00
Shu-yu Guo
c74a6cd257 Revert "Reland "[static-roots] Enable static roots on supported configurations""
This reverts commit b247270178.

Reason for revert: Breaking Fuchsia build and blocking roll:
https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-binary-size/186323/overview

Original change's description:
> Reland "[static-roots] Enable static roots on supported configurations"
>
> This is a reland of commit c04ca9cc63
>
> Original change's description:
> > [static-roots] Enable static roots on supported configurations
> >
> > The static root values are not actually used yet.
> >
> > Bug: v8:13466
> > Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84850}
>
> Bug: v8:13466
> Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84991}

Bug: v8:13466
Change-Id: I9a930649d5c5531f2b8d8472300f6efe3f75ae28
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4122795
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85001}
2022-12-22 17:45:08 +00:00
Olivier Flückiger
b247270178 Reland "[static-roots] Enable static roots on supported configurations"
This is a reland of commit c04ca9cc63

Original change's description:
> [static-roots] Enable static roots on supported configurations
>
> The static root values are not actually used yet.
>
> Bug: v8:13466
> Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84850}

Bug: v8:13466
Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84991}
2022-12-22 13:06:38 +00:00
Andrew Grieve
fd81728f2e Depend direclty on run_mksnapshot_default rather v8 for v8_external_startup_data_assets
This will prevent building v8 arm code when all we want is the snapshot
file.

Bug: chromium:1402705
Change-Id: If8137e8ef79ff1943c24d5bd71d8374e59bdf561
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4117695
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84981}
2022-12-21 18:40:14 +00:00
Nico Hartmann
41628b52fc [turboshaft] Implement %CheckTurboshaftTypeOf intrinsic to test typer
This CL implements a new %CheckTurboshaftTypeOf(e, type_string)
intrinsic allowing tests to express that the expression e is supposed
to have the turboshaft type expressed by type_string eventually during
lowering.

Test that use this intrinsic are verifying implementation details and
are thus somewhat brittle and potentially platform depedent. This
intrinsic is not supposed to be used broadly, but rather to write
some tests that check the precision of turboshaft's new type system.

This intrinsic may be removed once the type system is shipped and gets
coverage in other ways.

Bug: v8:12783
Change-Id: I4cc2582273f3d668601a3203c400a8461b470cac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061889
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84894}
2022-12-16 10:10:58 +00:00
Victor Gomes
9c2ac00eb1 [maglev][arm64] Add StringFromCharCode
... and any other node needed to test it.

Bug: v8:7700
Change-Id: Ia37fdcb1db3b6fb986f026696454d443236d011c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111600
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84893}
2022-12-16 10:06:21 +00:00
jiepan
256546319c [wasm][revec] Add RevectorizePhase in WASM compilation pipeline
Bug: v8:12716

Change-Id: I7ef53709e9757b58951086fc01af6b2eda296b27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3411357
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#84888}
2022-12-16 07:19:53 +00:00
Jakob Kummerow
2427a3bad1 [wasm] Move i64<->BigInt CallDescriptors to WasmEngine
This stores the CallDescriptors used for i64 <-> BigInt conversion
builtins as process-globals on the WasmEngine, instead of creating
them as temporaries whenever they're needed.
The primary purpose of this change is to simplify the interface to
the Int64Lowering by eliminating its "special case" parameter, in
preparation for moving that lowering to a different point in the
compilation pipeline.
A minor secondary benefit is that this will save a little bit of
(repeated) Zone memory usage.
Bonus change: drop the Int64Lowering from 64-bit builds, where it
isn't used, but was compiled in up to now. This saves ~17 KiB on
Android-arm64 builds.

Change-Id: Ib35d2e0f772110652eb05abd4c42d848108164b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110898
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84884}
2022-12-15 19:40:17 +00:00
Adam Klein
89f82e97d5 Revert "[static-roots] Enable static roots on supported configurations"
This reverts commit c04ca9cc63.

Reason for revert: failures on arm64 msan:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/47385/overview

Original change's description:
> [static-roots] Enable static roots on supported configurations
>
> The static root values are not actually used yet.
>
> Bug: v8:13466
> Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84850}

Bug: v8:13466
Change-Id: Iebf3c4eadb874f7ebc4d9382d454e63a63e9d977
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4107729
Auto-Submit: Adam Klein <adamk@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#84852}
2022-12-14 17:55:06 +00:00
Olivier Flückiger
c04ca9cc63 [static-roots] Enable static roots on supported configurations
The static root values are not actually used yet.

Bug: v8:13466
Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84850}
2022-12-14 17:00:42 +00:00
Olivier Flückiger
f6eab3830d [static-roots] Build infrastructure for static roots
Add gen-static-roots.py to conveniently re-generate the static roots
table when it needs changing.

Additionally, ensure the first read-only page is allocated as first page
during mksnapshot, to move static roots closer to start.

Bug: v8:13466
Change-Id: Ie72b64d0ad0dd3e5fccd3b41e8ed00a4a55a0033
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096481
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84844}
2022-12-14 15:19:39 +00:00
Olivier Flückiger
afc49f4725 [static-roots] Support serializing read-only heap as a memory dump
Build mode for serializing the read only heap as a memory dump in the
startup snapshot. This makes compressed pointers of root objects
statically known at mksnapshot time.

This CL also adds a feature to mksnapshot to dump the static addresses
to a C++ header file. This will allow us to use these addresses in the
future.

The mode is disabled for now since we need some build infrastructure
first to conveniently re-generate the table when the layout changes.

Bug: v8:13466
Change-Id: I975b15bd89fedf713fb7d12b4929935ece78139d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4056181
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84815}
2022-12-13 15:21:25 +00:00
Nico Hartmann
b3ffda44f2 [turboshaft] Introduce new Turboshaft type system
Bug: v8:12783
Change-Id: Id5d3ce17f0dc8cec1b2b257585290bed72dd9fd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4057111
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84765}
2022-12-09 17:41:29 +00:00
pthier
9ac5afe9f3 Include write barrier in JS shared heap buildrunner config
Shared heap is not available without write barriers, therefore skip all
tests that require shared heap when write barriers are disabled.

Change-Id: I66a9a94941ffab792ced964f12df6930b13c92cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079120
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84682}
2022-12-06 12:45:34 +00:00
Darius M
7795179da6 Reland "[turboshaft] Port LateEscapeAnalysis"
This reverts commit 0bd121f8e6.

MemoryAnalyzer wasn't calling LateEscapeAnalysisReducer's
ShouldSkipOperation method, but instead was calling the BaseReducer's
method (because it was using a generic Operation) for the call, which
resulted in some memory corruptions, because MemoryAnalyzer was
planning some folding which was never actually happening.

Original change's description:
> [turboshaft] Port LateEscapeAnalysis
>
> Bug: v8:12783
> Change-Id: Id5fa026d103dc67e05322b725f34186124bc5936
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4054621
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84603}

Bug: v8:12783
Change-Id: I103eb2f518943c0c57bc3e10471d1c47f5262599
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075724
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84660}
2022-12-05 16:13:36 +00:00
Scott Violet
7519793938 [reland] adds the ability for v8 to use sin/cos from libm
This differs from the patch that landed in so far as the libm target
is only defined if v8_use_libm_trig_functions is defined. Doing this
ensures building the 'all' target only builds libm is appropriate.
You can diff between patchset 1 and 2 to see the change.

This is controlled by a gn arg, which defaults to true for clang
builds. I'm limiting to clang builds as the macros for determining
endian type are currently clang specific. My understanding is that
chrome only uses clang. I can update the endian macros if necessary
for other targets.

Bug=v8:13477

Change-Id: I59cd450facc9fcb8987fe56e8cfc1c13522e1f6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4070924
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Auto-Submit: Scott Violet <sky@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84620}
2022-12-02 21:59:04 +00:00
Leszek Swirski
4e5a77d1b2 [maglev] Rename vreg allocation
Rename the vreg allocation to "SetValueLocationConstraints", which is a
more accurate description of what it does. Also, remove the actual vreg
state, since we don't care about unallocated operand vregs (ValueNodes
act as their own vreg).

This allows us to remove a post-processing pass which sets input
constraints for Phi nodes, which previously couldn't do so in the foward
pass due to loop Phis' back-edge inputs not having a vreg yet.

Bug: v8:7700
Change-Id: I24e75f0f600aa5fbd2169a189c0863e4153f3439
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075529
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84615}
2022-12-02 14:57:53 +00:00
Darius Mercadier
0bd121f8e6 Revert "[turboshaft] Port LateEscapeAnalysis"
This reverts commit fbcffa62b8.

Reason for revert: breaks a few fuzzers

Original change's description:
> [turboshaft] Port LateEscapeAnalysis
>
> Bug: v8:12783
> Change-Id: Id5fa026d103dc67e05322b725f34186124bc5936
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4054621
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84603}

Change-Id: I33dfaaa0f12eef634dec578fb4e3532a0cbb4b2b
Fixed: v8:13561, v8:13562, chromium:1395181, chromium:1395183, chromium:1395243,  chromium:1395244
Bug: v8:12783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4075524
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84608}
2022-12-02 08:59:10 +00:00
Darius M
fbcffa62b8 [turboshaft] Port LateEscapeAnalysis
Bug: v8:12783
Change-Id: Id5fa026d103dc67e05322b725f34186124bc5936
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4054621
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84603}
2022-12-01 16:40:03 +00:00
Caitlin Potter
c618a17984 [runtime] Refactor GetOwnPropertyDescriptor to use dispatching stub
This is split out from
https://chromium-review.googlesource.com/c/v8/v8/+/3963708, and
implements only the change to using a dispatcher code stub for different
object types in GetOwnPropertyDescriptor, which returns a
PropertyDescriptor struct, and converts the descriptor into a JSObject
in the final step of Reflect.getOwnPropertyDescriptor or
Object.getOwnPropertyDescriptor.

This does not include the path in the dispatcher for Proxy objects, and
thus Proxy objects are still handled in the runtime.

Change-Id: I3960615aa0941d02d32717ccea291f6b63ae180e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4024866
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84602}
2022-12-01 16:38:43 +00:00
Michael Achenbach
8606191c98 [build] Don't run orphaned action in default builds
A gn build with no specified targets builds all visible targets. The
postmortem-metadata action is visible, but its output is only needed
if v8_postmortem_support is enabled, hence we now guard the whole
action by the flag.

Depends on https://crrev.com/c/4064686

Bug: chromium:1394626
Change-Id: I8444021cfe253cedee5c1578c733a3ad973726db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061865
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84599}
2022-12-01 15:11:47 +00:00
Matthias Liedtke
ea18ee8ff8 Revert "adds the ability for v8 to use sin/cos from libm"
This reverts commit 4588fe544f.

Reason for revert: Fails on MSVC Windows builds: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20msvc%20-%20builder/4779/overview

Original change's description:
> adds the ability for v8 to use sin/cos from libm
>
> This is controlled by a gn arg, which defaults to true for clang
> builds. I'm limiting to clang builds as the macros for determining
> endian type are currently clang specific. My understanding is that
> chrome only uses clang. I can update the endian macros if necessary
> for other targets.
>
> Bug=v8:13477
>
> Change-Id: I604f99a2464b1d57f792bb339f9240ef043251e7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4000442
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Commit-Queue: Scott Violet <sky@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84577}

Change-Id: I96a1571196fe658568c626e5d36559e496ba4d45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4067303
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Owners-Override: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84586}
2022-12-01 09:54:21 +00:00
Scott Violet
4588fe544f adds the ability for v8 to use sin/cos from libm
This is controlled by a gn arg, which defaults to true for clang
builds. I'm limiting to clang builds as the macros for determining
endian type are currently clang specific. My understanding is that
chrome only uses clang. I can update the endian macros if necessary
for other targets.

Bug=v8:13477

Change-Id: I604f99a2464b1d57f792bb339f9240ef043251e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4000442
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84577}
2022-11-30 16:47:27 +00:00
Victor Gomes
2900117db9 [maglev] Move arch-independent code generator
Bug: v8:7700
Change-Id: I83e13bb6c19716e14576a957cf94b81371417808
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4063691
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84566}
2022-11-30 10:52:43 +00:00
Igor Sheludko
d0b408a84a [builtins-pgo] Make builtins profiles architecture independent
Profiles for 64/32 bits architectures are not interchangeable but
profiles collected for x64/x86 can be used for arm64/arm respectively.

Attempt to use an incompatible profile is now a fatal build error.

Note that some Float64RoundXXX instructions that are available on
arm64 are not available on x64, so we generate a bunch of code
containing branches instead. This means that we are safe to use x64
profiles for arm64 but not the other way round, otherwise we'll miss
the profile info for the subgraph that's not generated on arm64.

Bug: v8:10470
Change-Id: I6a34836866363207b5ed767e343100b406ac7990
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055274
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84564}
2022-11-30 10:27:24 +00:00
Tobias Tebbi
1d415100ed [turboshaft] port memory optimization
Bug: v8:12783
Change-Id: I923982285dc7bff40cc6f9b7db2772d344e19e97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3913085
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84547}
2022-11-29 16:04:12 +00:00
Victor Gomes
3a13bc5596 [maglev] Arm64 boilerplate
The absolute minimum to compile arm64 with v8_enable_maglev.

Bug: v8:7700
Change-Id: I7e1a0e31397f1677977c416d0ecc68fd6ee35b12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055115
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84498}
2022-11-25 16:13:36 +00:00
Samuel Groß
eacdc876e9 [sandbox] Remove v8_enable_sandbox_future
As this is by now equivalent to v8_enable_sandbox.

Bug: v8:10391
Change-Id: I1eef40a86b984a1867de3513a108ece0d43ec394
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055273
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84494}
2022-11-25 15:12:23 +00:00
Victor Gomes
7b33cc5d80 [maglev] Move x64 specific code
Bug: v8:7700
Change-Id: Ifed534a2fa5cd53955aa9bf126d31c79d4d6b9da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055110
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84490}
2022-11-25 13:21:25 +00:00
Igor Sheludko
00c7e383a8 [ptr-compr] Store cage bases in globals when cage sharing is enabled
... instead of computing them on the fly. This approach seems to
perform slightly better because it requires less code.

Bug: v8:7703, v8:11460
Change-Id: If31a06fbc748251c491c011e9e3f118665e20159
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020456
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84413}
2022-11-22 08:00:16 +00:00
Darius M
dd79882e54 Reland^2 "[turboshaft] Port BranchElimination to turboshaft"
Original change's description:
> Reland "[turboshaft] Port BranchElimination to turboshaft"
>
> Original change's description:
> > [turboshaft] Port BranchElimination to turboshaft
> >
> > Bug: v8:12783
> > Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84258}
>
> Bug: v8:12783
> Change-Id: I48214de33d05b7aa61a488b86bd5539fdb92e1f7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030576
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84331}

Bug: v8:12783
Change-Id: I7d217426f9ad96f586a8917d05492640f9c96af4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037762
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84370}
2022-11-18 16:38:04 +00:00
Anton Bikineev
cd731db4b3 unified-young-gen: Implement V8->Oilpan remembered set
The CL implements an old-V8-to-young-Oilpan remembered set together with
a generational barrier.

Bug: v8:13475
Change-Id: I5f09f7c6db397f2a49cb0c47fd758a1604af4e83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030433
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84365}
2022-11-18 15:03:44 +00:00
Darius Mercadier
dbbb59d0e6 Revert "Reland "[turboshaft] Port BranchElimination to turboshaft""
This reverts commit 1f26a28f0e.

Reason for revert: a fuzzer found a bug, and some infra stability bots broke.

Original change's description:
> Reland "[turboshaft] Port BranchElimination to turboshaft"
>
> Original change's description:
> > [turboshaft] Port BranchElimination to turboshaft
> >
> > Bug: v8:12783
> > Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84258}
>
> Bug: v8:12783
> Change-Id: I48214de33d05b7aa61a488b86bd5539fdb92e1f7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030576
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84331}

Bug: v8:12783, chromium:1385995
Change-Id: I1abee79e7292cf3afae8bd9456c46022a3123ed3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4035207
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84348}
2022-11-18 08:37:40 +00:00
Darius M
1f26a28f0e Reland "[turboshaft] Port BranchElimination to turboshaft"
Original change's description:
> [turboshaft] Port BranchElimination to turboshaft
>
> Bug: v8:12783
> Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84258}

Bug: v8:12783
Change-Id: I48214de33d05b7aa61a488b86bd5539fdb92e1f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4030576
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84331}
2022-11-17 15:11:10 +00:00
Darius Mercadier
a8d0f63a9d Revert "[turboshaft] Port BranchElimination to turboshaft"
This reverts commit f3917347b2.

Reason for revert: breaks numfuzz (https://crbug.com/v8/13492).

Original change's description:
> [turboshaft] Port BranchElimination to turboshaft
>
> Bug: v8:12783
> Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84258}

Change-Id: I0020ef3952b7273555d98c50366261a945f51058
Fixed: v8:13492
Bug: v8:12783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028938
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84282}
2022-11-16 08:54:19 +00:00
Michael Lippautz
841969dbdc [handles] Left over refactorings from TracedHandles
- GlobalHandleMarkingVisitor -> ConservativeTracedHandlesMarkingVisitor
- Encapsulate the acquire load into TracedHandles::Mark

Bug: v8:13372
Change-Id: I00277be4e87aff75419837d40b46bc376ea9a881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4028107
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84273}
2022-11-15 15:35:09 +00:00
Marja Hölttä
cf3f222543 [valuserializer] Add a hard fail mode
Invariant in the normal mode:
- If the data is invalid, we'll fail gracefully (no crash, no DCHECK
failures)

Invariant in the hard fail mode:
- If the data is invalid (in a way we can detect), a CHECK fails at the
earliest location where we detect the inconsistency

Bug: chromium:1381404
Change-Id: Icae077a5c76329018fdb759122297134ae70b897
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013142
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84265}
2022-11-15 11:28:39 +00:00
Darius M
f3917347b2 [turboshaft] Port BranchElimination to turboshaft
Bug: v8:12783
Change-Id: Ib1e7d3cb3ec18bfad57577ae6c830994e6139601
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899298
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84258}
2022-11-15 10:05:19 +00:00
Michael Achenbach
2b133ebc9e [gcmole] Simplify gcmole directives and add tests
This prepares work for speeding up gcmole infrastructure by adding
more checks and testing.

- Add a presubmit check that verifies gcmole directives in gn files.
- Simplify gcmole directives in gn files. Drop all but the
  architecture property as the others were unused. Simplify regular
  expressions.
- Fix some gcmole directives (fly by - only on untested
  architectures).
- Add a python test for the changed function in gcmole.py. There's
  no other testing yet and this starts somewhere. The test simulates
  real BUILD.gn files via checked-in test data.

Bug: v8:12660
Change-Id: I9ca3152b2c3b806de5d4509c152283b36294950d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020268
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84239}
2022-11-14 13:07:15 +00:00
Nikolaos Papaspyrou
dcaf26930f [heap] Refactor saving the callee-saved registers on stack
This CL refactors the trampoline that pushes the values of callee-saved
registers on the stack, which used before stack scanning.

At the low level, it defines simpler architecture-specific functions
that save the values of these registers in a caller-supplied buffer of
the appropriate size.

The trampoline is now implemented using this mechanism. However, the
low-level functions will be used in subsequent CLs for storing the
registers without using a callback, when setting a stack marker for
conservative stack scanning.

Bug: v8:13257
Change-Id: I86dae66e8613b839c694dc004747e04d1dfad7c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3989143
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84160}
2022-11-09 19:39:54 +00:00
Victor Gomes
91d83cf32a [maglev] Move Allocate and ToBoolean to MaglevAssembler
The idea is that later maglev-ir.cc would invoke higher
level macros (AllocateString, CharCodeAt, etc)
and these inline computations can then be shared.

Bug: v8:7700
Change-Id: Icb279cc335515263e1ec29c61ba318f33143f9b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4000484
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84029}
2022-11-03 09:38:39 +00:00
Tobias Tebbi
bfda81d1a1 [turboshaft] introduce SnapshotTable
Bug: v8:12783

Change-Id: Ie8e578105065ed5ad833fbf2a525b149e39d3424
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3971368
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83966}
2022-10-28 06:36:55 +00:00
Darius M
b35d549082 [turboshaft] Change Reducer stack architecture
Bug: v8:12783
Change-Id: If30dea88ce237c04261dc942ee9f1547a1c45252
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3982114
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83961}
2022-10-27 16:08:45 +00:00
Juan José Arboleda
69ad9552b2 [profiler] add Serialize to v8::CpuProfile
Support JSON serialization in `v8::CpuProfile`

Bug: v8:13291
Change-Id: I638cf2c1f7acba9c5b8a2932d84c9882d968c90d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3905128
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83901}
2022-10-25 10:49:04 +00:00
Michael Achenbach
b0644d42b8 Update V8 DEPS (trusted)
This also temporarily resets to C++17 with MSVC
(https://crbug.com/1377771).

Rolling v8/build: 35a1478..b8f0bc7

Rolling v8/buildtools: be63ea5..10c7a0a

Rolling v8/buildtools/third_party/libc++/trunk: 9f512cf..997e036

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/981585a..cf46d16

Rolling v8/third_party/depot_tools: 3b95525..9879712

Rolling v8/third_party/fuchsia-sdk/sdk: version:10.20221020.1.1..version:10.20221021.3.1

Rolling v8/tools/clang: 2619cde..7b9e2e2

Bug: chromium:1377771
Change-Id: I140715f6b808a04192372c797fac5cbb0a3ac759
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3972912
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83874}
2022-10-24 11:03:06 +00:00
Michael Lippautz
c23bc72c83 [handles] Split off traced handles from regular global handles
v8::TracedReference and their underlying traced handles are not
actually phantom references but have been historically represented as
such. This patch splits off their backing implementaton into
`TracedHandles`.

As a drive-by, re-organize the free list to rely on indices instead of
pointers, saving a full word for each node. In additon, the setup also
allows for freeing fully empty node blocks after GCs.

Allocation/free of nodes is also organized in a way that avoids
jumping between handles/blocks/nodes for accounting purposes.

Removing CRTP in GlobalHandle internals is left for a follow up.

Bug: v8:13372
Change-Id: Ib55aa9ba71202d5918b486c161fe6f747d31c719
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966952
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83872}
2022-10-24 10:04:08 +00:00
Igor Sheludko
cd8a02d508 [builtins] Add --use-qemu mode to tools/builtins-pgo/generate.py
... and prepare for using PGO profiles for arm builds.

Bug: v8:10470
Change-Id: If71d363195c60277a59dc68d0c18e361e24209c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3970665
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83867}
2022-10-24 08:52:36 +00:00
Nikolaos Papaspyrou
8c7c087812 [heap] Make stack thread-local and introduce stack markers
This CL makes the object keeping stack information thread-local, moving
it from Heap to ThreadLocalTop. In this way, stack scanning will work
correctly when switching between threads, e.g., using v8::Locker.

It also introduces a mechanism for setting a stack marker, to be used
for scanning only the part of stack between its start and the marker
(instead of the current stack top).

Bug: v8:13257
Change-Id: I01091f5f49d9a8143d50aeef53789a98bdb29048
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960991
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83848}
2022-10-21 13:02:07 +00:00