Commit Graph

12575 Commits

Author SHA1 Message Date
Dominik Inführ
2b2e4e4267 Reland "[heap] Handle old-to-new slot promotion to shared heap"
This is a reland of commit 9cca4e60f1

This CL disables the mjsunit tests as well in single generation mode.

Original change's description:
> [heap] Handle old-to-new slot promotion to shared heap
>
> The GC might promote an in-place internalizable string from new space
> directly into the shared heap. This means that the GC might need to
> create OLD_TO_SHARED slots when updating OLD_TO_NEW slots.
>
> This CL implements this both for minor and full GCs.
>
> Bug: v8:11708
> Change-Id: I6102b9024d1dd5dd602d654b006ea5897ab5baa6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804604
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82298}

Bug: v8:11708
Change-Id: I9e96fe7c3f263d4088536d3a15af6d00fa82625e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3828099
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82540}
2022-08-17 16:39:18 +00:00
Michael Lippautz
0c9083b59e Revert "Disable failing wasm/grow-memory test on arm64 mac"
This reverts commit a362c78e16.

Reason for revert: Failure is fixed now, see bug.

Original change's description:
> Disable failing wasm/grow-memory test on arm64 mac
>
> Bug: v8:13184
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I0200ce6e7877acf06cbffd8f7edd276119278f50
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829468
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82434}

Bug: v8:13184
Change-Id: I3dbe2e710e036efcc5b6375687cfcb099091ae1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829941
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82526}
2022-08-17 14:24:54 +00:00
Qifan Pan
5c4267d52f [turbofan] Lower BigInt multiply with truncation information
Bug: v8:9407
Change-Id: Id4ca4682d3fe4b2222a656c80dff95e5c099d5ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822671
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#82524}
2022-08-17 14:22:48 +00:00
Jakob Linke
63a2836076 [maglev] Fix Sparkplug tiering in presence of Maglev
We should only tier to Sparkplug from Ignition. Previously, the
'!ActiveTierIsSparkplug' condition was correct since only Ignition (and
Sparkplug itself) entered the TieringManager. But now that Maglev is
also present, the condition must be clarified to 'ActiveTierIsIgnition'.

Bug: v8:7700
Change-Id: Ic7ea898facf9ce65407d09cead35e0181e49db31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3835562
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82519}
2022-08-17 10:06:52 +00:00
Nico Hartmann
e8b62d509b Revert "[wasm-gc] Add extern.externalize"
This reverts commit ee89a26977.

Reason for revert: Speculative revert https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64%20GC%20Stress/24078/overview

Original change's description:
> [wasm-gc] Add extern.externalize
>
> This adds `extern.externalize(ref null any): ref null extern` to wasm
> which packs wasm objects into JS objects if the js-interop flag is not set.
> This is the counterpart to extern.internalize introduced in
> 50ec8a11f2.
>
> Bug: v8:7748
> Change-Id: I67b8fe6d70b9f526ff6c43b0a4d7861c7ff5dad0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825879
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82492}

Bug: v8:7748
Change-Id: I22c84d69a1dc957208f60ae3125e80278ae739a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3832389
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@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/main@{#82495}
2022-08-16 16:18:23 +00:00
Matthias Liedtke
ee89a26977 [wasm-gc] Add extern.externalize
This adds `extern.externalize(ref null any): ref null extern` to wasm
which packs wasm objects into JS objects if the js-interop flag is not set.
This is the counterpart to extern.internalize introduced in
50ec8a11f2.

Bug: v8:7748
Change-Id: I67b8fe6d70b9f526ff6c43b0a4d7861c7ff5dad0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825879
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82492}
2022-08-16 14:43:03 +00:00
Shu-yu Guo
374a93e23a [change-array-by-copy] Implement Array.prototype.toSorted
Bug: v8:13035
Change-Id: I028f77f7dea73d56bf9df56ee06908fd01ce8a43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3830034
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82491}
2022-08-16 14:11:53 +00:00
Al Muthanna Athamina
1e8a448291 Skip mjsunit/regress/regress-1034322 on NumFuzz until bug is fixed
Bug: v8:13153
No-Try: true
Change-Id: I0436f71b5fa00f00a0ae7a30bb0a5a167994739d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3833774
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Alexander Schulze <alexschulze@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82481}
2022-08-16 09:32:12 +00:00
Lu Yahan
8140809ece [riscv] Fix wasm/generic-wrapper test failed
Enable test-gc/RunWasmLiftoff_WasmArrayCop test-gc/RunWasmLiftoff_CastsBenchmark

Change-Id: I4d67ce0ead382c2e96951098b0fdd53766e5921f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822761
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82472}
2022-08-16 06:36:17 +00:00
Nico Hartmann
a362c78e16 Disable failing wasm/grow-memory test on arm64 mac
Bug: v8:13184
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I0200ce6e7877acf06cbffd8f7edd276119278f50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829468
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82434}
2022-08-12 12:52:39 +00:00
Matthias Liedtke
50ec8a11f2 [wasm-gc] Add extern.internalize
This adds `extern.internalize(ref null extern): ref null any` to wasm
which unpacks the wrapped wasm object if the js-interop flag is not set.
I31 values are still wrapped in object wrappers and don't use SMIs.

Bug: v8:7748
Change-Id: Ie4a4507961d0ad41caf430054a3d341f474b8e66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819645
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82426}
2022-08-12 08:18:48 +00:00
Matthias Liedtke
fed595d97c [fuzzer][wasm-gc] Add types nullfuncref, nullexternref and nullref
nullfuncref = ref null nofunc
nullexternref = ref null noextern
nullref = ref null none

Bug: v8:7748
Change-Id: Ia54ac52c81bde4315e2d6819cff032cb739216c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820064
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82425}
2022-08-12 08:17:29 +00:00
Matthias Liedtke
937b5d406c [wasm-gc] Use non-generic-wrapper for anyref
This has been broken even prior to the any <-> extern split.
The code decided to use the generic wrapper for type any even though
the generic wrapper doesn't support wrapping the return value of functions
and unwrapping arguments passed to it.

Bug: v8:7748
Change-Id: I9dbb893cc4bc4f2bb789b3b3a9addd0208d526ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3826056
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82424}
2022-08-12 08:13:10 +00:00
Adam Klein
699642a6cf [mjsunit] Skip maglev/get-template-object under stress_snaphot
Bug: v8:13181
Change-Id: I8eaa84ffc408225ee28dca17607b940fd3f34977
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3826068
Commit-Queue: Adam Klein <adamk@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82414}
2022-08-12 02:07:17 +00:00
Jakob Kummerow
e441e21260 [stringrefs] Switch GC prefix decoding to LEB
So far, we decoded instructions with the 0xFB prefix as two-byte, i.e.
a single "u8" byte following the prefix.
This patch changes that to 0xFB + LEB, which is how all prefixed
instructions are supposed to do it. Currently this makes a difference
only for the stringref proposal (instructions 0x80 through 0xb3).

It has the unfortunate consequence that all stringref instructions need
three bytes for now. We expect them to go back to a two-byte encoding
scheme (while remaining LEB compliant) when their final encoding is
decided.

Bug: v8:12868
Change-Id: I603f60adae88e9b985cb65288d9eeb7f98da8138
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825887
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82400}
2022-08-11 14:07:13 +00:00
Jakob Kummerow
89567f1cf7 [test][wasm] Add regression test for crbug-1320614
Bug: chromium:1320614
Change-Id: I3cd76a105c0cd5e7d0cf089dc60cb79b07863243
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825882
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82390}
2022-08-11 10:07:19 +00:00
Jakob Kummerow
606e7022b8 Harden Isolate::InstallConditionalFeatures
This function should properly forward any exceptions it encounters,
instead of silently swallowing them. Being an API function, that
means moving them from "pending" to "scheduled" state.

Fixed: v8:13123
Change-Id: I20b0782fd806e456f14dda84100000c857481d09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825880
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82386}
2022-08-11 09:36:02 +00:00
jameslahm
a784ec8ae7 Reland "[maglev] Support LdaModuleVariable and StaModuleVariable"
This is a reland of commit 532ca59910

Fix interger overflow when result_location is invalid in
MaglevCompiler::InReturnValues.

Original change's description:
> [maglev] Support LdaModuleVariable and StaModuleVariable
>
> Bug: v8:7700
> Change-Id: I036ac71324e0c1c96a4da4aacdb5a6718726db31
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3821203
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: 王澳 <wangao.james@bytedance.com>
> Cr-Commit-Position: refs/heads/main@{#82347}

Bug: v8:7700
Change-Id: I24f56691eefd1c6cb695fedd3b5c14264bb17943
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824942
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82379}
2022-08-11 06:57:23 +00:00
Shu-yu Guo
b6d4d9be9c Reland^2 "[shared-struct] Add Atomics.Condition"
This is a reland of commit b1020a4345

