Commit Graph

66833 Commits

Author SHA1 Message Date
Milad Fa
2e2fe5c6c0 PPC: [wasm-simd] Move i64x2.eq out of post mvp
Port 906b964462

Original Commit Message:

    This is merged into the proposal:
    https://github.com/WebAssembly/simd/issues/419#issuecomment-765675472.

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

Change-Id: I801c4337e2ea4671ef82cb1244b8da251d56fc2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650242
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72341}
2021-01-26 21:57:36 +00:00
Milad Fa
f111e0c572 [wasm-simd] Fix byte order when setting mask values
Multi byte values get stored on native host order when
arrays are being constructed, however as Wasm is LE enforced,
they get reversed on BE machines during simd load. This causes
incorrect values loaded into vector registers.

This CL will force mask elements to be saved in byte sizes
to eliminate endianness issues.

Change-Id: I7f2e5017664234e01fc8b51a95cdd852a418b651
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645586
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72340}
2021-01-26 21:40:24 +00:00
Ng Zhi An
4abba6d596 [wasm-simd][arm][liftoff] Implement store lane
Bug: v8:10975
Change-Id: I40b0c2c36553b44a510f8519b53195ab97f6f5a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645474
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72339}
2021-01-26 21:38:14 +00:00
Ng Zhi An
307f6dc976 [wasm-simd][arm64][liftoff] Implement store lane
Bug: v8:10975
Change-Id: I7d69b533fda8be369afe949699eea5abddda9a5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645469
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72338}
2021-01-26 19:47:10 +00:00
Junliang Yan
d70c8f4530 s390x: [liftoff] implement store op
Change-Id: I96abe7c2b2a2c988867dda3cf823f11c00ddec87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650234
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72337}
2021-01-26 19:12:40 +00:00
Ng Zhi An
173d660849 [wasm-simd][x64] Optimize i8x16.popcnt with aligned moves
movups is slower on older hardware (core2) than movaps, even if the
operand is aligned. (Not an issue on modern hardware).

Also move i8x16.splat(0x0F) to an external reference so we can load the
mask directly.

Bug: v8:11002
Change-Id: I0b01c27a142024d50b9faaa9e7bd6a1fe169e141
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643242
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72336}
2021-01-26 19:03:10 +00:00
Ng Zhi An
a6eefe14db Add regression test case for WasmCompileLazy bug
Bug: chromium:1161555
Change-Id: I449c10984a55bb43b7221d66b195552835af21a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650352
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72335}
2021-01-26 18:43:55 +00:00
Ng Zhi An
2f7505b746 [wasm-simd][ia32][liftoff] Implement store lane
Factor out the v128.load32_lane code sequence into macro-assembler functions
to be reused by Liftoff.

Bug: v8:10975
Change-Id: I9f53b5d98dfd610c4feafb087f00e6fc6dfca8d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645467
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72334}
2021-01-26 18:42:50 +00:00
Ng Zhi An
906b964462 [wasm-simd] Move i64x2.eq out of post mvp
This is merged into the proposal:
https://github.com/WebAssembly/simd/issues/419#issuecomment-765675472.

Bug: v8:11215
Change-Id: Ibe37c4f8a977ab9af1cc2dd083f1ebb88b27acfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647986
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72333}
2021-01-26 17:53:21 +00:00
Clemens Backes
1fa2b9ee63 [wasm][serialization] Publish all available units
Since publishing is sequential anyway, we can as well publish all
available units in one go. This avoids repeated locking in both the
queue and the NativeModule.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: Ie4b8914caaafd8d1e3330cb30f427aee6e571e9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644947
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72332}
2021-01-26 17:50:10 +00:00
Paolo Severini
4e9f651317 [test][turbofan] Add %ObserveNode intrinsic for node-specific tests
(Initially copied from nicohartmann@ CL
https://chromium-review.googlesource.com/c/v8/v8/+/2135631)

This CL adds a new intrinsic %ObserveNode(expr) which has noop semantics
but triggers the new NodeObserver set on the OptimizedCompilationInfo
when the node generated for expr is created or changed in any phase
(until EffectControlLinearization).

This provides the infrastructure to write reasonable unit tests that
check for the construction of or lowering to specific nodes (e.g.
depending on feedback).

When %ObserveNode(expr) is used an object of class ObserveNodeManager is
registered to every Reducer/GraphReducer and is notified by the Reducer
with all node changes. The same logic is added to classes
SimplifiedLowering/RepresentationSelector, which do not inherit from
class Reducer.

Observed Node modifications currently are:
 * The Node Operator
 * The Node type
 * Node replacements

A first use case (cctest/test-sloppy-equality.cc) is included in this CL.

Change-Id: Idc5a5e38af8b1d9a2ec5021bf821c4e4e1406220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555219
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72331}
2021-01-26 17:38:00 +00:00
Ng Zhi An
80b975620a Reland "[wasm-simd][x64] Prototype i32x4.widen_i8x16_{s,u}"
This is a reland of 5a0938e593

