Commit Graph

79979 Commits

Author SHA1 Message Date
Jakob Linke
b7026d7a97 Fix --predictable
.. by reverting this accidental change from crrev.com/c/4174091.

Bug: v8:13654
Change-Id: Ibbed516cbd1aff9fe649f5b68517371793226adc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178815
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85387}
2023-01-19 11:20:02 +00:00
Andreas Haas
e52933a2b8 [wasm] Increase the initial size of the Liftoff stack_state
In the single-threaded compilation benchmark with the PS module I see
locally a 4.4% improvement in Liftoff compile time.

R=clemensb@chromium.org
Bug: v8:13673, v8:13565

Change-Id: Id85990dd5d14d558ef4efd336755d7fbd07868ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177092
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85386}
2023-01-19 10:27:39 +00:00
Seth Brenith
c462b8fba1 Fix failing test test-debug-helper/GetObjectProperties
This test sets a value to zero to simulate not knowing where read-only
space starts, since v8::debug_helper code often must work with only
partial information. However, the zero value persisted to another part
of the test which expected a precise result, and could cause a test
failure if an object happened to be allocated at the same offset from
its containing chunk as a known read-only object. This CL fixes the
test to only use the zero value during the steps that need it.

Bug: v8:13646
Change-Id: I90f1593bf9b5bb36177ee904a910a183384a4e64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178630
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85385}
2023-01-19 10:00:28 +00:00
Dominik Inführ
978ca84374 [heap] Remove --global-gc-scheduling flag
This flag is already used in production for quite some time and we
don't need this flag for testing/experimenting.

Bug: v8:13653
Change-Id: I7326b495e2dca5d0402ff275fd697b46b8c231ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176733
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85384}
2023-01-19 09:12:50 +00:00
Jakob Linke
21ab5ea94c Remove remnant code for read-only builtin trampolines
.. all this no longer exists.

Bug: v8:13654
Change-Id: I76468164125d148bfdf29f6178fa5e0e608b949f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177094
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85383}
2023-01-19 08:06:05 +00:00
Jaroslav Sevcik
1009874faa [inspector] Omit call frames in instrumentation pause messages
Creating the full call frames is expensive. The client should only
need the script id. As the script id is passed in the 'data.scriptId'
field of the message, we can omit call frames from the instrumentation
pause event.

Bug: chromium:1408105
Change-Id: I11827865168946e1f412f7d351a0d359e2ac80ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174085
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85382}
2023-01-19 06:39:10 +00:00
v8-ci-autoroll-builder
bbbf5d8c7b Update V8 DEPS (trusted)
Rolling v8/build: e831815..b999a0b

Rolling v8/buildtools/reclient: re_client_version:0.87.0.b6908b3-gomaip..re_client_version:0.93.0.9ed3cef-gomaip

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7a311fe..de8aae6

Rolling v8/third_party/depot_tools: 86cfa62..8c5174b

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230114.0.1..version:11.20230118.1.1

Rolling v8/tools/clang: c042194..dced190

Change-Id: I8c073cccd2b33993069a960bab45e3a1fcace2d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4178354
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85381}
2023-01-19 03:58:51 +00:00
jiepan
0c2608724e [wasm][revec] Add instruction selection for simd256
Bug: v8:12716
Change-Id: Ib94e3e99b29d6715b1465f50d0a5bdb15bcbd29b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849644
Commit-Queue: Jie Pan <jie.pan@intel.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85380}
2023-01-19 03:54:31 +00:00
Hao Xu
263493add5 [wasm][revec] Reorder load chain to avoid breaking effect dependency
There exists load chain as below that can not be packed due to the
effect dependency to irrelevant load:

  [Load1] -> [Irrelevant Load] -> [Load2]

We can avoid breaking this dependency by reordering the load chain so
[Load1] and [Load2] can be packed:

  [Load1] -> [Load2] -> [Irrelevant Load]

Bug: v8:12716
Change-Id: I298a8fd3d44d0a147479e1f80ac67b6a491740ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4134474
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85379}
2023-01-19 02:29:35 +00:00
Milad Fa
0dbff5d07b PPC/s390: Various post-Code rename cleanups
Port c0367102a3

