Commit Graph

78373 Commits

Author SHA1 Message Date
Omer Katz
36ae12f4c0 [heap] Fix pretenturing for MinorMC
Pretenuring happens at the end of the atomic pause. With MinorMC, this
maybe before sweeping is completed. Thus the allocation site updates
will remain until the next GC cycle. However, the next cycle may move
allocation sites when evacuating pages, and thus make the pretenuring
data collected invalid.
MinorMC needs to update pretenuring decision after finalizing sweeping.

Bug: chromium:1374998
Change-Id: I585bdc4a1495ae6419d01eb6d5075832366b4198
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963116
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83781}
2022-10-18 18:31:16 +00:00
Toon Verwaest
358e31a3b5 [maglev] Update maglev budget
The budget was tuned for 1/10th of TurboFan, but wasn't updated when
TurboFan started compiling more aggressively.

Bug: v8:7700
Change-Id: Icc9662bacc8df8f7a0ee2f22c34701c176c851d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963490
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83780}
2022-10-18 16:44:06 +00:00
Paolo Severini
93b5de0569 [wasm] Fix CWasmArgumentsPacker::TotalSize() with Ref types
CWasmArgumentsPacker stores ref types as full pointers even when pointer
compression is enabled and should calculate its buffer size accordingly.

Bug: v8:13388
Change-Id: I6c1c6b5ecd879af5ca61cbc2a31edfc660fdb036
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962030
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83779}
2022-10-18 16:42:56 +00:00
Victor Gomes
db63dd50d8 [maglev] Remove result register from snapshot
Bug: v8:7700, chromium:1375931
Change-Id: I75113ee6e9c702818b9e0c9bb5911db4fda5835e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963009
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@{#83778}
2022-10-18 14:14:16 +00:00
Liviu Rau
5af41d8bc5 Reland "Whitespace to trigger builders."
This is a reland of commit 7746ce9962

Original change's description:
> Whitespace to trigger builders.
>
> We want to trigger CQ builders with the resultdb flag on.
>
>
> V8-Recipe-Flags: resultdb
> Bug: v8:13316
> Change-Id: I42299909504bddae51348ab1a70b43b5d8239453
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962988
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83769}

V8-Recipe-Flags: resultdb
Bug: v8:13316
Change-Id: Iafb5f5b93a34bf5f6bae6c30a19702e094ec7556
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963489
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83777}
2022-10-18 13:58:36 +00:00
Chengzhong Wu
b2e173711d [init] Print expected_next_state when state advancement failed
`next_state` is computed from the `current_state`. Print
`expected_next_state` and `current_state` instead.

Change-Id: Idd324ba66e1a20af83cf82dce6e8bd00884a3598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3945811
Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83776}
2022-10-18 13:49:16 +00:00
Clemens Backes
0f751827c6 [wasm] Use FastZoneVector for the locals initializers stack
This is only used for GC, so not performance critical for now, but since
this is the last use of ZoneVector in the function body decoder, we also
switch it to a FastZoneVector.

R=jkummerow@chromium.org

Bug: chromium:1358853
Change-Id: Id469364a69ebca4384f49db59313ddb536bc1f67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960408
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83775}
2022-10-18 13:26:56 +00:00
Liviu Rau
936768b480 Revert "Whitespace to trigger builders."
This reverts commit 7746ce9962.

Reason for revert: to trigger builders once more

Original change's description:
> Whitespace to trigger builders.
>
> We want to trigger CQ builders with the resultdb flag on.
>
>
> V8-Recipe-Flags: resultdb
> Bug: v8:13316
> Change-Id: I42299909504bddae51348ab1a70b43b5d8239453
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962988
> Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83769}

Bug: v8:13316
Change-Id: Iafbeccdefab507c64c43b8e274f03cee1faf6292
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963488
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83774}
2022-10-18 12:53:46 +00:00
v8-ci-autoroll-builder
cb30adae59 Update V8 DEPS (trusted)
Rolling v8/build: 7e7c21a..2cf254f

Rolling v8/buildtools: 9174abb..ca6213a

Rolling v8/buildtools/linux64: git_revision:cc28efe62ef0c2fb32455f414a29c4a55bb7fbc4..git_revision:b9c6c19be95a3863e02f00f1fe403b2502e345b6

