Commit Graph

67708 Commits

Author SHA1 Message Date
Andreas Haas
c64ce984fa [wasm][liftoff] Implement table.size
R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: I023d7f9be1d7e2211c400cc5c774c0a681c4c190
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735634
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73216}
2021-03-05 11:23:16 +00:00
Manos Koukoutos
e3acd9f8fe [wasm-gc] Implement non-nullable function tables
This adds the possibility to define non-nullable function tables of heap
types kFunc and user-defined functions. When such table is defined, it
is obligatory to provide an initializer expression after its limits.
Currently, this can only be a function reference.

Changes:
- Change WasmTableObject::raw_type to encode the whole entry type.
- Restructure call_indirect to load the signature only if needed, and
  do null checks only if needed.
- Add the requirement to provide an initializer expression for
  non-nullable tables in module-decoder.
- Rename "global initializer" -> "initializer expression" everywhere.
- Add table initialization in module-instantiate.
- Edit both the C++ and JS WasmModuleBuilder.
- Add and slightly improve tests.
- Format wasm-module-builder.js.

Bug: v8:9495
Change-Id: I7453ee7d567afd5b5fe48a4f1653513787cfe99a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732673
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73215}
2021-03-05 11:16:46 +00:00
Andreas Haas
476b527bb7 [wasm][liftoff] Implement table.fill
This CL implements table.fill in Liftoff. For that I also changed the
TurboFan implementation to call the runtime through a builtin instead of
calling the runtime function directly. This has the advantage that we
don't have to convert the parameters to Smi in the generated code.

R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: I26793509f8d44582d6a46d25d0c2fc933068f4fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735314
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73214}
2021-03-05 10:58:55 +00:00
Frank Emrich
fc7ca51882 [dict-proto] SwissNameDictionary rollout in runtime code, pt. 1
This CL is part of a series that makes SwissNameDictionary available
as a new property backing store. Currently, the flag
v8_dict_mode_prototypes allows selecting between NameDictionary and
OrderedNameDictionary as the backing store used for all dictionary
mode objects. This series of CLs changes this such that enabling the
flag causes SwissNameDictionary being used instead of
OrderedNameDictionary. The behavior for when the flag is not set
remains unchanged (= use NameDictionary).

This particular CL
a) moves two operations from ordered-hash-table.cc to
swiss-name-dictionary.cc (which were itself just copies of existing
functions, see the existing TODOs about cleaning this up).

b) adds a new getter for the SwissNameDictionary backing store,
called JSReceiver::property_dictionary_swiss.

c) contains a first wave of replacing usages of
OrderedNameDictionary with SwissNameDictionary.

Bug: v8:11388
Change-Id: Ie6b45571aee3646c0c0d3937b3c25f0f033810dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732676
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73213}
2021-03-05 10:32:15 +00:00
Jakob Kummerow
d4f31caa09 [wasm-gc][inspector] Debugging support for WasmGC
This adds support for WasmGC objects (structs/arrays) to the
inspector backend. For prettier printing, it also adds support
for reading the "type" and "field" subsections of the "name"
section in Wasm modules.

This patch includes a revert of most of commit
crrev.com/987a7f4ae45ebfc986525075277debdf73001fc2 because
types are more complicated now.

Bug: v8:7748, chromium:1177784
Change-Id: Icec52cbbb32291b0e773b40be6771a678c6ec79b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715193
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73212}
2021-03-05 10:21:35 +00:00
Ulan Degenbaev
ae9aeb5aa4 [heap] Remove snapshot-based visitation of JSObjects in the marker
Now that double unboxing is removed, the concurrent marker can directly
visit all JSObjects without snapshotting them first.

Bug: v8:11422
Change-Id: Ib5cb4d0b39fd2654f4e417a09c9497d134fea1ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732009
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73211}
2021-03-05 10:15:45 +00:00
Santiago Aboy Solanes
807807658e [csa][cleanup] Remove unneeded Unhcecked casts from T to the same T
For example, there is no need to do UncheckedCast<Object>(obj), if obj
is already of type Object.

Bug: v8:6949
Change-Id: I44278a023cb8741ead7b554569c66f412f01ffee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2737294
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73210}
2021-03-05 09:56:45 +00:00
Liu Yu
0be03022f5 [mips][wasm-simd] Remove add horiz instructions
Port: 430407cd2c

