Commit Graph

76220 Commits

Author SHA1 Message Date
Adam Klein
8fd659eedc Skip mjsunit/compiler/inlined-call-polymorphic under stress_concurrent_inlining
It's flaky in that config, and the failures are not considered actionable.

Bug: v8:12267
Change-Id: Ibc020cd7d28ddda431ec5f79f3c1952a14ffbfa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763582
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@{#81728}
2022-07-14 18:30:39 +00:00
Dominik Inführ
87b54ebabb [heap] Delete skipped test
Test was already skipped for quite some time.

Bug: v8:8169
Change-Id: I1cb4f024e43a42c48b425ad0c713fb85bbfb2354
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762580
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81727}
2022-07-14 17:45:20 +00:00
Clemens Backes
4c23602984 [utils] Modernize BitVector implementation
Use default constructors and algorithms. No functional change intended.

R=jkummerow@chromium.org

Bug: v8:13063
Change-Id: I74abfe17d265c95e38fde1440ba48d88fdb5a2c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760452
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81726}
2022-07-14 15:36:19 +00:00
Leszek Swirski
e7e29e4a12 [maglev] Add deopt reasons to eager deopts.
Bug: v8:7700
Change-Id: Iba160350ad2062abf7da6b97d04d255e0f780f4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757893
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81725}
2022-07-14 15:01:59 +00:00
Clemens Backes
8cd5d85d63 [utils] Fix new length computation when growing BitVector
The {std::min} followed by a loop does ensure that the new length is
bigger than {needed_value}, but does not ensure that we always allocate
at least {kInitialLength}. Maybe this was intended to be {std::max}?

Anyway, this CL replaces the loop by a computation which ensures that we
allocate a power of two that is greater than {needed_value} and at least
{kInitialLength}.
It also adds a CHECK to guard against integer overflows.

R=jkummerow@chromium.org

Bug: v8:13063
Change-Id: I374d304204a499536643a6c5df7111231d41d4bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760674
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81724}
2022-07-14 14:31:49 +00:00
Samuel Groß
63e054f5ee [sandbox] Fix serialization of raw external references
When testing the serializer (e.g. via --stress-snapshot), raw external
references (i.e. just raw pointers) can be embedded inside the snapshot.
When those pointers are sandboxed, the corresponding external pointer
tag also needs to be encoded in the snapshot. This CL adds the necessary
logic to support this by introducing new serializer Bytecodes for raw
external references and encoding the raw pointers together with the tag.

Bug: v8:10391
Change-Id: I7b3710c2144e19f7507e3f6db537d250d102ee28
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762575
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81723}
2022-07-14 14:09:32 +00:00
Jakob Kummerow
0ef8ce7dca [wasm][liftoff] Spill multi-used registers before branches
This extends the idea already used by "MaterializeMergedConstants":
certain values have to be processed by every br*, so to protect against
cascades of conditional jumps causing lots of repeated work, it makes
sense to do such processing just once.
For the module in the linked bug, this reduces Liftoff generated code
size from 69MB to 181KB.

Fixed: v8:13072
Change-Id: Ie9f98240e93751988067d4774d4a09b2b39bdad6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760444
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81722}
2022-07-14 13:31:14 +00:00
Leszek Swirski
e66547b774 [x64] Avoid movl into register for cmpl
Avoid materializing a compressed value into a register if that value is
only used for a compare afterward. Instead, emit it directly as an
immediate on the cml. We can only do this for the Cmp(Register,...)
overload, not Cmp(Operand,...), since the latter already has the lhs as
a complex operand.

Change-Id: I99f192c9919e401164d31d2e2e1c3a0c21a6aaf0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762577
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81721}
2022-07-14 13:25:49 +00:00
Samuel Groß
df2fc0725e [sandbox] Always use a constant sandbox size
As sandboxed pointers assume a constant sandbox size (they are
essentially n-bit offsets), it is no longer useful to be able to create
smaller sandboxes. This CL simplifies the sandbox initialization logic
accordingly and adds CHECKS to ensure a fixed-size sandbox is created.

Bug: v8:10391
Change-Id: I6541ab769001e60c0256d3a719f926128a0a20b0
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647684
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81720}
2022-07-14 13:21:04 +00:00
Leszek Swirski
0e2d90c7f1 [maglev] Remove the need for a tmp and pointer decompress in CheckMaps
Use the Operand overload of Cmp to avoid loading the object map into a
temporary in CheckMaps; this also avoids uncompressing the map pointer
when loading it.