Original Commit Message:

    The biggest chunk of this CL is related to the CodeBuilder now
    returning a Code object instead of an InstructionStream. Most
    codegen-related parts of the codebase had to be updated, including
    compiler.cc, pipeline.cc, and many tests. The good news is,
    we now have 400 fewer references to InstructionStream.

    Smaller changes:
    - Remove ToAbstractCode
    - Remove dead code
    - Update comments
    - Update method and variable names

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ib81459f65b474acb2f4f4e9bc547139e54877615
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177048
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85378}
2023-01-18 19:56:42 +00:00
Shu-yu Guo
360337cd80 [string-iswellformed] Ship the proposal
I2S with 3 LGTMs:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ieg6Od--og8/m/9drDtclrAAAJ

Bug: v8:13557
Change-Id: I4f60669fe245b7d6d9c1a82c5f0fd51761c66116
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4166668
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85377}
2023-01-18 19:07:18 +00:00
Johan Levin
84697034b6 RegExp.flags: check individual flags in correct order
ECMA262 22.2.6.4 specifies that the individual boolean-valued flags
should be checked in a particular order by the RegExp.flags getter.
'hasIndices' should be first - not last.

Bug: v8:13666

Change-Id: Ic4894dce84dc2454213d06c7356db0ded792a5be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171640
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85376}
2023-01-18 18:43:39 +00:00
Milad Fa
b7cce4aa16 PPC/s390: Rename CodeDataContainer to Code
Port c53c026e6e

Original Commit Message:

    This completes the big Code/CodeDataContainer name shuffle.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I1de7bcf669e0561fc6886abe312f4242d83a764b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177456
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85375}
2023-01-18 18:19:02 +00:00
Sam Clegg
29dca1c0c0 [buildtools] skip fetching reclient cipd package on linux-arm64
It doesn't exist for arm64-linux:
https://chrome-infra-packages.appspot.com/p/infra/rbe/client

See https://chromium-review.googlesource.com/c/v8/v8/+/3992966

Change-Id: I0175b5b4c9e20375240ce8e7e6b1f070f4147e27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4166667
Commit-Queue: Sam Clegg <sbc@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85374}
2023-01-18 16:59:06 +00:00
Leszek Swirski
01ff06b75c [maglev] Fast-path ForIn*
Add fast paths for ForInPrepare/ForInNext, using the feedback provided.

Bug: v8:7700
Change-Id: I934162e770f76660a947fd49ec0ddfb6072a9171
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168415
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85373}
2023-01-18 16:29:15 +00:00
Jakob Linke
c0367102a3 Various post-Code rename cleanups
The biggest chunk of this CL is related to the CodeBuilder now
returning a Code object instead of an InstructionStream. Most
codegen-related parts of the codebase had to be updated, including
compiler.cc, pipeline.cc, and many tests. The good news is,
we now have 400 fewer references to InstructionStream.

Smaller changes:
- Remove ToAbstractCode
- Remove dead code
- Update comments
- Update method and variable names

Bug: v8:13654
Change-Id: Ieb12bc698af576e07016e4c5c8c9d494e5addb0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174091
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85372}
2023-01-18 16:26:26 +00:00
Olivier Flückiger
9161de44a9 [ptr-compr] Fixing improved ptr decompresion
The improved decompression code from
https://chromium-review.googlesource.com/c/v8/v8/+/4130075
short-circuits an optimization introduced in
https://chromium-review.googlesource.com/c/v8/v8/+/4162929.

This is a likely candidate for the regression in the referenced bug. It
could be that both annotations (V8_ASSUME and V8_ASSUME_ALIGNED)
are helping in some situations.

Bug: v8:1408009
Change-Id: Id4994eeabec81793c50b3777e5b0fcb188157cab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173582
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85371}
2023-01-18 15:52:31 +00:00
Toon Verwaest
d99d366d3e [scanner] Improve whitespace skipping
This ~doubles the performance of skipping whitespace.

Change-Id: I18b09357a2966476e084e0d8b4178ff5e6e5000c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177103
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85370}
2023-01-18 15:48:28 +00:00
Milad Fa
60a8726ed6 PPC/s390: Rename Code to InstructionStream
Port 2c7272fdde

Original Commit Message:

    .. as part of the big Code/CodeDataContainer name shuffle.  In the
    next step, CodeDataContainer will be renamed to Code.

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I91b66eaf41aa3fdb897a43a830dbbfba8219b2c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174852
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85369}
2023-01-18 15:28:30 +00:00
Matthias Liedtke
d43139d41d [wasm-gc] Subtyping: Fix dcheck for nofuncref in type union
Follow-up CL for e9024ad26c.