The fix is in instruction-selector-x64.cc, the OpParameter is a
uint8_t, I typo-ed a int8_t.

Drive-by fix to maro-assembler-x64.cc to use movaps instead of movapd.

Original change's description:
> [wasm-simd][x64] Prototype i32x4.widen_i8x16_{s,u}
>
> This prototypes i32x4.widen_i8x16_s and i32x4.widen_i8x16_u for x64. It
> uses some masks and pshufb for the widening.  These masks (3 for each
> instruction) are stored as external references.
>
> Bug: v8:11297
> Change-Id: I6c8f55426bbb44b16ed552f393762c34c2524b55
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617389
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72301}

Bug: v8:11297
Change-Id: Ie1df32bd4ef3c71532cab6f82a515f619b6a2b67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648967
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72330}
2021-01-26 17:13:00 +00:00
Clemens Backes
c5c5d1447f [wasm] Fix tier down on streaming with error
Recompilation for tier down should not be triggered if the module had a
compile error. This CL ensures that by moving the recompilation a bit
later in the async compilation, to a place where a compile error would
have been detected already. An added DCHECK would catch similar bugs
earlier (crashing instead of timing out).

R=ahaas@chromium.org

Bug: chromium:1160031
Change-Id: I7eb3d2921db0f28bb39e9ec6150fd98fd4b99089
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649028
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72329}
2021-01-26 17:00:53 +00:00
Dominik Inführ
4512066b33 [heap] Stop counting old-to-new slots in MinorMC
The number of old-to-new slots was used as a heuristic in
GetMaxConcurrency() to control the number of background jobs. The
calculation already caused a bug that was fixed in
https://crrev.com/c/2593247 and isn't used in a major mark-compact.
Reduce complexity by removing that heuristic.

Change-Id: I88989974a94230b7d6f59846f5b0cce14b4118ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649039
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72328}
2021-01-26 15:42:50 +00:00
Dan Elphick
1370b29e75 [build] Enable external flag header with defines
Due to some unusual build failures on some trybots,
v8_generate_external_defines_header was reverted to false. This turns it
back on but changes the behaviour so that defines are added to the
command line as well as to the header. Because the generated header
checks that flags that should be unset are actually unset and flags that
should be set are either unset or set to 1, this will cause build
failures on many types of mismatches, although it will not detect where a
flag is not set on the command line when it is set by the header.

If no further failures show up with this, the hybrid part can be removed
and the v8-gn.h header can stand on its own.

Bug: v8:11292, v8:11341
Change-Id: I1deeeebec58f79607e68a28f808649e884810923
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649041
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72327}
2021-01-26 15:13:30 +00:00
Clemens Backes
bce455a3f0 [wasm][serialization] Skip redundant information
Writing out the number of functions in the module is unnecessary. That
number is only used for validation when reading back the value, but only
validating that number is pretty arbitrary and does not protect against
bugs or attacks. Hence skip these two header fields.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I083075e2c8959f99690fd1478d0950a25eb7311f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644946
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72326}
2021-01-26 15:07:20 +00:00
Clemens Backes
698508e1ea [wasm] Improve performance of WasmCodeRefScope
Holding an unordered set is surprisingly inefficient for large sets.
Switching to just a vector makes e.g. deserialization of large modules
30% faster. We pay in terms of memory usage though, so if there is ever
a use case where we are storing the same code objects multiple times, we
might want do add a deduplication algorithm which cleans up the vector
every now and then.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I3983ee7f6f04ea7678b8da49fb5cec369693dbc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647260
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72325}
2021-01-26 15:04:20 +00:00
Andreas Haas
e4a9a790cc [wasm][liftoff][x64] Align frame size
The GC requires all slots in a stack frame that store a reference to be
aligned. This alignment was not provided for spill slots in OOL code.