It does mean that the migration path of CheckMapsWithMigration has to
re-load the map, and heavier use of the scratch register in that
implementation, but it's a deferred path so that should be ok.

Bug: v8:7700
Change-Id: I6741d5b5a8ad402bdef9025c43a86aca21db050e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762574
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81719}
2022-07-14 13:19:59 +00:00
Victor Gomes
3fbe85bab3 [maglev] Support TestUndetectable
Bug: v8:7700
Change-Id: Ibf21ca005754d9dba2669175a24a74f96ff871a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760459
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81718}
2022-07-14 08:51:55 +00:00
Anton Bikineev
3687a51277 cppgc: Avoid decompression cycle when assigning Member from raw ptr
Bug: chromium:1325007
Change-Id: I1d84175a50adc03fdb7a504432fda088b6f3d736
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758214
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81717}
2022-07-14 08:47:45 +00:00
Michael Achenbach
0be6542ce7 [test] Skip slow tests
Also bump shards on a slow builder.

No-Try: true
Bug: v8:13074
Change-Id: I07131c53d1d632886039e811de38961dd4eb5752
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760458
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81716}
2022-07-14 07:56:25 +00:00
JianxiaoLuIntel
ceb06244f2 Group cases with the same return value
Change-Id: Ide57fbbe30c2d2f04c42af09784eb8fc4c8a52f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3761974
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Cr-Commit-Position: refs/heads/main@{#81715}
2022-07-14 07:20:45 +00:00
Clemens Backes
ae56aa0a21 [utils] Outline growing of GrowableBitVector
This change alone reduces the overall compile time of the reproducer
from the linked issue by >30%.

R=jkummerow@chromium.org

Bug: v8:13063
Change-Id: I5ac69ab6ec2f1427b1511181664d34f4b1d26f93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760451
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81714}
2022-07-14 07:17:31 +00:00
Marja Hölttä
07add52168 [rab/gsab] Tests for Array.p methods, part 13
In this part: filter

Bug: v8:11111
Change-Id: I8ca08e94ad2ab56605e9a32ba52de426f8100da8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758213
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81713}
2022-07-14 06:38:34 +00:00
Marja Hölttä
f20e4e71a2 [rab/gsab] Tests for Array.p methods, part 12
In this part: forEach, reduce, reduceRight + missing tests for includes

Bug: v8:11111
Change-Id: I3586d56655bd65c054e0933816f5331d5a8d1860
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758210
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81712}
2022-07-14 06:34:35 +00:00
v8-ci-autoroll-builder
b2ffb076f7 Update V8 DEPS (trusted-origins)
Rolling v8/build: 78234e5..142c351

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: If6ce5201a8b9ee75f54d6da84e0da61097f2e788
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3761236
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81711}
2022-07-14 04:51:04 +00:00
v8-ci-autoroll-builder
7e7bdf5ce6 Update V8 DEPS (trusted-versions)
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8e95834..e8f62ff

Rolling v8/third_party/depot_tools: d22bf60..c8fadda

Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220712.1.1..version:8.20220713.2.1

Rolling v8/tools/luci-go: git_revision:be5d9aacf8987c0826223264f0427cd0b530b6a4..git_revision:a0ba80649473055bae3d789eec28c9967adb5e45

Rolling v8/tools/luci-go: git_revision:be5d9aacf8987c0826223264f0427cd0b530b6a4..git_revision:a0ba80649473055bae3d789eec28c9967adb5e45

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I96a5f587b802f8db537774fd03a050a841de9fb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3761235
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81710}
2022-07-14 03:59:55 +00:00
JianxiaoLuIntel
0ecdae594d [heap] Expose max worker number of concurrent marking as a runtime flag
See details at https://groups.google.com/g/v8-dev/c/H3YXXKoauLI

Change-Id: Ibe255e95bfd1d09a115eb04d6cbfcca7a671d900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756729
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81709}
2022-07-14 03:57:54 +00:00
Shu-yu Guo
6c4b2e0ef2 [shared-struct] Fix unlocking in JSAtomicsMutex
Errors in the callback were not correctly unlocking the mutex, oops.