Bug: v8:6020
Change-Id: I9e4e3f21a1adc87f83ff7ebf6c157f9c453353e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2738894
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@{#73209}
2021-03-05 04:31:55 +00:00
v8-ci-autoroll-builder
3bb25afa26 Update V8 DEPS.
Rolling v8/build: d98aad9..1d395a4

Rolling v8/buildtools: 781cef0..523462a

Rolling v8/buildtools/third_party/libc++abi/trunk: 8f03866..fe29ae7

Rolling v8/third_party/aemu-linux-x64: utMThAHCm2co_NtVTIgysmvQlZ4OLWTUAedi23ThU2MC..4yn313S199CgJrH0XVuCHKiXUdTRA6xvUirpQa02vu0C

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1f50378..cdacb3b

Rolling v8/third_party/depot_tools: e0a2e12..3f58a79

Rolling v8/tools/clang: 1ab4fae..791d56c

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

Change-Id: I37bd514f8990f340f170912eab13bd87fdbc0922
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2738675
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@{#73208}
2021-03-05 04:03:35 +00:00
Shu-yu Guo
eed7206347 Reland "[ptr-cage] Reserve base registers on x64 (r14) and arm64 (x28)"
This is a reland of 0c63aa9eee

Fixes the correctness fuzzing BUILD.gn breakage.

Original change's description:
> [ptr-cage] Reserve base registers on x64 (r14) and arm64 (x28)
>
> Also add a V8_COMPRESS_POINTERS_IN_SHARED_CAGE define when pointer
> compression is enabled.
>
> This CL is to get performance numbers for reserving an extra register.
> There is no actual pointer cage yet, and the base register will always
> have the same value as the root register. The pointer decompression code
> is switched to using the base register instead of the root register.
>
> Bug: v8:11460
> Change-Id: I40bae556c2098608fb6fc193a52694e3f54754bd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716075
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73204}

TBR=rmcilroy@chromium.org,jkummerow@chromium.org,leszeks@chromium.org

Bug: v8:11460
Change-Id: Iecf6b783392a384b40ab33e0f4ce13538a8f81ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2737681
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73207}
2021-03-05 02:17:35 +00:00
Ng Zhi An
5300b26dcf Reland "[wasm-simd][liftoff] Compile double precision conversions"
This is a reland of fe00fbd963

Original change's description:
> [wasm-simd][liftoff] Compile double precision conversions
>
> I missed actually handling these instructions in liftoff-compiler, so
> even though the assembler functions were implemented for all archs, we
> weren't running them.
>
> This properly handles the instructions and a couple of fixes:
>
> - for arm64, typos in using signed instructions for unsigned Wasm ops
> - for arm, handle the case where dst == src, which leads to us
> overwriting src and then reading junk from the overwritten portions to
> convert
>
> Bug: v8:11265
> Change-Id: I7919280bdf395137e95075deb30ed815100df222
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728382
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73178}

Bug: v8:11265
Change-Id: Ib854b526e74710f03e83d5007e3a3f501363ce86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2733661
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73206}
2021-03-04 23:51:44 +00:00
Shu-yu Guo
645631f27d Revert "[ptr-cage] Reserve base registers on x64 (r14) and arm64 (x28)"
This reverts commit 0c63aa9eee.

Reason for revert: Breaking clusterfuzz builds

Original change's description:
> [ptr-cage] Reserve base registers on x64 (r14) and arm64 (x28)
>
> Also add a V8_COMPRESS_POINTERS_IN_SHARED_CAGE define when pointer
> compression is enabled.
>
> This CL is to get performance numbers for reserving an extra register.
> There is no actual pointer cage yet, and the base register will always
> have the same value as the root register. The pointer decompression code
> is switched to using the base register instead of the root register.
>
> Bug: v8:11460
> Change-Id: I40bae556c2098608fb6fc193a52694e3f54754bd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716075
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73204}

