Commit Graph

12261 Commits

Author SHA1 Message Date
Samuel Groß
a4d17470ab Reland "[sandbox] Also enable the sandbox outside of Chromium builds"
This is a reland of commit 5b9401dde4

Now also skip tests that require large amounts of virtual address space
if tsan is enabled as tsan may cause V8 to create a smaller sandbox
which is then unable to allocate the required amount of memory.

Original change's description:
> [sandbox] Also enable the sandbox outside of Chromium builds
>
> Drive-by: include the right header in sandboxed-pointer-inl.h and fix
> missing sandbox initialization in generate-bytecode-expectations.cc.
>
> Bug: v8:10391
> Change-Id: Ic39ba04b7c98eaa58ea3943189c23b297f581f5a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630082
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Samuel Groß <saelo@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81216}

Bug: v8:10391
Change-Id: I141080fdf61a77ef48b22e353e3cfbc1ff816e5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3716474
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81277}
2022-06-21 13:32:26 +00:00
Manos Koukoutos
7c74a9caea [wasm][test] Represent constant expressions with bytes
Maintaining an AST class just for testing constant exressions does not
seem justified. This CL changes constant expressions in mjsunit tests
to be represented with bytes, like regular expressions.

Change-Id: If5ec5f4d863176952442b1a7e2fec8a61e385971
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3714237
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81266}
2022-06-21 09:03:18 +00:00
Maya Lekova
1de7e24902 [d8] Handle exceptions on async_hooks.createHook
Before we assumed that no exception can be thrown when specifying a
function to be used as an async hook, but that's not the case when e.g.
the object passed to createHook is a proxy trapping on property access
and the trap throws an exception.

Bug: chromium:1337629
Change-Id: I7bd7893cd274afb6e642ed18aacb9e203f7fdd96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3714233
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81258}
2022-06-21 08:54:53 +00:00
Marja Hölttä
bc7b89f7c7 [rab/gsab] Tests for Array.p methods, part 1
In this part: copyWithin, includes

Bug: v8:11111
Change-Id: I63eee835661310c21ad53992ae3b161cc3214dfc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3678206
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81241}
2022-06-20 09:51:10 +00:00
Tobias Tebbi
95a23cf444 Revert "Skip mjsunit/turboshaft/simple on numfuzz until flake is solved"
This reverts commit c56edd3eba.

Reason for revert: should be fixed now

Original change's description:
> Skip mjsunit/turboshaft/simple on numfuzz until flake is solved
>
> NOTRY=true
>
> Bug: v8:12826
> Change-Id: I08be2980f92c69504290bb6152e48595e6a6c9aa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629540
> Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80369}

Bug: v8:12826
Change-Id: I615c682447df58bf9ae7acd9e4429b3a55697d8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3707593
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81220}
2022-06-17 14:45:20 +00:00
Thibaud Michaud
7da19e25d2 [wasm][stack-switching] Propagate exceptions across stack segments
Exceptions should propagate inside the logical stack, which can consist
of multiple wasm stack segments. When the outermost frame of the current
segment is reached, pick up the parent stack and continue the search
from there, and update the state to reflect the implicit stack switch.

Drive-by: cleanups.

R=ahaas@chromium.org
CC=​fgm@chromium.org

Bug: v8:12191, v8:12960
Change-Id: Ia5cb39a6ae197fb68e635f986952419dc43c7b98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695376
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81208}
2022-06-16 13:30:46 +00:00
Manos Koukoutos
97eff73b71 [wams-gc] Enable i31.new as constant expression
Bug: v8:7748
Change-Id: Ib3b1d99107ad2a9c703e9dc546b522e208204d1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702443
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81205}
2022-06-16 07:04:53 +00:00
Manos Koukoutos
7ba853bb98 Reland "[wasm-gc] Implement array.init_from_elem"
This is a reland of commit 76a07814b2

Changes compared to original:
- Add WasmArray::SetTaggedElement, which uses write barriers.
- In Factory::NewWasmArrayFromElementSegment, the new array may have
  moved to OldSpace until it is initialized. Therefore, it needs write
  barriers; use the new method for that.
- Small readability improvements.

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