Bug: v8:12547
Change-Id: If44ebc023b8192605c9f29bfd4099a197110f5c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760986
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81708}
2022-07-14 01:03:57 +00:00
Milad Fa
dda8d86087 PPC: make simd registers independent of double/fp registers
PPC Simd regs are already using separate set of register banks
on ppc, more details can be found here:
https://crrev.com/c/2718472

Here we are making use of this CL https://crrev.com/c/3005768
(fcd3ef4) and fully separating Simd regs during register allocation.

Member function `toSimd()` is also introduced which will be used
to cast FP regs to Simd regs in liftoff.

Change-Id: Ic5551fb04f37de7fc9501a2f1aba8fb44f622d95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755213
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81707}
2022-07-14 00:44:25 +00:00
Anton Bikineev
060f05787c cppgc: Provide relational operators for Members
The current compression scheme defines isomorphism with respect to
relational operations (i.e. the relational operators preserve their
results on the set of compressed pointers).

In addition, provide overloads for nullptr/sentinel.

Bug: chromium:1325007
Change-Id: I476a1c59e92f5210e26142320eb03802bd11ea51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758143
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81706}
2022-07-13 22:32:40 +00:00
Anton Bikineev
50a17855e3 cppgc: Reduce the age table back to 1MB
The increase caused a significant PMF regression on Windows. Apparently,
leaving the table in reserved state didn't eliminate the regression. The
CL returns the age size back to 1MB. The followup is to investiage and
fix the regression.

Bug: chromium:1336420
Change-Id: I56542ba4efe0fc8d08d8c5febf758384559a8860
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758146
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81705}
2022-07-13 22:18:54 +00:00
Michael Achenbach
1defafa494 [test] Increase shards for slow tests
To prevent timeouts on arm64-sim debug and gc-stress builder. Also
skip a very slow test on the arm64-sim gc-stress builder.

No-Try: true
Change-Id: I7d275aa893dbe4942b4d41c6e83d9b9e6f861a33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760455
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81704}
2022-07-13 21:13:54 +00:00
Samuel Groß
543b54da66 [sandbox] Sandboxify Foreign external pointer
Bug: v8:10391
Change-Id: I4c5c209454db316fe86f379f6b2e6dfc7ba7754e
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757340
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81703}
2022-07-13 21:04:14 +00:00
Anton Bikineev
4dee3fbd37 cppgc: Provide operator==(Raw, Member) to avoid Member decompression
The operator with raw pointer allows us to avoid Member decompression,
which is more expensive than compression. It's also quite frequently
called (e.g. in HeapHashSet::find()).

The existing operator
  template <...>
  bool operator==(const Member<T1>&, const Member<T2>&);
was not called for
  GCed* raw = ...;
  member == raw;
because the compiler wouldn't deduce `T2` in `const Member<T2>` as
`GCed` when the initializer expression `raw` is of different type
(`GCed*`).

Bug: chromium:1325007
Change-Id: Ie1ee12bad28081c66f4e08a146467fd7c040bb70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757344
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81702}
2022-07-13 20:07:04 +00:00
Shu-yu Guo
7ccbd7bed8 [rab/gsab] Do not Reallocate 0-lengthed ArrayBuffers
Bug: chromium:1344014
Change-Id: I5009af963d95d96f70785593664a1145ad20c97d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760975
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81701}
2022-07-13 19:06:34 +00:00
Jakob Kummerow
1609ffa8b3 [wasm-gc] Fix endless loop in WasmGCOperatorReducer
When the control-flow aware type of a Node doesn't actually change,
then we shouldn't claim that it did (which causes later re-visiting
of the node).

Fixed: v8:13061
Change-Id: I064cedf3721a79844bfc36ad3142428bdfbaf891
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760675
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81700}
2022-07-13 16:46:14 +00:00
Jacob Abraham
5f0e6a10f3 Add prototype of Wasm Trace proposal
Implements an initial prototype of the Wasm Trace proposal. A custom
section containing offsets to functions is decoded into trace
instructions that are inserted into the function. In Liftoff, these
are directly inserted. In TurboFan, these are added as StackEffect's,
this is a work in progress.

Traces will only be decoded and added when a flag is given to V8,
currently "--experimental-wasm-instruction-tracing". If a trace is ever
not valid or an error occurs, it is safe to just throw them away.