Bug: v8:7748
Change-Id: I3a05b6acb382f51cccf87022a59278a16a464255
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177100
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85368}
2023-01-18 15:25:54 +00:00
Manos Koukoutos
e9024ad26c [wasm-gc] Fix and extend type union
Bug: v8:7748
Change-Id: Ia0486dd543bdb2c9eb42899fd57aae22297f8cd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4177095
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85367}
2023-01-18 14:23:57 +00:00
Camillo Bruni
e3c6e32ec0 [mjsunit] Mark regress-1353555 as non-predictable
Bug: v8:13670
Change-Id: Iebf17dcdb2b843f0e6f2820f045f3c5879a7d8d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174086
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85366}
2023-01-18 14:16:52 +00:00
Andreas Haas
10f3039bdb [wasm] Implementation of code flushing with explicit call
This CL introduces an initial implementation of code flushing, which
can be triggered from JavaScript with an explicit runtime call. The
runtime call allows easier testing. So far all Liftoff code gets
deallocated at a code flushing event. Experiments will show if this is
a good strategy.

Bug: chromium:1407659
Change-Id: I2c19a25ab5da1cf3b6d027d14cc6e719f33e300b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171627
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85365}
2023-01-18 13:14:53 +00:00
Matthias Liedtke
b0cd98500d [wasm] Fix static out of bounds check in decoder
Bug: chromium:1408337
Change-Id: Id6026097bf6a367601ec2837d11754d784212f30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176734
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85364}
2023-01-18 13:11:32 +00:00
Camillo Bruni
8eed79319a JSON Parser micro optimisations
- Dehandlify more code
- Added FieldIndex::ForDetails helper

Bug: chromium:808503
Change-Id: Ib531f6c87e4a191cba162376636b0238e7e97e7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115749
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85363}
2023-01-18 12:00:47 +00:00
Nico Hartmann
8331582414 [turboshaft] Remove weak liveness from dead code elimination
Bug: v8:12783, chromium:1407349
Change-Id: If90c5323e36641c2fe7ae6ea79985dc09cf9e2eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176736
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85362}
2023-01-18 11:24:20 +00:00
Nico Hartmann
f5b98ee39b [turboshaft] Implement ReduceInputGraph mechanism
With this new mechanism, all operations in the input graph are passed
through the reducer stack's ReduceInputGraphXyz operations that have
direct access to the original operation and index. This allows for
analysis results (computed for the input graph) to be used in a simple
way. At the bottom of the stack, all ReduceInputGraphXyz calls are
forwarded to AssembleOutputGraphXyz in the OptimizationPhase, which
calls through the stack's ReduceXyz methods as before.

Bug: v8:12783
Change-Id: Ib5662d1fa72284bd1dd763a4a6c01e590fea945f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165600
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85361}
2023-01-18 10:53:03 +00:00
Leszek Swirski
dd7b9aa51a [assembler] Fix formatting of NOOP_UNLESS_DEBUG_CODE
NOOP_UNLESS_DEBUG_CODE conditionally either declares or defines as
empty, a debug-only method in assemblers (predominantly AssertFoo
methods). The macro confuses clang-format though, which doesn't know
that the macro terminates the member function declaration, and the
indentation after it gets weird.

This can be fixed by adding a semi-colon after the macro (so that it
looks like a trailing function annotation to clang-format), but doing
this naively causes "Extra ';' in class definition" errors for the
case where the method is defined inline. These can be resolved by
swallowing that semicolon using a dummy `static_assert(true)` after
the function body.

Change-Id: I2032e68eafeca29524da2fe7ba7873c11f63d5e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176735
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85360}
2023-01-18 10:41:29 +00:00
Leszek Swirski
df88d60a4a [maglev] Make sure kContextRegister isn't clobbered
... on arm64 budget/stack check interrupts.

Bug: v8:7700
Change-Id: Iae7162d1edab688bd7b211e70112a498a252cbb9
Fixed: chromium:1407930
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4176732
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85359}
2023-01-18 10:22:32 +00:00
Michael Lippautz
ba401bb42b [heap] Remove LocalEmbedderHeapTracer
Bug: v8:13207
Change-Id: I54c6f501337a502407f8c137ec59f55a6f8d3416
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174081
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85358}
2023-01-18 09:36:32 +00:00
Clemens Backes
c9b183f27d [trap-handler] Add more owners
Make mark@ and mseaborn@ owners of the trap-handler directory.

R=ahaas@chromium.org
CC=mark@chromium.org, mseaborn@chromium.org

Change-Id: I0de583218895245527e8da4c2b6a8506dd007266
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171632
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85357}
2023-01-18 09:14:04 +00:00
Clemens Backes
9d1e0f9b8c [wasm] Use lazy compilation for debugging
There is another place where the {is_in_debug_state} flag has precedence
over {lazy_module}. This should be the other way around: For lazy
modules, we should not eagerly compile Liftoff code.