R=thibaudm@chromium.org

Change-Id: I17492362318623aecc4c54635407d0c8badf3d36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649025
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72324}
2021-01-26 14:53:40 +00:00
Benedikt Meurer
7e2f11082b [inspector] Fix crash due to misuse of embedder fields.
The contract between V8 and Blink is that embedder fields belong to
Blink, at least when the object has two or more of them. Now we had 2-3
embedder fields used by the debug proxies and that was confusing Blink,
since it expects the first slot to hold an aligned pointer in that case
and we had a HeapObject reference stored there.

This is a quickfix, which avoids internal fields completely for the
context extension proxy (using interceptors on the prototype instead)
and changes the named proxies to store the name table under a private
symbol instead of using a second internal field.

A proper but way more involved fix is to introduce a proper instance
type here and use space in the header instead of misusing embedder
fields.

Fixed: chromium:1170283
Bug: chromium:1159402
Change-Id: I6c4bbe2fe88fef29a6b9946708588245efbbe72b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649033
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72323}
2021-01-26 14:52:30 +00:00
Clemens Backes
f30c268173 Revert "[wasm-gc] Remove abstract rtts"
This reverts commit b77deeca4b.

Reason for revert: MSVC compile fails: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20msvc/16535/overview

Original change's description:
> [wasm-gc] Remove abstract rtts
>
> In the latest wasm-gc spec, rtts of abstract types are no longer
> allowed. Consequently, canonical rtts of concrete types always have
> a depth of 0.
>
> Changes:
> - Change the immediate argument of rtts to a type index over a heap
>   type. Abstract it with TypeIndexImmediate in function body decoding.
>   This affects:
>   value_type.h, read_value_type(), decoding of relevant opcodes,
>   wasm subtyping, WasmInitExpr, consume_init_expr(), and
>   wasm-module-builder.cc.
> - In function-body-decoder-impl.h, update rtt.canon to always produce
>   an rtt of depth 0.
> - Pass a unit32_t type index over a HeapType to all rtt-related
>   utilities.
> - Remove infrastructure for abstract-type rtts from the wasm compilers,
>   setup-heap-internal.cc, roots.h, and module-instantiate.cc.
> - Remove ObjectReferenceKnowledge::rtt_is_i31. Remove related branches
>   from ref.test, ref.cast and br_on_cast implementations in the wasm
>   compilers.
> - Remove unused 'parent' field from WasmTypeInfo.
> - Make the parent argument optional in NewWasmTypeInfo, CreateStructMap,
>   and CreateArrayMap.
> - Use more convenient arguments in IsHeapSubtypeOf.
> - Update tests.
>
> Bug: v8:7748
> Change-Id: Ib45efe0741e6558c9b291fc8b4a75ae303146bdc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642248
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72321}

TBR=ulan@chromium.org,jkummerow@chromium.org,manoskouk@chromium.org

Change-Id: I2f0d97f1a34f7c81c5a97d7c37925cb84c66eea3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650206
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72322}
2021-01-26 14:46:34 +00:00
Manos Koukoutos
b77deeca4b [wasm-gc] Remove abstract rtts
In the latest wasm-gc spec, rtts of abstract types are no longer
allowed. Consequently, canonical rtts of concrete types always have
a depth of 0.

Changes:
- Change the immediate argument of rtts to a type index over a heap
  type. Abstract it with TypeIndexImmediate in function body decoding.
  This affects:
  value_type.h, read_value_type(), decoding of relevant opcodes,
  wasm subtyping, WasmInitExpr, consume_init_expr(), and
  wasm-module-builder.cc.
- In function-body-decoder-impl.h, update rtt.canon to always produce
  an rtt of depth 0.
- Pass a unit32_t type index over a HeapType to all rtt-related
  utilities.
- Remove infrastructure for abstract-type rtts from the wasm compilers,
  setup-heap-internal.cc, roots.h, and module-instantiate.cc.