Changes since revert:
- Fixed global safepoint interrupts in
https://chromium-review.googlesource.com/c/v8/v8/+/3820913

Original change's description:
> Reland "[shared-struct] Add Atomics.Condition"
>
> This is a reland of commit e2066ff6bf
>
> Changes since revert:
> - Rebased against c991852491, which
>   uses the external pointer table for the WaiterQueueNode stored
>   in the state field when compressing pointers. This relaxes
>   the alignment requirement of the state field to be 4-bytes when
>   compressing pointers.
> - Moved the state field into the JSSynchronizationPrimitive base
>   class, since alignment and padding can now be made simpler.
>
> Original change's description:
> > [shared-struct] Add Atomics.Condition
> >
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Reviewed-by: Adam Klein <adamk@chromium.org>
>
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763787
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>

Bug: v8:12547
Change-Id: Ibc6de74c7853e4ea766ff2c70f92339ba69f2675
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820901
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82368}
2022-08-11 00:12:22 +00:00
Frank Tang
3f0c44148d [Temporal] Fix ToRelativeTemporalObject
Change to use Handle<Object> instead of Handle<String>
for calendar and offset_string.

Spec text:
https://tc39.es/proposal-temporal/#sec-temporal-torelativetemporalobject

Bug: v8:11544
Change-Id: Ia9051f176e0e91a362b0c6b9edf6fea5a53ddcf2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3808256
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82363}
2022-08-10 21:30:22 +00:00
Jakob Linke
d55c644e95 [maglev] Fix leaks related to destructors and zone allocation
The zone-allocated objects, the destructor is never called. Such
objects must therefore never contain members that themselves have
non-trivial destructors, e.g. std containers.

Fix occurrences of this antipattern in Maglev.

Bug: v8:7700
Change-Id: I6892cf5203bb6e842397fd4292918b18134f97cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822672
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82358}
2022-08-10 16:59:21 +00:00
Adam Klein
e928d863f5 Revert "[maglev] Support LdaModuleVariable and StaModuleVariable"
This reverts commit 532ca59910.

Reason for revert: UBSan failures (integer overflow):
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/22615/overview

Original change's description:
> [maglev] Support LdaModuleVariable and StaModuleVariable
>
> Bug: v8:7700
> Change-Id: I036ac71324e0c1c96a4da4aacdb5a6718726db31
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3821203
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: 王澳 <wangao.james@bytedance.com>
> Cr-Commit-Position: refs/heads/main@{#82347}

Bug: v8:7700
Change-Id: Iedbcb80a2ec41f299105bb814650ec4eff30db0d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3824718
Auto-Submit: Adam Klein <adamk@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/main@{#82356}
2022-08-10 16:55:24 +00:00
jameslahm
cd6705d138 [maglev] Support CopyDataPropertiesWithExcludedPropertiesOnStack
... intrinsic.

This CL also adds stack arguments support in CallBuiltin.

Bug: v8:7700
Change-Id: I59d900414585f724c48f1557ba606f5b61cfb6da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813073
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82355}
2022-08-10 14:47:44 +00:00
Jakob Linke
0bc4b452af [maglev] Implement Maglev-to-Turbofan tiering
ML-TF tiering remains very similar to Ignition-TF tiering:

- When the interrupt budget is exhausted, enter the TieringManager
  which potentially decides to tier up and sets the appropriate
  TieringState on the FeedbackVector.
- The prologue on ML function entry recognizes the TieringState (and
  also available cached TF code) and starts compilation and/or jumps
  into optimized code.

TODOs:

- ML-to-TF OSR is not yet supported.
- ML code is no longer cached on the FeedbackVector.
- Tracing is rudimentary.
- The generated function-entry prologue is fairly large and must be
  either minimized or extracted into a builtin.
- Tiering involving Sparkplug is not entirely robust yet (Sparkplug
  code may be installed with unexpected timing).

Bug: v8:7700
Change-Id: I86b0692477f51b9967f318a4093bc874344120b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629149
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82351}
2022-08-10 14:00:53 +00:00
jameslahm
532ca59910 [maglev] Support LdaModuleVariable and StaModuleVariable
Bug: v8:7700
Change-Id: I036ac71324e0c1c96a4da4aacdb5a6718726db31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3821203
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82347}
2022-08-10 13:24:14 +00:00
jameslahm
fc4483e740 [maglev] Support LdaGlobalInsideTypeof
Bug: v8:7700
Change-Id: I92596898718a57ea9d8fbd002306aa45a8e9a549
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3821206
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82346}
2022-08-10 13:18:24 +00:00
jameslahm
96a42ce526 [web snapshot] Support BigInt
Bug: v8:11525
Change-Id: I69c08f3cc4ee6b391e462a5d49de750f34bbc8cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815487
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82345}
2022-08-10 13:15:15 +00:00
Clemens Backes
1c347f884b [wasm] Skip grow-memory test in predictable mode
Growing Wasm memory is allowed to fail nondeterministically.
I checked locally that this is indeed what is making this test fail in
--verify-predictable mode.

R=jkummerow@chromium.org

Bug: v8:13167
Change-Id: I91d21c91481ac692a9f6000be45d43d517e76cd4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822684
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82341}
2022-08-10 11:52:43 +00:00
Qifan Pan
78f8cb235a [TurboFan] Avoid temporary BigInt objects for wasm calls with i64 arguments
Bug: v8:9407
Change-Id: Id7a04bbdd795bd91a62f3984b760a7f42db96a7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3803225
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#82307}
2022-08-09 15:08:41 +00:00
Qifan Pan
25530fd6fb Reland "Reland "[TurboFan] Support BigIntMultiply""
This is a reland of commit 30ee069059

Avoid terminating from another thread in unit tests to make the termination of optimized bigint multiplication deterministic on windows

Original change's description:
> Reland "[TurboFan] Support BigIntMultiply"
>
> This is a reland of commit ccde420538
>
> Added a test case for terminating optimized bigint multiply and attached frame_state to the runtime call to provide deopt information to determine the throw location
>
> Original change's description:
> > [TurboFan] Support BigIntMultiply
> >
> > Bug: v8:9407
> > Change-Id: Iab0a4ca8dd5d83444d1addd6043a5c8e3a8577a7
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773773
> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#82140}
>
> Bug: v8:9407
> Change-Id: Ia691d758265148da1de291365d41c7c1d1f98ddd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810391
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82232}

Bug: v8:9407
Change-Id: I7d04897f4e8f260aba31dbad55ce1263406473d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819621
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82304}
2022-08-09 14:26:01 +00:00
Tobias Tebbi
c902ce585f Revert "[heap] Handle old-to-new slot promotion to shared heap"
This reverts commit 9cca4e60f1.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20debug%20-%20single%20generation/6185/overview

Original change's description:
> [heap] Handle old-to-new slot promotion to shared heap
>
> The GC might promote an in-place internalizable string from new space
> directly into the shared heap. This means that the GC might need to
> create OLD_TO_SHARED slots when updating OLD_TO_NEW slots.
>
> This CL implements this both for minor and full GCs.
>
> Bug: v8:11708
> Change-Id: I6102b9024d1dd5dd602d654b006ea5897ab5baa6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804604
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82298}

Bug: v8:11708
Change-Id: I4cfdcff22552ff92ec85497d58021e83a6e038b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3819647
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82303}
2022-08-09 13:57:21 +00:00
Dominik Inführ
9cca4e60f1 [heap] Handle old-to-new slot promotion to shared heap
The GC might promote an in-place internalizable string from new space
directly into the shared heap. This means that the GC might need to
create OLD_TO_SHARED slots when updating OLD_TO_NEW slots.

This CL implements this both for minor and full GCs.

Bug: v8:11708
Change-Id: I6102b9024d1dd5dd602d654b006ea5897ab5baa6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804604
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82298}
2022-08-09 10:20:10 +00:00
Tobias Tebbi
74d4f133d8 Revert "Reland "[shared-struct] Add Atomics.Condition""
This reverts commit b1020a4345.

Reason for revert: Causes timeout for `condition-workers`: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20debug/40516/overview