Code Metadata Tool Convention:
https://github.com/WebAssembly/tool-conventions/blob/main/CodeMetadata.md

Design Doc:
https://docs.google.com/document/d/1739a_LXbavBnek7pa0uqhHOCz8IJ56mn2C2Yvbssvkg/edit?usp=sharing

Wasm Trace Proposal:
https://github.com/WebAssembly/instrument-tracing

Bug: chromium:1090122, chromium:1252113
Change-Id: Id4690d8deca482ff0e863761668ffabca159bd29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386604
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81699}
2022-07-13 16:42:28 +00:00
Sergey Ulanov
178c42220d [Fuchsia] Use optimize_max on Fuchsia
V8 was compiled for Fuchsia with optimize_speed instead of optimize_max
used on most other platfroms. There is no reason Fuchsia needs to be
different, so it's better to use optimize_max. It also allows to save
about 1MB on the binary size.

Bug: chromium:1343990
Change-Id: Ie4a07fbbfd8100def61bf7709d2c4e6cb74209f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759647
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81698}
2022-07-13 16:29:04 +00:00
Marja Hölttä
ce18b115c2 [rab/gsab] Decommit the memory whenever possible
Bug: v8:11111
Change-Id: Ic07628bcf6018ea9814a38a0dab3667a7d8f0d69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755145
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81697}
2022-07-13 16:14:44 +00:00
Shu-yu Guo
f4547fbe8f Fix parking for --stress-snapshot
Bug: v8:13039
Change-Id: I80c9e0ab84437f8e932c13b3cb134b9bdb74c1a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3759563
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81696}
2022-07-13 15:29:34 +00:00
Victor Gomes
c0ff58e061 [maglev] Support TestReferenceEqual, TestNull and TestUndefined
Bug: v8:7700
Change-Id: I07e63a33e1ef1ab8e423bf46be1d83b8724d924d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760449
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81695}
2022-07-13 15:28:24 +00:00
Andy Wingo
74289c46bb [stringrefs] Implement stringview_iter.slice
Feature complete!

Bug: v8:12868
Change-Id: I7727071bdd062a6dae26206a65080f675ef7ee93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758226
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81694}
2022-07-13 15:26:14 +00:00
Andy Wingo
77425d0a3e [stringrefs] Implement stringview_iter.advance, stringview_iter.rewind
Bug: v8:12868
Change-Id: I2e4a1733876a817dca36e0134ba4b7549f0cf4b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757886
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81693}
2022-07-13 14:12:04 +00:00
Andy Wingo
994b64148e [stringrefs] Implement string.as_iter, stringview_iter.next
Bug: v8:12868
Change-Id: Ice7134d0ad5efddb85420543ea785253791d0258
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757885
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81692}
2022-07-13 14:03:24 +00:00
Clemens Backes
b580e58f88 [wasm] Generate better OOM locations
The exact method name is not interesting when looking at crash
statistics, and can easily be retrieved from stack traces. Instead,
print a consice string saying what we were trying to do when we ran OOM.
This is more consistent with other OOM location strings.

R=ahaas@chromium.org

Change-Id: Ic8cf70b40c304711e8b96391418019b3f697e977
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760446
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81691}
2022-07-13 13:53:19 +00:00
Samuel Groß
725ce4933c [sandbox] Verify that no EPT allocation can happen during sweeping
It is not safe to allocate ExternalPointerTable entries while the table
is being swept. This property is currently ensured by the GC. To better
catch any potential future violation of this requirement, this CL now
changes the Sweep() method to first set the freelist head to a special
marker value, which is checked in Allocate() in debug builds and will
cause a recognizable crash in release builds.

Bug: v8:10391
Change-Id: Iab69c1e97afc23ae5b2b894b2d765b82a760cdd8
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758211
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81690}
2022-07-13 13:15:14 +00:00
Leszek Swirski
30dad483aa [x64] Microoptimise comparisons against tagged values
Avoid loading objects with 64-bit movq when they are only being used to
compare against another object with a 32-bit cmp_tagged under pointer
compression.