Rolling v8/buildtools/third_party/libc++/trunk: 2e91997..e6caea4

Rolling v8/buildtools/third_party/libc++abi/trunk: db2a783..685c4ad

Rolling v8/buildtools/third_party/libunwind/trunk: 08ebcbe..1111799

Rolling v8/third_party/android_platform: 04b3350..1bf9b93

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/ff03621..98d333e

Rolling v8/third_party/depot_tools: a724859..77e64ae

Rolling v8/third_party/fuchsia-sdk/sdk: version:9.20220919.2.1..version:10.20221017.2.1

Rolling v8/third_party/instrumented_libraries: e09c4b6..26f2d29

Rolling v8/tools/clang: a5e0d72..2619cde

Rolling v8/tools/luci-go: git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4..git_revision:9f65ffe719f73af390727d369b342c22fa37ea54

Rolling v8/tools/luci-go: git_revision:20c50aa39686d91330c2daceccaa4ef1a0a72ee4..git_revision:9f65ffe719f73af390727d369b342c22fa37ea54

Change-Id: Ie07081ffa0b5c8512313ab1ba1915788c2a2e5bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3961032
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83773}
2022-10-18 12:37:46 +00:00
Clemens Backes
b8627f5133 [wasm] Switch back to base::SharedMutex
Since base::SharedMutex is now implemented via std::shared_ptr on Mac
(https://crrev.com/c/3870465), we do not need this special handling any
more.
As std::shared_ptr has slower performance than pthread_rwlock_t on
Android (see Runtime_WasmCompileLazy), we switch back to
base::SharedMutex.

This reverts commit f2faee8519.

R=ishell@chromium.org

Bug: v8:13256, chromium:1375009
Change-Id: Iebcff53a9b51f219ca4f12e0a539506781c94734
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959745
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83772}
2022-10-18 12:21:36 +00:00
Omer Katz
102d61d66b [heap] Fix check-header-include failures
Inlined virtual methods that are declared in *.h file but defined in
*-inl.h prevent generating a vtable for the type when only the *.h
file is included.

Bug: chromium:1374227
Change-Id: I01ff41248137ad69ec1ce23f4254e69c043d80ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959621
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83771}
2022-10-18 12:18:26 +00:00
Clemens Backes
eda81e2c68 [wasm] Use a plain array for storing initialized locals
This avoids some more OOB checks, saving binary size. Note that without
Wasm GC, this code is dead, so we can't expect performance wins from
this in production code, only binary size savings.

R=jkummerow@chromium.org

Bug: chromium:1358853
Change-Id: I426ce318c900322c9fcfc9d22a24c03855ddd885
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959736
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83770}
2022-10-18 12:07:46 +00:00
Liviu Rau
7746ce9962 Whitespace to trigger builders.
We want to trigger CQ builders with the resultdb flag on.


V8-Recipe-Flags: resultdb
Bug: v8:13316
Change-Id: I42299909504bddae51348ab1a70b43b5d8239453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3962988
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83769}
2022-10-18 11:46:46 +00:00
Qifan Pan
0c177366dd [turbofan] Support feedback for arithmetic BigInt operations
Collect feedback for small BigInt division and modulo operation in
the interpreter and use feedback for BigInt subtraction,
multiplication, and division in turbofan except modulo operation
because it is not supported yet in turbofan.

Bug: v8:9407
Change-Id: I931cf9f70778c866599611474f1834417f023a74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948787
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83768}
2022-10-18 10:46:26 +00:00
Omer Katz
30708892ef [heap] Enable concurrent sweeping for MinorMC
Remove the dedicated MinorMC sweeping flag and merge with the
general concurrent sweeping flag.

Bug: v8:12612
Change-Id: I278f274e293a7160839259df38b4a2951df31e91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3936272
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83767}
2022-10-18 10:26:26 +00:00
Victor Gomes
6443c81024 [maglev] Fix context register when calling kStringCharCodeAt
A generic DCHECK (in builtins-utils.h) checks if the content in
kContextRegister is properly a context.