Original change's description:
> Reland "[shared-struct] Add Atomics.Condition"
>
> This is a reland of commit e2066ff6bf
>
> Changes since revert:
> - Rebased against c991852491, which
>   uses the external pointer table for the WaiterQueueNode stored
>   in the state field when compressing pointers. This relaxes
>   the alignment requirement of the state field to be 4-bytes when
>   compressing pointers.
> - Moved the state field into the JSSynchronizationPrimitive base
>   class, since alignment and padding can now be made simpler.
>
> Original change's description:
> > [shared-struct] Add Atomics.Condition
> >
> > Bug: v8:12547
> > Change-Id: Id439aef9cab3348171a23378cdd47ede5f4d7288
> > Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> > Reviewed-by: Adam Klein <adamk@chromium.org>
> > Commit-Queue: Shu-yu Guo <syg@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#81734}
>
> Bug: v8:12547
> Change-Id: I638304c3d5722c64bd04708ed4cf84863cdebb81
> Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763787
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82278}

Bug: v8:12547
Change-Id: I27c2aeb131f1b68c2240323189db88d552aa92f9
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3817187
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82292}
2022-08-09 10:12:21 +00:00
jameslahm
15aa8c589c [runtime] Invalidate TypedArraySpeciesLookupChain protector
... when setting the prototype of TypedArray constructor.

Setting the __proto__ of TypedArray constructor could change TypedArray's
@@species, thus we need to invalidate the @@species protector.

Bug: v8:13110
Change-Id: Ib3b2c88d1136965c221492ff81a26ae69533b356
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813063
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82282}
2022-08-09 05:56:41 +00:00
Lu Yahan
ccc3138e04 [riscv] Fix wasm/externref-globals-liftoff failed
Change-Id: I4671a704fc76063a64ed90c337770ec17fe8e393
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815778
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82281}
2022-08-09 03:49:23 +00:00
Lu Yahan
a271ab14af [riscv] Fix asm atomic op test case failed
Change-Id: I406d211bdac02501b1bfefdf6ebb63b97bb02e44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815774
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82279}
2022-08-09 01:24:40 +00:00
Shu-yu Guo
b1020a4345 Reland "[shared-struct] Add Atomics.Condition"
This is a reland of commit e2066ff6bf

Changes since revert:
- Rebased against c991852491, which
  uses the external pointer table for the WaiterQueueNode stored
  in the state field when compressing pointers. This relaxes
  the alignment requirement of the state field to be 4-bytes when
  compressing pointers.
- Moved the state field into the JSSynchronizationPrimitive base
  class, since alignment and padding can now be made simpler.

Original change's description:
> [shared-struct] Add Atomics.Condition
>
> Bug: v8:12547
> Change-Id: Id439aef9cab3348171a23378cdd47ede5f4d7288
> Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81734}

Bug: v8:12547
Change-Id: I638304c3d5722c64bd04708ed4cf84863cdebb81
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763787
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82278}
2022-08-09 00:22:00 +00:00
Matthias Liedtke
18105c72d1 [wasm-gc] Introduce function null type nofunc
nofunc is the abstract null type, the equivalent of none but for the
function type hierarchy.
none and nofunc (and later on noextern) all can only represent a null
value, however their nulls are distinct (as there isn't any subtype
relationship between them).

Bug: v8:7748
Change-Id: Ic5ae502cc21a581ca2e0f5abc46139435d950af9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805884
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82274}
2022-08-08 16:18:22 +00:00
jameslahm
df251e4496 [web snapshot] Add verification mode
We should verify the consistency of the objects we produced after deserializing successfully.

Bug: v8:11525
Change-Id: Ieec1aa7112ab6eda0c61a1a9ab78e86ad8352942
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813061
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82272}
2022-08-08 15:47:22 +00:00
jameslahm
518de889e5 [maglev] Support CallRuntimeForPair
Bug: v8:7700
Change-Id: Ib27a3a818189acb5c1a1f39543762b3f0fcd9d69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815485
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82269}
2022-08-08 14:29:20 +00:00
Joyee Cheung
90a39679fd [string] handle strings sliced from externalized one-byte strings
...in Runtime_StringToArray.

When a string is sliced from an externalized two-byte string that has
only one-byte chars, String::IsFlat() and
should not call ToOneByteVector() on it and instead we should use

String: :IsOneByteRepresentation() can both be true, while
FlatContent: :IsOneByte() returns false. In this case we
String: :Get() to get the individual characters.
Bug: chromium:1350270
Change-Id: I735408602072279f09b32e1997c97b2900942bdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813070
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#82268}
2022-08-08 14:28:18 +00:00
Pierre Langlois
f1d1b2f9db [baseline] Reduce jump targets behind --no-deopt-to-baseline flag.
Add a --deopt-to-baseline flag, on by default, which allows returning to
sparkplug code when deoptimizing.

However when we turn this off, no longer deoptimizing to baseline code
means we can omit marking most bytecodes as valid jump targets. Leaving
just OSR and exception handling entry points.

This reduces the baseline code size by ~18% on Arm64.

Bug: v8:13082
Change-Id: I5b5a6679465807d7fe812cb977464167efffa7ab
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_cfi_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3785006
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/main@{#82266}
2022-08-08 14:26:10 +00:00
jameslahm
752872d0c9 [runtime] Check if proxy has been revoked in ObjectToString
We could throw proxy revoked error before calling
Array.IsArray to make error message clearer.

Bug: v8:13037
Change-Id: I85055d24c833acd25791ef7a8a394955805ff3f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813065
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82251}
2022-08-08 09:37:02 +00:00
jameslahm
dc8c911ad0 [maglev] Support CallJSRuntime
Bug: v8:7700
Change-Id: Iad4b8c8187dc99e811a90f66b05d0cd9e2713ec9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815484
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#82250}
2022-08-08 09:04:51 +00:00
jameslahm
d0f83a7c2a [maglev] Support GetTemplateObject
Bug: v8:7700
Change-Id: Ifa3c78017abf8f596a7d3c96877ca035d6126c90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3815481
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82249}
2022-08-08 08:52:43 +00:00
jameslahm
28ee240b20 [maglev] Support SetPendingMessage
Bug: v8:7700
Change-Id: Ib3f799f37110ea6ba56417d868a25794abbfa08b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813071
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82245}
2022-08-08 07:38:02 +00:00
Francis McCabe
8b63cc9bde Revert "Reland "[TurboFan] Support BigIntMultiply""
This reverts commit 30ee069059.

Reason for revert: breaks something on windows: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64/47755/overview

Original change's description:
> Reland "[TurboFan] Support BigIntMultiply"
>
> This is a reland of commit ccde420538
>
> Added a test case for terminating optimized bigint multiply and attached frame_state to the runtime call to provide deopt information to determine the throw location
>
> Original change's description:
> > [TurboFan] Support BigIntMultiply
> >
> > Bug: v8:9407
> > Change-Id: Iab0a4ca8dd5d83444d1addd6043a5c8e3a8577a7
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773773
> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#82140}
>
> Bug: v8:9407
> Change-Id: Ia691d758265148da1de291365d41c7c1d1f98ddd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810391
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82232}

Bug: v8:9407
Change-Id: I006ed3770564149ae146c614c3d693de9ec29e41
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3812289
Owners-Override: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Reviewed-by: Francis McCabe <fgm@chromium.org>
Auto-Submit: Francis McCabe <fgm@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82233}
2022-08-05 16:47:39 +00:00
Qifan Pan
30ee069059 Reland "[TurboFan] Support BigIntMultiply"
This is a reland of commit ccde420538

Added a test case for terminating optimized bigint multiply and attached frame_state to the runtime call to provide deopt information to determine the throw location

Original change's description:
> [TurboFan] Support BigIntMultiply
>
> Bug: v8:9407
> Change-Id: Iab0a4ca8dd5d83444d1addd6043a5c8e3a8577a7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773773
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82140}

Bug: v8:9407
Change-Id: Ia691d758265148da1de291365d41c7c1d1f98ddd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810391
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82232}
2022-08-05 15:07:59 +00:00
Lu Yahan
942a67ca01 Reland "[riscv32] Add RISCV32 backend"
This is a reland of commit 491de34bcc

co-authors: Ji Qiu <qiuji@iscas.ac.cn>
            Alvise De Faveri Tron <elvisilde@gmail.com>
            Usman Zain <uszain@gmail.com>
            Zheng Quan <vitalyankh@gmail.com>

Original change's description:
> [riscv32] Add RISCV32 backend
>
> This very large changeset adds support for RISCV32.
>
> Bug: v8:13025
> Change-Id: Ieacc857131e6620f0fcfd7daa88a0f8d77056aa9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736732
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
> Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82053}

Bug: v8:13025
Change-Id: I220fae4b8e2679bdc111724e08817b079b373bd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807124
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82198}
2022-08-04 12:47:44 +00:00
Frank Tang
6fd503608a [Temporal] Fix test to sync with latest spec after spec change.
1. fix year value between 100 and 9999 should use 4 digit padding without '+' prefix to sync with the latest spec in
mjsunit/temporal/plain-date-time-to-json