Bug: v8:11460
Change-Id: Idebf1fc6eeeda880a21d65b6f2c674fa58690bfa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2737812
Auto-Submit: Shu-yu Guo <syg@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@{#73205}
2021-03-04 23:34:06 +00:00
Shu-yu Guo
0c63aa9eee [ptr-cage] Reserve base registers on x64 (r14) and arm64 (x28)
Also add a V8_COMPRESS_POINTERS_IN_SHARED_CAGE define when pointer
compression is enabled.

This CL is to get performance numbers for reserving an extra register.
There is no actual pointer cage yet, and the base register will always
have the same value as the root register. The pointer decompression code
is switched to using the base register instead of the root register.

Bug: v8:11460
Change-Id: I40bae556c2098608fb6fc193a52694e3f54754bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2716075
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73204}
2021-03-04 23:25:54 +00:00
Milad Fa
f458cade98 PPC/s390: Reland "[wasm-simd] Remove add horiz instructions"
Port 430407cd2c

Original Commit Message:

    This is a reland of 77838343d8

    No changes in this reland, this wasn't causing the failures, see
    https://crbug.com/1163833 for the actual cause.

    Original change's description:
    > [wasm-simd] Remove add horiz instructions
    >
    > Bug: v8:6020
    > Change-Id: I0605798d03f2e9f9c3c07c49141289889a10a3b0
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727204
    > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
    > Commit-Queue: Zhi An Ng <zhin@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#73180}

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

Change-Id: I1d69a63c2394e8a703e1bcd8b18a4f9f666f03b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2737066
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73203}
2021-03-04 20:49:44 +00:00
Shu-yu Guo
81bb9cc8f8 Revert "Reland "[wasm][liftoff] Respect CallDescriptor linkage""
This reverts commit 36a7cba2d6.

Reason for revert: On suspicion of making breakpoints fail more reliably: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/41129/overview

Original change's description:
> Reland "[wasm][liftoff] Respect CallDescriptor linkage"
>
> This is a reland of 9428381103
>
> Patchset #2 fixes the Arm bug. A vpush is used to push the slot,
> so subtract kSimd128Size from the stack decrement to get padding.
>
> Original change's description:
> > [wasm][liftoff] Respect CallDescriptor linkage
> >
> > - Adds the actual stack slot location to LiftoffStackSlots::Slot.
> > - Adds SortInPushedOrder method for architectures that push
> >   parameters.
> > - Changes the LiftoffStackSlots::Construct signature to take the
> >   number of parameter slots in total, and changes implementations
> >   to insert padding when slots aren't contiguous.
> > - Changes Arm MacroAssembler::AllocateStackSpace to check the
> >   immediate value, and to be a nop when it's zero.
> >
> > Bug: v8:9198
> > Change-Id: Ibd5775dbed3a40051fa9e345556231a1c07cf4e9
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717120
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Commit-Queue: Bill Budge <bbudge@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#73191}
>
> Bug: v8:9198
> Change-Id: Iae4930e28dd7fc634e3709a5726379c6b37e5195
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735984
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73195}

Bug: v8:9198
Change-Id: I5e72a1f765eb49ec72198abd44798a6153e3dace
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2737796
Auto-Submit: Shu-yu Guo <syg@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@{#73202}
2021-03-04 20:25:06 +00:00
Milad Fa
e73c7b2199 PPC/s390: [no-wasm] Remove wasm-specific code from codegen
Port 75d7d12720

Original Commit Message:

    This removes many wasm-specific code paths from codegen, such that
    includes from src/wasm can be removed. After src/wasm is fully excluded
    from no-wasm builds, we can also clean up unused enum values, but for
    now they are still being referenced.

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

Change-Id: I009225a7e76afb31b264f79904253817ca564b57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2736516
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73201}
2021-03-04 19:40:24 +00:00
Ng Zhi An
430407cd2c Reland "[wasm-simd] Remove add horiz instructions"
This is a reland of 77838343d8

No changes in this reland, this wasn't causing the failures, see
https://crbug.com/1163833 for the actual cause.

Original change's description:
> [wasm-simd] Remove add horiz instructions
>
> Bug: v8:6020
> Change-Id: I0605798d03f2e9f9c3c07c49141289889a10a3b0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727204
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73180}

Bug: v8:6020
Change-Id: I83d59ed800bd73c81cb879b4ba3a5144045c62d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2733663
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73200}
2021-03-04 19:27:24 +00:00
Ng Zhi An
b701b3bf0c [wasm-simd][arm] Use unique registers in double precision conversions
See comment#6 and comment#8 in linked chromium bug for more details on
the register allocation behavior we are trying to workaround with this
patch.

