Commit Graph

66709 Commits

Author SHA1 Message Date
Zhi An Ng
e94084f6af [wasm-simd][liftoff][ia32] Implement saturating rounding multiply high
Create a macro-assembler helper function to enable code sharing between
Liftoff and TurboFan.

Bug: v8:10971
Change-Id: I8d8132f4cf3386b28cdf5350fde2e076428d68c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621860
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72067}
2021-01-13 15:39:17 +00:00
Thibaud Michaud
bbcb20a13e [regalloc] Fix merging a bundle with itself
When merging a bundle with itself, we should consider the merge a
success even though we do not merge anything. The result is used to
determine whether the backward spilling heuristic might introduce a
stack to stack move. For this purpose, it only matters whether the phi
and its input end up in the same bundle.

R=sigurds@chromium.org

Bug: chromium:1158088
Change-Id: Icdcfe81d58bce5916b87a34a46c9611f5978bf27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625876
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72066}
2021-01-13 15:23:37 +00:00
Nico Hartmann
458f7ad06f Revert "[regexp] Hard-crash on invalid offsets in AdvanceCurrentPosition"
This reverts commit 164cf80bbb.

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

Original change's description:
> [regexp] Hard-crash on invalid offsets in AdvanceCurrentPosition
>
> Drive-by: Range checks in `Emit(byte, twenty_four_bits)` to ensure the
> given packed bits actually fit into 24 bits.
>
> Bug: chromium:1166138
> Change-Id: I2e711e6466bb48d7b9897f68dfe621d12bd92508
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625877
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72064}

TBR=jgruber@chromium.org,leszeks@chromium.org,pthier@chromium.org

Change-Id: Ibe72ecda03518e444442a0440ecdae7669bfc4c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1166138
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625883
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72065}
2021-01-13 15:19:29 +00:00
Jakob Gruber
164cf80bbb [regexp] Hard-crash on invalid offsets in AdvanceCurrentPosition
Drive-by: Range checks in `Emit(byte, twenty_four_bits)` to ensure the
given packed bits actually fit into 24 bits.

Bug: chromium:1166138
Change-Id: I2e711e6466bb48d7b9897f68dfe621d12bd92508
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625877
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72064}
2021-01-13 14:16:06 +00:00
Kim-Anh Tran
1e463205ea [inspector] Skip sending data urls in the Runtime domain
This skips sending the data urls along with Runtime.CallFrame,
and Runtime.ExceptionDetails.

Also-by: bmeurer@chromium.org
Bug: chromium:1132260
Change-Id: I45136bc0d3217caf8fbd93946b021f56f64f04b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621077
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72063}
2021-01-13 13:27:41 +00:00
Mythri A
8f6ecde0cd Reland "Disable bytecode flushing once we toggle coverage mode."
This is a reland of 8aa6b15fa0 with a fix
for TSAN failures.

Original change's description:
> Disable bytecode flushing once we toggle coverage mode.
>
> Changing coverage mode generated different bytecode in some cases.
> Hence it is not safe to flush bytecode once we toggle coverage mode.
>
> Bug: chromium:1147917
> Change-Id: I9e640aeaec664d3d4a4aaedf809c568e9ad924fc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615020
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71985}

Bug: chromium:1147917
Change-Id: Ibd8c4feb8615ba7b92fe547c55d455958c94c526
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2624612
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72062}
2021-01-13 13:26:36 +00:00
Benedikt Meurer
1bd5755bba [wasm][debug] Simplify debug name handling.
This moves the logic for the debug name heuristic, which derives names
for imported and exported entities from the relevant tables, into
wasm-debug.{cc,h} and stores these maps on the DebugInfoImpl rather than
on the WasmModule.

Drive-by-fix: Also use the import table based heuristic for function
names, just like we use it for everything else.

Bug: chromium:1164305
Change-Id: I8a21e0880c680079f63e6607b5b62c788049b9e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625870
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72061}
2021-01-13 12:08:16 +00:00
Leszek Swirski
deb0813166 [heap] Add proper rebind support to StrongRootBlockAllocator
MSVC's STL in debug mode rebinds the allocator passed to vectors to
allocate helper structures, so we need StrongRootBlockAllocator to have
proper rebind support rather than assuming it always rebinds to Address.