Bug: v8:7700, chromium:1375932
Change-Id: Ib5e6ac7d331678faf1a6ec5737d93bbf555c3870
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959819
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83766}
2022-10-18 09:50:36 +00:00
Darius M
50f7bff422 [turboshaft] Fix MachineOptimization bug on 32-bit archs
Bug: v8:12783
Change-Id: Iae206bd2837a37a09fe90abc4d48786db2f8f211
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959665
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83765}
2022-10-18 09:35:26 +00:00
Matthias Liedtke
f418b5bc01 Fast path for String.p.toLocaleUpperCase
Use fast path for locales that don't need special handling.
Related CL for toLocaleLowercase: crrev.com/c/3952317

Change-Id: I400df77c8101715681c7f741581545924dbbfc57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3958915
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83764}
2022-10-18 09:30:36 +00:00
Simon Zünd
7c23f097c9 [inspector] Remove 'live_edit_top_frame' experiment flag
The feature landed in M105 so we can remove the kill switch with
M109. We haven't seen any crashes related to this feature.

R=bmeurer@chromium.org

Bug: chromium:1334484
Change-Id: I5e238d350b383c1b71781de750b634a891c5b0c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959818
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83763}
2022-10-18 08:39:46 +00:00
Leszek Swirski
c056493e26 [build] Disable deprecation warnings on gcc
They are blocking enabling C++20.

Bug: chromium:1374227
Change-Id: Idaf7a109e8c67e8628bd0781a6bca94afb7e562d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959663
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83762}
2022-10-18 08:31:18 +00:00
Manos Koukoutos
db14cc55da [wasm-gc] Faster array.new(_default)
Bug: v8:7748
Change-Id: I33bcb857e7d5898bcaf098c0edc920638a737556
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959634
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83761}
2022-10-18 08:08:13 +00:00
Victor Gomes
9435f9ba5a [maglev] Use CheckedSmiUntag
Fixes
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20debug%20-%20fyi/24710/overview

We need UnsafeSmiUntag (which does not exist) instead of UnsafeSmiTag.

Bug: v8:7700, chromium:1375934
Change-Id: Ib352b144f4f2bb0946b907d41e7e62beadc0a307
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3961468
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83760}
2022-10-18 07:37:51 +00:00
Alex Rudenko
e0163c475a DevTools: only send runIfWaitingForDebugger once per agent
Since the agent instance represents the DevTools session it should
be responsible for ensuring that runIfWaitingForDebugger are applied
only once. This allows the underlying client to not be concerned with
counting of the duplicate runIfWaitingForDebugger calls.

Blink CL: https://crrev.com/c/3954366

Context: https://crbug.com/1352175#c5
Bug: chromium:1352175
Change-Id: Ia1ef7287cd773e9f05db18d1439499e7fc9cfa16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952117
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83759}
2022-10-18 07:22:56 +00:00
Dominik Inführ
7c7e774baa [heap] Remove --use-map-space flag
--use-map-space was already disabled by default. This CL removes
the possibility to enable map space again by removing that flag and
all its usages.

Bug: v8:12578
Change-Id: I8af18f39e9bf645316aa8718b49589eb4b852374
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959658
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83758}
2022-10-18 07:04:07 +00:00
Simon Zünd
88358700ea [debug] Fix block lists for scopes with identical positions
This CL fixes a bug in the block list handling for debug-evaluate.
Specifically, we can't rely on the source position alone to find
scopes. We also need to take the scope type into account. This needs
to happen in two places:

  - When we try to find the closure scope in the re-parse
    result based on the function at the top of the stack.

  - When we try to find matching `ScopeInfo` objects from
    re-parsed scopes.

Note that the code alrady contains a fix for a similar issue in
the past where we found class scopes instead of member initializer
function scopes. Both share the exact same source position.

This CL generalizes that fix to check that the scope type matches
when looking for the closure scope.

R=jarin@chromium.org

Bug: chromium:1363561
Change-Id: I18d167f59c994ece85971273954d0e3c65c12b7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959915
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83757}
2022-10-18 06:38:13 +00:00
Michael Achenbach
d3e075ab87 Revert "cppgc: Fix concurrent marking flake"
This reverts commit e57fc46b6b.

Reason for revert: suspect of gpu crashes:
https://ci.chromium.org/ui/p/v8/builders/ci/Mac%20V8%20FYI%20Release%20(Intel)/18971/overview
https://luci-milo.appspot.com/ui/inv/build-8800049048962883905/test-results?q=conformance%2Fogles%2FGL%2Fstruct%2Fstruct_017_to_024.html