Bug: chromium:1182985,v8:11265
Change-Id: I7d00d97aee6c17dca7bb97563e741226d8a32c6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2736956
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73199}
2021-03-04 19:19:34 +00:00
Junliang Yan
cde4dcf374 s390x: [liftoff] implement Construct
Change-Id: I21ece3823aa98a4bd662ad774aac3e44f3ae024f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2736515
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73198}
2021-03-04 17:17:54 +00:00
Justin Novosad
bc123a1fcc Add missing include to v8-fast-api-calls.h
This missing include prevents v8-fast-api-calls.h from being included in
some places in blink code.

BUG=chromium:1181349

Change-Id: Ib0678c9a380b702319bd1717fac48bdc64c9b394
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2724929
Auto-Submit: Justin Novosad <junov@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73197}
2021-03-04 16:58:04 +00:00
Junliang Yan
024d2c0604 s390x: [liftoff] implement CallC and CallNativeWasmCode
Change-Id: Id7b756cb216d034108c08374c89bffc7a0c3aaa8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2736514
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73196}
2021-03-04 16:43:54 +00:00
Bill Budge
36a7cba2d6 Reland "[wasm][liftoff] Respect CallDescriptor linkage"
This is a reland of 9428381103

Patchset #2 fixes the Arm bug. A vpush is used to push the slot,
so subtract kSimd128Size from the stack decrement to get padding.

Original change's description:
> [wasm][liftoff] Respect CallDescriptor linkage
>
> - Adds the actual stack slot location to LiftoffStackSlots::Slot.
> - Adds SortInPushedOrder method for architectures that push
>   parameters.
> - Changes the LiftoffStackSlots::Construct signature to take the
>   number of parameter slots in total, and changes implementations
>   to insert padding when slots aren't contiguous.
> - Changes Arm MacroAssembler::AllocateStackSpace to check the
>   immediate value, and to be a nop when it's zero.
>
> Bug: v8:9198
> Change-Id: Ibd5775dbed3a40051fa9e345556231a1c07cf4e9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717120
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73191}

Bug: v8:9198
Change-Id: Iae4930e28dd7fc634e3709a5726379c6b37e5195
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735984
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73195}
2021-03-04 16:37:04 +00:00
Jakob Kummerow
76a302f97d [gm.py] Fix goma detection
Now that Goma is part of depot_tools (and any stale standalone
checkouts in ~/goma are dysfunctional), update gm.py's detection
logic.
Note: this only affects new args.gn files created by gm.py. On
machines where the build is already set up, this has no effect.

Fixed: v8:11160
No-Try: true
Change-Id: I19f475a51d4345d803d49d3ad2720a0f4f6f84bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735637
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73194}
2021-03-04 15:36:36 +00:00
Jakob Kummerow
1b5c7e1550 [wasm][liftoff] Update value stack after interface calls
This refactors the way the function-body-decoder maintains
its value stack: it now always calls the respective instruction's
interface function before updating its value stack (by dropping
input values and pushing results). The benefit is that interface
functions still see the original values in the decoder.

No change in observable behavior is intended.

Change-Id: I7618d11ff16675ef29ccb246371ac4fc85733955
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732019
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73193}
2021-03-04 15:33:54 +00:00
Maya Lekova
3dbb84c5e7 Revert "[wasm][liftoff] Respect CallDescriptor linkage"
This reverts commit 9428381103.

Reason for revert: Breaks arm simulator - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm%20-%20sim/27651/overview

Original change's description:
> [wasm][liftoff] Respect CallDescriptor linkage
>
> - Adds the actual stack slot location to LiftoffStackSlots::Slot.
> - Adds SortInPushedOrder method for architectures that push
>   parameters.
> - Changes the LiftoffStackSlots::Construct signature to take the
>   number of parameter slots in total, and changes implementations
>   to insert padding when slots aren't contiguous.
> - Changes Arm MacroAssembler::AllocateStackSpace to check the
>   immediate value, and to be a nop when it's zero.
>
> Bug: v8:9198
> Change-Id: Ibd5775dbed3a40051fa9e345556231a1c07cf4e9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717120
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73191}

