Commit Graph

79311 Commits

Author SHA1 Message Date
Choongwoo Han
fd8a89af75 [presubmit] Handle Windows path for header guard check
AffectedFile.LocalPath returns a path with backward slashes in Windows. Update the presubmit script to handle this case properly.

Bug: v8:13582
Change-Id: Iabc46ded5a8448e5d373679162108f94846c06e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4099007
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#84819}
2022-12-13 17:30:02 +00:00
Adam Klein
a40734b3cc Revert "[maglev] Enable --maglev with --future"
This reverts commit 4cc24b6a1c.

Reason for revert: sqlite-change-heap mjsunit test starts failing:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/12381/overview

Original change's description:
> [maglev] Enable --maglev with --future
>
> This also removes --nowrite-protect-code-memory from --future.
>
> Bug: v8:7700
> Change-Id: Ibf17f541906d5f586d380b00ce471b5e1f20f7e3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100754
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Auto-Submit: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84817}

Bug: v8:7700
Change-Id: Ia9c4e5515cf24c8b96f7b05dc3c823bdfa285643
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4102360
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84818}
2022-12-13 17:25:07 +00:00
Toon Verwaest
4cc24b6a1c [maglev] Enable --maglev with --future
This also removes --nowrite-protect-code-memory from --future.

Bug: v8:7700
Change-Id: Ibf17f541906d5f586d380b00ce471b5e1f20f7e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100754
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84817}
2022-12-13 16:32:16 +00:00
Victor Gomes
2a887253e1 [maglev] Share Tagged(Not)Equal nodes
Bug: v8:7700
Change-Id: Icee125319136cb3326c02b8f0958777929569bb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100709
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84816}
2022-12-13 15:28:14 +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
2e9b4afa38 [turboshaft] Fix type refinement for unreachable branches
Bug: v8:12783, chromium:1400034
Change-Id: Ifdd105fba500ebc7678ee223947743eb0283f950
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097428
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84814}
2022-12-13 14:53:18 +00:00
Dominik Inführ
8f911e423e Revert "[heap] Also promote strings in large objects into shared heap"
This reverts commit 303facf5e1.

Reason for revert: Causes failures with fuzzers.

Original change's description:
> [heap] Also promote strings in large objects into shared heap
>
> With --shared-string-table all in-place internalizable strings are
> directly promoted from new space into the shared heap. However, this
> wasn't the case with large objects. This CL fixes this and adds test
> to guide fuzzers.
>
> Bug: v8:13267, chromium:1400048
> Change-Id: I6f850d480956c63bfbe1a7060140df850e284933
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096818
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84805}

Bug: v8:13267, chromium:1400048
Change-Id: If20528bbf804b73ce8ad10f8addc9a1f11b50d96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101261
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84813}
2022-12-13 14:38:39 +00:00
Victor Gomes
317bc26ac9 [maglev] Share more generic nodes
Bug: v8:7700
Change-Id: I70d06f7f621ac53c871ba1361259cb08fed9fb76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100708
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84812}
2022-12-13 14:32:55 +00:00
Samuel Groß
65f1501634 Use --no-lazy --stress-lazy-source-positions when --fuzzing
This will allow bugs such as crbug.com/1394403 to be found much easier
by fuzzers as it will cause d8 to compile every function twice and to
verify that the resulting bytecode is the same.

In order to not lose fuzzer coverage of e.g. lazy compilation, this CL
also adds --lazy and --no-stress-lazy-source-positions to the fuzzer
configurations to be chosen with a small probability.

Bug: chromium:1394403
Change-Id: I172ac483b45978a669c9787e5f851daa985fd1f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096480
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84811}
2022-12-13 14:18:58 +00:00
Victor Gomes
689f0be089 [maglev] Add counters for Maglev Finch experiment
Bug: v8:7700, chromium:1400281
Change-Id: I768e6b1b0a23bc1ce91f307b99e30e9eee0fdb47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4098829
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84810}
2022-12-13 13:47:48 +00:00
Marja Hölttä
d873ac4b15 [rab/gsab] Fix ValueSerializer RAB / GSAB support
The "is there enough data" check has to be done *after* reading
maxByteLength.

