Commit Graph

69349 Commits

Author SHA1 Message Date
Ulan Degenbaev
8bcc824796 Enable icache flushing for embedded builtins
Dev experiment shows it helps to mitigate crashes on some Android
devices.

Bug: chromium:889460,v8:11619
Change-Id: I8c836e82e93f6373724d66598448c2610ab188d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910775
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74707}
2021-05-21 10:16:17 +00:00
Marja Hölttä
362edddecc [rab/gsab] Add RAB / GSAB support to KeyedStoreIC
Existing tests already exercise KeyedStoreIC; this CL makes them
take the fast path instead of the slow path.

Bug: v8:11111
Change-Id: I13b84650ae37abe1a8a46d53c9a9b7104bed31de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910315
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74706}
2021-05-21 10:13:47 +00:00
Nico Hartmann
f2dbf31864 [Torque] Introduce a builder pattern to generate C++ code
Generating C++ source files is very cumbersome using raw ostreams. This
CL introduces a few classes und the torque::cpp namespace that build an
abstraction of printing/formatting C++ source code (mostly functions for
now).

This is an initial implementation with a limited set of features and
uses. Landing features incrementally shall avoid huge CLs (+reviews) and
complex rebasing.

Bug: v8:7793
Change-Id: I3ae869755156175c7b37ea9f649e2f9c431ce3a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784688
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74705}
2021-05-21 10:09:28 +00:00
Ross McIlroy
78a06b5662 [compiler] Remove Early/LateGraphTrimming phases
These don't improve codegen and are unecessary overhead.

BUG=v8:9684

Change-Id: I2feb1c1200eb0c347f4a21be5444b6a15924e6de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2903162
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74704}
2021-05-21 10:02:57 +00:00
Benedikt Meurer
9f2df663b7 Fix length() access in ScopeInfo::RecreateWithBlockList().
Trivial follow up fix for https://crrev.com/c/1946349 which fixes the
call to length on a half-initialized ScopeInfo. ScopeInfo::length()
looks at the uninitialized fields (i.e. in case of ScopeInfo for module
scopes) and would thus crash.

Bug: chromium:1027475, v8:9938, chromium:1072939
Change-Id: I7e4e81edfbbde25063ab40b8e7807fd70625a8a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910773
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74703}
2021-05-21 05:45:37 +00:00
Junliang Yan
8a7db67d07 ppc: rename StoreP/PX as StoreU64
Change-Id: Ia1b8bf3ada1957c27334e98207d57bb2e644ecdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910796
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74702}
2021-05-20 19:34:07 +00:00
Milad Fa
c55ee71f8b PPC [simd]: Implement vector (VMX) splat immediates
This CL adds vector splat byte, word and halfword to
codegen, disassembler and the simulator.

It also optimizes a number of Simd opcodes by using
the added instructions as well as VSX splat immediate (xxspltib).

Change-Id: I2c4eba33e81542f901d7cdc669c50b510e48c4c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909525
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74701}
2021-05-20 19:01:31 +00:00
Santiago Aboy Solanes
4636b43bdb [cleanup] Remove synchronized_ from slot_count and used accessors
Continuing the cleanups and using the tags rather than synchronized_
in the name of the accessors.

Bug: v8:7790
Change-Id: I3fe942b1decae3b248f8662547d793777acd0e8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897096
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74700}
2021-05-20 15:19:48 +00:00
Sathya Gunasekaran
bd32997620 Revert "[heap] Disable the young generation in shared heaps"
This reverts commit 1186fc5008.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/16531/overview

Original change's description:
> [heap] Disable the young generation in shared heaps
>
> A shared heap will not have a young generation in the beginning.
>
> Bug: v8:11708
> Change-Id: I947ddb91a23a72a8cee3aa3e554723dda8146011
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2891569
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74697}

Bug: v8:11708
Change-Id: I8de67f70b00b5bd3066659e07fb1fd3ecfb76211
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909693
Auto-Submit: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#74699}
2021-05-20 14:09:09 +00:00
Ulan Degenbaev
4e1fadf4c2 Update TODOs to use bug ids
This also removes small TODOs that are not worth tracking in a bug