R=ahaas@chromium.org

Bug: v8:13224
Change-Id: I8da8280bd2e2ea08f83cb1bc5697b8f76795f403
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168412
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85356}
2023-01-18 09:12:28 +00:00
Clemens Backes
a1ab1271a0 Add a WATCHLIST entry for trap-handler
Changes to the trap-handler directory need special security review. Add
a WATCHLIST to make it less likely that security review is ignored.
The watch list has ahaas and clemensb as V8-side owners and mark and
mseaborn as security reviewers.

R=ahaas@chromium.org, mark@chromium.org, mseaborn@chromium.org

Change-Id: I3af3eee5797d20353c39a33de009f39df85e98a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4165617
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85355}
2023-01-18 09:00:37 +00:00
Jakob Linke
c53c026e6e Rename CodeDataContainer to Code
This completes the big Code/CodeDataContainer name shuffle.

Bug: v8:13654
Change-Id: If033e9153e751ab0d2a38572da2ce2f7029bc359
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173569
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85354}
2023-01-18 08:44:08 +00:00
Liu Yu
08aa1e2891 [loong64][mips64] Rename Code to InstructionStream
Port commit 2c7272fdde

Bug: v8:13654
Change-Id: I06b714c21db9e688ee7955f32061dd99c9374278
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173355
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#85353}
2023-01-18 07:46:59 +00:00
Andreas Haas
589591026a [wasm][cleanup] Clean up signature of WasmTierUpFunction
The runtime function took two parameters, the instance and the function
index. The function index, however, seems to be unnatural information,
as the function index is a value that only has meaning with the binary
format of a wasm module, and not for the embedder of a wasm module.

This CL changes the signature of the runtime function to a single
parameter, the wasm function that should be optimized.

R=manoskouk@chromium.org

Bug: v8:12926
Change-Id: I6802cb6c8ffc586f4997a4a069735785ce59583d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171625
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85352}
2023-01-18 07:10:47 +00:00
Liu Yu
6d40296e5a [loong64][mips64] Replace JumpToOffHeapInstructionStream with
functions from the TurboAssembler class

JumpTableAssembler inherits from TurboAssembler class instead of
MacroAssembler class, so its function cannot directly use
JumpToOffHeapInstructionStream.

Change-Id: Id87901157202443440cc8ff658b098d1db1a6865
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173347
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85351}
2023-01-18 06:56:14 +00:00
v8-ci-autoroll-builder
dc4497d013 Update V8 DEPS (trusted)
Rolling v8/build: 8eddf35..e831815

Rolling v8/buildtools: a1adda9..d843e69

Rolling v8/buildtools/clang_format/script: 8b525d2..f97059d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a4c8178..7a311fe

Rolling v8/third_party/depot_tools: 1757677..86cfa62

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20230112.1.1..version:11.20230114.0.1

Rolling v8/third_party/ninja: version:2@1.8.2.chromium.3..version:2@1.11.1.chromium.6

Change-Id: I0f3f07dadc4a8d82737e147bd0ff7b1836f5e0d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174855
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85350}
2023-01-18 04:04:33 +00:00
Clemens Backes
dbeb7ed3cc [wasm] Remove redundant set_function_validated
Liftoff will only be called on valid functions, but does not validate
itself. So we should not set the function to "validated" after executing
Liftoff compilation. Instead, we can DCHECK that the function was
validated before.

This requires a few changes to tests and fuzzers to correctly set the
{function_was_validated} bit.

R=ahaas@chromium.org

Change-Id: I669fca77724189c83d78bdfda9f08df9f7fd63f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168411
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85349}
2023-01-17 17:20:27 +00:00
Omer Katz
0a94bc6d3e [heap] Fix race with promoted page iteration
This is a followup to crrev.com/c/4165084.
Using relaxed atomic is not sufficient since the tasks are still running
and thus are not synced with the main thread.
This CL switches to using acquire-release semantics instead.

