Commit Graph

77510 Commits

Author SHA1 Message Date
Patrick Thier
7649960cf2 Reland "[strings] Support shared external strings"
This is a reland of commit d00c040547

Changes since revert: Use AsAtomicTagged instead of
base::AsAtomicPointer to store a hash value in the forwarding table.

Original change's description:
> [strings] Support shared external strings>
>
> With this CL shared strings can be externalized and external strings can
> be shared.
> The StringForwardingTable is used to delay the real transition to the
> next full GC. On the API side strings marked for externalization will
> look like externalized strings.
>
> Bug: v8:12957
> Change-Id: I53b6509129bc5679c06bdf99421bdb41ea5d9082
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849643
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82966}

Bug: v8:12957
Change-Id: I17715e927e4339240a6aa12a3c4a3c2ea50eb567
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871211
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83018}
2022-09-07 08:54:16 +00:00
Thibaud Michaud
23feac781f [wasm] Detect active stacks more reliably
Add an enum in the jump buffer to represent the state of the
stack: active, suspended, or retired. Update the state on stack switch
and check that they are consistent.

The previous method relied on comparing the current stack pointer with
the bounds of the stack, which was not reliable because the upper bound
of the native stack is not known precisely.

R=clemensb@chromium.org

Bug: v8:13236
Change-Id: If1880aa3efd5a9dc03c3c52ac5315d369d886a50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870925
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83017}
2022-09-07 08:45:26 +00:00
Patrick Thier
e1108083b2 [sandbox] Mark External String Resources from Client Heaps
External pointers used in external strings are always stored in the
shared external pointer table.
Prior to this CL we didn't mark external pointer entries for external
strings residing in client heaps.

Bug: v8:13260
Change-Id: Ifc5dc86f4ebe2791bfb8c4c8fe2673886d24e8a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875028
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83016}
2022-09-07 08:36:46 +00:00
Victor Gomes
30821ad65b [maglev] Show root constant name in BranchIf
Bug: v8:7700
Change-Id: I83ba4baff9b014a6f0bc6b91bb1ad3f66622e2ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878168
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83015}
2022-09-07 08:27:23 +00:00
Dominik Inführ
cfd951e030 [heap] Record typed old-to-shared slots when evacuating
When migrating code objects, we also need to record typed slots in the
old-to-shared remembered set.

In addition this CL also removes handling of typed slots and code
pointers because both they only occur in the old generation.

Bug: v8:11708, v8:13265
Change-Id: I2f05f79f1a24ab0d36dc54c5e450207496a15cfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876822
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83014}
2022-09-07 08:11:56 +00:00
Clemens Backes
c3f4c5323d [execution] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=ishell@chromium.org

Bug: v8:12887
Change-Id: Ic54ad0c1135f6d3ff9f261df40f2138bf511d5be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876383
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83013}
2022-09-07 06:44:40 +00:00
Marja Hölttä
23719f1afb [rab/gsab] TypedArray.p.slice fix: Destination can be resizable
Bug: v8:11111,chromium:1359991
Fixed: chromium:1359991
Change-Id: Ie150040d2831559eebb646772d9b2c494aadda98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3874930
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83012}
2022-09-07 06:41:26 +00:00
Shu-yu Guo
54f0c40459 Reinstate DoubleToInteger 0 special case for performance
Bug: chromium:1359950
Change-Id: I06a48ab940311481cb46486c766d179b30296415
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3877616
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83011}
2022-09-07 05:13:47 +00:00
Frank Tang
dafcb538c8 [intl] Return "UTC" instead of "Etc/UTC" or "Etc/GMT" as DefaultTimeZone
Bug: v8:13112
Change-Id: I84e025e889fa3a0e5a52cc3ca986935ebe4b0c62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868712
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83010}
2022-09-07 02:06:56 +00:00
Philip Chimento
b424baba23 [test] Fix test that was accidentally never executed
This test somehow ended up inside an assertThrows arrow function, after
the expression that was supposed to throw -- so it never got executed
(and the expectation was slightly off.) This moves the test outside the
arrow function so it gets executed, and fixes the expectation.

Justification for changing the expectation: rab is [0, 1, 2, 3, ... 9],
and length_tracking_ta_with_offset2 has an offset of 2, so it is [2, 3,
...]. During the loop, after 2 iterations which have produced [2, 3], we
resize the buffer so the array has length 0. Therefore, the iteration
ends after producing [2, 3], not [3, 4].