Bug: v8:11241
Change-Id: I15688e43fe2c71ec4ff0c287a03e36ca57427417
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622915
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72060}
2021-01-13 11:58:19 +00:00
Zhi An Ng
e61272a4b7 [wasm-simd][liftoff][ia32] Implement i64x2 widen i32x4
Implement these 4 instructions for ia32 Liftoff:
- i64x2.widen_low_i32x4_s
- i64x2.widen_high_i32x4_s
- i64x2.widen_low_i32x4_u
- i64x2.widen_high_i32x4_u

We move the codegen for the *high* instructions into macro-assembler to
allow sharing of the optimized code sequence between TurboFan and
Liftoff.

Bug: v8:10972
Change-Id: Ib5c6cbf6d4a39ef298298b75516f5221cb8ec249
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621863
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72059}
2021-01-13 06:05:06 +00:00
Zhi An Ng
6f52138682 [wasm-simd][liftoff][x64] Implement saturating rounding multiply high
Create a macro-assembler helper function to enable code sharing between
Liftoff and TurboFan.

Bug: v8:10971
Change-Id: I10228b502d959dbde670c38c44992fa7133dab7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621859
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72058}
2021-01-13 04:48:06 +00:00
Zhi An Ng
9e47dd6a27 [wasm-simd][liftoff][arm] Implement i64x2.bitmask
Move the current code sequence in TurboFan to a macro-assembler helper
function to allow Liftoff to reuse it.

Bug: v8:10997
Change-Id: I08a9d5b6d1f7898bf7e9239f54d69867e00b30eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620906
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72057}
2021-01-13 04:29:06 +00:00
v8-ci-autoroll-builder
1cf454a21c Update V8 DEPS.
Rolling v8/base/trace_event/common: eb94f1c..9b27757

Rolling v8/build: d599553..787a10d

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d1a3011..3889691

Rolling v8/third_party/depot_tools: 82b992a..8149a96

Rolling v8/tools/clang: 2246bee..b12d1c8

Rolling v8/tools/luci-go: git_revision:67aba6e3373bb0b9e3ef9871362045736cd29b6e..git_revision:16e6d735358b0166f06fd2e4daa0da4cff9918e9

Rolling v8/tools/luci-go: git_revision:67aba6e3373bb0b9e3ef9871362045736cd29b6e..git_revision:16e6d735358b0166f06fd2e4daa0da4cff9918e9

Rolling v8/tools/luci-go: git_revision:67aba6e3373bb0b9e3ef9871362045736cd29b6e..git_revision:16e6d735358b0166f06fd2e4daa0da4cff9918e9

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Id7c5629638d61e81b9868d7c905d88668a528b5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625753
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@{#72056}
2021-01-13 03:53:07 +00:00
Zhi An Ng
8c52f66f62 [wasm-simd][liftoff][x64] Implement i64x2 widen i32x4
Implement these 4 instructions for x64 Liftoff:
- i64x2.widen_low_i32x4_s
- i64x2.widen_high_i32x4_s
- i64x2.widen_low_i32x4_u
- i64x2.widen_high_i32x4_u

We move the codegen for the *high* instructions into macro-assembler to
allow sharing of the optimized code sequence between TurboFan and
Liftoff.

Bug: v8:10972
Change-Id: I900b24f96ee55784220656cb2664283b03c32110
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621862
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72055}
2021-01-13 00:54:36 +00:00
Zhi An Ng
88d48c53fc [wasm-simd][liftoff][arm64] Implement i64x2.bitmask
Move the current code sequence in TurboFan to a macro-assembler helper
function to allow Liftoff to reuse it.

Bug: v8:10997
Change-Id: I6205350897a4afc7ca9d0f84fd514be24508aef0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620905
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72054}
2021-01-13 00:36:56 +00:00
Seth Brenith
373f4ae739 [torque] Don't replace unmodified empty files
To improve incremental builds.