Bug: v8:9198
Change-Id: I59b4e84b5a54bcda65a9e96f75e5682713adbfd8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735639
Auto-Submit: Maya Lekova <mslekova@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@{#73192}
2021-03-04 15:18:05 +00:00
Bill Budge
9428381103 [wasm][liftoff] Respect CallDescriptor linkage
- Adds the actual stack slot location to LiftoffStackSlots::Slot.
- Adds SortInPushedOrder method for architectures that push
  parameters.
- Changes the LiftoffStackSlots::Construct signature to take the
  number of parameter slots in total, and changes implementations
  to insert padding when slots aren't contiguous.
- Changes Arm MacroAssembler::AllocateStackSpace to check the
  immediate value, and to be a nop when it's zero.

Bug: v8:9198
Change-Id: Ibd5775dbed3a40051fa9e345556231a1c07cf4e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717120
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73191}
2021-03-04 14:49:04 +00:00
Mythri A
51b7d3dc9d [turbofan] Dispose compilation job only on main thread
When disposing the compilation jobs, we have to update some fields
on JSFunction. Though the current implementation is safe given we only
dispose the compilation jobs when main thread is blocked, it is still
cleaner and safer to dispose of these jobs only on the main thread.
That also unifies the way we handle flushing the queues when we want
to block waiting for the pending tasks to finish or not

Basically this cl flushes the input queue before waiting for any
pending tasks to finish. This would avoid the special handling on the
background threads that dispose of these jobs when we are in the
flushing mode. This also means we don't need to keep track of
the mode anymore.

Change-Id: Icd3adbe998612159e796b2bc90486d38c420f9e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726502
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73190}
2021-03-04 14:23:35 +00:00
Clemens Backes
75d7d12720 [no-wasm] Remove wasm-specific code from codegen
This removes many wasm-specific code paths from codegen, such that
includes from src/wasm can be removed. After src/wasm is fully excluded
from no-wasm builds, we can also clean up unused enum values, but for
now they are still being referenced.

R=mslekova@chromium.org

Bug: v8:11238
Change-Id: I526ac931f023a57f70b5248befa2733ad10ce9ce
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732011
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73189}
2021-03-04 13:39:26 +00:00
Clemens Backes
69d1e2c21d Reland "[wasm][debug] Cache debugging code"
This is a reland of fab754ff56.
The lock-order inversion is fixed by putting the old code into the
surrounding WasmCodeRefScope such that it gets deleted only after
releasing the mutex.

Original change's description:
> [wasm][debug] Cache debugging code
>
> This adds a little cache for debugging code, including stepping code.
> Especially in stepping, we are currently repeatedly recompiling the same
> function, because whenever we pause (after every step) we clear
> stepping, only to reinstantiate it if the user continues stepping.
> Especially in source-level stepping this is wasteful, because stepping
> over a single line of C++ code can execute hundreds or thousands of
> steps in wasm.
>
> R=thibaudm@chromium.org
>
> Bug: chromium:1172299
> Change-Id: Id59a26cc67a5bf4a2d3cf6b1e8f14a8b1c73712c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732015
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73162}

Bug: chromium:1172299
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Change-Id: Ic2f92e2758e78dc4912021cd17267a4da563c0a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732675
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73188}
2021-03-04 13:08:26 +00:00
Maya Lekova
6fa780ffdc Revert "[sparkplug] Change bytecode offset mapping and introduce iterator."
This reverts commit a8b61ef521.

Reason for revert: Looks like it breaks GC stress bot - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/35880/overview

Original change's description:
> [sparkplug] Change bytecode offset mapping and introduce iterator.
>
> Previously, we recorded pairs of (bytecode offset, sparkplug pc) to
> create a mapping of bytecode offset <-> sparkplug pc.
> These pairs were only recorded after builtin/runtime calls.
> In preparation for deoptimizing to Sparkplug, we need a more precise
> mapping.
> With this CL, we record positions for every bytecode. Instead of storing
> a pair of (bytecode offset, sparkplug pc), we store only the pc,
> calculating the bytecode offset from the index in the mapping table.
> For easier use an iterator to access the mapping is introduced.
>
> Drive-by: Reduce sampling interval in cpu-profiler cctest to get rid of
> flaky failures.
>
> Bug: v8:11420, v8:11429
> Change-Id: I36a9171f43a574eb67880cbca6cf9ff7ab291e60
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720189
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Auto-Submit: Patrick Thier <pthier@chromium.org>
> Commit-Queue: Patrick Thier <pthier@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73186}