2. Change the the toPlainDateTime to accept object with partial time fields to sync with current spect in
test/mjsunit/temporal/plain-date-to-plain-date-time.js

3. Change the test to accept input parameter type to Number instead of BigInt for Instant fromEpochSeconds and from EpochMilliseconds in
test/mjsunit/temporal/instant-from-epoch-milliseconds.js and
test/mjsunit/temporal/instant-from-epoch-seconds.js
Throw TypeError if the type is BigInt.

4. Change the return type of Instant epochSeconds and epochMilliseconds from BigInt to Number to sync with the spec in
test/mjsunit/temporal/instant-constructor.js

Spec text
https://tc39.es/proposal-temporal/#sec-temporal-padisoyear
https://tc39.es/proposal-temporal/#sec-temporal-totemporaltimerecord
https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochmilliseconds
https://tc39.es/proposal-temporal/#sec-temporal.instant.fromepochseconds
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochmilliseconds
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.epochseconds

Bug: v8:11544
Change-Id: Icd290905b65fdabbedece27e59c785635c212ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807122
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82185}
2022-08-03 23:53:24 +00:00
Frank Tang
f4a938e4a6 [Temporal] Fix bug in Plain(Date|YearMonth|MonthDay) with()
Correct the wrong parameter passing in the 3rd  PrepareTemporalFields
calls

Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.with

Bug: v8:11544
Change-Id: I8acd7059cedf6924eee36ed5cb7892b636c8c72a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807905
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82184}
2022-08-03 21:58:54 +00:00
Thibaud Michaud
29db563159 [wasm] Implement new JS Promise Integration API
Implement the WebAssembly.Function-based API.
With the old API, wrapping an import and export with JS Promise
Integration looked like:

  WebAssembly.returnPromiseOnSuspend(<wasm_export>);
  WebAssembly.suspendOnReturnedPromise(
    new WebAssembly.Function(<sig>, <js_import>));

With the new API:

  new WebAssembly.Function(<sig>, <wasm_export>, {promising: 'first'})
  new WebAssembly.Function(<sig>, <js_import>, {suspending: 'first'})

For details, see
https://github.com/WebAssembly/js-promise-integration/pull/8/files

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Iaefaac5304a038fc39283db165b637af7e48b009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804669
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82183}
2022-08-03 17:34:24 +00:00
Andreas Haas
fe53fbfca0 [wasm] Delay error messages for lazy compilation
With streaming compilation we delay the generation of errors until after
all bytes are received, so that potentially better error messages get
generated. With this CL we also delay the generation of errors in the
combination of lazy compilation and streaming compilation.

In particular, this CL does the following:
* It avoids the creation of a `DecodeFail` task in
`FinishAsyncCompileJobWithError`, which would create an error immediately before a potential name section arrived.
* It calls `CompilationStateImpl::SetError()` so that an error is
created once the stream finishes.
* It removes the return value of `ProcessFunctionBody` so that wire
bytes continue to be received even after a validation error.
* It adds an early exit to `ProcessFunctionBody` if
`CompilationStateImpl::failed()` is true, so that we don't continue
validation after the first detected error.

R=clemensb@chromium.org

Bug: v8:12852
Change-Id: Ie8c6be243a257ef62cbb29fea6b8e0c205060680
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3802691
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82181}
2022-08-03 15:43:04 +00:00
Andreas Haas
8d0c71d7c7 [wasm][lazy] Fix error message of async compilation
Async compilation with lazy compilation generated an error message that
did not include the function name. With this CL the function name now
gets included.

R=clemensb@chromium.org

Bug: v8:12852
Change-Id: Ia8aed83a2114a2c9da1367045404b20fa8554c8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804863
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82172}
2022-08-03 13:46:34 +00:00
Andreas Haas
5c7e3230ab [wasm] Force liftoff compilation after deserialization
The serialized module contains information for each function whether the
serialized code for the function exists, and whether the function has
been executed before serialization. The latter information is used to
decide if the function should get compiled eagerly after deserialization
(in case the function has been executed before serialization), or if the
function should get compiled lazily because it will probably not be
executed anytime soon.

So far this code only worked for eager compilation. When lazy compilation
was enabled, all functions would get compiled lazily after
deserialization. With this CL the behavior described above is extended to
lazy compilation.

R=clemensb@chromium.org

Bug: v8:12926
Change-Id: Ifd6f400396222105feffa472c2e8787e1358220e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807583
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82171}
2022-08-03 13:41:04 +00:00
Nico Hartmann
8851a27419 Revert "[TurboFan] Support BigIntMultiply"
This reverts commit ccde420538.

Reason for revert: Investigating performance regressions

Original change's description:
> [TurboFan] Support BigIntMultiply
>
> Bug: v8:9407
> Change-Id: Iab0a4ca8dd5d83444d1addd6043a5c8e3a8577a7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773773
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82140}

Bug: v8:9407
Change-Id: I21de9fd43df2e043b4019d2bad560329ef0971b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807584
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82168}
2022-08-03 12:54:05 +00:00
Lu Yahan
c0d5d4d60a Revert "[riscv32] Add RISCV32 backend"
This reverts commit 491de34bcc.

Reason for revert: Lose co-authors information

Original change's description:
> [riscv32] Add RISCV32 backend
>
> This very large changeset adds support for RISCV32.
>
> Bug: v8:13025
> Change-Id: Ieacc857131e6620f0fcfd7daa88a0f8d77056aa9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736732
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
> Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82053}

Bug: v8:13025
Change-Id: I6abea32c8ea43b080a938782dc643c97a123f1d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3803994
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#82163}
2022-08-03 11:20:54 +00:00
Andreas Haas
4852286284 [wasm] Add --no-wasm-lazy-compilation for tests that need it
Some tests assume that liftoff code is available immediately after
compilation. Add the `--no-wasm-lazy-compilation` flag to these tests
so that they work even after shipping lazy compilation.

R=clemensb@chromium.org

Bug: v8:12926
Change-Id: I839610221390822b90b25e1bef3ae727fa33d1ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804862
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82162}
2022-08-03 11:05:45 +00:00
jameslahm
5903aa9354 [maglev] Support JumpIfUndefinedOrNull
Bug: v8:7700
Change-Id: I36018a3323d778b8657087736e1bff70b0fdbf2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779920
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82145}
2022-08-02 15:10:13 +00:00
Qifan Pan
ccde420538 [TurboFan] Support BigIntMultiply
Bug: v8:9407
Change-Id: Iab0a4ca8dd5d83444d1addd6043a5c8e3a8577a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3773773
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82140}
2022-08-02 13:12:23 +00:00
Nico Hartmann
9f18009fa0 Revert "Fix Context PromiseHook behaviour with debugger enabled"
This reverts commit 872b7faa32.

Reason for revert: Somewhat speculative revert because of https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/39673/overview (reverting locally resolved the issue for me)

Original change's description:
> Fix Context PromiseHook behaviour with debugger enabled
>
> This is a solution for https://github.com/nodejs/node/issues/43148.
>
> Due to differences in behaviour between code with and without the debugger enabled, some promise lifecycle events were being missed and some extra ones were being added. This change resolves this and verifies the event sequence is consistent between code with and without the debugger.
>
> Change-Id: I3dabf1dceb14233226b1752083d659f1c2f97966
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779922
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82132}

Change-Id: I3e05adead5d8033906055e0741854da68aade2ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3804859
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82136}
2022-08-02 12:00:24 +00:00
Stephen Belanger
872b7faa32 Fix Context PromiseHook behaviour with debugger enabled
This is a solution for https://github.com/nodejs/node/issues/43148.

Due to differences in behaviour between code with and without the debugger enabled, some promise lifecycle events were being missed and some extra ones were being added. This change resolves this and verifies the event sequence is consistent between code with and without the debugger.

Change-Id: I3dabf1dceb14233226b1752083d659f1c2f97966
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779922
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82132}
2022-08-02 10:28:51 +00:00
Matthias Liedtke
7961bd20df [wasm-gc] Remove br_on_func & br_on_non_func op
Preparation step to remove the subtype relationship between funcref and anyref.

Bug: v8:7748
Change-Id: Ie4b29bfc4b874aaca668082018f5359d1b6e3a2e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3803226
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82125}
2022-08-02 07:41:23 +00:00
Matthias Liedtke
fb9504f31e [wasm-gc] Remove ref.is_func & ref.as_func op
Preparation step to remove the subtype relationship between funcref and anyref.

Bug: v8:7748
Change-Id: Ic2d3467addff16dc0df466234cb7ce6e573ba666
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3797829
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82111}
2022-08-01 15:26:22 +00:00
Jakob Kummerow
32217caa20 [wasm-gc][arm] Fix call_direct feedback collection
...for very large feedback vector indices.