Bug: v8:7748
Change-Id: Ic5def1886f662bddce72b8eaea274eb5e8ec0c68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3704513
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81196}
2022-06-15 19:01:42 +00:00
jameslahm
cc709727e7 [web snapshot] Support resizable ArrayBuffer, detached
... ArrayBuffer and shared ArrayBuffer.

Bug: v8:11525
Change-Id: I6b3f78d5cf6528123b40c49f2767ade2b6bfbed1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3706279
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81189}
2022-06-15 15:41:33 +00:00
Andy Wingo
70289dd72a [stringrefs] Implement string.is_usv_sequence
Bug: v8:12868
Change-Id: I2f12858db1956a3b14b95341f1459df8abc03db0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702797
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81188}
2022-06-15 15:06:52 +00:00
Darius M
00fe5f5e65 Fix bug with SIMD fast path of array.IndexOf/Includes and negative 0
For FixedDoubleArrays that are not aligned on 8 bytes, the SIMD fast
path of array.IndexOf actually falls back on a scalar loop. Because of
how this loop was written, it was failing to see that 0.0 == -0.0.


Bug: chromium:1335445
Change-Id: Idf70fd3ed9950e5b2b7cc72bb2ebca6879b3a04e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702803
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81163}
2022-06-14 18:50:01 +00:00
Andy Wingo
310fe8e61c [stringrefs] Implement string.eq
Bug: v8:12868
Change-Id: I56ccab1a0cfacfae236c4f87c31a84d3afecafc8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702437
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81153}
2022-06-14 14:17:42 +00:00
Andy Wingo
163ed720c7 [stringrefs] Implement string.concat
Bug: v8:12868
Change-Id: I7f5487dc01b006caef582f792e007d3a3cabb324
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702435
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81151}
2022-06-14 14:08:38 +00:00
Andy Wingo
9efa9e3c92 [stringrefs] Implement stringview_wtf16.encode
Bug: v8:12868
Change-Id: I9b7cbd3851b3819bcc2c32e273ddae16b9d812ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702266
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81144}
2022-06-14 12:45:36 +00:00
Leszek Swirski
a6b7f1f3f4 Revert "[wasm-gc] Implement array.init_from_elem"
This reverts commit 76a07814b2.

Reason for revert: Failing on GC stress: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64%20GC%20Stress/23140/overview

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

Bug: v8:7748
Change-Id: Ia72cc121c50af7906e54a1742529bf081c511a8a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3704506
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81143}
2022-06-14 12:44:33 +00:00
jameslahm
293654ec6b [web snapshot] Support TypedArray
This CL adds serialization and deserialization
support for ArrayBuffer and TypedArray.

TODOs:
- Support resizable ArrayBuffer.
- Support detached ArrayBuffer.
- Support shared ArrayBuffer.

Bug: v8:11525
Change-Id: Ic9267a78e427ee20d55f2f0483b677eeee5c214b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688896
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81136}
2022-06-14 11:04:51 +00:00
Andreas Haas
efb80afe2a [wasm] Add flag to disable the wasm native module cache
The native module cache makes it difficult to test deserialization,
because the native module just gets loaded from the cache instead of
deserializing the serialized module. This CL adds a new flag,
--wasm-native-module-cache-enabled, to control whether the native module
cache is enabled or not. The cache gets disabled by handling all modules
like asm.js modules when the cache gets disabled, as the cache is not
used for asm.js.

The name of the flag is positive (i.e.
`enabled` instead of `disabled`) to avoid double negation. The flag is
true by default, and set to false in tests.

R=thibaudm@chromium.org
CC=clemensb@chromium.org

Bug: v8:12964
Change-Id: If2b96a95ccf37f2eb8a868ad1661c3325c1048f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3703836
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81132}
2022-06-14 10:17:38 +00:00
Manos Koukoutos
76a07814b2 [wasm-gc] Implement array.init_from_elem
Bug: v8:7748
Change-Id: I65dbb496302045820063bd0f4f9ea054e6a645bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695580
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81128}
2022-06-14 09:30:51 +00:00
Andy Wingo
a66f078712 [stringrefs] Implement string.encode_wtf16
Bug: v8:12868
Change-Id: Icdf4a04d55c59613e305ec8258485fd69b57e90a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702258
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81119}
2022-06-13 19:45:20 +00:00
Andy Wingo
a541dbcbb4 [stringrefs] Implement string.encode_wtf8
Bug: v8:12868
Change-Id: I81f175057ec0d40dbd1e9fd329a0e37ef3ade814
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702332
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81118}
2022-06-13 19:42:21 +00:00
Pan, Tao
c2d239ddb3 Reland "[compiler] Remove the optimized OSR code if deoptimizing at inside of loop"
This is a reland of commit c8c176190a