Change-Id: Iec6024fb955102841b45f033de3fed80b7d2af34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3878244
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Philip Chimento <ptomato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83009}
2022-09-07 00:17:48 +00:00
Shu-yu Guo
11d3a9eab9 Revert "[compiler] fix typing of [[DateValue]]"
This reverts commit ae32940798.

Reason for revert: Correct fix landed in https://chromium-review.googlesource.com/c/v8/v8/+/3869196

Do not backmerge this revert!

Original change's description:
> [compiler] fix typing of [[DateValue]]
>
> Bug: chromium:1356308
> Change-Id: I00be3495031b203b71cf924745dd2bad878ab3c2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868955
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82918}

Bug: chromium:1356308
Change-Id: Iaf4581ead10613a105844b6d703d25d1e7d37d14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872555
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83008}
2022-09-06 22:31:25 +00:00
Michael Lippautz
9cf407e998 Fix includes of base/platform/wrappers.h
Follow up from https://crrev.com/c/3858226

- Remove include when not necessary.
- Choose platform/memory.h when appropriate.

Change-Id: Ic24ef89aefb754acccef896e6b59a7ba744ac2df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3862504
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83007}
2022-09-06 19:24:55 +00:00
Michael Achenbach
b37760d2c9 [test] Add logging to test runner
This adds Python logging to several code locations that previously
used to just print. The locations aren't yet complete. The changed
code locations should help for investigating hanging test runs.

The default level is WARNING for running tests locally, and INFO
when called from bots that pass the --swarming parameter.

Bug: v8:13113
Change-Id: If3a336703e7c346a5c718f2359b1a80e37e1ca6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876183
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83006}
2022-09-06 19:19:25 +00:00
Dominik Inführ
519c430b4c [heap] Remove #ifdef usages with HeapVerifier
This CL defines empty methods when building without VERIFY_HEAP. This
removes the need for some preprocessor statements around heap
verification.

Bug: v8:11708
Change-Id: I354fd2793ab5d8ca4ab7de0822c832e2a868d832
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872267
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83005}
2022-09-06 18:46:36 +00:00
Shu-yu Guo
9b3f4e00be [shared-struct] Be lenient deserializing shared objects
ValueDeserializer should be lenient and not assume correct usage when
deserializing shared objects. This CL makes ValueDeserializer throw if
a shared object conveyor id or shared object id are not found.

Bug: v8:12547, chromium:1359227
Change-Id: I429a37dfadd95e42edca5d4870eb5188cb013bc7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872549
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83004}
2022-09-06 18:32:25 +00:00
Patrick Thier
5d4567279e [regexp] Add v-Flag for Unicode Sets
- Add v-flag and corresponding prototype getters.
- Update RegExp builtins fuzzer to handle two-byte flags.
- Update test262 status.

Bug: v8:11935
Change-Id: If649ebfacf1f933f3ae5c770c2240470a8b460ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868952
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83003}
2022-09-06 17:51:56 +00:00
Manos Koukoutos
71a2887f53 [wasm-gc] Change signature/name of TypeCheckJSObject
Rename {TypeCheckJSObject} to {JSToWasmObject}. Change it to return
a MaybeHandle containing the typechecked object transformed to its wasm representation. Use the new function to simplify
{WasmWrapperGraphBuilder::FromJS}.

Bug: v8:7748
Change-Id: I036f3a1c197041d0b12e7338adca2bc10e66038b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3874931
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83002}
2022-09-06 17:10:25 +00:00
Victor Gomes
4c1236c133 [maglev] Fix alias issue in GeneratorRestoreRegister
Temporary fix, ideally we should tell the register allocator to not
alias the input with the output.

Bug: v8:7700, v8:13109
Change-Id: I822e8e957689213499ea34620fcdeb5f532f2f5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876382
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83001}
2022-09-06 15:47:35 +00:00
Leszek Swirski
9734c2b74f [maglev] Ensure generator arguments are tagged
Bug: v8:7700
Change-Id: I08cea127fcb8a2d1adf1667d0953888e035e3e46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876242
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83000}
2022-09-06 14:46:05 +00:00
Leszek Swirski
80df17b74a [maglev] Check overflows in idiv
idiv throws a hardware divide exception if it overflows, so add some
manual overflow checks before it (mostly copied from TurboFan).