Fixed: v8:13118
Change-Id: I38f1507ffe29e63ae58fd6436dffec7d0d610f95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791247
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82110}
2022-08-01 15:14:22 +00:00
Clemens Backes
405fa4d649 [wasm][memory64] Bump memory limit to 16GB
Bump the memory size limit of memory64 memories from 4GB to 16GB. Tests
are added for larger sizes (5GB, 16GB).

Drive-by: Improve two decoder errors to properly include the unit,
  tested by the new tests.

R=jkummerow@chromium.org

Bug: v8:10949
Change-Id: I99dfc216b9213838784214c0b65ba863831d5884
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3789507
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82105}
2022-08-01 14:26:32 +00:00
Jakob Linke
440a0829f7 [regexp] Properly consider negated character classes for desugaring
.. instead of their non-negated form.

Fixed: v8:13097
Change-Id: I6426f5bbce2dfec2bbc64346d04f3b833d17c2b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3802690
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82100}
2022-08-01 13:47:35 +00:00
Clemens Backes
d6e2554d11 [wasm] Fix memory growth near the maximum
If we grow memory (out-of-place, so only without trap handling and only
if the maximum is >1GB) and the previous size is close to the maximum,
then the minimum growth we calculate can be bigger than the allowed
maximum. In this situation, the {std::clamp} has undefined behaviour,
since the provided lower limit is bigger then the upper limit.

Thus apply {std::min} and {std::max} in an order such that {max_pages}
has precedence over {min_growth}.

R=thibaudm@chromium.org

Bug: chromium:1348335
Change-Id: I4f9e9ce10a0685892248eaf0e06ffd2e84b9a069
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793396
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82081}
2022-07-29 14:39:19 +00:00
Jakob Kummerow
2f4df8da27 [wasm-gc] Increase struct field limit to 2000
Due to popular demand.
As a necessary byproduct, this drops our former experimental in-progress
support for accessing struct fields from JS as `.field0` etc. If we need
something similar in the future, we'll have to build a new mechanism for
it that scales to >1020 fields.

Bug: v8:7748
Change-Id: I08b2051bd9f76cf7128f3d4c74910ca891c38130
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793616
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82079}
2022-07-29 13:36:59 +00:00
Clemens Backes
9a7e151f6b [wasm][test] Clean up grow-memory tests
Call test functions immediately, and make them print their name before
execution.

R=thibaudm@chromium.org

Change-Id: I2057e2b3c2032c342a86705dbda8992aa54493e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793612
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82077}
2022-07-29 13:07:59 +00:00
Manos Koukoutos
d2c75d321e [wasm-gc] Disallow new_default with immutable fields
This is required by the MVP spec. In the future, it might be possible
to pass values for any immutable fields.

Bug: v8:7748
Change-Id: Ie7705b48e9d6ebb87d5e1b0a2a10556302395db6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793383
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82072}
2022-07-29 12:03:29 +00:00
Manos Koukoutos
4f0ef8c31d [wasm] Use isorecursive canonical types for call_indirect
Currently, we canonicalize types for call_indirect by looking in the
current module for a signature of the same shape. This is not enough
as of wasm-gc. Instead, the canonical identifier representing a type
has to be computed via isorecursive canonicalization.
This change is implemented behind a flag for now.
Future work: Also integrate export wrappers with isorecursive
canonical types. We need to store wrappers in instance-independent
storage.

Drive-by:
- Always emit type check for call_indirect. We did not emit a check
  only when typed-function-references was enabled, but not gc. This
  is not something that will be possible long-term.
- Fix some wasm cctests.

Bug: v8:7748
Change-Id: I7cced187009ac148c833dff5e720a8bb9a717e68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784600
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82064}
2022-07-29 08:55:49 +00:00
Lu Yahan
491de34bcc [riscv32] Add RISCV32 backend
This very large changeset adds support for RISCV32.

Bug: v8:13025
Change-Id: Ieacc857131e6620f0fcfd7daa88a0f8d77056aa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736732
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82053}
2022-07-29 00:59:06 +00:00
Manos Koukoutos
387dfe27eb [wasm-gc] All type shorthands should be nullable
arrayref, dataref and i31ref get changed to (ref null t).

Bug: v8:7748
Change-Id: Iae0e6969a1f71ccf1f193c267d761b7a1796f67b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788093
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82048}
2022-07-28 17:11:45 +00:00
Marja Hölttä
0d0e73e61c [rab/gsab] Fix error handling in GetDerivedRabGsabMap
It was delegating to GetDerivedMap but not handling the possible
error coming from it.

Bug: v8:11111,chromium:1347722
Change-Id: I348ed721281d8edd324f0e364d8ed45602cb9f54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3791063
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82046}
2022-07-28 17:04:01 +00:00
Victor Gomes
5f2d828274 [maglev] Support GetNamedPropertyFromSuper
Bug: v8:7700
Change-Id: Id5fddd337635b2932bb1ab0609db38ecc72d95b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3790961
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82042}
2022-07-28 15:04:55 +00:00
Matthias Liedtke
9c73f61ada [wasm-gc] Split any and extern type
Bug: v8:7748
Change-Id: Ifd4caec2015894f736dd94356298f6ee35ac852b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779911
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82035}
2022-07-28 13:09:55 +00:00
Marja Hölttä
602960f8ea Reland [rab/gsab] Fix accessing raw byte length
Now with smaller repro

Bug: v8:11111,chromium:1347721
Change-Id: I637d85e91249aa8eb433f6e00e4fd385d5b950ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3789519
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82022}
2022-07-28 10:45:22 +00:00
Thibaud Michaud
b8fe2724fc Reland "[wasm] Materialize suspender in JS-to-wasm wrapper"
This is a reland of commit 8cb027531c

Original change's description:
> [wasm] Materialize suspender in JS-to-wasm wrapper
>
> Instead of creating the Suspender object in JS and passing it to the
> stack-switching js-to-wasm wrapper, the wrapper now automatically
> creates the Suspender object and forwards it as an extra parameter to
> the wasm function. See:
> https://github.com/WebAssembly/js-promise-integration/pull/1/files
>
> R=ahaas@chromium.org
>
> Bug: v8:12191
> Change-Id: I2badee823f4223a293632f93e7e59f24c49d0820
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779688
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81890}

Bug: v8:12191
Change-Id: Iea233e30aa269279d2fe17f5230c87285c33e232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780817
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82009}
2022-07-27 14:42:13 +00:00
Leszek Swirski
d0a0d1bce5 Revert "[rab/gsab] Fix accessing raw byte length"
This reverts commit fb19bc369b.

Reason for revert: Test is flaky (see https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8807487788813571761/+/u/Check_-_isolates__flakes_/regress-crbug-1347721)

Original change's description:
> [rab/gsab] Fix accessing raw byte length
>
> Bug: v8:11111,chromium:1347721
> Change-Id: Idff4256f6720841ca4dee8f691babe7245277046
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782812
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Auto-Submit: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81995}

Bug: v8:11111,chromium:1347721
Change-Id: Ib29bd8fad1227acb21c79378c71ed081ba8b4914
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3789505
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82007}
2022-07-27 14:36:08 +00:00
Marja Hölttä
fb19bc369b [rab/gsab] Fix accessing raw byte length
Bug: v8:11111,chromium:1347721
Change-Id: Idff4256f6720841ca4dee8f691babe7245277046
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782812
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81995}
2022-07-27 10:36:28 +00:00
Camillo Bruni
64aeabbc95 [tools][profile] Add support for maglev optimisation markers
Drive-by-fix:
- Rename baseline to sparkplug for consistency
- Add request timeouts for the local symbol server
- Add script to start a local symbol server
- Fix -h/--help support for linux-perf-chrome-renderer-cmd.sh

Change-Id: I4c2fc3595d672871f20fc5c4065ba45e801a1111
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3769699
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81992}
2022-07-27 08:48:25 +00:00
Shu-yu Guo
3767ca8be5 [change-array-by-copy] Remove TypedArray.prototype.toSpliced
Normative update from
https://github.com/tc39/proposal-change-array-by-copy/issues/88

Bug: v8:13035
Change-Id: I939cebc13b4ab3cafbfb96a45d93b50453fd07e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3785282
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81989}
2022-07-27 07:51:12 +00:00
Thibaud Michaud
2623097138 [wasm][eh] Handle exceptions during value encoding
Handle the case where getting a value in the iterable object that
encodes the values throws an exception.

R=ahaas@chromium.org

Bug: chromium:1347073
Change-Id: Ie660ab04148d5fd3508397ae6e08130496f61b74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3788097
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81974}
2022-07-26 15:47:37 +00:00
Manos Koukoutos
cb5c1b8a1f [wasm-gc] Implement table-with-initializer encoding
See https://github.com/WebAssembly/function-references/pull/65.