This CL includes:

- crrev.com/c/3679846 Add condition use_ic to the removing the optimized OSR code logic
- crrev.com/c/3686589 Add out of bytecode array to break condition of removing OSR code cache logic
- Add JumpLoop nesting level 0 to break condition of removing OSR code cache logic
- Change to use Deoptimizer::DeoptimizeFunction() to deoptimize OSR code

Original change's description:
> [compiler] Remove the optimized OSR code if deoptimizing at inside of loop
>
> If the optimized code is deoptimized and the deoptimized exit offset is
> inside of the optimized OSR code related loop, the optimized OSR code is
> also out of date, remove the optimized OSR code, it will avoid hit the
> optimized OSR code and soon later deoptimization of the optimized OSR
> code.
> This CL will reduce deoptimization. E.g. Deoptimization of JetStream2
> case navier-stokes function addFields is reduced from twice to once.
>
> Change-Id: I5bbf3039e916c3736b5b967d1f36b6ea90cfd40b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3648219
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Tao Pan <tao.pan@intel.com>
> Cr-Commit-Position: refs/heads/main@{#80826}

Bug: chromium:1330444
Change-Id: I97a466ddfa764438b45f33c6ae33cb921d57278d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3690451
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Tao Pan <tao.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#81110}
2022-06-13 15:29:41 +00:00
Igor Sheludko
09fa6a72da [tests] Disable concurrent Sparkplug for some tests
... setting too low --max-old-space-size value.

Fixes: v8:12725
Change-Id: I5b1b533992d6b1024e81263525ed90914582e27a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695594
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81107}
2022-06-13 13:23:00 +00:00
Clemens Backes
dc748570c8 [wasm] Add flag to limit module size
Add a new --wasm-max-module-size flag to replace the unused and more
specific --experimental-wasm-allow-huge-modules flag.
The new flag can be used in fuzzers to reduce the maximum allowed module
size, avoiding OOM on some systems (like 32-bit ASan builds).

R=ahaas@chromium.org

Bug: chromium:1334577
Change-Id: I2830d407c5b01be21a47b21392c1210061c40b20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695267
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81102}
2022-06-13 11:06:50 +00:00
Andy Wingo
f03814f83e [stringrefs] Implement stringview_wtf16.slice
Bug: v8:12868
Change-Id: Ib92cbf7eae8e4b7bc76bc918011be747254d931f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3700075
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81087}
2022-06-11 11:46:33 +00:00
Andy Wingo
ea6bedaeb1 [stringrefs] Implement stringview_wtf16.get_codeunit
Bug: v8:12868
Change-Id: I5fb5dccb5ff6b691348a519253de338fa91e8be1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695269
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81082}
2022-06-10 18:00:48 +00:00
Tobias Tebbi
77ba98ef32 [turboshaft] add support for all JS machine-level operators
In particular, this CL adds support for:
- exception handling
- source positions
- OSR
- various numeric operations and conversions

Since the test suite now passes with `--turboshaft`, this also adds a
new variant for Turboshaft and enables it on some bots.

Bug: v8:12783
Change-Id: Ia2dd2e16f56fc955d49e51f86d050218e70cb575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669251
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81074}
2022-06-10 15:17:20 +00:00
Clemens Backes
436f088944 [wasm][streaming] Check for illegal section code
Add a missing check to reject illegal sections.

The test is added in three forms, to give fuzzers more food: A fuzzer
regression test for the streaming fuzzer, a unit test for the streaming
decoder, and an mjsunit test for streaming compilation.

Drive-by: Remove a redundant line in the synchronous decoder (this is
already handled by the following statement.

R=ahaas@chromium.org

Bug: chromium:1335023
Change-Id: Ic8c3b301f1b58981c7d68eafcffc89531ed2c64c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3698549
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81071}
2022-06-10 14:23:07 +00:00
Milad Fa
9dfac00a1d PPC: skip slow tests on the ppc simulator
This CL splits two mjsunit files and skips the ones
which take the longest on the simulator and cause a timeout.