Bug: v8:7793
Change-Id: I6990a97e058d22d34acd1f609167cd30ca7518ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596789
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72053}
2021-01-13 00:20:47 +00:00
Milad Fa
f7b60fa793 S390: increase sp delta after pushing float32 on the stack
Change-Id: Ife7fb1c08acd864f59b1f45877e7e75fd81748a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625488
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72052}
2021-01-12 23:24:26 +00:00
Milad Fa
3591de71af S390 [wasm-simd]: Implement saturating rounding multiply high
Also fix the simulator to avoid overrating dst register
during VectorPack.

Bug: v8:10971
Change-Id: I137e3cf4f73ddfc12c50099d519668858f95ecf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625487
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72051}
2021-01-12 21:57:20 +00:00
Milad Fa
bfcb3f00f4 PPC [wasm-simd]: Implement saturating rounding multiply high
Bug: v8:10971
Change-Id: Idaa75b5c4d63695dbb8eed2be076f067ff5df9ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2623817
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72050}
2021-01-12 21:06:20 +00:00
Bill Budge
f9e76d6dff [codegen] Handle alignment holes when pushing arguments
- Modify InstructionSelectors to track both padding and multiple
  slot values to correctly adjust stack pointers when pushing
  arguments. Pass stack offset as an immediate operand.
- Modify CodeGenerators to handle alignment padding.

Bug: v8:9198
Change-Id: I1c132284e07b5f5e73ce570a641f17decdfba504
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596027
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72049}
2021-01-12 18:58:01 +00:00
Mike Stanton
b763b422ec [Torque] Update owners file
Add nicohartmann@ as an owner.

Change-Id: I7c24b1ab575db857a15cff709f44c87c74106d80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593332
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72048}
2021-01-12 16:58:59 +00:00
Milad Fa
d511d4ec4d PPC/s390: [wasm-simd][liftoff][ia32][x64] Implement i64x2.bitmask
Port d6c4c884fc

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

Change-Id: I99c91b49c1fda7e50fee7d9a204e9ade3e336220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2623808
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72047}
2021-01-12 15:52:04 +00:00
Milad Fa
d59ba82d99 PPC/s390: [wasm-simd] Move i64x2.bitmask out of post-mvp
Port acbdaa4ce5

Original Commit Message:

    Also remove some ifdefs since it is implemented on all architectures.

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

Change-Id: I2ec501c15dda5a0aa970b8b7d18a995e60f71b60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2624747
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72046}
2021-01-12 15:50:59 +00:00
Clemens Backes
4e57789f26 [wasm] Remove bulk-memory flag
bulk-memory shipped in V8 v7.5, hence the feature flag can be removed
now. This saves some binary size and a few dynamic checks for the flag.

R=ahaas@chromium.org

Bug: v8:11074
Change-Id: Ia73622637939f2192940fdd6909520786ed27286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622913
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72045}
2021-01-12 15:28:39 +00:00
Camillo Bruni
cab067c653 [tools] Fix system-analyzer script panel selection
Drive-by-fix:
- fix load spinner z-index

Change-Id: I4a8f9b768ec858da4d91780ae0998a685f4438bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2624609
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72044}
2021-01-12 15:23:49 +00:00
Camillo Bruni
35da8e0377 [tools] Format tickprocessor.mjs and friends
Bug: v8:10667
Change-Id: Ie11b21f6610ad5e5be81e12191207ac85680a1ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622213
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72043}
2021-01-12 15:19:59 +00:00
Benedikt Meurer
a23adbbc5a [inspector][wasm] Improve Scope view and instance preview.
This adds the following internal properties to `WasmInstanceObject`
values in DevTools:

 - `[[Module]]` pointing to the `WasmModuleObject`, allowing the
   developer to find the module to an instance no matter where in
   DevTools front-end the instance is inspected.
 - `[[Functions]]`, `[[Globals]]`, `[[Memories]]`, and `[[Tables]]`
   are shown (when they aren't empty), allowing developers to inspect
   the entities within an instance no matter where in DevTools front-end
   it's inspected.

This also updates the _Module_ scope for Wasm frames to show the entity
containers (`functions`, `globals`, `memories` and `tables`) in addition
to the `instance` and `module` to make it easier accessible (fewer
clicks to get there), but also to align it better with the _Add property
path to Watch_ and _Copy property path_ features (since exactly the same
names are exposed via Debug Evaluate on Wasm frames).

```
> Stack
> Locals
v Module
  > module
  > instance
  > functions
  > globals
  > memories
  > tables
```

Drive-by-fix: Move GetWasmModuleObjectInternalProperties() logic into
debug-wasm-support.cc

Screenshot: https://imgur.com/ksEHG2I.png
Doc: http://bit.ly/devtools-wasm-entities
Fixed: chromium:1165294
Bug: chromium:1071432, chromium:1164241, chromium:1165304
Change-Id: Ia88fb2705287c79988ff2b432e4a33ac34e098f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622912
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72042}
2021-01-12 15:13:49 +00:00
Milad Fa
be5738a8d4 [wasm][memory64] Fix endianness issue on Load cctest
`0x12345678` will be written to memory in the same order on BE
machines however, as Wasm is LE enforced, a memory load will
force a byte reverse operation on BE machines which changes the value.