Bug: v8:7700
Change-Id: Ic3764ecb03d627e482d75b80e712d5ce4a16e9df
Fixed: chromium:1359864
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3876182
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82999}
2022-09-06 14:44:55 +00:00
Leszek Swirski
067507a270 [objects] Make map validity cell access relaxed
... because it's now read concurrently by Maglev.

Bug: v8:7700
Change-Id: Iab20ee398269bab403f9d463665c967dcf48e9aa
Fixed: chromium:1360255, v8:13266
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875903
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82998}
2022-09-06 14:36:35 +00:00
Milad Fa
8d7186c699 PPC [liftoff]: Initiate simd binary ops
Change-Id: I61227d13bd6d9efb037ea62179c02e0571d61fa8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870654
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#82997}
2022-09-06 14:24:07 +00:00
Clemens Backes
38cf5793e9 [codegen] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=ishell@chromium.org

Bug: v8:12887
Change-Id: I457fd781f13c37ffdaa19e29c8f998ee3eaa55a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875085
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82996}
2022-09-06 13:34:25 +00:00
Clemens Backes
16097154cf [wasm][pgo] Keep native modules alive
If collecting PGO information, keep all modules alive until the process
dies. This allows to run multiple tests / benchmarks and combining the
profile information for all of them. Otherwise the NativeModule might be
garbage-collected between runs, and previous information would be lost.

R=manoskouk@chromium.org

Bug: v8:13209
Change-Id: I96e3cda1a123c7a1f3fbc7f5369d2366acee80e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875082
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82995}
2022-09-06 12:46:35 +00:00
Samuel Groß
003f5608a0 [sandbox] Fix non-canonical address detection in sandbox crash filter
The check for non-canonical address access must come before the check
for nullptr access as the faultaddr will be 0x0 in the former case.

Bug: v8:12878
Change-Id: I6f141d08862879ec9ccb13c081aa6c75a3707530
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875904
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82994}
2022-09-06 12:27:42 +00:00
Victor Gomes
0472d5a5aa [maglev] Add Print commands
Allows to debug print a node, similar to CSA.

Bug: v8:7700
Change-Id: I602f8f8ed8c6df6b0782dd55b477252ee31dca26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3874932
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82993}
2022-09-06 09:37:58 +00:00
Manos Koukoutos
8df265970a [wasm-gc] Fixes for the JS/Wasm boundary
- i31s should not be packed in {WasmWrapperGraphBuilder::ToJS}.
- anyref should be able to hold any JS value (except null if non
  nullable).
- Restructure TypeCheckJSObject.

Bug: v8:7748
Change-Id: I51ab6b84e89a70e565ce56de7a41f8693aa28e5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871073
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82992}
2022-09-06 08:59:35 +00:00
Danylo Boiko
6811cb9f88 [turbofan][turbolizer] --trace-turbo Smi support
Fixed a bug with Smis in the bytecode constant pool when running
with --trace-turbo

Bug: chromium:1356895
Change-Id: Idc8990c250c2c85f4755e45115d4c4bac167bfe3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870413
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#82991}
2022-09-06 07:41:35 +00:00
Clemens Backes
1df05d5dbd [snapshot] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=jgruber@chromium.org

Bug: v8:12887
Change-Id: Id293b260c1d84c2f9bd7f5c3c826f374ac6a68b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875086
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82990}
2022-09-06 06:13:35 +00:00
Clemens Backes
ca2a96837c [regexp] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=jgruber@chromium.org

Bug: v8:12887
Change-Id: Ide7272de6a59e8324f19d4f52053737b56a380d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875083
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82989}
2022-09-06 06:12:15 +00:00
v8-ci-autoroll-builder
f5cda3d1ef Update V8 DEPS (trusted)
Rolling v8/build: a412eb2..24bb610

Rolling v8/buildtools: 18d22db..46ab4c3

Rolling v8/buildtools/third_party/libc++/trunk: 369cbf3..85a3363

Rolling v8/buildtools/third_party/libc++abi/trunk: 48afced..6285577

Rolling v8/third_party/zlib: 81e0cc1..9f4113d

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