- Remove ObjectReferenceKnowledge::rtt_is_i31. Remove related branches
  from ref.test, ref.cast and br_on_cast implementations in the wasm
  compilers.
- Remove unused 'parent' field from WasmTypeInfo.
- Make the parent argument optional in NewWasmTypeInfo, CreateStructMap,
  and CreateArrayMap.
- Use more convenient arguments in IsHeapSubtypeOf.
- Update tests.

Bug: v8:7748
Change-Id: Ib45efe0741e6558c9b291fc8b4a75ae303146bdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642248
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72321}
2021-01-26 13:54:09 +00:00
Pierre Langlois
4adf55a004 Reland "[diagnostics] Enable logging for --perf-prof and --ll-prof."
This is a reland of fcf28e8301

Original change's description:
> [diagnostics] Enable logging for --perf-prof and --ll-prof.
>
> Change-Id: I09722d0ce372a825dfe454583da433b38cf4de60
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647109
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Cr-Commit-Position: refs/heads/master@{#72311}

Change-Id: Ib304c42eb16000a67ecb0264e7714339e7a2bbd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649037
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#72320}
2021-01-26 13:20:59 +00:00
Pierre Langlois
28572ad078 [mac] Enable support for JSCVT in builtins.
When cross-compiling builtins, hardcode the fact that targeting MACOSX
enables JSCVT. This is useful when cross-compiling from a x86 Mac where
the compiler itself does not define __ARM_FEATURE_JSCVT for the
mksnapshot binary.

Change-Id: I2817f18de42b18f6236e5d5f26d574a0955a7557
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637228
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72319}
2021-01-26 13:18:19 +00:00
Dan Elphick
02f17a8c24 [clang-tidy] Reserve space in vectors before pushing
This reserves space in a newly several newly created vectors before
pushing a known number of elements.

Change-Id: If3ba016395e7b509ced549b57279a049125c5d7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649034
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72318}
2021-01-26 13:06:09 +00:00
Clemens Backes
e284517ba8 [wasm][serialization] Allocate code in large chunks
On most platforms, we can do a single allocation for all code. On
platforms where this is not possible (e.g. ARM64 has a 128MB code space
limit), we will at least allocate big chunks instead of one chunk per
function. This reduces overhead in {WasmCodeAllocator} for maintaining
sets of used and available code space, and reduces locking during
deserialization.

In order to know how much code space to pre-allocate, the serializer
writes out the total code space size. This is then used during
deserialization to know how much code to expect.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: If3846292544c7b6832b7a0b56357b74310f6fb23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644942
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72317}
2021-01-26 12:55:00 +00:00
Michael Achenbach
2145c6c7b3 Revert "[diagnostics] Enable logging for --perf-prof and --ll-prof."
This reverts commit fcf28e8301.

Reason for revert: Speculative revert since all gpu bots are failing:
https://ci.chromium.org/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20(NVIDIA)/13141

Original change's description:
> [diagnostics] Enable logging for --perf-prof and --ll-prof.
>
> Change-Id: I09722d0ce372a825dfe454583da433b38cf4de60
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647109
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> Cr-Commit-Position: refs/heads/master@{#72311}

TBR=cbruni@chromium.org,jgruber@chromium.org,pierre.langlois@arm.com

Change-Id: I4f0fd218b707fd8eef9e1a5319d30012e76c88fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649036
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72316}
2021-01-26 12:11:31 +00:00
Marja Hölttä
73d401b9d1 [test] Make worker related tests more fuzzable
Details: https://docs.google.com/document/d/1-Gi37Ks7rXMVVRkC_HkwGxenP7T1huQUOMrYOtkUCFk/edit?usp=sharing

Bug: v8:11340
Change-Id: Ia1d75270373a7ef2307e7ee0fd24da9ecfa27d18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643381
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72315}
2021-01-26 12:09:59 +00:00
Georg Neis
ca5da5b9e5 [cleanup] Remove unused root empty_property_cell
Change-Id: I702f8c021490f0538a98cad9a61b1dbae60fb881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649027
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72314}
2021-01-26 10:58:59 +00:00
Jakob Gruber
dda341e64e [compiler] Remove old hack for arguments adaptor frames
.. which applied to the AssemblePopArgumentsAdaptorFrame
function that no longer exists.