Change-Id: If61acd1239ac90a908327694b280846b1f676c25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909859
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74698}
2021-05-20 13:38:18 +00:00
Dominik Inführ
1186fc5008 [heap] Disable the young generation in shared heaps
A shared heap will not have a young generation in the beginning.

Bug: v8:11708
Change-Id: I947ddb91a23a72a8cee3aa3e554723dda8146011
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2891569
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74697}
2021-05-20 13:28:08 +00:00
Michael Hablich
1ace3b5cac Update V8 version to 9.3
TBR=machenbach@chromium.org
notry=true

Change-Id: I9110ef10d6e817b64a377108158014cd9f04ad84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910321
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74696}
2021-05-20 12:56:48 +00:00
Ulan Degenbaev
735471b366 [heap] Fix --gc-verbose flag
Calling Heap::Print in GC is not safe because the function tries
to print the stack and may allocate.

Change-Id: I48fe29863076792657e2184c52d355821375f969
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2835239
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74695}
2021-05-20 11:51:49 +00:00
Clemens Backes
3871bc8466 Fix unaligned access in Relaxed_Memcpy
The old code was relying on identical alignment of both the source and
the destination of the Relaxed_Memcpy. This is not always given, thus
check for alignment of both.

R=mlippautz@chromium.org

Bug: chromium:1208782, v8:11704
Change-Id: Ic5dca3a5f0ecaea0df6eb123105520bd7785853c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905611
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74694}
2021-05-20 10:50:00 +00:00
Michael Lippautz
5181aa6e02 cppgc: IWYU cleanups
Used include-what-you-use [1] to clean up cppgc API headers. The tool
does somewhat work but requires some cleanup afterwards as it cannot
nicely deal with `v8config.h` and the defines it generates.

[1] https://github.com/include-what-you-use/include-what-you-use/

Bug: chromium:1056170
Change-Id: I7b03797c615f8e033510fc959bbdb792d8b7a4ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2907612
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74693}
2021-05-20 10:42:29 +00:00
Ulan Degenbaev
350be8d461 [test] Re-enable ReleaseStackTraceData with --always-opt
Change-Id: Idbe26a82ba0e208985ab2b1e5b85c6f98c3ec925
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844663
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74692}
2021-05-20 10:34:39 +00:00
Georg Neis
a08820c10e [compiler] Add simple mjsunit test using %VerifyType
Also make the output more helpful in the error case.

Bug: v8:11724
Change-Id: Ibb8bd328f936f3d4f847ba7e14adf9c30b9460f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2903158
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74691}
2021-05-20 10:10:59 +00:00
Andreas Haas
6d08c94cb5 [wasm][debug] Provide WebAssembly Table entries to DevTools
With this CL, V8 adds an internal field to the WebAssembly Table object
that is sent to DevTools to also show table entries. As WebAssembly
Tables get initialized lazily, V8 only shows the name of the function
instead of the function object itself.

Screenshot before change: https://imgur.com/a/XFvy3lA
Screenshot after change: https://imgur.com/kT84kst
R=kimanh@chromium.org

Change-Id: I56a0b07785ff3484f1447419fe39ae5ec3f93247
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897097
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74690}
2021-05-20 09:59:09 +00:00
Manos Koukoutos
e90c366be4 Reland "[wasm-gc] Implement br_on_cast_fail"
This is a reland of 8f39a58586

Changes compared to original:
Change the type of arguments of WASM_I32V from byte to int for MSVC
compatibility.

Original change's description:
> [wasm-gc] Implement br_on_cast_fail
>
> Bug: v8:7748
> Change-Id: I7894ad51ccf8ac41a5081c272a583a4ff25c1835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900225
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74652}

Bug: v8:7748
Change-Id: I39f39ff6979382f5618683a8e7754f56df4ec9e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905599
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74689}
2021-05-20 09:35:09 +00:00
Milad Fa
b8571b309a [sparkplug] remove UNREACHABLE from constexpr functions
gcc may throw the following compilation error if UNREACHABLE
is used within a constexpr function:
```
error: call to non-'constexpr' function
                  'void V8_Fatal(const char*, ...)'
```