Change-Id: If51fa917599a962c36cbb1cacfaa3c182911540a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870602
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@{#82988}
2022-09-06 03:52:45 +00:00
Michael Lippautz
e47a942a68 cppgc: Random cleanups
- ObjectAllocator::Terminate() description was out of date.
- Compactor::CancelIfShouldNotCompact() return value was unused.

Change-Id: Ie47e70eaecaba1300ad638e155a9dd273202aca5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3875084
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82987}
2022-09-05 17:35:54 +00:00
Feng Yu
41df164a1a [test] Migrate cctest/test-run-tail-calls to unittests/
Bug: v8:12781
Change-Id: Ib2d7fe959f06cb750ccf419796002efb7e569623
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865062
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Feng Yu <f3n67u@gmail.com>
Cr-Commit-Position: refs/heads/main@{#82986}
2022-09-05 16:33:54 +00:00
Leszek Swirski
8c12c24d04 [maglev] Add fast-path trampolines for dynamic lookup
Dynamic maybe-context/maybe-global lookup can fast-path in the case
where there are no context extensions in the parent contexts. Add a
trampoline builtin for maglev which performs this fast path.

This is similar to Sparkplug, which calls a similar builtin (except one
which loads context and FBV from Sparkplug frame slots), and unlike
TurboFan, which creates local control flow to inline this operation
fully. Maglev avoids creating local control flow, so the builtin
approach seems more fitting.

Bug: v8:7700
Change-Id: I2f63694d9c1f907f91b8b7b8982adc9f9ba106ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871210
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82985}
2022-09-05 16:32:20 +00:00
Victor Gomes
9a2912d219 [maglev] Unconditionally create LoopPhi for contexts
Contexts are not included into bytecode loop assignment
analysis. We follow TF and create a LoopPhi unconditionally.

Bug: v8:7700
Fixed: chromium:1359662
Change-Id: I1a589a4bae2bbbf14bf637f0c1e0439e66216aae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871209
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82984}
2022-09-05 14:37:25 +00:00
Leszek Swirski
9dedaaf313 Revert "Enable background merging of deserialized scripts"
This reverts commit f388f96fdb.

Reason for revert: Crashes in canary (https://crbug.com/1360024)

Original change's description:
> Enable background merging of deserialized scripts
>
> This can save memory in cases where multiple frames in a process use the
> same script, with sufficient time between loads that the script's
> top-level SharedFunctionInfo is no longer present in the compilation
> cache. Merging is relatively fast; it generally takes about one tenth as
> long as deserialization.
>
> Bug: v8:12808
> Change-Id: I7366a51f1d2ca6a9f551cdf2bdbe0441450cf1bb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868088
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82920}

Bug: v8:12808
Change-Id: If160173afaab351d995ddcf4b60d6efe656cf70b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871208
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82983}
2022-09-05 14:26:24 +00:00
Clemens Backes
1bc4d3989e [objects] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=tebbi@chromium.org

Bug: v8:12887
Change-Id: Ia636a23e8d9fceb9bc17d830b8395bac46984285
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871202
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82982}
2022-09-05 14:15:04 +00:00
Clemens Backes
62cebbe031 [builtins] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=nicohartmann@chromium.org

Bug: v8:12887
Change-Id: Icc9016552c53489afd821ff6d360c025e48fee18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871201
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82981}
2022-09-05 13:59:05 +00:00
Clemens Backes
c61b985ee0 [baseline] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=leszeks@chromium.org

Bug: v8:12887
Change-Id: I17a168a4810f13087be34a58358c684f1516da99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870489
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82980}
2022-09-05 13:51:44 +00:00
Clemens Backes
943de45545 [wasm][pgo] Introduce flags for PGO via local files
This adds two flags to dump "type feedback" (call targets and
frequencies) to a local file, or load it from there. This is meant for
experimentation only.

Some implications are removed, as (speculative) inlining now does not
require Liftoff any more, but can also use information from PGO.

R=jkummerow@chromium.org

Bug: v8:13209
Change-Id: I2d34233ce4077db61f5c237b1941136ac61d3b73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870470
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82979}
2022-09-05 13:48:45 +00:00
Leon Bettscheider
4320ed7dcc [heap] Enable MinorMC concurrent marking
This CL implements ConcurrentMarking::RunMinor which uses
YoungGenerationConcurrentMarkingVisitor (go/YGCMV).

This CL also implements Teardown and FinishConcurrentMarking, and
schedules minor concurrent marking in
IncrementalMarking::StartMarkingMinor.