Drive-by: Remove unused functions in mips, mips64.

Bug: v8:11306
Change-Id: Ia47c4287a452afe0aea2be0902cb3adce15f02bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649029
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72313}
2021-01-26 10:40:59 +00:00
Thibaud Michaud
e862ced330 [codegen] Use separate fields for access mode and lane size
The same bit field (MiscField) is currently used to encode either a SIMD
lane size or a memory access mode depending on the instruction.

For now this does not conflict, but in order to support protected loads
and stores on arm64, we will need to add a protected access mode to some
SIMD instructions that already encode a lane size (kArm64LoadSplat,
kArm64LoadLane, kArm64StoreLane).

To prepare for this, use non-overlapping bits of the Misc field to
encode the two properties.

R=zhin@chromium.org
CC=ahaas@chromium.org

Bug: v8:11098
Change-Id: I2320b2be74d023429f8b8c78a5736b13f53c0399
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643390
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72312}
2021-01-26 09:47:20 +00:00
Pierre Langlois
fcf28e8301 [diagnostics] Enable logging for --perf-prof and --ll-prof.
Change-Id: I09722d0ce372a825dfe454583da433b38cf4de60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647109
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#72311}
2021-01-26 09:04:50 +00:00
Georg Neis
b7d26bda8b Revert "[test] Disable cctest/test-loop-analysis/LaEdgeMatrix2_0 on ODROID"
This reverts commit ec7e9a8dbc.

Reason for revert: failure was due to a clang bug that is fixed in
latest rolled clang.

Original change's description:
> [test] Disable cctest/test-loop-analysis/LaEdgeMatrix2_0 on ODROID
>
> Bug: chromium:1163847
> Change-Id: Iabb152cd1a5c04e2032cb1254d8b27ea081cbb27
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614427
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71952}

TBR=machenbach@chromium.org,leszeks@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:1163847
Change-Id: Iba18918e8ceab166e7d5e9751e857f13142ed583
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647153
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72310}
2021-01-26 07:09:30 +00:00
Milad Fa
5204fb6e23 PPC/s390: [wasm-simd][x64][liftoff] Implement store lane
Port 22e06c7b85

Original Commit Message:

    Factor out the code sequence into macro-assembler functions to be reused
    by Liftoff.

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

Change-Id: I94d4c8ec8a374a030918c7781b5d4a40dc29091b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648985
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72309}
2021-01-26 04:17:25 +00:00
v8-ci-autoroll-builder
7eeb08861a Update V8 DEPS.
Rolling v8/build: 710b42c..32fd3b2

Rolling v8/buildtools: 13547b9..450b6b6

Rolling v8/third_party/depot_tools: 07bd252..1076f38

Rolling v8/tools/swarming_client: 1a07271..a32a160

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

Change-Id: Iaf9a49e55a724d28bf41f9fb0d510105462af385
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649237
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@{#72308}
2021-01-26 04:16:20 +00:00
Daniel Clark
a09c076f00 [modules][api] Add version of HostImportModuleDynamically with import assertions
This change completes support for import assertions for dynamic import().

A new version of the HostImportModuleDynamically callback taking import
assertions is added to the public API. The name is very verbose; we
could consider removing the "ImportAssertions" part when the old API
is removed.

Bytecode generation is updated to pass the assertions, if present, to
Runtime_DynamicImportCall.

Isolate::RunHostImportModuleDynamicallyCallback extracts the assertions
from the options bag, filters out the assertions not present in the
list specified by the host in HostGetSupportedImportAssertions, and
sorts them by code point order of the keys per
https://tc39.es/proposal-import-assertions/#sec-import-call-runtime-semantics-evaluation.
The resulting array is passed to the host in the callback.

Bug: v8:10958
Change-Id: I931df00f954a9f9c65bff5bcf461ba1c8f11e94e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2620578
Commit-Queue: Dan Clark <daniec@microsoft.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72307}
2021-01-26 04:15:15 +00:00
Shu-yu Guo
81e7e2f437 [regexp] Implement the /d flag for RegExp indices
This CL implements the upcoming spec change:
https://github.com/tc39/proposal-regexp-match-indices/pull/49