Bug: v8:11111, chromium:1400431
Change-Id: I7c2eddaeb998f3cd3919e118c093a5d036fca408
Fixed: chromium:1400431
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100468
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84809}
2022-12-13 13:27:35 +00:00
Toon Verwaest
e1e08901c2 [parser] Reset the calls_eval flag after arrow head
Otherwise it's propagated to the parent

Bug: chromium:1394973
Change-Id: I178f9d5d863aec501525a783846d1df6d3031bb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100687
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84808}
2022-12-13 13:15:51 +00:00
Clemens Backes
b095103b7e [x64] Optimize operand emitting
The {Assembler::emit_operand} method is basically just copying 1-6 bytes
from {Operand::Data::buf} into the assembler buffer. This showed up with
>5% of Liftoff compilation time in a performance profile.

This CL makes this >2x faster by using an optimized copying routine
(using the same trick that libc's memcpy uses).

R=jkummerow@chromium.org

Bug: v8:13570
Change-Id: I525a94989c271b56ad7c148d21f234d05a25842a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4088606
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84807}
2022-12-13 13:14:43 +00:00
Al Muthanna Athamina
85f5add30d Add tools/.vpython3 file to test runner deps
Bug: v8:12313
Change-Id: Id127d9f75cddef3be85ab6e624df215464562899
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100467
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84806}
2022-12-13 12:29:16 +00:00
Dominik Inführ
303facf5e1 [heap] Also promote strings in large objects into shared heap
With --shared-string-table all in-place internalizable strings are
directly promoted from new space into the shared heap. However, this
wasn't the case with large objects. This CL fixes this and adds test
to guide fuzzers.

Bug: v8:13267, chromium:1400048
Change-Id: I6f850d480956c63bfbe1a7060140df850e284933
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096818
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84805}
2022-12-13 12:25:14 +00:00
Leszek Swirski
f051f773f4 [heap] Remove optimized code list
Code objects are linked in a custom per-native-context weak list of
optimized code (previously there was also a list of deoptimized code,
but this was recently removed).

There used to be reasons for this list, but at this point it is only
used by the debugger to mark code for deoptimization. The debugger can
do this with a heap walk instead, so we can remove this list and indeed
the next_code_links from Code objects themselves.

Change-Id: Iebbed4adacd31b8ddc442ae6355ea45c691cc856
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4061515
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84804}
2022-12-13 11:58:32 +00:00
Dominik Inführ
739842c1f9 [heap] Enable fuzzing for --shared-space
Bug: v8:13267
Change-Id: I256cf892390da770bcbb0345f4a4c9e2f4013f0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097427
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84803}
2022-12-13 11:43:31 +00:00
Matthias Liedtke
e9f58c7ca9 [wasm-gc] Fix br_on_* turbofan typeguard nodes
The "negative" instructions `br_on_non_*` & `br_on_cast_fail` created
the `TypeGuard` node for the successful branch using the effect /
control chain o fthe wrong branch.

As `TypeGuard`s do not generate code, these instructions are for the
Turbofan type system.

Bug: v8:7748
Change-Id: I12de7421a6d16e24d91336457443ab6f646ab309
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097425
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84802}
2022-12-13 10:42:34 +00:00
Nico Hartmann
0efdcf6f38 [turboshaft] Fix type refinement on branches with implicit truncation
Bug: v8:12783, chromium:1400056
Change-Id: Ie522a308f49b92c8438ae102559a763f8912c1d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4094420
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84801}
2022-12-13 09:35:50 +00:00
Simon Zünd
30861a3932 [debug] Re-enable internal [[Scopes]] property
We received feedback that the [[Scopes]] property has some legitimate
use-cases not covered by the Scopes View during pause.

We re-enable the feature for now and will remove the flag in a
follow-up.

R=bmeurer@chromium.org