Bug: v8:11420
Change-Id: I7f8237d00ba1a5d9bd778d45eb833b89cbe8eb24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906032
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74688}
2021-05-20 08:18:09 +00:00
Clemens Backes
3d9d474535 [nowasm] Fix compile error
This fixes a compile error if webassembly is disabled. It was introduced
in https://crrev.com/c/2902731.

R=cbruni@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Change-Id: Icf12b22d54dbd4710130e0f2b56c44f42ac86424
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905602
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74687}
2021-05-20 06:51:02 +00:00
v8-ci-autoroll-builder
80e2686d55 Update V8 DEPS.
Rolling v8/build: 4036cf1..d3e8244

Rolling v8/buildtools: 20b1d0f..b9af93e

Rolling v8/third_party/aemu-linux-x64: -Sz2gSN_5yVSHDlitjxUlmZpHuz-F2kFDW6TnmggCZoC..uDQJbkoDWGwLYtnDu3A7LnRVwsKkaFQkUWtChrVO_hYC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c1e1d55..7da48e9

Rolling v8/third_party/depot_tools: 6b0a611..51e3708

Rolling v8/third_party/google_benchmark/src: 7d0d906..e539e80

Rolling v8/tools/luci-go: git_revision:22d464e2f8f3bd2bd33f69fe819326d63f881008..git_revision:9cd9603def7a649cd3e29517180d6622be2fa898

Rolling v8/tools/luci-go: git_revision:22d464e2f8f3bd2bd33f69fe819326d63f881008..git_revision:9cd9603def7a649cd3e29517180d6622be2fa898

Rolling v8/tools/luci-go: git_revision:22d464e2f8f3bd2bd33f69fe819326d63f881008..git_revision:9cd9603def7a649cd3e29517180d6622be2fa898

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ia80861e8b13e2b9c57916f1ac0a55fca6bb50227
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2908255
Reviewed-by: 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/master@{#74686}
2021-05-20 03:39:12 +00:00
Junliang Yan
5319e928eb PPC: replace LoadPX with LoadU64
Change-Id: I24081a3fe941d083cefa782d4ba712acf7776980
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905766
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74685}
2021-05-19 23:38:41 +00:00
Francis McCabe
c7cd212fb8 Revert "[heap] Replace usages of CollectionRequested with SafepointRequested"
This reverts commit 5ef4e14fb8.

Reason for revert: Seems to be causing a lot of flakes
e.g., https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64/42913

Original change's description:
> [heap] Replace usages of CollectionRequested with SafepointRequested
>
> CollectionRequested was used exclusively on the main thread when a
> background thread requested a GC. The main thread never used
> SafepointRequested at any time. Now with the shared GC we might need to
> stop multiple isolates in a safepoint in the future. In such a situation
> we would need to use SafepointRequested also on the main thread.
>
> This CL prepares V8 for this situation by using SafepointRequested
> instead of CollectionRequested and friends on the main thread. The slow
> path of Safepoint(), Park() and Unpark() will check in the future
> whether the main thread needs to halt for a shared GC or needs to
> perform a local GC. At the moment, simply performing the local GC is
> still enough.
>
> Bug: v8:11708
> Change-Id: I819b6f7db8251074a4adf8b554e0a1393c76f7da
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2891834
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74673}

Bug: v8:11708
Change-Id: I51c51e68110e83f729bd43ef62eef1396aa0cb96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906913
Auto-Submit: Francis McCabe <fgm@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#74684}
2021-05-19 18:29:14 +00:00
Luis Fernando Pardo Sixtos
3ef42c03d0 Refactor of ScopeInfo::ContextSlotIndex
Refactoring ScopeInfo::ContextSlotIndex so it accepts a pointer to
LookupResult instead of references to the individual arguments.

Change-Id: I52bc7800f14e790bd4788c213ab0eff2354ab20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900837
Commit-Queue: Luis Fernando Pardo Sixtos <lpardosixtos@microsoft.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74683}
2021-05-19 18:12:40 +00:00
Jakob Kummerow
54d84cf385 [wasm-c-api] Cache CapiCallWrappers in the NativeModule
We used to recompile WasmCapiCallWrappers whenever they were
needed, but never garbage-collected them, which caused a memory
leak when many short-lived instances of the same module were
created. This patch makes the wrappers cacheable and caches them,
which avoids both repeated compilation effort and the unbounded
memory growth.
Drive-by cleanup: unify WasmCapiFunctionData with the other
Wasm*FunctionData classes by making it inherit from WasmFunctionData.