Original change's description:
> cppgc: Fix concurrent marking flake
>
> Also flush the worklist with retraced marked objects.
>
> Change-Id: Ic0cd7d8dc5de64426ff9b4246ce5cf6649ffeb4d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959776
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83744}

Change-Id: I6410e99f1fa6bc21538a723400b0b68986ee6716
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959660
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83756}
2022-10-18 06:34:00 +00:00
Michael Achenbach
bf9ffddf05 Revert "[cleanup] More C++20 fixes"
This reverts commit 918b998dc7.

Reason for revert: Win32 gets crashy:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32%20-%20debug/39198/overview
https://ci.chromium.org/ui/p/v8/builders/try.triggered/v8_flako/b8799988959011833553/overview

Original change's description:
> [cleanup] More C++20 fixes
>
> Fix C++20 removing implicit 'this' copy capture in lambdas by preferring
> [&](...){...} over [=](...){...} lambdas (predominantly in CSA).
>
> Bug: chromium:3956795
> Change-Id: Ieb4b9f700d32a0676c95dea08b46f9474020d5ce
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959742
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83752}

Bug: chromium:3956795
Change-Id: I2232c30eeb516a6a02ec0e9c925a9baac79499bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959817
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83755}
2022-10-18 06:32:56 +00:00
Simon Zünd
0a66c1b365 [debug] Don't calculate a blocklist for the script scope
This CL fixes the ScopeIterator when it's created for a stack frame
that represents the script scope. For example the following script:

```
function foo() { debugger; }
foo();
```

Then a ScopeIterator created for the second stack frame (`foo()`)
should not a create a blocklist. This is somewhat a special case,
since the closure_scope_/start_scope_ are the SCRIPT_SCOPE.

Note that the debug-evaluate code can't run into this scenario as
we would never iterate far enough to actually trigger block list
calculation. Nevertheless, since it's possible to create a
`ScopeIterator` that could run into this scenario, we guard
against it.

R=jarin@chromium.org

Bug: chromium:1363561
Change-Id: I0677c257d41c9af5ffc38d390f58997da20fd069
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960568
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83754}
2022-10-18 05:34:07 +00:00
Leszek Swirski
d06c23a01c [maglev] Move code assembly to BG thread
Move the Assemble call on MaglevCodeGenerator to happen as part of job
execution instead of finalization, to allow it to happen on the
background thread.

Bug: v8:7700
Change-Id: I55c35f3d0423f88c38e2048a271282c62a818e14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959694
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83753}
2022-10-17 16:42:20 +00:00
Leszek Swirski
918b998dc7 [cleanup] More C++20 fixes
Fix C++20 removing implicit 'this' copy capture in lambdas by preferring
[&](...){...} over [=](...){...} lambdas (predominantly in CSA).

Bug: chromium:3956795
Change-Id: Ieb4b9f700d32a0676c95dea08b46f9474020d5ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959742
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83752}
2022-10-17 16:15:05 +00:00
Matthias Liedtke
088ea54118 [wasm-gc] Object.p.toString() should throw on wasm struct/array
Bug: v8:7748
Change-Id: I84b0896334e06f6831e543036b8b54ddf9fa0134
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959914
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83751}
2022-10-17 15:56:56 +00:00
Clemens Backes
630c606062 Revert "[base] Implement SharedMutex via std::shared_mutex"
This reverts commit b172c4dc6e.

Reason for revert: Major regressions on "IC:duration_avg" on mobile.

Original change's description:
> [base] Implement SharedMutex via std::shared_mutex
>
> On Mac we already use {std::shared_mutex} to implement
> {base::SharedMutex}, as {pthread_rwlock_t} causes deadlocks if combined
> with signals. Other platforms still use such low-level primitives.
>
> In order to streamline the implementation, and as a preparation to use
> {std::shared_mutex} directly everywhere, we make {base::SharedMutex} a
> wrapper around {std::shared_mutex} on all platforms.
>
> If this causes regressions anywhere, it will be reverted and the switch
> to {std::shared_mutex} will be abandoned.
>
> R=​ishell@chromium.org
>
> Bug: v8:13256
> Change-Id: I39c41666451884b974f8e5e592df0a36e8e80445
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952116
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83722}