Bug: v8:13668
Change-Id: I613e56d423926d990aa22b3bd762a51af34737b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174078
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85348}
2023-01-17 17:09:56 +00:00
Paolo Severini
11a63fa8d2 [sandbox] Reduce max size of ExternalPointerTable on Android
Bug: v8:13661
Change-Id: Iec08bc81fc2d42b728a05bbbe51c765d3982427c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173595
Reviewed-by: Samuel Groß <saelo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#85347}
2023-01-17 16:58:54 +00:00
Manos Koukoutos
0033691b2a [wasm-gc] Move and simplify AssertNotNull optimization
We used to optimize the pattern of a {WasmTypeCast} followed by an
{AssertNotNull} in the wasm typer, by moving the latter before the
former. This has caused multiple bugs in the past.
Now that we have null-trapping casts, we can simplify the optimization
by changing the return type of the type cast to non-nullable, thus
making it trap on null, and removing the explicit null assertion. We
also move it to the WasmGCOperatorReducer, which is more appropriate.

Bug: v8:7748
Change-Id: I756543090145c71e998042607437a5bad3fd19da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4172731
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85346}
2023-01-17 16:08:10 +00:00
Dominik Inführ
4abbe5deeb [test] Mark shared memory tests as unpredictable
Tests with shared memory are non-deterministic and shall not be
run with --predictable.

Bug: v8:13267, v8:13669
Change-Id: I65c9e1b273ff96ea73acd817a297c08f83ba615f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174076
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85345}
2023-01-17 15:47:36 +00:00
Clemens Backes
d2119c0b68 Annotate some SmallVector methods as V8_PRESERVE_MOST
SmallVectors are assumed to be small most of the time. Hence the {Grow}
method and others will most of the time not be called. So mark them
{V8_PRESERVE_MOST} to make caller code slimmer and faster.

R=dlehmann@chromium.org

Bug: v8:13565
Change-Id: Ia2bdcdff7e415b1d8a2717849c74604677a9dade
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168413
Reviewed-by: Daniel Lehmann <dlehmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85344}
2023-01-17 15:05:51 +00:00
Clemens Backes
79ed179625 [wasm] Relax a DCHECK for validation
We sometimes validate functions in the background, e.g. when inlining in
TurboFan. This had a slight chance of triggering a DCHECK when we were
validating the same function explicitly in another thread.
This would only happen in non-default configurations, if some functions
get eagerly compiled with TurboFan and other functions get lazily
compiled, and therefore validated explicitly.
Since listing all such conditions is tricky, we just return early if we
detect that a function was already validated.

R=ahaas@chromium.org

Bug: v8:13659
Change-Id: Ie75b2638e86e263406edfbc41cc4f404b3b98e68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4171623
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85343}
2023-01-17 14:52:54 +00:00
Toon Verwaest
1d8f2517e3 [parser] Don't lazy compile CreateDynamicFunction functions
Bug: chromium:1407080
Change-Id: I9b0c30a9ab8fb66510e627ab276eb1c9b3146aa0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4174072
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85342}
2023-01-17 14:50:21 +00:00
Michael Achenbach
2a20b228ef [gcmole] Run gcmole on bots with matching architecture
This does:
- Move gcmole runs to bots with matching arch.
- Update mb_configs to enable gcmole on the bots that run it.
- Add a GN target that extracts some compiler flags from a
ninja file of one of V8's other targets.
- Use the extracted flags in the gcmole script and remove other
hard-coded arch-specific flags.

This is done for DEFINES and includes for now. Other compiler flags
are still a TODO.

Bug: v8:9287
Change-Id: Icba9ce59e0bfffd138d9207b1c2ad64d42bf6a91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4055629
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85341}
2023-01-17 13:56:18 +00:00
Victor Gomes
6350ef168c [maglev][arm64] Fix lack of scratch registers in ExceptionHandlerTrampolineBuilder
Not enough scratch registers to materialize results.

Fixed: chromium:1407928
Bug: v8:7700
Change-Id: I90c60bd4f8607d223d577344f8452fedfc6774af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4173573
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85340}
2023-01-17 13:49:10 +00:00
Milad Fa
e2edd1c992 [codet] Fix decoding of KindField on big endian
KindField seems to be a 2 byte value (rather than 4).
Loading 32 bits would read an incorrect value on BE and fails
runtime assertions.

Behaviour does not change on little endian as only the low-order
4 bits are used.

Change-Id: I0933a00e6fb5259785f894a838933791d411edba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4168418
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#85339}
2023-01-17 13:23:33 +00:00
Olivier Flückiger
0f4a6a500c [runtime] StringEqual check in larger chunks
SeqStrings are now zero padded. This allows us to check equality in
chunks of 32, or 64 bytes. Makes StringEqual about 2x as fast for
strings larger than 4-8 bytes.

Bug: v8:13664
Change-Id: Ic5e21bbef97b401a6d28a76bcb164a88739a68a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4156058
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85338}
2023-01-17 13:15:58 +00:00