Change-Id: Ib8ccd093fb49caea3bf1b923b83825626ba0bffc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760447
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81689}
2022-07-13 12:41:24 +00:00
Junliang Yan
db9e3428c6 s390x: [baseline] fix ptr-compr issue
Change-Id: I8f0235877f9f31a5f81467a9f0ccfbc7491faa14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757888
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81688}
2022-07-13 12:09:44 +00:00
Leszek Swirski
8d52262b59 [maglev] Support CreateArrayLiteral
Also changes CreateObjectLiteral to take the boilerplate as a constant
value, not a node.

Bug: v8:7700
Change-Id: I6852c7c4b8d361f903155c513e627ebc1af4d2f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758223
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81687}
2022-07-13 11:02:33 +00:00
Samuel Groß
e5b9fae45d Disable wasm/shared-memory-worker-gc-stress test when TSAN is enabled
TSAN may cause the sandbox to fail to obtain enough virtual address
space during initialization, thereby causing it to fall back to a
smaller backing reservation. This may then in turn cause future
WebAssembly.Memory allocations to fail.

Bug: v8:12980
Change-Id: I812ee02c5421153f1ea3b6bc371c72bc1da406a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757897
Commit-Queue: Samuel Groß <saelo@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81686}
2022-07-13 10:55:53 +00:00
Clemens Backes
0dc1bab10c Reland^2 "[flags] Enable freezing of flags"
This is a reland of commit 1ed7d0b8d1.
Fixes:
- https://crrev.com/c/3745533
- https://crrev.com/c/3758064
- https://crrev.com/c/3757709

Original change's description:
> [flags] Enable freezing of flags
>
> This enables the --freeze-flags-after-init flag globally. Note that
> tests, fuzzers, Node and other still explicitly disable the flag. The
> chrome renderer process and default d8 execution will have it enabled
> though.
>
> R=cbruni@chromium.org
>
> Bug: v8:12887
> Change-Id: I9a15ef64227e5e6e04779d8d671a2c50d99c9097
> Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695264
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81214}

Bug: v8:12887
Change-Id: Ibacb7b738a91f9a893a35a7b845ce4a6ff7bae3f
Cq-Include-Trybots: luci.v8.try:v8_linux_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758224
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81685}
2022-07-13 10:49:58 +00:00
Leszek Swirski
c505520a93 [maglev] Support generic StaInArrayLiteral
Just the generic path for now, the most valuable optimisation here would
be transitioning stores but we don't yet support these.

Bug: v8:7700
Change-Id: I95e3a77cccf43bc33607a50bab1eb89fca32af06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758144
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81684}
2022-07-13 10:08:43 +00:00
Leszek Swirski
c906eec72a [maglev] Support CreateClosure
Bug: v8:7700
Change-Id: Iacdb0ecd04d7b50d7dd623feb8646c89cc4016ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757884
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81683}
2022-07-13 09:48:49 +00:00
Victor Gomes
fb945c9185 [maglev] Add SetKeyed and DefineKeyedOwn generic nodes
Bug: v8:7700
Change-Id: I49c13eb2f251b8d547826928da479fa1186a11fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757894
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: 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@{#81682}
2022-07-13 09:34:09 +00:00
Leszek Swirski
7cbdde4a70 [maglev] Support Sta(Current)ContextSlot
We don't even need any new IR nodes for it.

Bug: v8:7700
Change-Id: I8c2844f9bc6d21b09799395f817831685be21df7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757883
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81681}
2022-07-13 09:15:38 +00:00
Camillo
67c951fa12 Reland "[maglev] Add internalized string compare fast-path"
This is a reland of commit c4301c0489:
- Fix thin string in string-compare.js with low gc interval

Original change:
- Rename TryBuildCompareOperationBranch to TryBuildCompareOperation
- Add CheckedInternalizedString conversion Node that checks for string
  inputs and extracts internalised Strings from ThinStrings
- Add BranchIfReferenceCompare Node
- Add runtime functions to create internalised and thin Strings
- Add deopt check to test/mjsunit/maglev/int32-branch.js

Bug: v8:7700
Change-Id: I9221253f6bbeef12297419495c6eaf5096e06278
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755152
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81680}
2022-07-13 09:08:58 +00:00
Marja Hölttä
1e7e85306a [rab/gsab] Tests for Array.p methods, part 11
In this part: join, toLocaleString

Bug: v8:11111
Change-Id: I66ba85c33aae61a86e162352adb2d4bcf0dbac12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757333
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81679}
2022-07-13 06:58:17 +00:00