Drive-by: Lower gc nodes also if typed-funcref is enabled.

Bug: v8:9495
Change-Id: I19cb67cdbdedae24b9460bc7d5b280a21a946b21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3784590
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81956}
2022-07-26 09:45:08 +00:00
Michael Achenbach
4af624591b [test] Skip flaky test
No-Try: true
Bug: v8:13107
Change-Id: I18ed93605594c7d2baba6fb744439df0eb4cb3ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3785146
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81940}
2022-07-25 16:54:56 +00:00
Matthias Liedtke
48ae9bb6c9 [wasm-gc] Remove obsolete RTT statements from internal processing
This is a follow up to Iadf73c294904ec20cefe1053a2969aa1dbb91a39.

Bug: v8:7748
Change-Id: I59390b8c82c4ebed58f2d3130cd9b1578bffdd4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780535
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Cr-Commit-Position: refs/heads/main@{#81908}
2022-07-25 08:19:36 +00:00
Paolo Severini
ccf308a08d [fastcall] Harden function AddAllSequenceSlowCallback
Make sure AddAllSequenceSlowCallback works on arrays where some
elements cannot be accessed.

Bug: chromium:1338877
Change-Id: Icdf61a305fb208a91832d03ebc47201d8941e41a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3778410
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81896}
2022-07-22 17:43:12 +00:00
Shu-yu Guo
73812f968e Revert "[heap] Filter new test for single generation mode"
This reverts commit edbe337397.

Reason for revert: Breaking presubmit
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8807931292038216513/+/u/Presubmit/stdout

/b/s/w/ir/cache/builder/v8/test/mjsunit/mjsunit.status: Error: missing file for mjsunit test wasm/stack-switching-export


Original change's description:
> [heap] Filter new test for single generation mode
>
> R=​dinfuehr@chromium.org
>
> Bug: v8:11644, v8:12191
> Change-Id: I60c6426851bb46510ec0b0df132e460bed6d6e80
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782801
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81893}

Bug: v8:11644, v8:12191
Change-Id: I52caf104ed3f13bb03dbeb009199c67e34b63732
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782199
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81895}
2022-07-22 15:38:27 +00:00
Thibaud Michaud
edbe337397 [heap] Filter new test for single generation mode
R=dinfuehr@chromium.org

Bug: v8:11644, v8:12191
Change-Id: I60c6426851bb46510ec0b0df132e460bed6d6e80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782801
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81893}
2022-07-22 14:05:42 +00:00
Nico Hartmann
14262e04d8 Revert "[wasm] Materialize suspender in JS-to-wasm wrapper"
This reverts commit 8cb027531c.

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

Original change's description:
> [wasm] Materialize suspender in JS-to-wasm wrapper
>
> Instead of creating the Suspender object in JS and passing it to the
> stack-switching js-to-wasm wrapper, the wrapper now automatically
> creates the Suspender object and forwards it as an extra parameter to
> the wasm function. See:
> https://github.com/WebAssembly/js-promise-integration/pull/1/files
>
> R=​ahaas@chromium.org
>
> Bug: v8:12191
> Change-Id: I2badee823f4223a293632f93e7e59f24c49d0820
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779688
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81890}

Bug: v8:12191
Change-Id: Id22ed357e3a59bd1569687eadbc9b007d3da995c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780816
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81891}
2022-07-22 14:02:18 +00:00
Thibaud Michaud
8cb027531c [wasm] Materialize suspender in JS-to-wasm wrapper
Instead of creating the Suspender object in JS and passing it to the
stack-switching js-to-wasm wrapper, the wrapper now automatically
creates the Suspender object and forwards it as an extra parameter to
the wasm function. See:
https://github.com/WebAssembly/js-promise-integration/pull/1/files

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: I2badee823f4223a293632f93e7e59f24c49d0820
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779688
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81890}
2022-07-22 12:23:01 +00:00
Matthias Liedtke
86da4f8f60 [test][wasm-gc] remove remaining rtt canon tests
Bug: v8:7748
Change-Id: I067e9d6a56dd58dbd0f45607f62b5ef36c69ff6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776690
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Cr-Commit-Position: refs/heads/main@{#81888}
2022-07-22 11:39:21 +00:00
Divy Srivastava
376813dfeb [fastcall] Implement support for Uint8Array arguments
This CL adds Uint8Array as supported arguments for fast API calls.
It introduces a kUint8 variant to CTypeInfo for use with TypedArrays
only.

Bug: v8:13080
Change-Id: Ie65206078a18acabaafa9c95793f400b8e95373d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3767098
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81886}
2022-07-22 09:05:41 +00:00
Thibaud Michaud
62b4d3c13d [wasm] Fix ReturnPromiseOnSuspend frame visiting
Add a test where the GC gets called during parameter conversion, and fix
two related issues:
- Reorder spilled references so that they are at the top of the stack
  before the builtin call
- Add the missing frame marker on the new stack

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: I3f68c675123c726543df6942d110fe06bc6c0efb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780530
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81873}
2022-07-21 16:12:51 +00:00
Manos Koukoutos
af39b32154 [wasm-gc] Remove nominal types
Some tests and testing infrastructure had to be changed because it
relied on nominal types.
Drive-by: Support function supertypes in wasm-module-builder.js.

Bug: v8:7748
Change-Id: Ife92431d1842ff9de91e296a50421aa48f02c0de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776197
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81862}
2022-07-21 09:13:12 +00:00
Dominik Inführ
aee4f59521 [heap] Add thread-safe shared barrier for code objects
In order to make the shared code write barrier thread-safe, we simply
lock the page mutex when appending to the typed_slot_set. We can later
improve this when performance isn't good enough.

Bug: v8:13018
Change-Id: I5e12f83f459f8976c22ec488cfa9b6f16d4a8a8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763867
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81855}
2022-07-20 14:12:45 +00:00
Matthias Liedtke
b9768c0d53 [test][wasm-gc] replace remaining new and cast instructions using rtt
Bug: v8:7748
Change-Id: I09e9d919751945e99e0178168358a3f269fa34a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776679
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81850}
2022-07-20 12:21:15 +00:00
Manos Koukoutos
cd0c116e3b [stringrefs][test] Use regexes in error messages
This way we make tests more flexible wrt. future changes, especially
when it comes to module offsets.

Bug: v8:12868
Change-Id: Ie99806603603e5c731c61267469b14f81c88ffac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776195
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81846}
2022-07-20 10:02:30 +00:00
Maya Lekova
ef5934792f [fastcall] Fix UB when floating point test argument is OOB
This CL hardens a test to avoid static_cast-ing doubles that don't fit
into the 32-bit integer range.

Bug: chromium:1344965
Change-Id: I1f3a05800158cda9dc582bfa4427516932db9679
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776337
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81843}
2022-07-20 08:56:47 +00:00
Matthias Liedtke
81bd4a559b [test][wasm-gc] Replace ref.(cast|test) usages with static variant
Bug: v8:7748
Change-Id: Iec95162ec86a0d96fdd64764864604fc3e26cc39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3771902
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Cr-Commit-Position: refs/heads/main@{#81821}
2022-07-19 16:18:41 +00:00
Thibaud Michaud
5c02c29097 [wasm] Drop suspender param in wasm-to-JS wrapper
The suspender is only needed by the wrapper, do not forward it to the JS
import.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Id8e9a820491588b40fffb5dfd8706e85a16b8b23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3768410
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81818}
2022-07-19 15:43:31 +00:00
Jakob Kummerow
d4a4d69cca [tools][wasm] wami: full-module annotated hex dump
This adds a bunch of tracing hooks to the module decoder and uses
them to support "annotated hexdump" output for full modules in wami:

$ out/x64.release/wami my_module.wasm --full-hexdump

Change-Id: I5821d940b5ec236df9708eecd0124172d8893ffd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3754741
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81791}
2022-07-18 19:43:53 +00:00
Matthias Liedtke
e43a5f0ee2 [test][wasm-gc] Replace (array|struct).new_[default_]with_rtt
Bug: v8:7748
Change-Id: Ib8fadc272178fb0d49f7d5fab7d1953e2328a1ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3770107
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81787}
2022-07-18 16:35:53 +00:00
Marja Hölttä
090156f8ad [rab/gsab] Tests for Array.p methods, part 16
In this part: at

Drive-by: test helper cleanup