Bug: v8:13256, chromium:1375009
Change-Id: I6a9b39de73580510bd3881e37fca9c55d16a46bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959743
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83750}
2022-10-17 15:38:55 +00:00
Clemens Backes
a735d987a1 [wasm] Avoid huge allocation on invalid local entries count
If the number of locals entries is inplausibly huge, we still try to
allocate storage for the SmallVector, resulting in OOMs, DCHECK errors
and other weird behavior depending on the platform.
This can be avoided by checking the decoded value for plausibility
before trying the allocation.

R=thibaudm@chromium.org

Bug: chromium:1374529
Change-Id: I4ba5f943e1933527fb009d9271750b1fb9ad21a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956518
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83749}
2022-10-17 15:23:25 +00:00
Clemens Backes
e69505242f [wasm] Add more output to console-profile-wasm test
The test occasionally times out, and it's unclear why.
This CL adds an explicit timeout to the test (30 seconds), and prints
all seen profiles after that. This makes it easier to see which frame is
missing from the profiles.

As a drive-by refactoring, we now also use
{InspectorTest.runAsyncTestSuite} instead of the hand-written sequential
execution of the asynchronous test functions.

R=thibaudm@chromium.org

Bug: v8:13370
Change-Id: I67f53a819706c8e5971bf32dc925d90b21c96243
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956976
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83748}
2022-10-17 15:18:25 +00:00
Clemens Backes
9b3a177b16 [wasm] Use FastZoneVector for control stack
In order to avoid bounds checks on every access (with hardened libc++),
use FastZoneVector for the control stack.

R=thibaudm@chromium.org

Bug: chromium:1358853
Change-Id: I081758774a04a8257a8995eb043ae8b60e530e9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952319
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83747}
2022-10-17 15:16:45 +00:00
Leszek Swirski
838dd6d120 [maglev] Split code assembly and codegen
Split up the mostly-Isolate-independent code assembly, and the
actual-Isolate-access codegen, similar to TurboFan. This will allow us
to move code assembly to the background thread.

Bug: v8:7700
Change-Id: Icc9345f7c61ef30f271cc2ab766f5ab49d65b6c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3957716
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83746}
2022-10-17 14:59:06 +00:00
Victor Gomes
aebad779e9 [maglev] Add fast path for strings in element access
Currently it falls back to runtime for externalized strings.

Bug: v8:7700
Change-Id: I9bc09969915e437af5fcf563ba74a6edd9280779
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956975
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83745}
2022-10-17 14:45:35 +00:00
Michael Lippautz
e57fc46b6b cppgc: Fix concurrent marking flake
Also flush the worklist with retraced marked objects.

Change-Id: Ic0cd7d8dc5de64426ff9b4246ce5cf6649ffeb4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959776
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83744}
2022-10-17 13:52:57 +00:00
Leszek Swirski
62993b70d2 Revert "Reland "[heap] Enable --shared-space flag by default""
This reverts commit 3df866d67d.

Reason for revert: Still some issues: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20debug/41375/overview

Original change's description:
> Reland "[heap] Enable --shared-space flag by default"
>
> This is a reland of commit 934afdf0d1
>
> After landing https://crrev.com/c/3959774 try to re-enable
> --shared-space again.
>
> Original change's description:
> > [heap] Enable --shared-space flag by default
> >
> > This switches V8 to the shared space isolate approach for the shared
> > heap by default.
> >
> > Bug: v8:13267
> > Change-Id: I06d36468a3a6b098475ec2bbfa998cb1934afe81
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925754
> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#83701}
>
> Bug: v8:13267
> Change-Id: Icb3cfd7c1da2d2420741057c26d32893a6edc80c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959695
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83742}

Bug: v8:13267
Change-Id: Iffe8cb0e14a98cbbb3093acb9011cbb30cff1c13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959697
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83743}
2022-10-17 13:47:30 +00:00
Dominik Inführ
3df866d67d Reland "[heap] Enable --shared-space flag by default"
This is a reland of commit 934afdf0d1

After landing https://crrev.com/c/3959774 try to re-enable
--shared-space again.

Original change's description:
> [heap] Enable --shared-space flag by default
>
> This switches V8 to the shared space isolate approach for the shared
> heap by default.
>
> Bug: v8:13267
> Change-Id: I06d36468a3a6b098475ec2bbfa998cb1934afe81
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925754
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83701}