Bug: v8:11420
Bug: v8:11429
Change-Id: Ie71e7ce234e7b9ab9a2ec99a983e9900f35baa44
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735397
Auto-Submit: Maya Lekova <mslekova@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@{#73187}
2021-03-04 13:01:08 +00:00
pthier
a8b61ef521 [sparkplug] Change bytecode offset mapping and introduce iterator.
Previously, we recorded pairs of (bytecode offset, sparkplug pc) to
create a mapping of bytecode offset <-> sparkplug pc.
These pairs were only recorded after builtin/runtime calls.
In preparation for deoptimizing to Sparkplug, we need a more precise
mapping.
With this CL, we record positions for every bytecode. Instead of storing
a pair of (bytecode offset, sparkplug pc), we store only the pc,
calculating the bytecode offset from the index in the mapping table.
For easier use an iterator to access the mapping is introduced.

Drive-by: Reduce sampling interval in cpu-profiler cctest to get rid of
flaky failures.

Bug: v8:11420, v8:11429
Change-Id: I36a9171f43a574eb67880cbca6cf9ff7ab291e60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720189
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73186}
2021-03-04 12:30:07 +00:00
Michael Lippautz
ec741dbd7d cppgc: Rework Visitor ephemeron handling
Fixes an issue with tracing empty ephemeron values of mixin types.

Bug: chromium:1056170
Change-Id: I0089df29943ba7670ec4bdfa5592a01b0ec6de04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732025
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73185}
2021-03-04 11:30:36 +00:00
Thibaud Michaud
30dd7b462c Reland "[wasm][liftoff][eh] Implement catch_all"
This is a reland of 6e234e9d76
Fix CFI by adding a BTI instruction at the start of the handler.

Original change's description:
> [wasm][liftoff][eh] Implement catch_all
>
> Inline a catch handler after each potentially throwing call. The handler
> just merges values into the actual catch environment and then jumps to
> the catch body.
>
> This automatically adds support for unwind, which also uses the
> "CatchAll" interface method.
>
> Many tests can be written either with "catch" or with "catch_all".
> Duplicate them to get coverage for both.
>
> R=clemensb@chromium.org
>
> Bug: v8:11453
> Change-Id: I789ad44b8d1e496f026157d5c37a12004a8b37e3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726497
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73129}

Bug: v8:11453
Change-Id: I84d90877e6227a1966b6347877a9c18e213d9419
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732023
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73184}
2021-03-04 10:53:16 +00:00
Camillo Bruni
29bac13edb Revert "[api] Advance API deprecation"
This reverts commit 3ba9e86665.

Reason for revert: Breaks libfuzzer

Original change's description:
> [api] Advance API deprecation
>
> Bug: v8:11165
> Change-Id: Id1c7abec73d5dd4824c0d84c9789a8b4ea4911ac
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726513
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73156}