Bug: v8:11774
Change-Id: Ia0c0d76be2938dc7bebfdc845f4a1cfeafef4a70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905605
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74682}
2021-05-19 16:36:41 +00:00
Jakob Kummerow
598f6c3499 [wasm-c-api] Fix unnecessary heap memory growth
When adding new instances to the WeakArrayList of a script's
instances, use Append() instead of AddToEnd() to allow possible
compaction of the WAL.
Also, check for interrupt requests every now and then, which
allows incremental marking to get finalized when appropriate.

Bug: v8:11774
Change-Id: I8be959a78d8ef370f65e8f9849f48e34c9691a13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905603
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74681}
2021-05-19 16:34:51 +00:00
Junliang Yan
f9a15e1cf9 ppc: [liftoff] implement LoadFromInstance
Change-Id: I1ada6628e8d17d313f6ee73fda40bb867e3e0ee4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906013
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74680}
2021-05-19 16:06:51 +00:00
Jakob Kummerow
84fb524262 Fix --trace-gc-object-stats
Attempting to trace object stats ran into an UNREACHABLE because
the FieldStatsCollector didn't override VisitMapPointer.

Change-Id: I38f2739c204e462e5a35f2a7ca6e0f100161b240
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905604
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74679}
2021-05-19 15:51:11 +00:00
Victor Gomes
7760315dbb [runtime] Unify invalid size error handling
This is a follow-up to
https://chromium-review.googlesource.com/c/v8/v8/+/2833920

Bug: chromium:1209210, chromium:1198188
Change-Id: I43f18649434b06431dac6cae7946505fc4b5b398
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905607
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74678}
2021-05-19 15:34:31 +00:00
Manos Koukoutos
916eb86952 Reland "[wasm][bug] Fix a couple of bugs in validation of unreachable code"
This is a reland of 4a037f871e

Changes compared to original change: None. This seems not to create
problems after all.

Original change's description:
> [wasm][bug] Fix a couple of bugs in validation of unreachable code
>
> Changes:
> - SetBlockType now instantiates the block's start merge with values of
>   the correct type in unreachable code.
> - EnsureStackArguments now keeps the existing stack values and moves
>   them over the new bottom values.
> - Drop stack size validation in Drop().
> - Add new tests in unreachable-validation.js.
>
> Change-Id: Ie68b3d9abb0a41d1623d4a123fb526e71941c4e7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2902733
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74650}

Change-Id: Id620f7fb6677b772b0dcfd38108256384db44439
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905598
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74677}
2021-05-19 15:30:01 +00:00
Junliang Yan
dd5954bc50 PPC: move LoadXXX to TurboAssm
Change-Id: I1449424536b721e54f95aeb2e3b68fb25d6a5ccf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906033
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74676}
2021-05-19 15:03:17 +00:00
Benedikt Meurer
ea3ee6da79 [inspector] Derive breakpoint hint based on resolved location.
When setting a breakpoint on a line (in the DevTools front-end), the
front-end sends a columnNumber of 0 and the inspector automatically
resolves the actual location (in bytecode execution order). In order
to also support changing source code, the inspector memorizes a text
hint, and uses that to adjust the location upon reload. This hint was
however taken based on the original line and column numbers, rather than
the resolved location, which causes trouble when syntactic order doesn't
match execution order, as in case of `await o.m()`.

In order to address that we now remember the textual hint based on the
resolved location.

Fixed: chromium:1081162
Also-By: kimanh@chromium.org
Change-Id: I7d08373440693b7abc18c29c1a05929d771d3031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905606
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74675}
2021-05-19 14:46:57 +00:00
Milad Fa
5b48a13a7a s390: [sparkplug] Use separate WriteBarrier stubs
Port 2a43f8c4c7