Bug: chromium:1365858
Change-Id: Ibf279ae6c4f5ae492d03e9b4ee7316f6500508d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4099385
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84800}
2022-12-13 08:52:15 +00:00
Jaroslav Sevcik
00c8f93df1 [debug] Fix removing instrumentation breakpoint on pause
Bug: chromium:1354043
Change-Id: Ib30aaa6e799eb3cda611e1ec63cd8e049befc75f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100485
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84799}
2022-12-13 08:18:44 +00:00
Samuel Groß
f8ca14b769 [sandbox] Fix JSArrayBuffer serialization
In case a JSArrayBuffer is empty but has an extension installed, the
previous code would not clear the extension prior to serialization. This
would then cause a DCHECK failure right after serialization when
restoring the extension pointer because we only allow changing from
nullptr to a non-null extension pointer.

Bug: chromium:1335043
Change-Id: I9276da0ebb7ecf0d22949c3d1294cfa90bad7a7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096479
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84798}
2022-12-13 08:14:51 +00:00
Jaroslav Sevcik
d46662c084 [test] Move inspector stopping to session
This patch moves the stop method from context group to session to enable
stopping each session independently. This is useful for testing that
stopping does not interact badly with other sessions.

Bug: chromium:1354043
Change-Id: I885cf49f2d4cf006fa5228edf2954099e45cfc6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100484
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84797}
2022-12-13 06:59:09 +00:00
Clemens Backes
a38209949f [wasm][turbofan] Load 32-bit values more efficiently
When loading a 32-bit value from the stack, just load 32 bit and
zero-extend them into the target register, instead of loading the full
64 bits.

As there are things to fix (see https://crbug.com/1356461), we only
enable this optimization for Wasm for now.

R=jkummerow@chromium.org

Bug: chromium:1395604, chromium:1356461, v8:13581
Change-Id: Ibdd2d80704973362906aec9b38faa762d3b43f3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097424
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84796}
2022-12-12 21:36:50 +00:00
Milad Fa
50961e7032 [turboshaft] Fix compilation with gcc
gcc versions < 9 may produce the following compilation error due
to passing/initializing an empty struct as a parameter:
> '<anonymous>' is used uninitialized in this function

A reproducible code sample can be seen here:
https://godbolt.org/z/PfanPrEGG

This issues seems to have come up in gcc in various ways,
here is a related bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465

A simple workaround here it to add a 0 initialized value to
the empty struct.

More information can be found at the comment section of this CL: crrev.com/c/4057111

Bug: v8:12783
Change-Id: Iee8fec73610fa2525530db431daf5fa285c09a3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4097624
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#84795}
2022-12-12 18:56:24 +00:00
Toon Verwaest
7b381dfef6 [flags] Remove future implications that are already default
Change-Id: Ib5741c2245baa2032bb609df9a21d1f47beb6f21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096989
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84794}
2022-12-12 17:02:58 +00:00
Qifan Pan
c27adbd631 [turbofan] Fix bugs of ToBigIntConvertNumber
This CL fixes two bugs:

- The monotonicity violation in the typers of ToBigIntConvertNumber and
  Integral32OrMinusZeroToBigInt.
- The missing handling of conversion from Tagged output with the type
  DoubleRepresentableInt64OrMinusZero to Word64.

Bug: v8:9407, v8:13580, chromium:1399951, chromium:1400053
Change-Id: I669820b52e5b82bddc9853cfd97a2361c344a2cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096990
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#84793}
2022-12-12 17:01:54 +00:00
Clemens Backes
67377c13c0 [wasm] Use WasmEngine's allocator for validation
We already exclusively use the WasmEngine's AccountingAllocator for all
decoded Wasm modules. Except for tests, the same allocator will also be
used for validation. Thus do not pass it down explicitly, but get it
from the WasmEngine when needed.

R=ahaas@chromium.org

Bug: v8:13447
Change-Id: Idaa9d6c3e0ab0051bf85bb2667accac89e8b5607
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4092738
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84792}
2022-12-12 16:59:04 +00:00
Victor Gomes
96837869d6 [maglev] ToObject cannot lazy deopt
Fixed: chromium:1400089
Bug: v8:7700
Change-Id: I141ded36322759d77bfd2a6b68270ade3ea88486
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096918
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84791}
2022-12-12 16:34:21 +00:00
Victor Gomes
21969e8e24 [maglev] Only trigger OSR compilation in concurrent mode
In synchronous mode, a TF compilation can trigger a lazy
deopt of the Maglev code.