Bug: v8:11111
Change-Id: I760d0c4ee078c397c8a8365ec96101b488986d41
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764344
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81774}
2022-07-18 11:29:52 +00:00
Matthias Liedtke
1b866e6153 [wasm-gc][turbofan] Use none type in reducers enabling further optimizations
Bug: v8:7748
Change-Id: Ie39a12097f287e0eaf7e3f6c0072dd4cd5a40457
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3764347
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@google.com>
Commit-Queue: Matthias Liedtke <mliedtke@google.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81773}
2022-07-18 11:19:33 +00:00
Liviu Rau
b3477fdd01 [test] Refactor testrunner (4)
- Removed duplication and unnecessary indirection from all suites testcfgs.
 - Introduced a more comprehensive context to cover both command context and other platform specific concerns.
 - Propagated above context to TestLoader to allow for test counting command execution on all platforms.
 - Wrapped original pool with another class to give it a new interface and allow injecting different implementations in the future.
 - Consolidated progress indicators under a single processor in the pipeline.
 - Consolidated result retention requirements calculation outside of pipeline chain.
 - Refactored LoaderProc and got it under tests.
 - Added some more tests for the standard runner.
 - Extracted BuildConfig class.


Bug: v8:12785
Change-Id: I87be040e91f792a983662bb5a10d55b36a14ea7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3701595
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81770}
2022-07-18 09:52:24 +00:00
Shu-yu Guo
88e538179e [turbofan] Don't inline DataView#byte{Length,Offset} without detach protector
Currently the same reduction is used for both TypedArray's and
DataView's byte{Length,Offset} accessors. But their behavior differ on
detached buffers: TypedArray returns 0 while DataView throw.

Do not do the optimization for DataViews if we can't depend on the
detach protector.

Bug: chromium:1344549
Change-Id: I38b533a62f756869380cb5c19fe254e03979e81a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763785
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81754}
2022-07-15 14:55:16 +00:00
Jakob Kummerow
2d4f043aae [stringrefs][test] Speed up stringrefs-exec test
By about 10x-20x depending on platform and configuration.
Shorter test strings make the set of all possible substrings
considerably smaller.

Fixed: v8:13074
Bug: v8:12868
Change-Id: I46ae94fbcba43080d06b1b825feae6b2acf819d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763861
Reviewed-by: Andy Wingo <wingo@igalia.com>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81753}
2022-07-15 13:49:43 +00:00
Marja Hölttä
b06c215b9c [rab/gsab] Tests for Array.p methods, part 15
In this part: every, some

Bug: v8:11111
Change-Id: I2fbaf352606a47b7e6b0708589775656b83366c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762572
Commit-Queue: Marja Hölttä <marja@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81740}
2022-07-15 06:25:20 +00:00
Marja Hölttä
e501a2b162 [rab/gsab] Tests for Array.p methods, part 14
In this part: map

Bug: v8:11111
Change-Id: I1fa9aa7ca78e8023242e75b61e8ec6b1902ccd84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762571
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81739}
2022-07-15 06:12:39 +00:00
Adam Klein
47207c262e Revert "[shared-struct] Add Atomics.Condition"
This reverts commit e2066ff6bf.

Reason for revert: fails tests on GC stress bot:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/42868/overview

Original change's description:
> [shared-struct] Add Atomics.Condition
>
> Bug: v8:12547
> Change-Id: Id439aef9cab3348171a23378cdd47ede5f4d7288
> Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81734}

Bug: v8:12547
Change-Id: I237b744e5be8725cbe41ca73076d951018ca80a0
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763784
Auto-Submit: Adam Klein <adamk@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/main@{#81735}
2022-07-15 00:00:19 +00:00
Shu-yu Guo
e2066ff6bf [shared-struct] Add Atomics.Condition
Bug: v8:12547
Change-Id: Id439aef9cab3348171a23378cdd47ede5f4d7288
Cq-Include-Trybots: luci.v8.try:v8_linux_arm64_rel_ng,v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630350
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81734}
2022-07-14 22:08:21 +00:00
Adam Klein
8fd659eedc Skip mjsunit/compiler/inlined-call-polymorphic under stress_concurrent_inlining
It's flaky in that config, and the failures are not considered actionable.

Bug: v8:12267
Change-Id: Ibc020cd7d28ddda431ec5f79f3c1952a14ffbfa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763582
Auto-Submit: Adam Klein <adamk@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/main@{#81728}
2022-07-14 18:30:39 +00:00
Dominik Inführ
87b54ebabb [heap] Delete skipped test
Test was already skipped for quite some time.

Bug: v8:8169
Change-Id: I1cb4f024e43a42c48b425ad0c713fb85bbfb2354
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3762580
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81727}
2022-07-14 17:45:20 +00:00
Michael Achenbach
0be6542ce7 [test] Skip slow tests
Also bump shards on a slow builder.

No-Try: true
Bug: v8:13074
Change-Id: I07131c53d1d632886039e811de38961dd4eb5752
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760458
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81716}
2022-07-14 07:56:25 +00:00
Marja Hölttä
07add52168 [rab/gsab] Tests for Array.p methods, part 13
In this part: filter

Bug: v8:11111
Change-Id: I8ca08e94ad2ab56605e9a32ba52de426f8100da8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758213
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81713}
2022-07-14 06:38:34 +00:00
Marja Hölttä
f20e4e71a2 [rab/gsab] Tests for Array.p methods, part 12
In this part: forEach, reduce, reduceRight + missing tests for includes

Bug: v8:11111
Change-Id: I3586d56655bd65c054e0933816f5331d5a8d1860
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758210
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81712}
2022-07-14 06:34:35 +00:00
Shu-yu Guo
6c4b2e0ef2 [shared-struct] Fix unlocking in JSAtomicsMutex
Errors in the callback were not correctly unlocking the mutex, oops.

Bug: v8:12547
Change-Id: If44ebc023b8192605c9f29bfd4099a197110f5c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760986
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81708}
2022-07-14 01:03:57 +00:00
Michael Achenbach
1defafa494 [test] Increase shards for slow tests
To prevent timeouts on arm64-sim debug and gc-stress builder. Also
skip a very slow test on the arm64-sim gc-stress builder.

No-Try: true
Change-Id: I7d275aa893dbe4942b4d41c6e83d9b9e6f861a33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760455
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81704}
2022-07-13 21:13:54 +00:00
Shu-yu Guo
7ccbd7bed8 [rab/gsab] Do not Reallocate 0-lengthed ArrayBuffers
Bug: chromium:1344014
Change-Id: I5009af963d95d96f70785593664a1145ad20c97d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760975
Reviewed-by: Adam Klein <adamk@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81701}
2022-07-13 19:06:34 +00:00
Jakob Kummerow
1609ffa8b3 [wasm-gc] Fix endless loop in WasmGCOperatorReducer
When the control-flow aware type of a Node doesn't actually change,
then we shouldn't claim that it did (which causes later re-visiting
of the node).

Fixed: v8:13061
Change-Id: I064cedf3721a79844bfc36ad3142428bdfbaf891
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3760675
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81700}
2022-07-13 16:46:14 +00:00
Marja Hölttä
ce18b115c2 [rab/gsab] Decommit the memory whenever possible
Bug: v8:11111
Change-Id: Ic07628bcf6018ea9814a38a0dab3667a7d8f0d69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755145
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81697}
2022-07-13 16:14:44 +00:00
Andy Wingo
74289c46bb [stringrefs] Implement stringview_iter.slice
Feature complete!

Bug: v8:12868
Change-Id: I7727071bdd062a6dae26206a65080f675ef7ee93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3758226
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81694}
2022-07-13 15:26:14 +00:00
Andy Wingo
77425d0a3e [stringrefs] Implement stringview_iter.advance, stringview_iter.rewind
Bug: v8:12868
Change-Id: I2e4a1733876a817dca36e0134ba4b7549f0cf4b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757886
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81693}
2022-07-13 14:12:04 +00:00
Andy Wingo
994b64148e [stringrefs] Implement string.as_iter, stringview_iter.next
Bug: v8:12868
Change-Id: Ice7134d0ad5efddb85420543ea785253791d0258
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757885
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81692}
2022-07-13 14:03:24 +00:00
Samuel Groß
e5b9fae45d Disable wasm/shared-memory-worker-gc-stress test when TSAN is enabled
TSAN may cause the sandbox to fail to obtain enough virtual address
space during initialization, thereby causing it to fall back to a
smaller backing reservation. This may then in turn cause future
WebAssembly.Memory allocations to fail.

Bug: v8:12980
Change-Id: I812ee02c5421153f1ea3b6bc371c72bc1da406a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757897
Commit-Queue: Samuel Groß <saelo@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81686}
2022-07-13 10:55:53 +00:00
Leszek Swirski
c906eec72a [maglev] Support CreateClosure
Bug: v8:7700
Change-Id: Iacdb0ecd04d7b50d7dd623feb8646c89cc4016ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757884
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81683}
2022-07-13 09:48:49 +00:00
Camillo
67c951fa12 Reland "[maglev] Add internalized string compare fast-path"
This is a reland of commit c4301c0489:
- Fix thin string in string-compare.js with low gc interval