To fix the problem, we write the reversed value to memory.

Change-Id: I0d562768d5cef823cb918ed1b57a2a41e404ffc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622927
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72041}
2021-01-12 14:13:19 +00:00
Leszek Swirski
9a6a22874c [heap] Fix DCHECK in TransitionArrayNeedsCompaction
The dead target check in TransitionArrayNeedsCompaction, confirming that
Smi (uninitialized) targets imply that no other target is dead, has to
additionally support Smi entries.

Bug: v8:11305
Change-Id: I6f3fa9e7420b1bd0a64a25dae670f439e3f41162
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622914
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72040}
2021-01-12 14:10:49 +00:00
Camillo Bruni
d16a2a6884 [tools] Add DisableGCMole scope
Make sure gcmole detects issue in DisallowGarbageCollection scopes.

DisallowGarbageCollection is widely used in the codebase to document
code that doesn't allocate. However, this has the rather unexpected
side-effect that gcmole is not run when such a scope is active.

This CL changes the default behavior of gcmole to run even with
DisallowGarbageCollection scopes present. This will give us the best
results of both worlds, dynamic checks by the fuzzer, and static
analysis by gcmole.

To allow crazy local raw pointer operations there is a new
DisableGCMole scope that explicitly disables gcmole.

Change-Id: I0a78fb3b4ceaad35be9bcf7293d917a41f90c91f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615419
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72039}
2021-01-12 12:59:39 +00:00
Leszek Swirski
2059ee8133 [heap] Make CompactTransitionArray deserializer friendly
Add a pre-loop over transition arrays during compaction, that checks
whether compaction is needed at all, and whether any of the entries are
still uninitialized values as part of deserialization (and therefore no
other targets can be dead). Bails out of compaction early if this is the
case.

Bug: v8:11305
Change-Id: I27af792a8a0bd3df17892f54ac95ed15e4bdfcc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622910
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72038}
2021-01-12 11:59:09 +00:00
Jakob Gruber
4113b70d43 [cleanup] Add named constant SafepointEntry::kNoTrampolinePC
.. instead of implicitly using -1 as a marker in a few spots.

Bug: chromium:1161357
Change-Id: Icfb9a2b81dbda844c8405c57454d63ae89dfe4f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2606336
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72037}
2021-01-12 11:49:59 +00:00
Georgia Kouveli
ec598bbe55 [arm64] Fix setting up of frame pointer in RegExpMacroAssembler
The frame pointer did not point to the previous frame pointer, which
made the stack non-iterable with SafeStackFrameIterator.

This can cause pointer authentication failures when CFI is enabled,
as we expect the value stored above the previous frame pointer to
be a return address.

Bug: v8:10026
Change-Id: Ia55181038b1b277d0a6df519f1e7f61859847b1a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614429
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#72036}
2021-01-12 10:53:39 +00:00
Clemens Backes
50a10443f7 [wasm][memory64] Test traps
... and fix an issue in TurboFan and issues in Liftoff.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I3493205ab56a4ded550af6fcd75c465f7d8894ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2618246
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72035}
2021-01-12 09:13:39 +00:00
Manos Koukoutos
31a574e90d [wasm-gc] Clean up a couple rough edges
Changes:
- Rename PassThrough -> Forward in function-body-decoder.
- Introduce IsHeapSubtypeOf in subtyping.
- Do not push a redundant bottom value in br_on_null, remove
  fallthrough. Also, improve code structure.