A new JSRegExpResultWithIndices subclass is introduced with a separate map and
an extra slot for storing the indices. If /d is passed, exec() constructs a
JSRegExpResultWithIndices and eagerly builds indices.

The existing re-execution logic is removed.

Bug: v8:9548
Change-Id: Ic11853e7521017af5e8bd583c7b82bb672821132
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2616873
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72306}
2021-01-26 04:14:10 +00:00
Zhi An Ng
9dccd91c37 Revert "[wasm-simd] Merge all any_true to v128.any_true"
This reverts commit 9c09c227b0.

Reason for revert: gc stress failures https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/20563/overview

Original change's description:
> [wasm-simd] Merge all any_true to v128.any_true
>
> In https://github.com/WebAssembly/simd/pull/423, all any_true
> instructions were removed, and replaced with a single v128.any_true.
>
> This patch removes all but v8x16.any_true, and renames it to
> v128.any_true.
>
> Bug: v8:11331
> Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72304}

TBR=neis@chromium.org,gdeepti@chromium.org,neis@google.com,zhin@chromium.org

Change-Id: I52dbf8de679059dd7b17908c1fe3ada0eb54ff84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:11331
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649240
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72305}
2021-01-26 04:04:41 +00:00
Ng Zhi An
9c09c227b0 [wasm-simd] Merge all any_true to v128.any_true
In https://github.com/WebAssembly/simd/pull/423, all any_true
instructions were removed, and replaced with a single v128.any_true.

This patch removes all but v8x16.any_true, and renames it to
v128.any_true.

Bug: v8:11331
Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72304}
2021-01-25 23:26:10 +00:00
Frank Tang
c2795bd790 [intl] Implement ECMA402 PR500 Use OrdinaryHasInstance
Implement https://github.com/tc39/ecma402/pull/500

For the legacy [optional]  Unwrap*Format steps, use OrdinaryHasInstance
instead of InstanceofOperator.

ECMA402 agree w/ PR500 on 2021-1-14

Bug: v8:10981
Change-Id: Ic697aa245b11fecaf998127c009e59a821aaa01e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2444092
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72303}
2021-01-25 22:33:04 +00:00
Zhi An Ng
89ea6caf56 Revert "[wasm-simd][x64] Prototype i32x4.widen_i8x16_{s,u}"
This reverts commit 5a0938e593.

Reason for revert: Broke build https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8857098178780038608/+/steps/Check/0/logs/RunWasm_I32x4WidenI8x16S_liftoff/0

Original change's description:
> [wasm-simd][x64] Prototype i32x4.widen_i8x16_{s,u}
>
> This prototypes i32x4.widen_i8x16_s and i32x4.widen_i8x16_u for x64. It
> uses some masks and pshufb for the widening.  These masks (3 for each
> instruction) are stored as external references.
>
> Bug: v8:11297
> Change-Id: I6c8f55426bbb44b16ed552f393762c34c2524b55
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617389
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72301}

TBR=neis@chromium.org,gdeepti@chromium.org,neis@google.com,ahaas@chromium.org,zhin@chromium.org

Change-Id: I83aa2e86854e39ac6afd250fdc0dfac7cdd99e6d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:11297
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648194
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72302}
2021-01-25 22:01:15 +00:00
Ng Zhi An
5a0938e593 [wasm-simd][x64] Prototype i32x4.widen_i8x16_{s,u}
This prototypes i32x4.widen_i8x16_s and i32x4.widen_i8x16_u for x64. It
uses some masks and pshufb for the widening.  These masks (3 for each
instruction) are stored as external references.

Bug: v8:11297
Change-Id: I6c8f55426bbb44b16ed552f393762c34c2524b55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617389
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72301}
2021-01-25 21:01:54 +00:00
Ng Zhi An
22e06c7b85 [wasm-simd][x64][liftoff] Implement store lane
Factor out the code sequence into macro-assembler functions to be reused
by Liftoff.