Change-Id: I89be764dc2d7684b401690a23bf53a3ef6384d16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693667
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81065}
2022-06-10 12:03:17 +00:00
jameslahm
b61ee5f34a [web snapshot] Support static methods, static async methods,
... static generator methods and static async generator methods
for Class.

Bug: v8:11525
Change-Id: I58e8059c95e8a24e1a09d84aea84b82d35f5e2d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688891
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81058}
2022-06-10 09:05:12 +00:00
Andy Wingo
03dcbc88e0 [stringrefs] Implement string.as_wtf16, stringview_wtf16.length
Bug: v8:12868
Change-Id: I19190dc8163de42964fb3911f82e8aeabaf48524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695585
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81046}
2022-06-09 16:03:15 +00:00
Manos Koukoutos
ccc8389f14 [wasm][refactor] Use MessageTemplate to describe errors
- Functions related to table initialization now return an optional
  {MessageTemplate} if they fail. This is used to emit the correct error
  message in one test.
- InitExprInterface now uses {MessageTemplate} to describe errors.

Change-Id: I2428f7823859b95d14b6e81c8200f78da4510ceb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695579
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81045}
2022-06-09 16:01:54 +00:00
Thibaud Michaud
cfea0eb0e8 [wasm][eh] Add WebAssembly.Exception traceStack parameter
Context: https://github.com/WebAssembly/exception-handling/pull/197

This change adds the optional {traceStack: <bool>} parameter to the
WebAssembly.Exception constructor. When set to true, this captures the
stack and sets the `stack` accessor on the exception object.

R=jkummerow@chromium.org

Bug: v8:8091
Change-Id: I4430b6317b27ec62f11e951fbe95ee480ac72d37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688402
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81041}
2022-06-09 15:37:18 +00:00
Andy Wingo
0c2bb397a0 [stringrefs] Implement string.measure_wtf16
Bug: v8:12868
Change-Id: I717326b27ce783710ffd141370648dde7e0d74a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695561
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81035}
2022-06-09 12:57:16 +00:00
Andy Wingo
18393c8c6e [stringrefs] Implement string.measure_utf8, string.measure_wtf8
Bug: v8:12868
Change-Id: I13b32086e736490c54b583a514ac3592179adf7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695381
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81033}
2022-06-09 12:45:53 +00:00
legendecas
a438bc4166 [builtins] Rename array grouping to group and groupToMap
Rename array grouping methods according to the consensus on TC39 June
meeting.

Bug: v8:12499
Change-Id: I89cb3a49b0de45b74131877bb70d38b49233f275
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3692436
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81009}
2022-06-08 18:12:52 +00:00
Andy Wingo
c842874cb5 [stringrefs] Implement string.const
Current implementation doesn't cache the result, however.

Bug: v8:12868
Change-Id: Idd5eb7bbb49d018fec82a80bffb5288c0b6ee0f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695377
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81006}
2022-06-08 16:49:14 +00:00
Al Muthanna Athamina
4e83492762 Skip mjsunit/compiler/regress-crbug-1211215 test on NumFuzz
NOTRY=true

Bug: v8:12358
Change-Id: I89a880b9e187b8b149b670d38320aa46be0424dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695374
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81000}
2022-06-08 14:01:18 +00:00
Thibaud Michaud
a28947f7bb [wasm][eh] Wasm exceptions are not JS errors
Context: https://github.com/WebAssembly/exception-handling/pull/197

This change removes the wasm exception -> JS Error inheritance.

R=jkummerow@chromium.org

Bug: v8:8091
Change-Id: I479f16fe03d4d77d2ecd8409e96f9a3c063912b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688401
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80997}
2022-06-08 12:56:36 +00:00
Al Muthanna Athamina
d1510ff43d Skip mjsunit/ignition/regress-672027 test on NumFuzz
NOTRY=true