Instead, if in synchronous mode, we eager deopt to Ignition
and OSR from there.

Fixed: chromium:1394279
Bug: v8:7700
Change-Id: I4db2ac561d5626ab5f04b167e50025013490a4a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096878
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84790}
2022-12-12 16:33:17 +00:00
Al Muthanna Athamina
86f0d14d2d [test] Add ClusterFuzz wheel to V8 and analyze crashes
This replaces the dummy values for the crash analysis. We use the
stack parser from ClusterFuzz to extract the crash type and state from
the stderr of the output and we store it in the test results. We also
added some tests to check the functionality with some example stderrs.

Bug: v8:12313
Change-Id: I67994a752a7aa01cacfb7ebfe7e9d3d61820a4dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4067428
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84789}
2022-12-12 16:12:31 +00:00
Victor Gomes
835a2c12e0 [maglev][arm64] Add CheckedInternalizedString
Bug: v8:7700
Change-Id: I1d0c29dabd3bec177662007de314b27d448a4e39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096858
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84788}
2022-12-12 16:04:05 +00:00
Darius M
27f306a4b0 [maglev][arm64] Add (most) BranchIf IR nodes
Bug: v8:7700
Change-Id: I1cc04ceae5a90e55f82eb845308639042f1c647c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4092266
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84787}
2022-12-12 15:48:59 +00:00
Victor Gomes
405e40aa3b [maglev] Call Math.pow builtin if both inputs are tagged
JetStream2:ARES:Basic regresses with the Float64Exponentiate.
It seems that calling the builtin directly is cheaper than
unboxing both inputs and calling the C++ stub.

Bug: v8:7700, v8:1393643
Change-Id: Ib2c1523ed57eea048bb269fc16992349687cbb73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4084764
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84786}
2022-12-12 15:04:49 +00:00
Manos Koukoutos
2ee52447c8 [wasm] Exception LoopExitValue should be TaggedPointer
Change-Id: I5d6a4745881241f827158ea7a9e790883f6dbb81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096985
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84785}
2022-12-12 14:27:40 +00:00
Olivier Flückiger
f834ce3ae4 [static-roots] Skip a slow serializer test on windows debug build
A new test added in https://crrev.com/c/4092575 times out on ASan
windows builds and is slow.

Superseeds https://crrev.com/c/4096677.

No-Tree-Checks: true
No-Try: true
Bug: v8:13466
Change-Id: I40d61459437434cf739fbff8c223871012a23010
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096817
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84784}
2022-12-12 14:22:02 +00:00
Matthias Liedtke
4760f9292c [test] Skip flaky unittest TyperTest.Monotonicity_Operation_Integral32OrMinusZeroToBigInt
Bug: v8:13580
Change-Id: I96680f9e12515fa1f2885edc6fbdf754fed6b40b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096986
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84783}
2022-12-12 14:19:28 +00:00
Toon Verwaest
968254f6cb [flags] Remove turboshaft from future for now
Change-Id: I9c1ef8213e62370df17c468ba6285ea56713d213
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096857
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84782}
2022-12-12 14:18:26 +00:00
Darius M
d2bb8554cb [maglev][arm64] Fix wrong ExternalReference Move
Bug: v8:7700
Change-Id: I0931d4aa3638b51675ba73b43ed1244a75cd9214
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096739
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84781}
2022-12-12 14:17:24 +00:00
Maya Lekova
10ae2e4a59 [turboshaft] Fix a crash in branch elimination
The current reduction of blocks that are branch targets with a known
condition assumes that this is the first time we're seeing the given
condition with the given value. That's no longer the case, so updating
the expectation accordingly.