Bug: v8:10975
Change-Id: I82e253c94e09bf62197e7de87359d0e3956d2dcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643662
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72300}
2021-01-25 20:57:34 +00:00
Daniel Clark
53cb6654ea [modules][api] Stop filtering import assertions based on list provided by the host
The change https://chromium-review.googlesource.com/c/v8/v8/+/2572173
implemented HostGetSupportedImportAssertions [1] in a fairly literal
sense, where the host supplies a list of supported import assertions
and V8 filters the import assertions in a ModuleRequest and exposes
only supported assertions via its API surface.

However, we've decided that the interop guarantees provided
by doing the filtering in V8 are probably not worth the added
complexity. Thus, this change removes the filtering. Going forward,
hosts will be expected to ignore unknown asserions received from V8.

This is mostly a revert of
https://chromium-review.googlesource.com/c/v8/v8/+/2572173, with
v8::Isolate::CreateParams::supported_import_assertions being kept
for now (since we first have to delete the Blink code that sets it),
and a new comment in v8.h instructing hosts to ignore unknown
assertions.

[1] https://tc39.es/proposal-import-assertions/#sec-hostgetsupportedimportassertions

Bug: v8:10958
Change-Id: I7e8e2a7fbfe2d5bf891805cff6c3160d0e6825cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643563
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72299}
2021-01-25 19:30:13 +00:00
Ng Zhi An
3b302d5cfe [arm64] Push the full q register before lazy compile
If a lazy compilation happens in between 2 Wasm calls, we need to save
the full Q register, since we can have live v128 values.

Bug: chromium:1161555
Change-Id: I7393d6fbf5133f635a8fd62cd394323d7018f090
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645694
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72298}
2021-01-25 19:07:24 +00:00
Ng Zhi An
3097bf785d [wasm-simd][x64] Prototype double precision conversion
Prototype these 6 instructions on x64:

- f64x2.convert_low_i32x4_s
- f64x2.convert_low_i32x4_u
- i32x4.trunc_sat_f64x2_s_zero
- i32x4.trunc_sat_f64x2_u_zero
- f32x4.demote_f64x2_zero
- f64x2.promote_low_f32x4

Some of these code sequences make use of special masks, we keep them in
external references.

Code sequence based on suggestions at:
https://github.com/WebAssembly/simd/pull/383

Bug: v8:11265
Change-Id: Ied67d7b5b6beaaccac7c179ec13504482cb9c915
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643562
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72297}
2021-01-25 19:04:14 +00:00
Clemens Backes
2777148271 [build] Introduce gn arg to disable WebAssembly
For now, that flag only avoid the installation of the 'WebAssembly'
global. Follow-up CLs will remove unneeded code from the binary if the gn
arg is not set to true.

R=ecmziegler@chromium.org, machenbach@chromium.org

Bug: v8:11238, v8:11344
Change-Id: Ie95b608ed12b0476470cb552138e369f863d249b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2646833
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72296}
2021-01-25 16:59:53 +00:00
Nico Hartmann
5d1a7c6440 [TurboFan] Optional FunctionTemplateInfo with heap access
This CL makes direct heap access consistent with the serialized mode by
correctly skipping optimizations if we encounter a FunctionTemplateInfo
that is unknown to the broker, because we haven't seen it during
serialization.

Bug: chromium:1158322
Change-Id: I10ad6f307bbd5a17f27890390179bd9e2d35418c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639958
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72295}
2021-01-25 16:36:53 +00:00
Junliang Yan
21c74f4f96 [fastcall] Store full size pointer to template data
This fixes an issue on 64-bit big endian architectures as discussed in
https://chromium-review.googlesource.com/c/v8/v8/+/2603925, where stack
slots always have the system pointer size, even with pointer compression
enabled.

Bug: chromium:1052746
Change-Id: I84030ba8bcde71cb1768bd7286314cf09c4dc640
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645721
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72294}
2021-01-25 15:49:23 +00:00
Gus Caplan
b6ba105467 [Py3] fix py3 issue in tools
Bug: v8:9871
Change-Id: I4084771cfc4d34f8e1b9d5265e115f9eac1098d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2646165
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Gus Caplan <snek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72293}
2021-01-25 15:33:53 +00:00
Ng Zhi An
b2860adf94 Fix broken link to infra-side specifications
Change-Id: Ie4b673d7f56a62528c288c4684f8cc9822277587
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461065
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72292}
2021-01-25 15:21:23 +00:00