- Update a couple of comments.

Bug: v8:7748
Change-Id: I8d23cd3829c5504156ace595f8ac86c511c9f5e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2611250
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72034}
2021-01-12 09:06:49 +00:00
Manos Koukoutos
18640f8662 [wasm] Resize over instantiating vector in graph-builder-interface
Change-Id: I6970506864a5b2604f9d4607c2f20ffa2b409c9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2621078
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72033}
2021-01-12 08:57:39 +00:00
Sathya Gunasekaran
bf6a80f34c [github] Close PRs created on the V8 GitHub mirror automatically
As per https://v8.dev/docs/contribute: Code contributions to v8 are
done through Gerrit, not using GitHub pull requests.

Unfortunately not a lot of people seem to read this and end up opening
PRs on the github v8 mirror which then needs to be closed manually:
https://github.com/v8/v8/pulls?q=is%3Apr+is%3Aclosed

Rather than manually closing these PRs, once we add this config, we
can make the google GitHub bot automatically do this. See:
https://opensource.google/docs/github/disable-features/#close

Bug: v8:11301
Change-Id: I2b55f60cb095bd4d3e26e5a096dac2c1c886ba31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617080
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72032}
2021-01-12 08:39:59 +00:00
Clemens Backes
1f7721b1a2 [inspector][fuzzer] Fix timeouts on endless loops
The watchdog previously didn't terminate execution, it just prevented
the execution of additional tasks.
This CL fixes that by making {TaskRunner::Terminate} actually terminate
execution in the isolate.

It also adds a regression test for this.

R=szuend@chromium.org

Bug: chromium:1154412, chromium:1142437
Change-Id: Ic6638e8a5c37e8840a85651b4d4bea2ee0f71c43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622212
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72031}
2021-01-12 08:36:09 +00:00
Manos Koukoutos
8361a59f89 [wasm] Infrastructure to support loop exits in wasm
Changes:
- Add LoopExit and LoopExitValue functions in wasm-compiler.
- Handle kLoopExitValue opcode in simd-scalar-lowering.

Bug: v8:11298
Change-Id: I4d00402ed1913f927bec973b3d480ddc1990962b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2611251
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72030}
2021-01-12 08:22:09 +00:00
Zhi An Ng
646bdbf843 [wasm-simd][arm] Prototype i64x2 widen i32x4 instructions
Prototype these 4 instructions:

- i64x2.widen_low_i32x4_s
- i64x2.widen_high_i32x4_s
- i64x2.widen_low_i32x4_u
- i64x2.widen_high_i32x4_u

Bug: v8:10972
Change-Id: I57508a7fcafdf3b8a9477d6e9292fbb6b67e3619
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2612342
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72029}
2021-01-12 07:54:39 +00:00
Frank Tang
dff4f7a921 Fix resolvedOption calendar for "iso8601"
Use a bit to work around the issue of ICU getType() bug.

Bug: v8:11295
Change-Id: I15d65bd44c489031d789e7638ea8abab90128124
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614216
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72028}
2021-01-12 06:22:08 +00:00
LiuYu
cbed65f4f5 [mips64] Move extended multiply into macro-assembler
Change-Id: I1024b336ac3d24c69f5a47a919b69a9ef363ec66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620002
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72027}
2021-01-12 04:30:55 +00:00
v8-ci-autoroll-builder
4b28dbfcb2 Update V8 DEPS.
Rolling v8/build: d1a7463..d599553

Rolling v8/buildtools: 2277272..235cfe4

Rolling v8/buildtools/linux64: git_revision:0d67e272bdb8145f87d238bc0b2cb8bf80ccec90..git_revision:595e3be7c8381d4eeefce62a63ec12bae9ce5140

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e174329..d1a3011

Rolling v8/third_party/depot_tools: c1aa4ec..82b992a