Original change:
- Rename TryBuildCompareOperationBranch to TryBuildCompareOperation
- Add CheckedInternalizedString conversion Node that checks for string
  inputs and extracts internalised Strings from ThinStrings
- Add BranchIfReferenceCompare Node
- Add runtime functions to create internalised and thin Strings
- Add deopt check to test/mjsunit/maglev/int32-branch.js

Bug: v8:7700
Change-Id: I9221253f6bbeef12297419495c6eaf5096e06278
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755152
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81680}
2022-07-13 09:08:58 +00:00
Marja Hölttä
1e7e85306a [rab/gsab] Tests for Array.p methods, part 11
In this part: join, toLocaleString

Bug: v8:11111
Change-Id: I66ba85c33aae61a86e162352adb2d4bcf0dbac12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757333
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81679}
2022-07-13 06:58:17 +00:00
Marja Hölttä
0c75b8136b [rab/gsab] Tests for Array.p methods, part 10
In this part: Array.from

Bug: v8:11111
Change-Id: I266126e5b6bf217b49bb87b3a744443f5a5c1b2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755137
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81678}
2022-07-13 06:17:59 +00:00
Frank Tang
f593e43a0c [Temporal] Add since/until to PlainDate/PlainTime/PlainYearMonth
Change temporal::ToTemporalTime to use default argument value
Fix negative float division bug in BalanceTime

Also implement:
DifferenceTemporalPlainDate, DifferenceTemporalPlainYearMonth and DifferenceTemporalPlainTime

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplaindate
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplaintime
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalplainyearmonth


Bug: v8:11544
Change-Id: Ic717c69f4e399bc0ed4aaaaff4578cb329223205
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3741000
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81672}
2022-07-12 19:18:28 +00:00
Shu-yu Guo
6387763c67 [rab/gsab] Implement ArrayBuffer.prototype.transfer
Bug: v8:11111
Change-Id: I5174d1ef9225d603850aa25e65484fe9ee06317a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3750323
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81671}
2022-07-12 19:16:58 +00:00
Andy Wingo
8eb07e4916 [stringrefs] Implement stringview_wtf8.slice
Bug: v8:12868
Change-Id: I93595dfc168b6e4702b67bdd7355a1f7c18caa46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3757332
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81669}
2022-07-12 16:54:08 +00:00
Andy Wingo
e8610ab883 [stringrefs] Implement stringview_wtf8.encode
Bug: v8:12868
Change-Id: I714fffec248114a7ff61479f122a7df538e8e8d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755140
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81666}
2022-07-12 15:07:58 +00:00
Patrick Thier
1895e44d83 [string] Ensure ThinString's don't have a forwarding index
With the flag --always-use-forwarding-table we could end up turning a
String into a ThinString that had a forwarding index set.
This could happen when a String with a forwarding index is externalized.

Bug: chromium:1337469
Change-Id: Iea05586f61e2b78d83d04d5d2e94c4dca2892c1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735164
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81660}
2022-07-12 08:57:31 +00:00
Marja Hölttä
d385d4116b [rab/gsab] Tests for Array.p methods, part 9
In this part: splice, flat, flatMap

Bug: v8:11111
Change-Id: Ide06c1137c6b4def70d09d479cfbedfb2d7c8450
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3755106
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81657}
2022-07-12 06:40:19 +00:00
Thibaud Michaud
ff44012623 [wasm] Move Suspender functions to WebAssembly
Suspender.{returnPromiseOnSuspend,suspendOnReturnedPromise}
are not tied to a specific suspender anymore, so move them to
WebAssembly.{returnPRomiseOnSuspend,suspendOnReturnedPromise}.

With this change, the suspender property is not needed anymore on the
function data. Convert it to a boolean flag that just indicates whether
a function uses the JS Promise Integration API.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: I1b6d8e3190ebf5049dbc7eedee448999cf077509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748660
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81639}
2022-07-11 14:52:43 +00:00
Thibaud Michaud
00282d7d10 [wasm] Take suspender as parameter for stack-switching
This CL is the first step towards the 'static API':
https://github.com/WebAssembly/js-promise-integration/pull/1/files

The limitation of the previous API is that the stack-switching wrappers
are tied to a particular suspender. Since a suspender cannot be
re-entered until the corresponding computation has completed, this
prevents creating multiple concurrent instances of the same export.

Multiple APIs have been proposed and are still under discussion to
solve that, but the core idea is the same: the suspender should become a
runtime argument of the export and the import. This CL implements that.

For now, the suspender is still explicit everywhere: it is created in JS
and passed to the export, and forwarded to the JS import. Eventually,
the suspender may be completely hidden from JS: it would be materialized
by the export wrapper, and "swallowed" by the import wrapper, as
proposed in the PR above.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Ic425a3fd920c7ad03874c636cd835d31c0e04994
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748655
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81633}
2022-07-11 11:11:32 +00:00
Marja Hölttä
70625046b9 [rab/gsab] Tests for Array.p methods, part 8
In this part: slice

Bug: v8:11111
Change-Id: I66236039454ba50899a7c600b9a3df5fb5f7fc6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749582
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81629}
2022-07-11 08:19:53 +00:00
Jakob Kummerow
348be8052b [wasm] Name section: skip duplicate subsections
Duplicate subsections in the name section are disallowed by the spec.
Since the whole name section is optional, we shouldn't fail validation
because of it, but we'll ignore duplicate subsections.

Drive-by cleanup: reduce code duplication by reusing DecodeNameMap from
DecodeIndirectNameMap.

Fixed: chromium:1342338
Change-Id: Icae14c27a0255c6107517354f07ec8eb78d2a7b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3751211
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81608}
2022-07-08 12:29:51 +00:00
Andy Wingo
8a30ee7e98 [stringrefs] Implement string.as_wtf8, stringview_wtf8.advance
We represent WTF-8 views as ByteArray instances.

Bug: v8:12868
Change-Id: I642ee2ef3d6fd7ea0f383073b282549c31233c7b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3750931
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81607}
2022-07-08 12:15:00 +00:00
Thibaud Michaud
d9e44b2d9b [wasm] Suspend on other JS import kinds
The stack-switching variant of the wasm-to-js wrapper was only generated
for js functions with matching arity. Also suspend for js functions with
mismatching arity and unknown callables.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Iab3e2d85210c86a814ae1defab9cd57bf74d80d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749578
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81605}
2022-07-08 10:53:10 +00:00
Andy Wingo
9662376ad9 [stringrefs] Implement string.encode_wtf16_array
Bug: v8:12868
Change-Id: I4229cefc4dfdb29214712aeef18841092cdf9e87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3748653
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81600}
2022-07-08 09:01:00 +00:00
Marja Hölttä
2b2ce1d8be [rab/gsab] Tests for Array.p methods, part 7
In this part: sort

Bug: v8:11111
Change-Id: Idd1e7552b4cdda0cdec610189391dbb729c94cdf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742703
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81599}
2022-07-08 07:32:50 +00:00
Marja Hölttä
3483b970eb [rab/gsab] Fix flag mismatch in serialized data
Bug: v8:11111,chromium:1339648
Change-Id: I3b472f74f37a4e1514ce20635b16970e95a36e15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735162
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81598}
2022-07-08 07:08:10 +00:00
Andy Wingo
3f7c53b017 [stringrefs] Implement string.encode_wtf8_array
Bug: v8:12868
Change-Id: Ide772c6e480783931942f6c02eb3e57dd3adf508
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3751201
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81597}
2022-07-08 06:50:40 +00:00
Marja Hölttä
0a8bd76651 [rab/gsab] Tests for Array.p methods, part 6
In this part: shift, unshift, reverse

Bug: v8:11111
Change-Id: I13c156dc401b6a90b3bcccd9261b7240d8dc7498
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740720
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81596}
2022-07-08 06:40:00 +00:00
Michael Achenbach
f7b98adffd [test] Mark slow test
The test mjsunit/wasm/shared-memory-worker-gc is too slow on the gcov
bot.

No-Try: true
Bug: v8:13005
Change-Id: Idac2a6df836c981195d61f9c2737c06d548edb28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3751204
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81587}
2022-07-07 14:39:01 +00:00
Andy Wingo
43cef7a627 [stringrefs] Encoding instructions return code units written
See https://github.com/WebAssembly/stringref/issues/24.

Bug: v8:12868
Change-Id: Ib3854625aa18ae0e59f8d62d04e7132ca7381f60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749179
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81582}
2022-07-07 11:39:41 +00:00