Bug: v8:12725
Change-Id: I3650d920bfe7ec432e84fc294d38baf13b2ef53a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695375
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80994}
2022-06-08 11:57:54 +00:00
Al Muthanna Athamina
7680e5d586 Re-enable concurrent inlining tests
Bug: v8:12013
Change-Id: Idb0ae37176b81623f6faaf5904352e95066684dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695373
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80993}
2022-06-08 10:46:03 +00:00
Manos Koukoutos
15821ebb60 [wasm][refactor] Rename some symbols
- Rename WasmTrapElemSegmentDropped -> WasmTrapElemSegmentOutOfBounds.
- Rename WasmArrayInitFromData -> WasmArrayInitFromSegment, in
  anticipation of array.init_from_elem.
- Rename InitExprInterface::result_ -> computed_value_, to
  distinguish it from the {result} values. Also, rename
  generate_result() -> generate_value().
- Drive-by: Restructure Runtime_WasmArrayInitFromSegment.

Change-Id: Ic372db909847c7a169f3d6732e64e8665f4200fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693702
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80991}
2022-06-08 08:23:52 +00:00
Jakob Kummerow
4dd8d76b17 [wasm] Fix typing for unreachable AssertNonNull
Performing the "swap with TypeCast" input optimization causes inconsistent
types for unreachable AssertNonNull instructions (that should inherit that
TypeCast's <bot> type).

Fixed: v8:12945
Change-Id: Ie51cd6531267a2828c6aac92948edda5c2a5db37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693708
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80989}
2022-06-08 08:18:42 +00:00
Frank Tang
fdde51c674 [Temporal] Add Instant.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.subtract

Also fix bug in IsValidEpochNanoseconds

Bug: v8:11544
Change-Id: Ied605c9de4ee38a18e2356a89e3a69d534a004d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617394
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80983}
2022-06-07 23:44:12 +00:00
Nico Hartmann
46ed47e66a [turbofan] Fix inconsistent typing of NumberFloor(NumberDivide(...))
In typed-optimization, Turbofan optimized NumberFloor(NumberDivide(...))
patterns where both inputs are known to be of Unsigned32 type, but the
replacement couldn't be typed consistently. This CL introduces a new
operator Unsigned32Divide, which has the same semantics, but can be
typed consistently and thus allows the simplified lowering verifier to
validate the graph correctly.

Bug: v8:12619
Change-Id: Iad77154d3d840c94edfd3ab91ffa37c840da0bc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644790
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80967}
2022-06-07 10:11:49 +00:00
Frank Tang
6d33cb89a4 [Temporal] Add Instant.(compare|prototype.equals)
Also implement AO: CompareEpochNanoseconds
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.instant.compare
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.equals

Bug: v8:11544
Change-Id: I953a890250ff0bf29cd24e4638bf17ceb5f9bb2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3382057
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80959}
2022-06-06 17:44:42 +00:00
Frank Tang
88b644717f [Temporal] Add PlainDate.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.subtract

Bug: v8:11544
Change-Id: Iacb4b9ba7d481005d14e2e4d42e2422133f5ab42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617389
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80955}
2022-06-06 15:49:55 +00:00
Igor Sheludko
ff64360d0a [rab/gsab] Skip slow tests on debug sim builds
Bug: v8:11111
Change-Id: I52caef43e7f2b3921ef34eeb50e41f1dedf90e32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3689570
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80949}
2022-06-04 12:59:20 +00:00
Jakob Kummerow
11a1ac4bc2 Faster TypedArray.fill(0) and .fill(-1)
Calling memset directly is faster than std::fill for multi-byte element
types.

Change-Id: I83b997740146688f87b86901825e31d6644bc25b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687700
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80945}
2022-06-03 14:01:49 +00:00
Marja Hölttä
efadd2d0a2 [rab/gsab] RAB/GSAB support for A.p.concat
It mostly worked out of the box. Only the dictionary mode prototype
chain walk code paths had to be updated.

Bug: v8:11111
Change-Id: Ia8336964d29304916a34e305f32bb33bb06e211a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683340
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@{#80935}
2022-06-03 09:40:09 +00:00
jameslahm
b425a0e94f [web snapshot] Support properties in Class.
This CL adds the serialization and deserialization for
properties in class.

TODO: we could use serialized start_position and length
in function to add ClassPositions property to class.

Bug: v8:11525
Change-Id: I065039932b3c10c6b757b331aba0ced36eba84e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3682878
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80927}
2022-06-03 02:43:29 +00:00