Rolling v8/tools/clang: 01d7e1f..2246bee

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ib358f0e49fab39cf13fb91a0db2a2b453b28c94a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622902
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@{#72026}
2021-01-12 03:54:05 +00:00
Zhi An Ng
bf9875e816 [wasm-simd][ia32] Prototype i64x2 widen i32x4 instructions
Prototype these 4 instructions:

- i64x2.widen_low_i32x4_s
- i64x2.widen_high_i32x4_s
- i64x2.widen_low_i32x4_u
- i64x2.widen_high_i32x4_u

Implementation is the same as x64.

Drive-by fix to add a missing CpuFeatureScope to x64.

Bug: v8:10972
Change-Id: Iacc84bce156053d0ac39b1a419727c93c499a8c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2612339
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72025}
2021-01-12 03:29:25 +00:00
Zhi An Ng
acbdaa4ce5 [wasm-simd] Move i64x2.bitmask out of post-mvp
Also remove some ifdefs since it is implemented on all architectures.

Bug: v8:10997
Change-Id: I06f82e2c67219a8990bdd7c78e63b1300c8f34d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620907
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72024}
2021-01-12 02:19:05 +00:00
Zhi An Ng
e14de8b986 [wasm-simd][arm] Implement saturating rounding multiply high
Removing ifdef guards since our 4 supported architectures
implement this now.

Bug: v8:10971
Change-Id: Ic0295b1492a6316df61340a38f3e6d06d8fe64ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620900
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72023}
2021-01-12 02:15:35 +00:00
Zhi An Ng
d6c4c884fc [wasm-simd][liftoff][ia32][x64] Implement i64x2.bitmask
Bug: v8:10997
Change-Id: Ic7a3848792867ef3068151eff8dbf45e628ce6c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620901
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72022}
2021-01-12 01:45:30 +00:00
Zhi An Ng
d5ba8283a2 [wasm-simd][ia32] Implement saturating rounding multiply high
Implementation is the same as x64.

Disassembly support for the new instruction, pmulhrsw, is already
supported due to the macro list.

Bug: v8:10971
Change-Id: I099c4f8c3da521006ef5e2b151626f25a5df1ed9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620898
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72021}
2021-01-12 01:44:25 +00:00
Milad Fa
c5fc192efb PPC: [wasm-simd] Prototype extended pairwise addition
Bug: v8:11086
Change-Id: Ib896020b0865c0f87cabbde254bc8af36ce705d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2623007
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72020}
2021-01-11 21:43:15 +00:00
Andrew Comminos
fbdcef31d4 [cpu-profiler] Optimize CodeMap implementation
Currently, the CodeMap utilizes double indirection into a deque for
entries in its map. Since we don't reuse CodeEntry objects, this doesn't
confer any benefits really -- avoid this step and save memory by
maintaining only a single mapping.

Bug: v8:11054
Change-Id: I2cbc188ff64dd2faa9c4c03d9892b4c8e5e68794
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617746
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#72019}
2021-01-11 20:09:55 +00:00
Andreas Haas
48ead1a858 [wasm][liftoff] Delay use counter decrement of PeekToRegister
This CL fixes a bug in the code generation for I32AtomicCompareExchange
in Liftoff on ia32. The problem is the inconsistency that
LiftoffAssembler::PeekToRegister(...) introduces to the cache state.
PeekToRegister loads the value from the value stack into a register, but
does not pop the value off the stack. When the value was already stored
in a register, the use counter of that register gets decreased, even
though the value is still on the stack.

The problem arises when this register later gets reused, which is
necessary unfortunately on ia32. When SpillRegister is called for this
register, all stack values that are stored in this register get written
to memory. SpillRegister uses the use counter of the register to detect
when the register was spilled to all stack slots that were cached by
this register. However, as described above, the value stack and the use
counter are inconsistent at that moment, so SpillRegister finishes
early and does not spill the register to all stack values, and this
causes the bug later.

With this CL the decrement of the use counter gets delayed until when
the value actually gets popped off the stack.

R=clemensb@chromium.org

Bug: chromium:1145135
Change-Id: I07cb256a7e5135dbce41b246c120650635ad2758
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2602464
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72018}
2021-01-11 19:59:34 +00:00