Bug: v8:11165
Change-Id: Ia193be7aba6fc303a9f1d6853d373787118e39e3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732024
Auto-Submit: Camillo Bruni <cbruni@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@{#73183}
2021-03-04 09:24:07 +00:00
v8-ci-autoroll-builder
8ec8518b2c Update V8 DEPS.
Rolling v8/build: 122de42..d98aad9

Rolling v8/buildtools: b60d41f..781cef0

Rolling v8/buildtools/third_party/libc++abi/trunk: 6918862..8f03866

Rolling v8/third_party/aemu-linux-x64: xxaIXDIq8jINlzwdt2TTV0PFwnzlgMri76ohrXyvF-wC..utMThAHCm2co_NtVTIgysmvQlZ4OLWTUAedi23ThU2MC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6da8f82..1f50378

Rolling v8/third_party/depot_tools: bf0766c..e0a2e12

Rolling v8/tools/clang: 6a9fd91..1ab4fae

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

Change-Id: If4bb8bdedb6b9edf1a7f7716a7227c30137a2459
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2734009
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@{#73182}
2021-03-04 03:41:55 +00:00
Shu-yu Guo
91f173aac6 Revert "[wasm-simd] Remove add horiz instructions"
This reverts commit 77838343d8.

Reason for revert: Mysterious win32 test262 failures: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32%20-%20debug/30119/overview

Original change's description:
> [wasm-simd] Remove add horiz instructions
>
> Bug: v8:6020
> Change-Id: I0605798d03f2e9f9c3c07c49141289889a10a3b0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727204
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73180}

Bug: v8:6020
Change-Id: Id1a58d7689d506b17ed04a7df67fec4003bc523d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2733662
Auto-Submit: Shu-yu Guo <syg@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@{#73181}
2021-03-04 01:36:18 +00:00
Ng Zhi An
77838343d8 [wasm-simd] Remove add horiz instructions
Bug: v8:6020
Change-Id: I0605798d03f2e9f9c3c07c49141289889a10a3b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727204
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73180}
2021-03-04 01:13:35 +00:00
Zhi An Ng
67be7dea55 Revert "[wasm-simd][liftoff] Compile double precision conversions"
This reverts commit fe00fbd963.

Reason for revert: Broke on noavx https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20debug/36175/overview

Original change's description:
> [wasm-simd][liftoff] Compile double precision conversions
>
> I missed actually handling these instructions in liftoff-compiler, so
> even though the assembler functions were implemented for all archs, we
> weren't running them.
>
> This properly handles the instructions and a couple of fixes:
>
> - for arm64, typos in using signed instructions for unsigned Wasm ops
> - for arm, handle the case where dst == src, which leads to us
> overwriting src and then reading junk from the overwritten portions to
> convert
>
> Bug: v8:11265
> Change-Id: I7919280bdf395137e95075deb30ed815100df222
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728382
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73178}

Bug: v8:11265
Change-Id: I9bce3418c5321ded38e339cd96a9e7e399190c96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2733660
Auto-Submit: Zhi An Ng <zhin@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@{#73179}
2021-03-04 00:56:17 +00:00
Ng Zhi An
fe00fbd963 [wasm-simd][liftoff] Compile double precision conversions
I missed actually handling these instructions in liftoff-compiler, so
even though the assembler functions were implemented for all archs, we
weren't running them.

This properly handles the instructions and a couple of fixes:

- for arm64, typos in using signed instructions for unsigned Wasm ops
- for arm, handle the case where dst == src, which leads to us
overwriting src and then reading junk from the overwritten portions to
convert

Bug: v8:11265
Change-Id: I7919280bdf395137e95075deb30ed815100df222
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728382
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73178}
2021-03-04 00:06:05 +00:00
Ng Zhi An
d2948ce943 [wasm-simd][ia32] Optimize pmin/pmax for AVX
We don't need DefineSameAsFirst for AVX, this can save some moves.

Bug: v8:11190
Change-Id: I301896527cbeab62636b4af744ab0d3b42094ae2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727152
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73177}
2021-03-03 22:27:15 +00:00
Ng Zhi An
6445c959c4 [wasm-simd][x64] Optimize pmin/pmax for AVX
We don't need DefineSameAsFirst for AVX, this can save some moves.

Bug: v8:9561
Change-Id: Ie30334d4a8f82d171d8048c2e02792c60b0106a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727151
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73176}
2021-03-03 21:53:35 +00:00
Milad Fa
147b01d164 PPC [simd]: Implement vector compare ops on Sim
Change-Id: Ic6d25a2fbb22a1c658bcfa9dedae0c7b5dd13794
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2733072
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73175}
2021-03-03 21:26:26 +00:00
Milad Fa
84eef254a7 PPC [simd]: Implement vector logical ops on Sim
Also introduced a new generic macro to decode vx instructions.

Change-Id: I52477213555381b401022434de2946f91558a0b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732609
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73174}
2021-03-03 19:59:15 +00:00
Ng Zhi An
439366cc03 Update wasm-js tests and wasm-spec-tests
Bug: v8:11508
Change-Id: I27c01b9069de283247cfae4f5e5bfc42ebb998a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720017
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73173}
2021-03-03 19:03:05 +00:00
Dan Elphick
a8fa6199cf [build] Improve torque explicit dependencies
Add a couple of missing dependencies to the build rules for
torque-generated files. Also add a allow_circular_includes_from
declaration to v8_initializers, so that its files can be accessed by
torque_generated_initializers which cannot depend on v8_initializers
without introducing a cycle.