Bug: chromium:1399627
Change-Id: Id84d80a38801cf6178b476e62160d616b948d8d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096984
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84780}
2022-12-12 14:16:20 +00:00
Shu-yu Guo
d1d100d4ef [shared-struct] Disallow Symbol field names
Bug: chromium:1394408, v8:12547
Change-Id: If98e6f0e7048a7d218010eb2859bb986a20917ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4094374
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84779}
2022-12-12 12:45:34 +00:00
Darius M
11ab3a1d86 [maglev][arm64] Implement Float64 Comparisons
Bug: v8:7700
Change-Id: I673ac722f95af4b486a54ccdea3725a345495f05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4085004
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84778}
2022-12-12 12:30:36 +00:00
Victor Gomes
d871c03e4a [maglev][arm64] Port simple Load<Type> IRs
Bug: v8:7700
Change-Id: I275a72562c5d2f85fce007db5e77bb804cca6bd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4088684
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84777}
2022-12-12 11:35:11 +00:00
Matthias Liedtke
1bf670ef20 [wasm-gc] ref.cast null: Always produces a null type independent of input type
This is required to be spec-compliant.
The previously implemented behavior was more relaxed allowing one to use
`ref.cast null` on non-nullable inputs and still getting a non-nullable
result on cast success.

Bug: v8:7748
Change-Id: I1297314389b0445a7c8d5a74f37d07a723d7a133
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4091549
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84776}
2022-12-12 11:30:33 +00:00
Toon Verwaest
d310532598 [maglev] Use CallApiCallback for api getters
Bug: v8:7700
Change-Id: Ie1009205f90f13933d7f127165d8d16c8276854f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4091244
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84775}
2022-12-12 11:20:09 +00:00
Victor Gomes
db973bb462 [maglev] Support %OptimizeOsr
Since Maglev can OSR to TF, we only need to remove the checks.

Bug: v8:7700
Change-Id: I2d3c5ede4c3611bb1830b0c16a480585c123586d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4084793
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@{#84774}
2022-12-12 11:08:42 +00:00
Olivier Flückiger
bd7458cb7f Reland "[static-roots] Allow creating isolates from exist. r/o snapshot"
This is a reland of commit 331c577e1d

Fix DCHECK for single generation builds.

Original change's description:
> [static-roots] Allow creating isolates from existing r/o snapshot
>
> This adds the ability to create an isolate from scratch, except the
> read only roots, which are initialized from a read_only_data snapshot.
> To do this we split the heap setup in a read/only part and the rest.
> The goal of these changes is to later support writing serializer tests,
> even if the read only roots are static and have to be loaded from a
> fixed snapshot.
>
> Bug: v8:13466
> Change-Id: I078695b95710e5281da013ca0c08af0e153b4725
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4037271
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84750}

Bug: v8:13466
Change-Id: Ic680b7620fc3176260c5d550e474412afef5f598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4092575
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84773}
2022-12-12 10:44:23 +00:00
Victor Gomes
e039f6b1a4 [maglev] Fix saved return register in CheckMapsWithMigration
We check if kReturnRegister is in the live register of the node snapshot,
but this does not include the eager extended deopt registers added
by AddDeoptRegistersToSnapshot.

This CL makes sure we do the proper check.

Fixed: chromium:1399805
Bug: v8:7700
Change-Id: I6eba5d7ec81ce6f4137aaeeda925029484824920
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4096558
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84772}
2022-12-12 10:31:34 +00:00
Marja Hölttä
bf998bdf47 [rab/gsab] Fix TA.p.slice even more
The previous fix was using the wrong getter for accessing the length.

It also threw an error when the created TA was length-tracking but in
bounds.

Bug: v8:11111,chromium:1399799
Change-Id: I5a94b1b49b2e30cf33999be7ff0ee8e4f5323849
Fixed: chromium:1399799
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4090984
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84771}
2022-12-12 08:37:34 +00:00
Omer Katz
c9ab4a47ce Reland "[heap] Fix typo in pretenuring"
This is a reland of commit 350f57281a

Original change's description:
> [heap] Fix typo in pretenuring
>
> PretenturingHandler -> PretenuringHandler
>
> Change-Id: If25e8be65dc6050688213fbb481751d7cbcd0e8b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4085984
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84727}

Change-Id: I9823044350724a895fbf41a43699b6fe38ca9347
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4094756
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84770}
2022-12-12 08:26:37 +00:00