Bug: v8:13267
Change-Id: Icb3cfd7c1da2d2420741057c26d32893a6edc80c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959695
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83742}
2022-10-17 12:47:32 +00:00
Leszek Swirski
b4a0a76681 [maglev] Record source positions for eager deopts
Bug: v8:7700
Change-Id: I19d9d1e54ec20d77fbeeb38fee887c3db57d44fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890917
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83741}
2022-10-17 11:50:58 +00:00
Dominik Inführ
b13f69d51b [heap] Directly allocate in shared space on promotion into shared heap
The shared heap isolate can directly allocate in the shared space
instead of using a ConcurrentAllocator.

Bug: v8:13267
Change-Id: I349e0f3570215bf798e89a77179c0ff9d9f7a118
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959774
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83740}
2022-10-17 10:54:28 +00:00
Nico Hartmann
70d665026d [turbofan] Fix a false positive in SLVerifier for TypeGuards
TypeGuard nodes interpret their inputs to be of a given type, which
might not be reflected in the graph and hence may lead to a type
conflict being reported by the Simplified Lowering Verifier. This
CL adds an additional SLVerifierHint node to preserve this type
information for the verification step.

Bug: v8:12619, chromium:1370398
Change-Id: I5e4117d6b3ada053249bc000ba98d04021395ce1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948704
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83739}
2022-10-17 10:40:38 +00:00
Michael Lippautz
796a153b01 [handles] Fix accessor during stack walk
The accessor runs concurrently with parallel marking in the atomic
pause.

Bug: v8:13385
Change-Id: I5e53a7a12947059d26073de00c201c46204e0ee8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959775
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83738}
2022-10-17 10:37:25 +00:00
Michael Lippautz
4d68f7f858 [cppgc-js] Fix sweeping on mutator scope during compaction
Compaction also invokes finalizers and requires bailing on global
handles.

Bug: chromium:1371512, v8:13372
Change-Id: Ie7b00493201e800b1adf3475b1fef9f3a11b57fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959635
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83737}
2022-10-17 09:40:18 +00:00
Manos Koukoutos
58ae443cfc [wasm-gc] Add optimization test
Bug: v8:7748
Change-Id: Idc690cb2251cdd43ee6eb099bad05c7d9b481c32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952320
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83736}
2022-10-17 08:41:11 +00:00
Leszek Swirski
656a3e5a23 [maglev] Fix: super receiver can be null / undefined
Apply the fix from https://crrev.com/c/2549941 to Maglev.

Bug: v8:9237, chromium:1148758, v8:11161
Change-Id: Icf8ca9c03b1d31d3e1326cc950e294ce21e9eecb
Fixed: v8:13386
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3957715
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83735}
2022-10-17 06:50:58 +00:00
Marja Hölttä
f85f1e19ff Revert "[classes] Ship --omit-default-ctors"
This reverts commit 9027afd67a.

Reason for revert: Several fuzz bugs

Original change's description:
> [classes] Ship --omit-default-ctors
>
> Breakage is expected, please revert if needed.
>
> Bug: v8:13091
> Change-Id: Iede9e0b88a501c9cbf855da39cef0148229a114e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3937966
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83702}

Bug: v8:13091,chromium:1375000,chromium:1375043,chromium:1375047,chromium:1374995,chromium:1374746,chromium:1375074,chromium:1375086,chromium:1365114,chromium:1375073,chromium:1375135
Change-Id: I5781b9645c6f3c33d58e70e5135067f2c25921a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956241
Commit-Queue: Marja Hölttä <marja@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83734}
2022-10-17 06:29:08 +00:00
Darius M
9e895ed861 [turboshaft] Fix bug with Bind in SelectLowering and MachineOptimization
Bug: v8:12783
Change-Id: I3a66acf8cf00943b7b5e60dd4173d35b8fcd30a9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952100
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83733}
2022-10-15 08:24:16 +00:00
v8-ci-autoroll-builder
80c0b76386 Update ICU (trusted)
Rolling v8/third_party/icu: 20f8ac6..da07448

Update ICU timezone database to IANA tzdb 2022e (Jungshik Shin)
https://chromium.googlesource.com/chromium/deps/icu/+/da07448

Change-Id: I0f7bdaf1ca4007f0667cc2347196a2cc6096d27e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956803
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@{#83732}
2022-10-15 04:38:56 +00:00