Original Commit Message:

    Inline the RememberedSetAction and SaveFPMode flags directly into the
    RecordWrite stubs:
    - Save two register for input arguments
    - Avoid branches in the RecordWrite stubs

    We end up with 2 stubs for the EphemeronKeyBarrier and 4 stubs for
    RecordWrite. Due to more inlined calls we have roughly 1KiB more
    builtins code for RecordWrite currently. We will address this in the
    future by splitting out common code into a separate stub. There is
    no additional code size overhead for EphemeronKeyBarrier.

    This saves 4 to 8 bytes on x64 per RecordWrite call and 2.5% sparkplug
    code size reduction on d3.min.js.

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

Change-Id: Iaab3d0aad9f90a942459ac63a641c52246a4afa1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906012
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74674}
2021-05-19 14:39:37 +00:00
Dominik Inführ
5ef4e14fb8 [heap] Replace usages of CollectionRequested with SafepointRequested
CollectionRequested was used exclusively on the main thread when a
background thread requested a GC. The main thread never used
SafepointRequested at any time. Now with the shared GC we might need to
stop multiple isolates in a safepoint in the future. In such a situation
we would need to use SafepointRequested also on the main thread.

This CL prepares V8 for this situation by using SafepointRequested
instead of CollectionRequested and friends on the main thread. The slow
path of Safepoint(), Park() and Unpark() will check in the future
whether the main thread needs to halt for a shared GC or needs to
perform a local GC. At the moment, simply performing the local GC is
still enough.

Bug: v8:11708
Change-Id: I819b6f7db8251074a4adf8b554e0a1393c76f7da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2891834
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74673}
2021-05-19 14:31:37 +00:00
Omer Katz
2c80e71484 cppgc: Check mark bit on assignment from prefinalizer.
Check that the marked bit of an object is set if assigned during a
prefinalizer to a Member in a live object or a Persistent.

Bug: v8:11749
Change-Id: I993c0d226a4157698591e1f7bc0c55e5c79239b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897093
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74672}
2021-05-19 14:17:38 +00:00
Patrick Thier
16e90e0dad [test] ReturnFuzzSafe only returns undefined when correctness fuzzing
Change ReturnFuzzSafe to only return undefined when
--correctness-fuzzer-supressions is on, instead of --fuzzing.

Bug: chromium:1200724, v8:11701
Change-Id: I21aa77db89fe26308881985055b023a5c03c2518
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905593
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74671}
2021-05-19 13:34:48 +00:00
Junliang Yan
5361950a32 ppc: rename LoadByte to LoadU8
Change-Id: Id1a468a51c0f37c99bb36b388aaa803ae6ed8516
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905193
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74670}
2021-05-19 12:59:23 +00:00
Patrick Thier
da300746b4 [test] Skip baseline for variant stress_concurrent_inlining
We compile with Sparkplug when we allocate the feedback vector with lazy
feedback vector allocation. --stress-concurrent-inlining implies
--no-lazy-feedback-allocation, so it doesn't make sense to run
baseline tests with this variant.

Change-Id: I7fd4c2b11cf2a9bb29d6f78c5973aed80abab85e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2903118
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74669}
2021-05-19 12:58:18 +00:00
Michael Lippautz
0052640ef2 cppgc: Avoid double-accounting live bytes through Steele barrier
The barrier just re-added a black object to the worklist (making it
gray) which results in double-accounting live bytes.

Trace directly as the barrier is not widely used.

Bug: chromium:1056170
Change-Id: I06a55c13f6e82652ad1939a12c4e23f3a3ebd3fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904212
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74668}
2021-05-19 12:53:12 +00:00
Clemens Backes
7ae8f4fbe3 [ia32][disasm] Fix another unsupported instruction
This adds another data pointer increase to fix an occurence of an
unsupported instruction.

R=jkummerow@chromium.org

Bug: chromium:1206412
Change-Id: I311dbdc0cc33f7d8d0cfe952c1f085a61f3ec225
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2880220
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74667}
2021-05-19 12:50:18 +00:00
Clemens Backes
3cd74b65e3 [wasm] Fix check failure on low reservation limits
If fuzzers pass a low --wasm-max-initial-code-space-reservation limit,
we might run into a DCHECK/CHECK failure because the "overhead" per code
space (for jump tables) is more than half of the reserved code space
(DCHECK) or actually bigger than the reserved code space (CHECK).