Additionally, this CL opts out of ConcurrentMarking::PauseScope in
Heap::MinorMarkCompact if concurrent MinorMC is active because
concurrent marking will be finalized in FinishConcurrentMarking
subsequentially.

Bug: v8:13012
Change-Id: I78fe18416e564565c6421243ff40dec7561fb20a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3850292
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82978}
2022-09-05 13:43:24 +00:00
Igor Sheludko
633cc57f8d [runtime] Update transitioning target when deserializing values
Bug: chromium:1359936
Change-Id: If5b09647dbb341b056a782ae6d1733351c8061bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870487
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82977}
2022-09-05 13:29:54 +00:00
Leon Bettscheider
fb41a1369e [heap] Remove global handle marking barrier for MinorMC
This CL removes global handle marking barriers for MinorMC because
global handles should only be marked by MajorMC.

Bug: v8:13012
Change-Id: I23737f128c01eee75b2b1a19f47c4bcf6d043976
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872270
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82976}
2022-09-05 13:05:08 +00:00
Camillo
10f0fb9d89 [tools] Improve linux-perf-d8.py
- Disable interspersed args for a cleaner CLI
- Auto upload pprof results for authenticated googlers

Change-Id: I3bfa602980ed659c8671910ea77dddedabc84e12
No-Try: True
No-CQ: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871200
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82975}
2022-09-05 13:04:05 +00:00
Michael Lippautz
ec5a042e66 cppgc: Fix AgeTableTest
The test broke in
  https://crrev.com/c/3865148

Bug: chromium:1352649
Change-Id: I9857fd359d73a4c1f7d202feba27a3dcf56e23c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872275
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82974}
2022-09-05 12:56:15 +00:00
Nikolaos Papaspyrou
7c79ab6d43 [heap] Fix setting start of stack
The stack of an isolate's main thread is kept in the isolate's heap.
This CL sets the stack's start address when the isolate's heap is set
up; it can also be set explicitly from the embedder. The CL also fixes
threaded cctests, where an isolate is shared by many "main" threads.

Bug: v8:13257
Change-Id: Ie30bbbe4130882d94f23de946cbada748f32e22d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870923
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82973}
2022-09-05 12:43:21 +00:00
Leszek Swirski
c6a8832e88 [turbofan] DCHECK that lookups have a slow path
LdaLookupGlobal/ContextSlot loop over parent contexts to check for
context extensions. If there aren't any, they can do a fast
context/global load, otherwise they have to call a runtime slow path.

The bytecode graph builder didn't build a slow path in the case where no
context extensions are possible, by depth == 0 or static scope info
information that there are no possible context extensions. However, this
information is already known to the interpreter, so that should already
elide the lookup in these cases. So, get rid of the slow path being
optional in TurboFan, and consider such cases bytecode generation bugs.

Change-Id: Ib69f90e51b0f783306824fed56911d039f7e134e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872277
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82972}
2022-09-05 12:42:18 +00:00
Leszek Swirski
007862bf18 [maglev] Workaround for linux perf logging
Workaround crbug.com/13261 by converting the maglev CodeT into a Code.

Bug: v8:7700
Bug: v8:13261
Change-Id: I5ef692dea9d7c4eee2c1ca6476f572fc415f5ed0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3872274
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82971}
2022-09-05 12:41:15 +00:00
Matthias Liedtke
0b1b79d24a Revert "[strings] Support shared external strings"
This reverts commit d00c040547.

Reason for revert: Failing CI tests on Mac arm64

Original change's description:
> [strings] Support shared external strings
>
> With this CL shared strings can be externalized and external strings can
> be shared.
> The StringForwardingTable is used to delay the real transition to the
> next full GC. On the API side strings marked for externalization will
> look like externalized strings.
>
> Bug: v8:12957
> Change-Id: I53b6509129bc5679c06bdf99421bdb41ea5d9082
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849643
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82966}

Bug: v8:12957
Change-Id: I13155fcc788d217db56cbfd1c9e4457a81a9dbd7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870486
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82970}
2022-09-05 12:06:17 +00:00
Clemens Backes
7d3d3a780c [heap] Use v8_flags for accessing flag values
Avoid the deprecated FLAG_* syntax, access flag values via the
{v8_flags} struct instead.

R=mlippautz@chromium.org

Bug: v8:12887
Change-Id: Id12f9d8270dd9fed651e1b3596c06e45aae9d6d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3846151
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82969}
2022-09-05 10:59:05 +00:00