This reduces the number of gn check errors with --check-generated from
10512 to 33.

Bug: v8:7330
Change-Id: I324295c639094c258b3e8e674aef6edc043fe505
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732014
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73172}
2021-03-03 18:59:05 +00:00
Ng Zhi An
c296436ed4 [wasm-simd][ia32] Optimize i8x16.swizzle with external refs
This is similar to the x64 optimization for i8x16.swizzle.

Use external refs to load the masks neded for i8x16.swizzle. Before it
would need 3 instructions (2 moves + 1 pshufd), now it requires 2 moves.
Also on AVX we can relax the dst == src requirement, which can
potentially save a move too.

Extract the code sequence into a macro-assembler function for sharing
between Liftoff and TurboFan.

Bug: v8:11346
Change-Id: Id0ec5e891595f0b0fc2922e932fc6c501eca8dc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727150
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73171}
2021-03-03 18:46:55 +00:00
Manos Koukoutos
e0bbda57e1 [turbofan] Preliminary changes to enable wasm optimizations
Changes:
- Add wasm-specific opcodes to MemoryOptimizer::CanAllocate.
- Instantiate PipelineData::{simplified_, javascript_, jsgraph_} in the
  wasm pipeline.
- In pipeline.cc, move WasmHeapStubCompilationJob below
  MemoryOptimizationPhase.
- Introduce WasmBaseOptimizationPhase, use it in the wasm pipeline.
- Add allow_singalling_nan argument to CsaEarlyOptimizationPhase and
  CsaOptimizationPhase.

Bug: v8:11510
Change-Id: I6d886a352ce0be612415f51d29860aeb6c0efcf4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726503
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73170}
2021-03-03 17:48:55 +00:00
Frank Emrich
a3ad352961 [dict-proto] TF support for constants in dictionary mode protos, pt. 1
This CL is the first in a series that implements Turbofan support for
property accesses satisfying the following conditions:
1. The holder is a dictionary mode object.
2. The holder is a prototype.
3. The access is a load.

This feature will only be enabled if the build flag
v8_dict_property_const_tracking is set.

This particular CL does the following:

a) In PropertyAccessInfo::Kind, rename kDataConstant and
kAccessorConstant to kFastDataConstant and kFastAccessorConstant,
respectively, to indicate that these kinds are used for fast mode
holders.

b) In PropertyAccessInfo::Kind, add kDictionaryProtoDataConstant and
kDictionaryProtoAccessorConstant, which will be used for dictionary
mode holders (which must also be prototypes, as stated  above).

c) Add a member dictionary_index_ to PropertyAccessInfo, which is
used by the kinds mentioned in b)

Bug: v8:11248
Change-Id: Id1c10215aab287066a9765756f112c8035141013
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718228
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73169}
2021-03-03 17:39:35 +00:00
Clemens Backes
685f25964a Revert "[wasm][debug] Cache debugging code"
This reverts commit fab754ff56.

Reason for revert: TSan failures: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20isolates/13875/overview

Original change's description:
> [wasm][debug] Cache debugging code
>
> This adds a little cache for debugging code, including stepping code.
> Especially in stepping, we are currently repeatedly recompiling the same
> function, because whenever we pause (after every step) we clear
> stepping, only to reinstantiate it if the user continues stepping.
> Especially in source-level stepping this is wasteful, because stepping
> over a single line of C++ code can execute hundreds or thousands of
> steps in wasm.
>
> R=​thibaudm@chromium.org
>
> Bug: chromium:1172299
> Change-Id: Id59a26cc67a5bf4a2d3cf6b1e8f14a8b1c73712c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732015
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73162}

Bug: chromium:1172299
Change-Id: I8fac7701e6f58012c8e17322c22f29692ee8932b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732020
Auto-Submit: Clemens Backes <clemensb@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@{#73168}
2021-03-03 17:36:06 +00:00
Omer Katz
7d69193fb2 cppgc: Populate TraceSummary in TraceEpilogue
This was missing in CppHeap which means the used_bytes counter in
EmbedderTracing was reset to 0 after every GC.

Bug: chromium:1056170
Change-Id: Iddb0aa1eff9cc354622653376c6623364e015c5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2732668
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73167}
2021-03-03 17:22:33 +00:00