This CL fixes that by explicitly failing with an OOM message in that
case. This should only happen if that testing flag is set.

I do have a test case for this (reduced from the ClusterFuzz report) but
it needs >20000 functions (to make the jump tables big enough to fail
the checks), so it runs really slow (>90 seconds in debug).
Since the failure only happens with a testing flag, I think it's
acceptable to fix this without a regression test.

R=ahaas@chromium.org

Bug: chromium:1208259
Change-Id: I99e56a533efcdfa51d99eb5f64edead490398b3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904206
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74666}
2021-05-19 12:42:38 +00:00
Marja Hölttä
519d394917 [rab/gsab] Simplify JSFunction::GetDerivedRabGsabMap
Bug: v8:11111
Change-Id: I0bea83be43f9749b95caed146224d21b5128a478
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904207
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74665}
2021-05-19 12:27:18 +00:00
Marja Hölttä
bc11dbcb8a [web snapshot] web snapshot <3 RuntimeCallStats
Bug: v8:11525
Change-Id: I1c8e2346ed1581dc6b44e8df203d1ad0bcd1639a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2883357
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74664}
2021-05-19 12:16:28 +00:00
Michael Lippautz
4da83c8211 cppgc: Avoid temporaries in Member equality
Bug: chromium:1056170
Change-Id: I885ec134ad632473c4bdaab82c0fe86d7a9ae931
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904214
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74663}
2021-05-19 12:14:29 +00:00
Clemens Backes
98ecaf6091 [cctest] Test SharedMutex plus sampling
The combination of pthread_rwlock_t and signals causes spurious
deadlocks on Mac (see linked issue).
This adds a cctest which tests this combination. This test is skipped on
Mac, where it would deadlock. This test can be used to document and
further investigate the issue, and test potential fixes.

R=jkummerow@chromium.org

Bug: v8:11399
Change-Id: I5d1fcdd84db253ec2d0637575239f212aae2ecb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2856553
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74662}
2021-05-19 12:11:28 +00:00
Camillo Bruni
2a43f8c4c7 [sparkplug] Use separate WriteBarrier stubs
Inline the RememberedSetAction and SaveFPMode flags directly into the
RecordWrite stubs:
- Save two register for input arguments
- Avoid branches in the RecordWrite stubs

We end up with 2 stubs for the EphemeronKeyBarrier and 4 stubs for
RecordWrite. Due to more inlined calls we have roughly 1KiB more
builtins code for RecordWrite currently. We will address this in the
future by splitting out common code into a separate stub. There is
no additional code size overhead for EphemeronKeyBarrier.

This saves 4 to 8 bytes on x64 per RecordWrite call and 2.5% sparkplug
code size reduction on d3.min.js.

Bug: v8:11420
Change-Id: Ib7170265dd6dd4b3aaf8275083f096e76fae8251
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2902731
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74661}
2021-05-19 12:09:18 +00:00
Junliang Yan
dac4a1e376 ppc: rename LoadHalfWorld to LoadU/S16
Change-Id: Iedb0bb641a83fd897c92baca4f58c7d689135e33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904271
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74660}
2021-05-19 12:08:13 +00:00
Manos Koukoutos
1d0719c7fe [wasm][fuzzer] Integrate wasm-module-builder.js changes
Recent changes in wasm-module-builder.js were not translated to the
fuzzer JS output. After this CL, the fuzzer should generate .js files
that output back the fuzzed module.

Change-Id: I8bc33ab7f4f838a519c7aa47e425d8ac65b88d45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904217
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74659}
2021-05-19 12:07:08 +00:00
Sathya Gunasekaran
fc91261600 Revert "[wasm-gc] Implement br_on_cast_fail"
This reverts commit 8f39a58586.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20msvc/17874/blamelist

Original change's description:
> [wasm-gc] Implement br_on_cast_fail
>
> Bug: v8:7748
> Change-Id: I7894ad51ccf8ac41a5081c272a583a4ff25c1835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900225
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74652}

Bug: v8:7748
Change-Id: I90ca2d789e943cd00c2344e2d333c9175fcedee5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2903482
Auto-Submit: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#74658}
2021-05-19 10:50:09 +00:00