Commit Graph

30320 Commits

Author SHA1 Message Date
Frank Tang
9b4b64c282 [Temporal] Add PlainDateTime.prototype.(add|subtract)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.add
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.subtract

Bug: v8:11544
Change-Id: Ib76b090a62a932931ab48cb5814ce1f1050fae10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3617391
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80956}
2022-06-06 15:55:44 +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
Fanchen Kong
e344bf94a4 [x64][wasm-simd] Pattern match on packed byte to dword zero extend like shuffle
When a 8x16 shuffle matches a packed byte to dword zero extension,
1. input1 is S128Zero after canonicalization,
2. the indices {0,4,8,16} are consecutive value in the range [0-15] and
other indices are in the range [16-31],
the shuffle can be matched to packed byte to dword zero extend. These
shuffles are commonly used in image processing.

Change-Id: I14d1e35401dbc5ecd91f67c46ea9762628835d01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3547667
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/main@{#80953}
2022-06-06 03:15:12 +00:00
Anton Bikineev
d8da11ae05 cppgc: shared-cage: Use dedicated reservations for normal/large pages
The CL splits the Oilpan giga-cage in two 2GB reservations: one for
normal pages and the other for large ones. The split enables fast
page-header lookup (assuming most objects reside on normal pages), which
is needed for:
1) the young generation project, where the remembered set will move to
   pages;
2) the shared-cage project, to find HeapBase* from page-headers.

Bug: v8:12231, chromium:1029379
Change-Id: I4ae9e8a75a307ed0dff9a2ec4f1247b80e17ebd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688519
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80950}
2022-06-05 14:32:01 +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
Milad Fa
e51b03a08a [wasm-gc] Fix LOAD_VERIFY/STORE_VERIFY on big endian
Applying the set of unittest changes from
https://crrev.com/c/3678208 to BE.

Change-Id: I02d0f2f388720e3acc35660042d5c2c76fa589e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687474
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80942}
2022-06-03 12:03:20 +00:00
Jakob Kummerow
bfd0ccf2dd [wasm] EquivalentTypes() should be symmetric
Fixed: v8:12935
Change-Id: Ib4dfdc276e6a9f465666b068bdbe31776429f359
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687699
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80941}
2022-06-03 11:16:59 +00:00
Clemens Backes
2d5c7a1517 [wasm][c-api] Avoid flag updates after initialization
There are two flag updates from the Wasm C-API. Both are unnecessary:
FLAG_expose_gc is not needed because we call the internal API for
garbage collection; this is always allowed.
FLAG_experimental_wasm_eh is enabled by default, so does not need to be
set to true in that test.

R=jkummerow@chromium.org

Bug: v8:12887
Change-Id: If56506228cd89d5452e71376e4c2f6a4ec636979
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687690
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80939}
2022-06-03 10:25:45 +00:00
Clemens Backes
f149912f33 [flags] Protect individual flag updates
Extend the effect of --freeze-flags-after-init to also protect updates
of individual flags instead of only the API.
For this, we wrap each flag in a {FlagValue} class which implicitly
converts to the value of the flag. Some cases still require the explicit
{value()} accessor though. That accessor is {constexpr}, in contrast to
the implicit conversion, because otherwise clang emits a lot of warnings
about dead code within "if (FLAG...)" scopes.

R=cbruni@chromium.org

Bug: v8:12887
Change-Id: I87d3457e49ceb317d34d6a21cf09c520d4171eb5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683321
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80938}
2022-06-03 10:24:40 +00:00
Igor Sheludko
7b4721f8b8 [ext-code-space] Introduce CodeLookupResult
... as a pair of Code and CodeDataContainer.

In order to stop creating and using trampoline Code objects for
builtins we need a different way to represent an "embedded builtin"
code lookup result of builtin trampoline Code objects.
We can't switch to CodeT for this purpose because GC still needs to
be able to locate not yet evacuated Code objects in order to update
old code pointers on the stack once Code objects are moved.

Bug: v8:11880
Change-Id: I296636a6728a11c8e3220b3fee43fd12ff633c1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3684813
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80937}
2022-06-03 10:04:50 +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
Clemens Backes
13567f5f3a [wasm] Remove kFinishedTopTierCompilation event
This fully removes the kFinishedTopTierCompilation event, and any
handling of it. In a dynamic tiering world, that event has no meaning
any more.

R=ahaas@chromium.org

Bug: v8:12899
Change-Id: I36484e36f7c36f2ac4fcb111e67a14509c2eefef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3667081
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80930}
2022-06-03 07:49:39 +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
Milad Fa
1dae3f2ba4 PPC/S390: skip JSAtomicsMutexTest.Contention test
This test requires shared cage implemented. More details
under https://crrev.com/c/3673354 .

Change-Id: Ib1d39dcc2fd6c8abb4f79bf6b845132c34d2ec8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687475
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80926}
2022-06-02 20:44:28 +00:00
Ilya Rezvov
a52b44f093 [wasm-simd] Prototype relaxed integer Dot product instructions
Prototype the instruction on the interpreter, and Arm64. Details of
instruction lowerings on all relevant architectures can be found at:
https://github.com/WebAssembly/relaxed-simd/issues/52

Bug: v8:12908
Change-Id: If8ffb82c38042191c67c9b5c23a231877d4f2159
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3679848
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80924}
2022-06-02 18:30:58 +00:00
Deepti Gandluri
a13598ae0c Revert "Allow lookup of matching scripts in Isolate compilation cache"
This reverts commit c443858fa9.

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

Original change's description:
> Allow lookup of matching scripts in Isolate compilation cache
>
> Currently, if the same script text is compiled multiple times with
> differing details (such as name, line number, or host-defined options),
> then multiple copies of that script are added to the Isolate's
> compilation cache. However, any attempt to look up those scripts can
> find only the first instance. This change makes the script compilation
> cache behave more consistently by checking the details while searching
> the hash table for a match, rather than after a potential match has been
> found.
>
> Bug: v8:12808
> Change-Id: Ic9da0bf74f359d4f1c88af89d585404f173056ee
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3671615
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#80919}

Bug: v8:12808
Change-Id: I6d007374fb607a2670ca260c6bd0d6774d7f51d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687311
Auto-Submit: Deepti Gandluri <gdeepti@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@{#80922}
2022-06-02 17:32:33 +00:00
Seth Brenith
c443858fa9 Allow lookup of matching scripts in Isolate compilation cache
Currently, if the same script text is compiled multiple times with
differing details (such as name, line number, or host-defined options),
then multiple copies of that script are added to the Isolate's
compilation cache. However, any attempt to look up those scripts can
find only the first instance. This change makes the script compilation
cache behave more consistently by checking the details while searching
the hash table for a match, rather than after a potential match has been
found.

Bug: v8:12808
Change-Id: Ic9da0bf74f359d4f1c88af89d585404f173056ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3671615
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80919}
2022-06-02 16:39:39 +00:00
Liu Yu
56dd286445 [test][loong64] Fix error when moving test-disasm-loong64
commit ce9d6d49bd

Bug: v8:12781
Change-Id: I2010281c04a26cd93fefabae98cf9a6585210013
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687069
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80916}
2022-06-02 13:22:43 +00:00
Clemens Backes
22b4ab86ef [flags] Refactor MaybeBoolFlag to use base::Optional
Use the existing {base::Optional} instead of the extra {MaybeBoolFlag}
struct. This makes writing to a maybe-flag simpler because you just
write a boolean value and that automatically initializes the optional.

R=cbruni@chromium.org

Bug: v8:12887
Change-Id: I940d20286d65ba4355dc04b4b6068a306706f295
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3686412
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80915}
2022-06-02 12:55:38 +00:00
Manos Koukoutos
aee0ec979a [wasm-gc][turbofan] Implement typing phase
We introduce a typing phase into the Turbofan compilation pipeline for
wasm-gc. It has two functionalities: (1) to type nodes that were not
typed during code generation (mainly phi nodes) and (2) to narrow types
as much as possible.
The following nodes are handled, which should be enough for our
purposes: TypeGuard, WasmTypeCast, AssertNotNull, Phi, LoadFromObject,
and LoadImmutableFromObject.
Loop phi types are computed by first assigning the type of the
non-recursive input, and updating once we have the type of the recursive
inputs, and repeating this process to a fixed point.

Drive-by: Remove the narrowing of function signatures during wasm
inlining, as it created some issues and should not be needed after this
series of changes.

Bug: v8:7748
Change-Id: I8a72488d5c221c4ae8257fc5abf6f0368cf10e96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3678208
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80912}
2022-06-02 11:08:21 +00:00
Marja Hölttä
084356297d [rab/gsab] Add missing tests for TA.p.copyWithin
Bug: v8:11111
Change-Id: I8190bc8cfd1e8e5b9d498e29bc2d0a25eae2e03a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683363
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80906}
2022-06-02 07:31:49 +00:00
Milad Fa
c553b02cec Fix compilation with gcc
Currently getting the following error with gcc 8.4,
including on x64 linux:
```
error: ':InterpreterState::scratch_' is used uninitialized in this function
```

Change-Id: I95ae848bf2503f6a0dac30254b19b08047b73cce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683104
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80901}
2022-06-01 18:17:22 +00:00
Clemens Backes
85cf4be909 [wasm][fuzzer] Refactor second instantiation
The fuzzer instantiates the module twice: Once for reference
interpretation / execution, and once for the actual execution of
Liftoff/TurboFan code.
For some reason, the two code paths for interpretation and Liftoff
reference execution used different patterns: Interpretation was using
the first instance, and then creating a second instance for actual
execution, whereas the Liftoff path used a second instance for the
reference execution and used the first one for the actual execution.

This CL refactors this to always create a "reference instance" first,
use that for either the interpreter or Liftoff, and then create a second
instance for the actual execution.

R=thibaudm@chromium.org

Bug: v8:12425
Change-Id: I19754264240d8570f00161abb7aecba1cc2b2ae0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683323
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80900}
2022-06-01 16:46:28 +00:00
Marja Hölttä
bfa18f9e57 [rab/gsab] Move OOB check to ValidateIntegerTypedArray
The OOB check belongs in ValidateIntegerTypedArray according to the
spec.

This also fixes the error types for OOB TypedArrays when doing Atomics:
OOB TypedArrays should get a TypeError, not RangeError.

Bug: v8:11111
Change-Id: Ice2e5695d69d84b2c20a4cf8f06880673d901a91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676859
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80898}
2022-06-01 16:12:16 +00:00
Clemens Backes
3694eba74e [wasm][fuzzer] More output for failed instantiation
The fuzzers sometimes fail to instantiate a module that we already
instantiated before. This is nondetermistic and hard to reproduce (maybe
an out-of-memory situation).
Make the fuzzers print the error message so we learn more about those
failures.

R=ahaas@chromium.org

Bug: chromium:1330572
Change-Id: I0db103bdb113b1c1cedf662e02fb7a7f9d34ebd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3680298
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80893}
2022-06-01 13:14:38 +00:00
Leszek Swirski
1acb5db0ea [test] Add perfetto initialisation to unittest runner
Bug: v8:12781
Change-Id: I1cf929e1d817ba81d25ba5095872b975c13f40d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683319
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80891}
2022-06-01 12:32:17 +00:00
jameslahm
a9ca9f7dbc [test] Move cctest/test-flags to unittests/flags/
... flag-definitions-unittest.

Bug: v8:12781
Change-Id: I11cd6acc4d7c548773f013fcaf5a2de5b47d730b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3682879
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80889}
2022-06-01 11:06:31 +00:00
Danil Somsikov
0944ea06c6 Disable command-line API for untrusted inspector clients.
Bug: chromium:1290236
Change-Id: Ie8cda6fd6260d30d3107d3b0288e01960b0e2d3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3677293
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80885}
2022-06-01 09:37:58 +00:00
jameslahm
9d12255c1e [test] Move cctest/test-managed to unittests/objects/
... managed-unittest.

Bug: v8:12781
Change-Id: Ic9dea14ffd0f8ca944c39d791c2b66aa1f76bcfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3682881
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80882}
2022-06-01 08:05:31 +00:00
jameslahm
a9a44a3126 [test] Move cctest/test-threads to unittests/execution/
... threads-unittest.

Bug: v8:12781
Change-Id: I1294d0bf9f47c158532a489657bc1e5349afce79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3682882
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80881}
2022-06-01 08:01:51 +00:00
jameslahm
daee783c73 [test] Move cctest/test-hashmap to unittests/base/
... hashmap-unittest.

Bug: v8:12781
Change-Id: Id2d4c1d41540791e4c32919d4da4648565ac9faf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3682880
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80880}
2022-06-01 08:00:48 +00:00
Dominik Inführ
c6527293a5 [heap] Fix external bytes accounting when promoting large objects
Unlike other spaces we didn't update external bytes counters when
adding or removing pages from large spaces.

Bug: chromium:1329766
Change-Id: I5fbc8703964f9e4e846d986c32c5d57ed4f0c0c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3681118
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80877}
2022-06-01 07:24:08 +00:00
Shu-yu Guo
7ff1857560 Reland "[shared-struct] Add Atomics.Mutex"
This is a reland of commit ea9a1f1cbe

Changes since revert:
- Make the state field uintptr-aligned since arm64 faults on
  atomic accesses to non-naturally aligned addresses.

Original change's description:
> [shared-struct] Add Atomics.Mutex
>
> This CL adds a moving GC-safe, JS-exposed mutex behind the
> --harmony-struct flag. It uses a ParkingLot-inspired algorithm and
> each mutex manages its own waiter queue.
>
> For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing
>
> Bug: v8:12547
> Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80789}

Bug: v8:12547
Change-Id: I776cbf6ea860dcc6cb0ac51694a9b584b53d255c
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673354
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@{#80875}
2022-06-01 01:12:07 +00:00
Shu-yu Guo
0f510c4ab1 [change-array-by-copy] Implement with
Bug: v8:12764
Change-Id: I67b9b0e4f3c7ca6a2719c234b7f7605f07f86b28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3671760
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80874}
2022-06-01 00:47:32 +00:00
Milad Fa
efcbd13355 S390: Add missing headers to disasm-s390-unittest
Modification is needed since after this CL:
https://crrev.com/c/3676642

Bug: v8:12781
Change-Id: Icb2644c9cd6f20e37c4b0ba0c4b861417c84b7f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3679980
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80871}
2022-05-31 17:51:08 +00:00
Joyee Cheung
4bdbccc392 Revert "[heap] pre-populate the single_character_string_cache"
This reverts commit 07e11a64e4.

Reason for revert: caused regressions and heap verification failures

Bug: chromium:1330410, chromium:1330408, chromium:1330413

Original change's description:
> [heap] pre-populate the single_character_string_cache
>
> This simplifies the code and removes the runtime overhead of
> spontaneously adding strings to the cache.
>
> Bug: v8:12718
> Change-Id: I2ed49bd82e3baf2563eeb8f463be72c0308c52c5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616553
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Joyee Cheung <joyee@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#80803}

Bug: v8:12718
Change-Id: I569fea9e34effd57c9e7c65190cf5b4ec0b0623b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3679680
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80870}
2022-05-31 16:41:47 +00:00
Nikolaos Papaspyrou
4651df6bba heap: Fix and clean up object start bitmap
This CL introduces the following changes to the experimental
implementation of the object start bitmap, that is evaluated as
a mechanism for resolving inner pointers (behind the flag
v8_enable_conservative_stack_scanning):

- Manually iterate through page objects, instead of using the
  PagedSpaceObjectIterator, for performance (avoid calling
  MakeHeapIterable all the time) and to simplify the handling
  of filler objects.
- Clear bits when reusing evacuated pages of the new space.
- Use the cage base to iterate correctly through code objects.
- Introduce a method for verifying the validity of the object
  start bitmap.
- Minor fixes, additional checks and cleanup.

Bug: v8:12851
Change-Id: I245937ffe6f4b53c4c2dcf5126e8836aec4dc79e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675099
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80869}
2022-05-31 16:37:08 +00:00
Clemens Backes
ca7e0c669b [wasm] Remove sampling on top tier finished
Remove code size and compilation time sampling for the "top tier
finished" event. With dynamic tiering, this event will never be reached.

R=ahaas@chromium.org

Bug: v8:12899
Change-Id: I1b0d053e31fe8cd1f8ba3b23bfff4c5879569b45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647691
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80867}
2022-05-31 16:20:58 +00:00
Leszek Swirski
f215daa819 Reland "Reland "[test] Move tracing cctest to unittests""
This is a reland of commit 3b251debfb

Annotates the perfetto proto include with nogncheck, because gn's header
checker doesn't understand preprocessor directives.

See
https://gn.googlesource.com/gn/+/main/docs/reference.md#advice-on-fixing-problems

Original change's description:
> Reland "[test] Move tracing cctest to unittests"
>
> This is a reland of a7d6bf9662
>
> Added perfetto to unittests include_rules.
>
> Bug: v8:12781
> Change-Id: Iabf0e62abb1de879de21ba06fbd38f5432ee4f76
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652295
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80847}

Bug: v8:12781
Change-Id: I886df9254d8fecd56f64110f04b1447937605b58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3680299
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80866}
2022-05-31 16:16:57 +00:00
jameslahm
16fa2f28b7 [web snapshot] Support properties in function
This CL adds the serialization and deserialization
for properties in function. And we only support fast
properties in property array now.

Bug: v8:11525
Change-Id: If0bb3fee400ca957009d046ed74b92d8192c2514
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650675
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80858}
2022-05-31 13:14:17 +00:00
Leszek Swirski
cbdc545dcb Revert "Reland "[test] Move tracing cctest to unittests""
This reverts commit 3b251debfb.

Reason for revert: Chrome build is still unhappy

Original change's description:
> Reland "[test] Move tracing cctest to unittests"
>
> This is a reland of a7d6bf9662
>
> Added perfetto to unittests include_rules.
>
> Bug: v8:12781
> Change-Id: Iabf0e62abb1de879de21ba06fbd38f5432ee4f76
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652295
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80847}

Bug: v8:12781
Change-Id: I54d64a10e24bc913be9d2bd66c1908664665f484
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3679519
Auto-Submit: Leszek Swirski <leszeks@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@{#80857}
2022-05-31 12:48:18 +00:00
Manos Koukoutos
ac1c4c6d56 [wasm] Fix effect chain, enable its verification
This CL fixes all spots where wasm Turbofan code did not satisfy the
invariant that all nodes with effect outputs are connected to another
node. Also, it enables the related verification for wasm code.

Drive-by:
- Simplify how stack checks are removed during loop unrolling.
- Fix a test declaration in test-gc.cc.

Change-Id: Id32af8584ba0ec281f4bf7757bd2915e6d8bf443
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676862
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80854}
2022-05-31 12:37:27 +00:00
Leszek Swirski
5d71a2c9dc [test] Add perfetto deps to unittests
Bug: v8:12781
Change-Id: Icf3233b48718e117cc39289c511f9fd4d99c874d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3679079
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80853}
2022-05-31 12:28:47 +00:00
Maya Lekova
11a304ffeb [megadom] Fix crash in d8 when realm is entered
Bug: chromium:1329234
Change-Id: I59f171d3e2ab0c07f79f631971b1695b9f706600
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3677294
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80850}
2022-05-31 12:09:38 +00:00
Clemens Backes
a1c96c7b8a [wasm] Enable dynamic tiering in serialization tests
Some tests disabled dynamic tiering in order to actually serialize
TurboFan code. This makes the tests a bit simpler, but does not reflect
real-world usage.
This CL enables dynamic tiering in those tests and when needed executes
the code until tier-up was observed.

R=ahaas@chromium.org

Bug: v8:12899
Change-Id: I34cb8cedbc5908d9e6ca09d56c51609d0c8b2d6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3660262
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80849}
2022-05-31 11:11:17 +00:00
Leszek Swirski
3b251debfb Reland "[test] Move tracing cctest to unittests"
This is a reland of a7d6bf9662

Added perfetto to unittests include_rules.

Bug: v8:12781
Change-Id: Iabf0e62abb1de879de21ba06fbd38f5432ee4f76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652295
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80847}
2022-05-31 10:45:17 +00:00
Omer Katz
5411e8508b [heap] Abstract away remaining SemiSpaceNewSpace methods
The abstractions in this CL include:
1) Using EvacuatePrologue to handle age mark updating in
SemiSpaceNewSpace.
2) Using IsPromotionCandidate to check if a page contains
the current age mark.
3) EnsureCurrentCapacity instead of Rebalance.
4) Delegate page promotions in mark-compact.cc to the
NewSpace implementation.

Bug: v8:12612
Change-Id: Ied83261d661a8e61a11bf33b1d7a2103ac99a853
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644966
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80846}
2022-05-31 10:37:57 +00:00
Igor Sheludko
b5283a2e5b [cleanup] Make the CaptureStackTrace test threaded
Fixes b/3074796.

Change-Id: Ib8343702a7f9f8c912bcb5660ff9d0378b90d1f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676856
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80843}
2022-05-31 09:52:38 +00:00
Clemens Backes
8f531bea0a [wasm] Add fuzzer for streaming decoder
The fuzzer runs the same wire bytes through the streaming decoder and
through synchronous compilation, and compares the result. In particular,
if one fails, then also the other should fail.

More checks for the result of both pipelines can be added later.

R=ahaas@chromium.org

Bug: v8:12922
Change-Id: I905adf740e581c4b7d0f4ab7c0d5d0e48d96fc4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675100
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80842}
2022-05-31 09:40:17 +00:00
Darius M
7c4461add3 Reland "[builtins] use SIMD IndexOf/includes on large arrays"
This is a reland of commit ab76ffc8bd.

Original change's description:
> [builtins] use SIMD IndexOf/includes on large arrays
>
> Change-Id: If751e813c7f45a4d18b84e8c0314a54c84894d61
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639203
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80771}

Change-Id: I81dcf3c97a15b95fd42927ff8e91602f109db315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672418
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80840}
2022-05-31 09:19:50 +00:00
Dominik Inführ
94ca8fa8c1 [heap] Drop UPDATE_WEAK_WRITE_BARRIER write barrier mode
Replace all usages of UPDATE_WEAK_WRITE_BARRIER with
UPDATE_WRITE_BARRIER. The barrier wasn't hot, so the additional branch
for the marking barrier shouldn't be a problem.

Performing the marking barrier could in theory cause more floating
garbage. However in this case the write barrier is only run once
directly after e.g. allocating a Code or NativeContext object. Since
UPDATE_WEAK_WRITE_BARRIER only skips the marking barrier, we should only
observe different behavior when marking is on. But since we already
have black allocation for objects in old space, we will not cause
additional floating garbage.

In case of performance regression, we should also be able to replace
those usages with SKIP_WRITE_BARRIER, since NativeContext and Code
objects are never allocated in the young generation, so running the
generational barrier shouldn't be necessary. It's just hard to DCHECK
that SKIP_WRITE_BARRIER is valid here.

Bug: v8:11708
Change-Id: I25d760a46d1d7ec973cc589f51ddf80ca3b5419d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663080
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80839}
2022-05-31 08:56:57 +00:00
Marja Hölttä
171ee1a7d4 [web snap] Support objects with dictionary elements
Bug: v8:11525
Change-Id: I0196169d5bfe80df23179414f37c418db775cefb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663341
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80838}
2022-05-31 08:38:22 +00:00
jameslahm
ce9d6d49bd [test] Move cctest/test-disasm-loong64 to unittests/assembler/
... disasm-loong64-unittest.

Bug: v8:12781
Change-Id: I81b5ff789d8e5d7eb0ce8e4c6fa1531f52199918
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676638
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80836}
2022-05-31 07:40:39 +00:00
jameslahm
3ebdddeb66 [test] Move cctest/test-disasm-ppc to unittests/assembler/
... disasm-pcc-unittest.

Bug: v8:12781
Change-Id: I239c5101a0b978b0b824bac8e31a6e62b3e7e836
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676639
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80835}
2022-05-31 07:39:37 +00:00
jameslahm
1d2a4903d4 [test] Move cctest/test-disasm-mips64 to unittests/assembler/
... disasm-mips64-unittest.

Bug: v8:12781
Change-Id: I5c4e2b95d4d30962c671c1f2a625f6e97fecad15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676640
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80834}
2022-05-31 07:38:23 +00:00
jameslahm
c1caada64d [test] Move cctest/test-disasm-riscv64 to unittests/assembler/
... disasm-riscv64-unittest.

Bug: v8:12781
Change-Id: I0d4c0ffbda5757db6a6b906e9f51ce28bc5f6f11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676641
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80833}
2022-05-31 07:36:57 +00:00
jameslahm
6d6cd4e92b [test] Move cctest/test-disasm-arm to unittests/assembler/
... disasm-arm-unittest.

Bug: v8:12781
Change-Id: Ice4bafdf89e2eb9ddbef7b613eef1e6ceb56133b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676637
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80832}
2022-05-31 07:35:37 +00:00
jameslahm
4ecbc7cf72 [test] Move cctest/test-diy-fp to unittests/numbers/
... diy-fp-unittest.

Bug: v8:12781
Change-Id: I7cb996c095ec0c946ed2db311dfd815e1cbd459b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676643
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80831}
2022-05-31 07:34:19 +00:00
jameslahm
df89f11a08 [test] Move cctest/test-decls to unittests/parser/
... decls-unittest.

Bug: v8:12781
Change-Id: I0c2915bade2b5a6f6eeeba3db81542d3220bcd66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676644
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80830}
2022-05-31 07:33:17 +00:00
jameslahm
17265d1a88 [test] Move cctest/test-disasm-s390 to unittests/assembler/
... disasm-s390-unittest.

Bug: v8:12781
Change-Id: I52155e0f6667202ce2f3c7bd59cb0031694edbc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676642
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80829}
2022-05-31 07:31:58 +00:00
Jakob Kummerow
d1f2ccf15c [bigint][test] Parse command-line integer parameters robustly
The previous implementation would simply crash when command-line
parameters to the bigint_shell weren't valid integers (where
integers were expected).

Change-Id: Ia9987ab241ae9cac8dad4517766bfdd0b8cc98b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3677295
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80824}
2022-05-30 15:21:36 +00:00
Andy Wingo
ec8b247201 [stringrefs] Implement string.new_wtf16
Bug: v8:12868
Change-Id: Ied5e985db139517ec34446bcb8b16041e5d79af7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663092
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80823}
2022-05-30 15:12:46 +00:00
Thibaud Michaud
a77dd89e4c [regalloc] Improve gap resolver algorithm
design doc:
https://docs.google.com/document/d/1h4nxeEkMrVBd3QUmLBFGCqbq9BPUPFfkU6L0-IdvJdE/edit?usp=sharing

Bug: v8:5210, chromium:1269989, chromium:1313647
Change-Id: I31cc6c0756b3754b61c02f7c5ddde6b5016abcd0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3613322
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80816}
2022-05-30 12:20:38 +00:00
Leszek Swirski
31925e51de [test] Disable mjsunit/regress/regress-crbug-620253 on TSAN
Bug: v8:12920
Change-Id: Iec1f4a2effc45299e30ecf8a586c535dbb22ee20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3676860
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80815}
2022-05-30 12:18:29 +00:00
Thibaud Michaud
3ac478475c [wasm-relaxed-simd] Add relaxed trunc opcodes in Liftoff on ia32+x64
R=gdeepti@chromium.org,clemensb@chromium.org

Bug: v8:12284
Change-Id: Id003edadabb061aff074ad69602caf9322bda07e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3667085
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80813}
2022-05-30 11:41:40 +00:00
Thibaud Michaud
eb40c67d8b [wasm-relaxed-simd] Enable relaxed min/max on Liftoff ia32/x64
R=gdeepti@chromium.org,clemensb@chromium.org

Bug: v8:12284
Change-Id: Idc2fb6b2ee8453ed84b1be1b23e6bdae878989b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3667504
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80812}
2022-05-30 10:59:47 +00:00
Manos Koukoutos
ee0f0d5424 [wasm] Introduce type union and intersection
Change-Id: Ic150f990ac7329bf93b0f9c1c87c4c13be3e3c06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669252
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80811}
2022-05-30 10:49:56 +00:00
Nikolaos Papaspyrou
2117278882 cleanup: Fix some typos
Mostly in comments, again, not much to be said...

Bug: v8:12425
Change-Id: I75b4b244e6fa259a29f6cf28bd8258b035af4be6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673536
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80808}
2022-05-30 09:13:36 +00:00
Joyee Cheung
07e11a64e4 [heap] pre-populate the single_character_string_cache
This simplifies the code and removes the runtime overhead of
spontaneously adding strings to the cache.

Bug: v8:12718
Change-Id: I2ed49bd82e3baf2563eeb8f463be72c0308c52c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616553
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80803}
2022-05-30 07:44:10 +00:00
jameslahm
ca70df512d [test] Move cctest/test-types to unittests/compiler/types-unittest
Bug: v8:12781
Change-Id: I01416a638abbb0f2c590f806869c00356b0fcba5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675732
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80802}
2022-05-30 06:39:49 +00:00
jameslahm
d1fbcecc1d [test] Move cctest/test-strtod to unittests/numbers/
... strtod-unittest.

Bug: v8:12781
Change-Id: I86c3a27a0197103c4ca4be111d55e60b98928758
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675735
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80801}
2022-05-30 06:38:46 +00:00
jameslahm
e8186979f4 [test] Move cctest/test-version to unittests/utils/
... version-unittest.

Bug: v8:12781
Change-Id: If5bd862533c265bb87ee21008da27e8defebe863
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675734
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80800}
2022-05-30 06:37:30 +00:00
jameslahm
c78d7a9bcb [test] Move cctest/test-symbols to unittests/objects/
... symbols-unittest.

Bug: v8:12781
Change-Id: I14da3989b7af71886e5f8a122a9f569a9146b81e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675733
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80799}
2022-05-30 06:33:57 +00:00
jameslahm
dec69f8d07 [test] Move cctest/test-disasm-arm64 to unittests/assembler/
... disasm-arm64-unittest.

Bug: v8:12781
Change-Id: I4278eb39e9521bc49b280b22a681f6eb270b80d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675901
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80798}
2022-05-30 06:06:30 +00:00
jameslahm
26cb6b92ef [test] Move cctest/test-disasm-ia32 to test/unittests/
... disasm-ia32-unittest.

Bug: v8:12781
Change-Id: I7291ac23571ecb5564053ba97746c8d18fd615e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675900
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80797}
2022-05-30 06:05:28 +00:00
jameslahm
2669418337 [test] Move cctest/test-disasm-x64 to unittests/assembler/
... disasm-x64-unittest.

Bug: v8:12781
Change-Id: Ia00f626e097606cb27aaaff1841ae3b5a031b2e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675899
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80796}
2022-05-30 06:04:26 +00:00
jameslahm
d223aa6779 [test] Move cctest/test-traced-value to unittests/tracing/
... traced-value-unittest.

Bug: v8:12781
Change-Id: I0da3b38c12a1c1f39e47ddde9b266ff0249715bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675897
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80795}
2022-05-30 06:03:18 +00:00
Lu Yahan
a4f8bb5939 [riscv64] Fix name ambiguous
Change-Id: I30042811cec8fc2821b7a240c2f8b4e748f437e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673913
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80794}
2022-05-30 01:34:06 +00:00
Frank Tang
c61c73ad0d [Temporal] Add toJSON and non-intl version ot toLocaleString to PlainDateTime
Implement AO: TemporalDateTimeToString
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.tolocalestring

https://tc39.es/proposal-temporal/#sec-temporal-temporaldatetimetostring

Bug: v8:11544
Change-Id: I170fa13822d87cfd668bd4cd8df50476f00c86f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672001
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80793}
2022-05-28 19:17:45 +00:00
Frank Tang
8ea33c9f54 [Temporal] Add PlainTime toString and non-intl toLocaleString
Also implement AOs:
ToTemporalRoundingMode, ToSmallestTemporalUnit, RoundNumberToIncrement, RoundTime, ToSecondsStringPrecision

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tostring
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tolocalestring
https://tc39.es/proposal-temporal/#sec-temporal-totemporalroundingmode
https://tc39.es/proposal-temporal/#sec-temporal-tosmallesttemporalunit
https://tc39.es/proposal-temporal/#sec-temporal-roundnumbertoincrement
https://tc39.es/proposal-temporal/#sec-temporal-roundtime
https://tc39.es/proposal-temporal/#sec-temporal-tosecondsstringprecision

Bug: v8:11544
Change-Id: I47ea27e966232e89bab48bf15a48c2c00ce5e160
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3665937
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80792}
2022-05-28 19:05:25 +00:00
Shu-yu Guo
60e02cfb0c Revert "[shared-struct] Add Atomics.Mutex"
This reverts commit ea9a1f1cbe.

Reason for revert: arm64 pointer alignment issue
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8812962856609920785/+/u/Check/mutex-workers

Original change's description:
> [shared-struct] Add Atomics.Mutex
>
> This CL adds a moving GC-safe, JS-exposed mutex behind the
> --harmony-struct flag. It uses a ParkingLot-inspired algorithm and
> each mutex manages its own waiter queue.
>
> For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing
>
> Bug: v8:12547
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
> Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80789}

Bug: v8:12547
Change-Id: I226e16b743dc4b157fac33a9cbabab4d72cf290b
Cq-Include-Trybots: luci.v8.try: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/+/3673353
Owners-Override: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80790}
2022-05-28 01:31:54 +00:00
Shu-yu Guo
ea9a1f1cbe [shared-struct] Add Atomics.Mutex
This CL adds a moving GC-safe, JS-exposed mutex behind the
--harmony-struct flag. It uses a ParkingLot-inspired algorithm and
each mutex manages its own waiter queue.

For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing

Bug: v8:12547
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80789}
2022-05-28 01:04:34 +00:00
Frank Tang
6fdea7b040 [Temporal] Add ZonedDateTime to(Instant|Plain(Date)?(Time)?)
Also change some AO's return type from MaybeHandle to Handle
and call ToHandleChecked() on the right spot.

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toinstant
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaindate
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaintime
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.toplaindatetime

Bug: v8:11544
Change-Id: I140b6a7053d00837bc48fb70980d69778715c0c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3385603
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80788}
2022-05-27 23:03:08 +00:00
Frank Tang
e85a0243ce [Temporal] Add PlainDate(Time)?.(compare|prototype.equals)
Also add AO CalendarEquals, CompareISODateTime

Remove Isolate from CompareISODate argument
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.compare
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.equals
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.compare
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.equals
https://tc39.es/proposal-temporal/#sec-temporal-calendarequals
https://tc39.es/proposal-temporal/#sec-temporal-compareisodatetime

Bug: v8:11544
Change-Id: I5505c7923e3c1f76d44e292135b489ea20fbf13c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534458
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80787}
2022-05-27 23:02:04 +00:00
Shu-yu Guo
978506c3e2 [change-array-by-copy] Refactor ConvertToRelativeIndex
This refactors ConvertToRelativeIndex into a clamping version and a
version that takes OOB labels for the upcoming implementation of
Array#with and TypedArray#with.

Also gets rid of the the "to" in the name, because these macros are
actually converting _from_ a relative index to an absolute one, not
the other way around.

Bug: v8:12764
Change-Id: I8bf1c16ce73008164acbd6b849f4259fb9315274
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669655
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80786}
2022-05-27 21:13:14 +00:00
Shu-yu Guo
5299e11bda [change-array-by-copy] Add RAB/GSAB tests for toReversed
Bug: v8:12764
Change-Id: I51130143494e6442b335660d2fdcbc75f289fd92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3671759
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80785}
2022-05-27 21:00:34 +00:00
Frank Tang
17087937da [Temporal] Add Plain(YearMonth|MonthDay).prototype.toPlainDate
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.toplaindate
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.toplaindate

Bug: v8:11544
Change-Id: I506efe3fa3685f621596fa34301a73d8c57ded38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3566114
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80783}
2022-05-27 17:32:24 +00:00
Manos Koukoutos
ae2c0b1dd2 [wasm][turbofan] Annotate nodes with wasm types
We introduce wasm types to Turbofan. They are represented by a new
subtype of {TypeBase}.
Types are attached to nodes during graph generation, as nodes are
assigned to wasm values. Therefore, phi nodes corresponding to merges
are not typed. Missing types will be computed, and assigned types will
be narrowed as much as possible, in a retyping phase that will be
introduced later.

Bug: v8:7748
Change-Id: I943559cf1d512edfab3bb2d22f8748c072cb1911
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3660248
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80778}
2022-05-27 11:25:53 +00:00
Leszek Swirski
38a0bf1e79 Revert "[ic] Shadow smi_handler on LoadHandler to always be Smi"
This reverts commit 5f0e7dd44f.

Reason for revert: Turns out this isn't true: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/ic/ic.cc;l=946

Original change's description:
> [ic] Shadow smi_handler on LoadHandler to always be Smi
>
> StoreHandlers can store either a Code object or a Smi, so the
> smi_handler field on DataHandler is a Code|Smi. But, LoadHandlers can
> only store Smis here so add a shadowing smi_handler definition which
> only allows / returns Smis.
>
> Change-Id: Icc1c508db268950990b9c84b9e682b9a9b1f43e5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663745
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80775}

Change-Id: Ia2c14141ab5929be3ded883f0cecb40645a72dfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672419
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80776}
2022-05-27 09:51:14 +00:00
Leszek Swirski
5f0e7dd44f [ic] Shadow smi_handler on LoadHandler to always be Smi
StoreHandlers can store either a Code object or a Smi, so the
smi_handler field on DataHandler is a Code|Smi. But, LoadHandlers can
only store Smis here so add a shadowing smi_handler definition which
only allows / returns Smis.

Change-Id: Icc1c508db268950990b9c84b9e682b9a9b1f43e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663745
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80775}
2022-05-27 09:47:35 +00:00
Thibaud Michaud
3065af5325 [codegen] Fuzz gap resolver with codegen
The cctest test-code-generator/FuzzAssembleMove fuzzes codegen
for a random list of sequential moves by simulating the moves on a
FixedArray, and comparing the result to the output of the generated
code.

Add a variant of this test that resolves parallel moves first, to also
test integration with the gap resolver.

Bug: chromium:1313647
Change-Id: I02f385a957dafc89d91a4ab2216e0ac72147536d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3660252
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80774}
2022-05-27 09:36:13 +00:00
Leszek Swirski
9ed9dff9dd Revert "[builtins] use SIMD IndexOf/includes on large arrays"
This reverts commit ab76ffc8bd.

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

Original change's description:
> [builtins] use SIMD IndexOf/includes on large arrays
>
> Change-Id: If751e813c7f45a4d18b84e8c0314a54c84894d61
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639203
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80771}

Change-Id: I62dd4249df122af567680cbaa18deb3c9ed44c90
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672416
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80773}
2022-05-27 09:17:44 +00:00
Darius M
ab76ffc8bd [builtins] use SIMD IndexOf/includes on large arrays
Change-Id: If751e813c7f45a4d18b84e8c0314a54c84894d61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639203
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80771}
2022-05-27 08:40:25 +00:00
Frank Tang
4ad4ba1dff [Temporal] Add Plain(Date)?Time.prototype.with
Refactor ToTemporalTimeRecord to a new routine
ToTemporalTimeRecordOrPartialTime to share code with ToPartilTime
Change the return type of ToTemporalTimeRecord, RegulateTime

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal-topartialtime

Bug: v8:11544
Change-Id: I214147f497a405ee48e264833c7c0b9401596c01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3665269
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80769}
2022-05-27 04:00:13 +00:00
QiuJi
ee6c6a2f1c [riscv64] Using SystemPointerSize to index address for PrologueFillFrame
Also remove useless comment in test-assembler-riscv64

Change-Id: I28451386449f15542b02383d8bf1aa9c4539469c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669660
Auto-Submit: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80768}
2022-05-27 03:35:03 +00:00
Frank Tang
86a219d9c9 [Temporal] Add Duration.prototype.with
Also add AO: ToPartialDuration
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal-topartialduration
https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.with

Bug: v8:11544
Change-Id: I43282f5285a3c884229445547add6db2cde4fbe4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380102
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80767}
2022-05-27 00:53:03 +00:00
Adam Klein
2c2280554e Enable mjsunit/wasm/shared-memory-worker-gc
This test had been skipped since it was added in
4a416dbbe1.

Bug: v8:9380
Change-Id: I700f83fa4242baf44dd260fbc74520abf05101dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3670052
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80766}
2022-05-26 22:19:29 +00:00
Frank Tang
1b13172df3 [Temporal] Add PlainDateTime.prototype.withPlainDate
Also add AO: ConsolidateCalendars

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withplaindate
https://tc39.es/proposal-temporal/#sec-temporal-consolidatecalendars

Bug: v8:11544
Change-Id: I98084f7cc92a837f6401a88ad10389a7c5df8b3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563541
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80764}
2022-05-26 20:42:09 +00:00
Manos Koukoutos
66d3d28149 [wasm-gc] Improve array allocation
We inline array allocation for wasm-gc in the TF graph by using
AllocateRaw nodes. Additionally, we use memset to initialize large,
zero-initialized arrays. These changes give measurable speedup in some
benchmarks.

Bug: v8:7748
Change-Id: Icbd37d0fe673c673379139b96d0e1c175e95e357
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3666618
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80762}
2022-05-26 17:19:19 +00:00
Frank Tang
cc8b442773 [Temporal] Add PlainTime.prototype.toPlainDateTime
Spec Text: https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.toplaindatetime

Bug: v8:11544
Change-Id: I95bab9814471bb9347101d654f6dc902159f8fe3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538670
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80757}
2022-05-26 04:45:19 +00:00
Frank Tang
600cebb4d0 [Temporal] Add Date.prototype.toTemporalInstant
Spec Text:
https://tc39.es/proposal-temporal/#sec-date.prototype.totemporalinstant

Bug: v8:11544
Change-Id: I65315152333291f76edc05cc41a528912a185d02
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3609214
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80755}
2022-05-25 18:20:10 +00:00
Frank Tang
06d61bd575 [Temporal] Add ZonedDateTime.prototype.startOfDay
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.startofday

Bug: v8:11544
Change-Id: I475e03fa9ba43290896a906524414cfbddd1f7bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3385610
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80754}
2022-05-25 18:19:08 +00:00
Manos Koukoutos
fe44d70604 [test] Skip failing test
Bug: v8:12907
Change-Id: I8a6da86b4c88b5cfcc9bbb349841c422ac81b64e
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3667082
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80751}
2022-05-25 15:04:47 +00:00
Andy Wingo
e4941131f1 [stringrefs] Implement string.new_wtf8
Bug: v8:12868

Also adds the equivalent of Utf8Decoder, but for WTF-8.

Change-Id: I1548a44b0aea912cdd429eb85be4dfc606355cad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3660257
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80750}
2022-05-25 14:38:38 +00:00
Maya Lekova
5480e036d2 [megadom] Add TF inlining for Megadom
The generated code checks if the receiver is a JS_API_OBJECT and if the
receiver requires an access check, and if not it lowers the call to an
API call.

We also add compilation dependencies on the protector cell to deopt if
our invariants change. (Note - the actual invalidation of these cells
will be implemented in a follow up CL)

Bug: v8:11321
Change-Id: I15722f1e5fac7176e292da4a35186e4609636aba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2719563
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80748}
2022-05-25 14:07:01 +00:00
Anton Bikineev
51d2256b8a cppgc: Conservatively scan compressed pointers
Due to collections with inlined storage, Oilpan still supports on-stack
Members, which are always compressed if pointer compression is enabled.
This CL scans halfwords (together with full words) on stack to find
potential pointers. Since on-heap pointers can only be compressed and
in-construction objects always reside on heap, only halfwords need to be
scanned for them.

The alternative potential followup approaches:
1) Use a separate uncompressed type for pointer in inlined collections;
2) Dynamically register regions of stack containing compressed pointers.

Bug: chromium:1325007
Change-Id: Ia706fd8e7383d30aff11f4014faa9edd3d289a55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644959
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80747}
2022-05-25 14:04:41 +00:00
Seth Brenith
d21b37d3f2 Revert several changes that caused performance regressions
This change reverts the following:

400b2cc2c6 Don't rescue old top-level SharedFunctionInfos
Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3657472

16a7150bae Reland "Disable recompilation of existing Scripts from
           Isolate compilation cache"
Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3655011

2df4d58a9e Fix rehashing of script compilation cache
Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3654413

c8848cf493 Refactor CompilationSubCache
Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3629603

2507217839 Improve Script reuse in isolate compilation cache, part 1
Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3597106

Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601, chromium:1328671, chromium:1328672, chromium:1328678, chromium:1328811, chromium:1328810
Change-Id: I1d318dc172e5214166d3b15f19903186f4fe6024
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3664023
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80744}
2022-05-25 12:11:28 +00:00
Simon Zünd
50f84564b4 [inspector] Reset the async task stack when resetting the context group
This CL fixes an issue with async stacks. The async task stack is not
torn down between page navigations or reloads. The result is that
any new async tasks are stacked on top of the old pages async task
stack.

This was not prominent until now for two reasons:
  1) Async tasks created in blink are always finished as long as
     destructors have time to run.
  2) When V8 is terminated while running the micro task queue also
     all async tasks created for Promises (including `await`) are
     cleaned up properly.

Introducing the stack tagging API made it more common for having
unfinished async tasks open outside the MTQ, which left the
async task stack non-empty during navigation.

This CL fixes this problem by clearing out all the async task
and async stack data structures for a context group when that
context group is reset.

R=bmeurer@chromium.org, victorporof@chromium.org

Fixed: chromium:1328785
Change-Id: Iee0c3c4a55f66e643829dae3726dc03c735da1dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3666620
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80741}
2022-05-25 10:51:23 +00:00
Darius M
702f0ff111 [compiler] Inline Array.prototype.at in JSCallReducer
Bug: v8:12865
Change-Id: I539a5b0a9c3c78ef9a767de75b71dd06de337d9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647351
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80740}
2022-05-25 10:01:03 +00:00
Simon Zünd
9e27dbca79 [debug] Fix crash when live editing unused inner functions
This CL fixes a wrong assumption in the LiveEdit machinery. Namely
the assumption that every FunctionLiteral the parser finds, will have
a corresponding SFI created by the compiler. This assumption does not
hold in all cases. Inner functions that are never referenced by the
outer function don't get an SFI.

R=bmeurer@chromium.org

Fixed: chromium:1328453
Change-Id: I674f023f948954c1fcae04a4aa2afb69ea1642aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663443
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80735}
2022-05-25 07:51:03 +00:00
Frank Tang
3ba8390cb9 [Temporal] Add PlainTime.(compare|prototype.equals)
Also add AO: CompareTemporalTime

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.compare
https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.equals
https://tc39.es/proposal-temporal/#sec-temporal-comparetemporaltime

Bug: v8:11544
Change-Id: I8e2a320c2e296558e1fb15ef6e855e6b6a14ece2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538669
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80732}
2022-05-25 03:10:23 +00:00
Frank Tang
702f874a3b [Temporal] Add PlainDateTime.prototype.toPlain(Date|Time)
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplaindate
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplaintime

Bug: v8:11544
Change-Id: Ifb7115823d1d3d1ff53806f1b376d69302e00ae1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3385761
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80731}
2022-05-25 01:17:21 +00:00
Frank Tang
38e56036dd [Temporal] Add PlainTime.prototype.toZonedDateTime
Spec Text: https://tc39.es/proposal-temporal/#sec-temporal.plaintime.prototype.tozoneddatetime

Bug: v8:11544
Change-Id: I147b1d21b4728520c5667a30548ec77f71d7445a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3554456
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80730}
2022-05-24 22:10:12 +00:00
Patrick Thier
9964283126 Re-enable shared-memory tests under tsan/stress_incremental_marking
The underlying issue was fixed with https://crrev.com/c/3660258

Bug: v8:12883
Change-Id: If7a1fdaf122396396cfbaaae3a68ef89bafc1703
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663342
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80728}
2022-05-24 18:05:03 +00:00
Peter Kasting
db24d136fb C++20 fixes.
Math between disparate enums is deprecated.  Use constexprs instead.

This requires switching some caller code to work with the new non-enum
constants also.

Bug: chromium:1284275
Change-Id: Ifb3c8757ed62e2a0966120f830f0a7e282b53a16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3661148
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80722}
2022-05-24 13:58:20 +00:00
Dominik Inführ
3674876cd6 [heap] Fix test failure with disabled map space
Fix failing tests with --no-use-map-space enabled.

Bug: v8:12578
Change-Id: I121b0d22cd69e76b6c5c02d1f83a166af0610b83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3663343
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80717}
2022-05-24 12:31:51 +00:00
jameslahm
560ce080fe [test] split websnapshot tests to avoid
... timeout in the big websnapshot tests.

Bug: v8:12891
Change-Id: I7837ba985f835e20af294ea0206dfafb5def7619
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3660705
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80713}
2022-05-24 09:57:58 +00:00
Solomon Kinard
ab2aa72dc7 v8: Copyright: Remove extra slashes
Change-Id: I924a2b4dc4ab5e7be22fd2a9a1084473ba65fc35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3651039
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80711}
2022-05-24 09:40:28 +00:00
Frank Tang
fc50b033e3 [Temporal] Add PlainDate.prototype.toZonedDateTime
Spec Text: https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tozoneddatetime

Bug: v8:11544
Change-Id: I758e46efdc33cfc3f336e5c595a402123ae6c485
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3535920
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80709}
2022-05-24 07:54:30 +00:00
Frank Tang
8516c9bed5 [Temporal] Add Plain(Date|YearMonth|MonthDay).prototype.with
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: I311d6246646ce18503804352bc95a374af3d8c6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565014
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80708}
2022-05-24 06:04:35 +00:00
Frank Tang
a663b1ff66 [Temporal] Add PlainDate toPlainDateTime
Spec Text: https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplaindatetime

Bug: v8:11544
Change-Id: Ie86a5d8a2f1206a44d0e74638392ae26e0f8e900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534454
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80707}
2022-05-24 05:13:47 +00:00
Frank Tang
3c53e9adae [Temporal] Add PlainDateTime.prototype.withPlainTime
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.withplaintime

Bug: v8:11544
Change-Id: I5277fb88675bb6d99b028a289329db06b95cc003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565026
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80706}
2022-05-24 05:11:48 +00:00
Frank Tang
2fc37ae5e2 [Temporal] Syntax error if DateExtendedYear is -000000
Sync to PR2036
https://github.com/tc39/proposal-temporal/pull/2036

Treat -000000 in DateExtendedYear as syntax error

Bug: v8:11544
Change-Id: I8cf7a506e85ad2b74d572142d646f3f98cd8bffa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3633620
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80705}
2022-05-24 04:58:31 +00:00
Shu-yu Guo
116e6a528d [change-array-by-copy] Implement toReversed
Bug: v8:12764
Change-Id: I7e76647be838749b723400914b144b9ec2a27cd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3656520
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80703}
2022-05-24 00:57:21 +00:00
Deepti Gandluri
37569a5a99 [wasm-relaxed-simd] Enable relaxed Swizzle on Arm/Arm64
Also remove the SKIP statement for relaxed min/max tests

Bug: v8:12284
Change-Id: Iff67fe2a1c281295f237fbb95a9a36da668f27e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3651530
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80701}
2022-05-23 20:24:27 +00:00
Joyee Cheung
bb98b38735 [ic] handle access check for private names
Previously the LookupIterator ignores private symbols
(including private names) for the access check. This patch
removes these exceptions so that they are always checked.

Drive-by: removes the unused should_throw parameter in
Runtime::DefineObjectOwnProperty()

Bug: chromium:1321899
Change-Id: I9677b1e377f01d966daa1603eee1ed9535ffab92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623419
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80700}
2022-05-23 18:30:07 +00:00
Leszek Swirski
9ec29a4428 [maglev] Implement BranchIfInt32Compare
Add an implementation of BranchIfInt32Compare, which is emitted whenever
a compare op is immediately followed by a branch.

Bug: v8:7700
Change-Id: I2c56d9de199bac8de33b33201f8614aee8e9894e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647693
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80694}
2022-05-23 11:40:57 +00:00
Frank Tang
05f3596f80 [Temporal] Add PlainDateTime.prototype.toZonedDateTime
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.tozoneddatetime

Bug: v8:11544
Change-Id: Ic4464e6d4521fb7e006164933df4f38c5d3115b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3554666
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80685}
2022-05-21 01:38:55 +00:00
Frank Tang
a90169d304 [Temporal] Add Instant.prototype.toZonedDateTime(ISO)?
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tozoneddatetime
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tozoneddatetimeiso

Bug: v8:11544
Change-Id: I452dfbf027e5d58edde9f9691519204ff29d8082
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3382058
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80684}
2022-05-21 01:30:26 +00:00
Frank Tang
4cf301722c [Temporal] Add PlainYearMonth.from
Also Add AOs: ToTemporalYearMonth, YearMonthFromFields, ParseTemporalYearMonthString

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.from
https://tc39.es/proposal-temporal/#sec-temporal-totemporalyearmonth
https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalyearmonthstring
https://tc39.es/proposal-temporal/#sec-temporal-yearmonthfromfields

Bug: v8:11544
Change-Id: I04b30a4159142a996c765c542f19e66bee593e4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538666
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80683}
2022-05-21 01:19:45 +00:00
Frank Tang
9473a5e987 [Temporal] Add toJSON to PlainTime
Bug: v8:11544
Change-Id: Iaf440009b2abdf9e90de3ed0e6e02eb35060a65b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3437889
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80682}
2022-05-21 01:14:05 +00:00
Frank Tang
db2dc63535 [Temporal] Add ZonedDateTime.prototype.withPlainTime
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.withplaintime

Bug: v8:11544
Change-Id: I1c35c1105c9f2cc051d3b17718f52170fbee2a5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565027
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80681}
2022-05-21 01:04:45 +00:00
Frank Tang
a2f22f4355 [Temporal] Add PlainDate(Time)? toPlain*Month*
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplainmonthday
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.toplainyearmonth
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplainyearmonth
https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.toplainmonthday


Bug: v8:11544
Change-Id: Ia97de3b4dde183ae4ee514deb4d13da5d5ff9bae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534451
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80680}
2022-05-21 00:26:07 +00:00
Frank Tang
71fb98092b [Temporal] Add ZonedDateTime.prototype.* forward to calendar
Implement the following methods of ZonedDateTime
year, month, monthCode, day, dayOfWeek, dayOfYear, weekOfYear,
daysInWeek, daysInMonth, daysInYear, monthsInYear, inLeapYear,
era, eraYear

Also implement corresponding AOs (CalendarXXX).

Spec Text:
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.year
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.month
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.monthcode
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.day
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.dayofweek
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.dayofyear
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.weekofyear
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinweek
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinmonth
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.daysinyear
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.monthsinyear
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.inleapyear
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.era
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.erayear

Bug: v8:11544
Change-Id: I7d7008a719f0109836834d170c5f52b49c3ffb7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565028
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80678}
2022-05-20 23:07:26 +00:00
Frank Tang
74aa5e7d68 [Temporal] Add Temporal.Duration.prototype.toJSON
Also add AO: TemporalDurationToString

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal-temporaldurationtostring

Bug: v8:11544
Change-Id: I7dfdb5458b88646a4ac7b7713e7c8e63352f7539
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3438375
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80677}
2022-05-20 22:38:35 +00:00
Frank Tang
caccea8d09 [Temporal] Add PlainMonthDay.from
Also add AOs: ParseTemporalMonthDayString, MonthDayFromFields,
ToTemporalMonthDay
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.from
https://tc39.es/proposal-temporal/#sec-temporal-totemporalmonthday
https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalmonthdaystring
https://tc39.es/proposal-temporal/#sec-temporal-monthdayfromfields

Bug: v8:11544
Change-Id: I971b5a0f43b9dbeefe38ebe28035f7c9b1a617ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538664
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80676}
2022-05-20 22:34:05 +00:00
Frank Tang
c68336252d [Temporal] Add Plain(Date|MonthDay|YearMonth).*.to(Locale)?String
Spec Text:
https://tc39.es/proposal-temporal/#sup-temporal.plaindate.prototype.tostring
https://tc39.es/proposal-temporal/#sup-temporal.plaindate.prototype.tolocalestring
https://tc39.es/proposal-temporal/#sup-temporal.plainmonthday.prototype.tostring
https://tc39.es/proposal-temporal/#sup-temporal.plainmonthday.prototype.tolocalestring
https://tc39.es/proposal-temporal/#sup-temporal.plainyearmonth.prototype.tostring
https://tc39.es/proposal-temporal/#sup-temporal.plainyearmonth.prototype.tolocalestring

Implement toString/toLocaleString as non-intl version.

Because toString took options bag in Temporal, we cannot use the
same way how we handle Date.prototype.toLocaleString() for non-intl
build by just forwarding to it's toString implementation.
Change built-ins-defintions.h to always has built-ins for
*.toLocaleString , not just in intl build.
Change src/init/bootstrapper.cc away of the toLocaleString forward
to toString approach.

Implement the non-intl version of ToLocaleString in js-temporal-objects.cc for
Temporal.Plain(Date|YearMonth|MonthDay)


Bug: v8:11544
Change-Id: I202bcf28ef05ed03c337475300cfdfd18b52ffb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3656137
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80675}
2022-05-20 20:35:35 +00:00
Andy Wingo
44932c1689 [stringrefs] Parse the string literals section
Bug: v8:12868

Also adds wtf8.cc, wtf8.h to src/wasm, to implement WTF-8 validation and
possibly other utilities.  Also fixes a bug when parsing the string
literals section; I had misunderstood the way the unordered/ordered
sections mechanism worked.

Change-Id: I3c4205e0872379a69575f84ba33e0090a9d8d656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652789
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80674}
2022-05-20 20:04:35 +00:00
Marja Hölttä
e819612aaf [web snap] Enable context referring to function
Bug: v8:11525,v8:12820
Change-Id: Ic4cd3172a4d6884b8234ca6b6463dfc405e10ba1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652793
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80672}
2022-05-20 16:10:44 +00:00
Tobias Tebbi
6e1fcf22f3 [test] remove flaky isOptimized check in regress-crbug-1323114.js
Bug: v8:12893
Change-Id: Ibc2068011243b2ec811cd90646f0ec2a0d93cc05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657433
Auto-Submit: Tobias Tebbi <tebbi@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@{#80671}
2022-05-20 14:50:02 +00:00
Leszek Swirski
47090774a4 [maglev] Add more Int32/Float64 arithmetic nodes
Add Int32/Float64 nodes for:

  * Subtract
  * Multiply
  * Divide

and additionally Int32 nodes for

  * BitwiseOr/And/Xor
  * ShiftLeft/Right/RightLogical

The latter ones don't have Float64 equivalents since they're implicitly
Int32 operations. In the future we'll add support for Number feedback by
adding Float64-to-Int32 conversions and using the Int32 nodes.

The divide node does an Int32 division and deopts if there's a remainder
to the division -- we may want to make it output a Float64 instead if we
think that's more likely in real-world code. There's also no peephole
optimisations for constant operations, which would generate much better
code, especially for shifts.

Bug: v8:7700
Change-Id: Ief1d24b46557cf4d2b7929ed50956df7b0d25992
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652301
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80670}
2022-05-20 14:48:59 +00:00
Tobias Tebbi
c2430b4ff2 Revert "[heap] Disable map space with --future"
This reverts commit 74c68e2a04.

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

Original change's description:
> [heap] Disable map space with --future
>
> Original CL got reverted, this time the failing test should be fixed.
>
> Bug: v8:12578
> Change-Id: Id2d8801f07742e8b00884fefec8200e4270f4250
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657434
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80668}

Bug: v8:12578
Change-Id: I2ee20c79ec09ff4f7bece6ddcc1c3a5cd9351223
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647692
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@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@{#80669}
2022-05-20 14:47:24 +00:00
Dominik Inführ
74c68e2a04 [heap] Disable map space with --future
Original CL got reverted, this time the failing test should be fixed.

Bug: v8:12578
Change-Id: Id2d8801f07742e8b00884fefec8200e4270f4250
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657434
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80668}
2022-05-20 13:22:44 +00:00
Marja Hölttä
0d57c9a863 [web snap] Fix context tree serialization
Enforce the parent context has a smaller id, this time more forcefully.

Bug: v8:11525,v8:12820
Change-Id: I05bf675545b81b818eebfcaa40ee6bb93f5bcf9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652792
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80666}
2022-05-20 12:21:50 +00:00
Jakob Kummerow
86be87df9c [bigint] Fix object literal property keys like 0x0n
Fixed: chromium:1327321
Change-Id: I4868e0127b9dd14a0812cafca1681280534faa46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652788
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80661}
2022-05-20 11:21:15 +00:00
Andy Wingo
b48262d719 [stringrefs] Add generalized UTF-8 decoder / validator
Bug: v8:12868

A slight modification to the existing DFA-based UTF-8 allocator to allow
decoding surrogates, for use in decoding WTF-8.  We'll need to
additionally constrain the decoder to disallow surrogate pairs.

Change-Id: Ifddbf08d4eeeff8f270df52a68f01769ea790eec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652787
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80654}
2022-05-20 08:05:04 +00:00
Seth Brenith
16a7150bae Reland "Disable recompilation of existing Scripts from Isolate compilation cache"
This is a reland of commit a76072217a

The bug exposed by landing this change the first time has been fixed
separately in https://crrev.com/c/3654413 .

Original change's description:
> Disable recompilation of existing Scripts from Isolate compilation cache
>
> My previous change https://crrev.com/c/3597106 led to some performance
> regressions in time spent on parsing and compilation. This change
> disables the ability to recompile an existing uncompiled Script, as an
> attempt to both fix the regressions and isolate which part of the
> previous change was the cause of those problems.
>
> Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601
> Change-Id: Ifa086bf27070da8f4b3c0e4415af5ca7b6706b0a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652252
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#80616}

Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601
Change-Id: Ib31864bef90ff3340d1dfd4e25e21bef121f2d49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3655011
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80645}
2022-05-19 16:50:14 +00:00
Clemens Backes
4a6e65bf56 [wasm] Avoid HandleScope when triggering tier-up
Triggering tier-up can happen very often, so the runtime function should
be as slim as possible.

This CL adds two DisallowGarbageCollection scopes and removes a
HandleScope which was unnecessarily created.

R=jkummerow@chromium.org

Bug: v8:12281
Change-Id: I43e7f2b449630856ac8dfb36d294fbd29191d0eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652300
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80644}
2022-05-19 16:43:05 +00:00
Issack John
a679edbb6e JSON.parse errors made user-friendly part 2
Part of the improve error messages initiative.

Based on a resource of JSON.parse() errors found at
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse

added support for:
- 'Bad control character in string literal'
- 'Bad Unicode escape'

Previously JSON.parse('"a\bz"') would output:
SyntaxError: Unexpected token  in JSON at position 2
Now the output is:
SyntaxError: Bad control character in string literal in
JSON at position 2

Previously JSON.parse("[\"\\t\\u") would output:
SyntaxError: Unexpected end of JSON input
Now the output is:
SyntaxError: Bad Unicode escape in JSON at position 6

Bug: v8:6551
Change-Id: I3ba5450c41b8a388643a15bc58e4e3fc75855d13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652254
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Issack John <issackjohn@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80642}
2022-05-19 15:07:03 +00:00
Stephen Roettger
4d6ddf1b5f Remove deprecated AccessorSignatures
Bug: chromium:1310790
Change-Id: I739161f47fc1fc32d832f106d5ef6b7df4aed213
Fixed: chromium:1310790
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3654096
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Stephen Röttger <sroettger@google.com>
Cr-Commit-Position: refs/heads/main@{#80639}
2022-05-19 14:15:54 +00:00
Clemens Backes
16fb5ccfa5 [wasm] Add comment about WasmOpcode encoding
As a follow-up to https://crrev.com/c/3625835, document how we
internally encode Wasm opcodes in the WasmOpcode enum. In particular,
it's important for the mapping to be bijective.

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

Bug: v8:12284
Change-Id: Ic4bcd70211e83b1eabb45204bdcce3209a4432b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647360
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80635}
2022-05-19 10:40:05 +00:00
Frank Tang
5354d8a1c6 [Temporal] Add PlainYearMonth.prototype.toJSON
Also add AOs: TemporalYearMonthToString

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal-temporalyearmonthtostring

Bug: v8:11544
Change-Id: Ibe8bd20ae5eb5b7721e50cf5386c20d8d23e18e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3437894
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80627}
2022-05-19 05:06:23 +00:00
Frank Tang
0b44a86009 [Temporal] Add PlainMonthDay.prototype.toJSON
Also add AO: TemporalMonthDayToString

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal-temporalmonthdaytostring

Bug: v8:11544
Change-Id: Ibbc5b28a9c73474f7edc1b67c9beabf5bca54dbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3437891
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80624}
2022-05-19 02:44:13 +00:00
jiepan
852e075639 [wasm-simd][x64] Optimize I8x16Shuffle if one input is S128Zero
If b is S128Zero, Shuffle(a,b,s) can be optimized to
Swizzle(a,s). By setting s[i] to 0x80, we can avoid access b.
If a is S128Zero, we can swap a and b first.

If one input of I8x16Shuffle is S128Zero, this patch can save
~60% instructions(7 of 12), and more than 30% improvement is
observed in local microbenchmarks.

Change-Id: I5953fa9064e01203cd4cf423c55dd5ed33cad57e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3544992
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/main@{#80623}
2022-05-19 01:26:03 +00:00
Frank Tang
a5697616eb [Temporal] Add PlainDate.prototype.toJSON
Also add AOs: PadISOYear, FormatCalendarAnnotation, TemporalDateToString
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal-padisoyear
https://tc39.es/proposal-temporal/#sec-temporal-formatcalendarannotation
https://tc39.es/proposal-temporal/#sec-temporal-temporaldatetostring

Change the ISODateTimeWithinLimits from
-8.64 × 10^21 - 8.64 × 10^16, 8.64 × 10^21 + 8.64 × 10^16
to
-8.64 × 10^21 - 8.64 × 10^13, 8.64 × 10^21 + 8.64 × 10^13
per https://github.com/tc39/proposal-temporal/pull/1723

Change to use AppendCStringLiteral instead of AppendCharacter when
appropriate.

Bug: v8:11544
Change-Id: I01f22657b2c3e5aacbea790593d7e9f60076ec74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3438379
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80622}
2022-05-19 01:22:23 +00:00
Deepti Gandluri
0236d7b5b4 [wasm-relaxed-simd] Add liftoff min/max operations on Arm and Arm64
Instruction lowering on ARM uses pmin/pmax as there is no hardware support.
More details here: https://github.com/WebAssembly/relaxed-simd/issues/33

Bug: v8:12284
Change-Id: I075d4a6660afc4418fcc91c5d48e8e9096536dc9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3646075
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80621}
2022-05-18 23:22:03 +00:00
Adam Klein
09c1012b21 Skip shared-memory tests under tsan/stress_incremental_marking
Goal is to keep the tree green while the issue is investigated.
No impact on shipped product since shared-memory is flag-guarded off.

Bug: v8:12883
Change-Id: I9a434bdebc781023fa6693eef47db6dbe81cd4bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3653320
Auto-Submit: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80619}
2022-05-18 18:48:01 +00:00
Adam Klein
de877f7497 Revert "Disable recompilation of existing Scripts from Isolate compilation cache"
This reverts commit a76072217a.

Reason for revert: fails on GC Stress bot:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/38512/overview

Original change's description:
> Disable recompilation of existing Scripts from Isolate compilation cache
>
> My previous change https://crrev.com/c/3597106 led to some performance
> regressions in time spent on parsing and compilation. This change
> disables the ability to recompile an existing uncompiled Script, as an
> attempt to both fix the regressions and isolate which part of the
> previous change was the cause of those problems.
>
> Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601
> Change-Id: Ifa086bf27070da8f4b3c0e4415af5ca7b6706b0a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652252
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#80616}

Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601
Change-Id: I0f56163856d04ff49da96b0fb344fb59b5501a40
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3653273
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@{#80617}
2022-05-18 16:45:11 +00:00
Seth Brenith
a76072217a Disable recompilation of existing Scripts from Isolate compilation cache
My previous change https://crrev.com/c/3597106 led to some performance
regressions in time spent on parsing and compilation. This change
disables the ability to recompile an existing uncompiled Script, as an
attempt to both fix the regressions and isolate which part of the
previous change was the cause of those problems.

Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601
Change-Id: Ifa086bf27070da8f4b3c0e4415af5ca7b6706b0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3652252
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80616}
2022-05-18 15:47:59 +00:00
Dominik Inführ
e9af212a11 [heap] Check liveness of invalidated objects in UpdateUntypedPointers
This is a follow-up CL to https://crrev.com/c/3623542.

When updating pointers during a full GC, a page might not be swept
already. In such cases there might be invalid objects in free memory.
Since these objects might be dead, their maps might have been reclaimed
already as well.

The previous CL cached the size of invalid objects in order to avoid
accessing an invalid object's map. However, as soon as a slot is within
an invalid object, we also need to check whether this slot is still a
tagged pointer which would require map access. This CL checks marking
bits on invalid objects to skip that check on such invalid objects.

Bug: v8:12578, chromium:1316289
Change-Id: Ie1d736f897a2994dbed7bfb95ed37732cd3b0882
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596123
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80609}
2022-05-18 07:47:28 +00:00
Marja Hölttä
2cb5a08f43 [web snapshot] Add support for derived constructors
Especially, this requires having the __proto__s of functions serialized.

Drive-by fix (gc stress): Handlify IterateBuiltinObjects.

Bug: v8:11525
Change-Id: I8dc50b9144d17134a7c9b8fdbabe23f5e44f197f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644613
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80608}
2022-05-18 07:42:21 +00:00
Frank Tang
972d7e5abf [Temporal] Add TimeZone getOffset(Nanoseconds|String)For
Also add the non-intl version of AO
GetIANATimeZoneOffsetNanoseconds which only implement for UTC.
(intl version implement other tz come later)

Also fix bug in JSTemporalTimeZone::offset_nanoseconds() that
"1000000L * offset_milliseconds()" may overflow int32_t before returning as int64_t by first casting offset_milliseconds() to int64_t in the operation so the whole formula is calculating under 64 bits not 32 bits. This bug fix some  *timezone-string-datetime tests.

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getoffsetnanosecondsfor
https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getoffsetstringfor
https://tc39.es/proposal-temporal/#sec-temporal-getianatimezoneoffsetnanoseconds

Bug: v8:11544
Change-Id: I2227dbfc8d6ed3ef83edcef5a9b903b8642b5902
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534622
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80606}
2022-05-18 07:15:48 +00:00
Andy Wingo
010de10eb8 [stringref] Add support for stringrefs in tables
Bug: v8:12868
Change-Id: I42ef3e15b2a7fd2ef157aa0e657ddf98973e8d79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644956
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80605}
2022-05-18 06:11:20 +00:00
Andy Wingo
59b7d6a0c1 [stringref] Add test for wasm-to-js calls
Bug: v8:12868
Change-Id: I8d789457c725708e06f482d362d17c16a802a1f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644950
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80603}
2022-05-17 19:14:37 +00:00
George Wort
1e12c1f7ff [wasm-simd][arm64] Do not emit Bic(x, imm) for AndNot(imm, x)
Fix bug where AndNot(x, imm) and AndNot(imm, x) both become Bic(x, imm).

Bug: chromium:1318092
Change-Id: I0ca2c65a1e5d64da0347c86346e7c4dc04943eff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3613386
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: George Wort <george.wort@arm.com>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80600}
2022-05-17 16:13:27 +00:00
Solomon Kinard
87b4acd3d6 v8: Remove extra slashes
Change-Id: Ib5d2e24ee4a83547b9d403d5d8b5d75173b8310b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3648093
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Solomon Kinard <solomonkinard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80597}
2022-05-17 15:27:27 +00:00
Clemens Backes
4fef561880 [wasm] Clean up SetCompiledModuleBytes
- Pass base::Vector instead of pointer plus size
- Remove always-true return value
- Remove unused SetCompiledModuleBytes in tests
- Drive-by: Use std::move for std::function callback

R=ahaas@chromium.org

Bug: v8:12425
Change-Id: I698abb64e4c8d8229997f09d6a79ef664fe9c933
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644952
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80596}
2022-05-17 14:27:13 +00:00
Leszek Swirski
1ab43384ca [maglev] Make maglev frames optimized frames
Split off a TurbofanFrame from OptimizedFrame, and make MaglevFrame a
subclass of OptimizedFrame. This allows it to be treated as an optimized
frame by code that is looking at deoptimization data.

Bug: v8:7700
Change-Id: Ia38e0f1c2cd73f054f63be81dff187d9197c1202
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644798
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80592}
2022-05-17 13:43:22 +00:00
jameslahm
bc5677de91 [test] Move cctest/parsing to unittests/parser
This CL moves cctest/parsing/{test-parse-decision,
test-scanner-streams, test-scanner} to unittests/{
parse-decision-unittest, scanner-streams-unittest,
scanner-unittest}.

Bug: v8:12781
Change-Id: I2adfeaf2ccc796f17d6b7010c77b1f65c6ce593e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3612668
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80588}
2022-05-17 13:07:30 +00:00
Manos Koukoutos
2a606bdb27 [wasm-gc][turbofan] Allow incompatible mutability in CsaLoadElimination
Loading from/storing to the same field with incompatible mutabilities
is possible in unreachable code, specifically when a value is cast to
two different types with incompatible mutability for the same field
offset. Therefore, we allow this pattern in CsaLoadElimination.
When we detect it, we emit an Unreachable node to immediately crash the
program in case this unreachable code is somehow executed.

Bug: v8:7748, v8:12874
Change-Id: Ieb359d3e1b9f7bc4a91c556af2bba0507526d20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644806
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80587}
2022-05-17 13:06:28 +00:00
Andy Wingo
1a3edfb7e5 [stringref] Add support for stringref globals, with JS interface
Bug: v8:12868
Change-Id: I955155db468b2ecd86fa6c5a73c616b0e4c66446
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644949
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80584}
2022-05-17 11:35:47 +00:00
Marja Hölttä
eb56775a69 [rab/gsab]: RAB/GSAB support for Function.p.apply
Bug: v8:11111, chromium:1321013
Change-Id: Iec45b885e844ab02059470dd514f47133b0a6efe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650596
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80583}
2022-05-17 10:50:27 +00:00
Solomon Kinard
b5c95961bd v8: Copyright: Remove extra slashes
Change-Id: I3d3b1f0b86714e0d654ed18c055d394002dbec2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650832
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80582}
2022-05-17 10:18:24 +00:00
jameslahm
2eeed60520 [test] move cctest/libsampler to unittests/libsampler
This Cl moves cctest/libsampler/{test-sampler, test-signals-and-mutexes}
to unittests/libsampler/{sampler-unittest, signals-and-mutexes-unittest}.

Bug: v8:12781
Change-Id: I106e709a66d00d23df76c6868d0843dd0ac1887e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3612666
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80581}
2022-05-17 09:51:27 +00:00
Andy Wingo
e5af9c4f97 [stringref] Add support for passing stringref values to/from JS
Bug: v8:12868
Change-Id: Ib4540352c7db4b4bdbf88b559da44b08e71dd483
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650603
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80580}
2022-05-17 09:42:28 +00:00
jameslahm
6faa6d553b [test] Move cctest/test-roots to unittests
... /objects/roots-unittest.

Bug: v8:12781
Change-Id: Id76a0e1ffaea18849866fa0f55c9a056dbdf6e2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3612670
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80579}
2022-05-17 09:12:17 +00:00
jameslahm
552ffd38dc [test] Migrate cctest/test-api-accessors.cc to unittests/
... api/accessor-unittest.cc.

- Add IsInt32, IsString, IsUndefined matcher in
testing/gmock-support.h.

Bug: v8:12781
Change-Id: I764491d7643e35fb8bc1621e857873aa24f64ccd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593573
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80577}
2022-05-17 08:27:55 +00:00
jameslahm
e740932949 [test] Move cctest/{test-bignum-dtoa, test-dtoa
... ,test-fast-dtoa, test-fixed-dtoa} to unittests/base/
{bignum-dtoa-unittest, dtoa-unittest, fast-dtoa-unittest,
fixed-dtoa-unittest}.

This CL also moves cctest/{gay-fixed, gay-precision,
gay-shortest} to unittest/{gay-fixed, gay-precision,
gay-shortest}.

Bug: v8:12781
Change-Id: Id6072f92908ad3abfe683c69dac041227de2553f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3607114
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80572}
2022-05-17 01:38:57 +00:00
Solomon Kinard
f54408434b v8: Copyright: Remove extra slashes
Change-Id: Ib8ca0c771b50b712e5fd6acb470213235f69a99b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650833
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Solomon Kinard <solomonkinard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80569}
2022-05-16 18:19:06 +00:00
Issack John
718f743750 JSON.parse errors made user-friendly
Part of the improve error messages initiative.

Based on a resource of JSON.parse() errors found at
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/JSON_bad_parse

Previously JSON.parse(NaN) would output:
SyntaxError: Unexpected token N in JSON at position 0
Now the output is:
SyntaxError: "NaN" is not valid JSON

Previously JSON.parse("{a:1}") would output:
SyntaxError: Unexpected token a in JSON at position 1
Now the output is:
SyntaxError: Expected property name or '}' in JSON at position 1

Bug: v8:6551
Change-Id: Ic9fad1fdbd295e1302805b81e6603fc526121960
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513684
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Issack John <issackjohn@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80567}
2022-05-16 17:02:37 +00:00
Clemens Backes
b33179ae4d [API] Pass OOMDetails to OOMErrorCallback
This adds a new struct "OOMDetails" which is passed to the
OOMErrorCallback. It currently holds the "is_heap_oom" bool that was
also passed before, plus an optional "detail" string.
The struct can later be extended without having to change the signature
of the OOMErrorCallback. Removing fields will have to follow the
standard deprecation rules, but this is also easily possible without the
hassle for this initial change.

We modify the deprecated OOMErrorCallback definition and un-deprecate it,
which can be seen as removing a deprecated API and adding a new one in
one CL.

R=mlippautz@chromium.org, jkummerow@chromium.org

Bug: chromium:1323177
Change-Id: Ic4c2cb5856906ebd664626fe463d8e96cb99b0a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647827
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80565}
2022-05-16 16:43:07 +00:00
Omer Katz
72bea1abd3 [heap] Remove references to semi spaces from heap.cc
This includes:
1) Inline UncommintFromSpace into Shrink (always called together)
2) Replace ZapFromSpace with virtual ZapUnusedMemory
3) Replace EnsureFromSpaceIsCommited with virtual Prologue

Bug: v8:12612
Change-Id: I934479761c877e10734f54e6d5896a4741b92ef7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650738
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80563}
2022-05-16 15:45:40 +00:00
Nikolaos Papaspyrou
b514973d72 cleanup: Fix some typos
Mostly in comments, not much to be said...

Bug: v8:12425
Change-Id: Ib1e4d3913f9b91eeafefbef13330fd1388223c06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650597
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80562}
2022-05-16 15:44:37 +00:00
jameslahm
37654f8fdd [test] Move cctest/test-representation to unittests
... /objects/representation-unittest.

Bug: v8:12781
Change-Id: I3ae39df619ac6920c5ff722ed481bed20b5a5c6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3612669
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80557}
2022-05-16 14:15:36 +00:00
jameslahm
3bfb0466ed [test] Move cctest/test-double to unittests
... /base/double-unittest.

Bug: v8:12781
Change-Id: I13817728735a53fbc28a4e2d1babdcbd9bbf419d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3607113
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80556}
2022-05-16 14:13:16 +00:00
jameslahm
0598bb38d8 [test] Move cctest/test-elements-kind to unittests
... /objects/elements-kind-unittest.

Bug: v8:12781
Change-Id: I335cec050faf584652a43041437ec0a14539cf1e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3607115
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80553}
2022-05-16 13:20:28 +00:00
Milad Fa
3ca7c29b69 AIX: skip some of the LogTest tests
A few of LogTests have been crashing intermittently
after they were moved to unittests in this CL:
https://crrev.com/c/3616424

Will re-enable once issue is investigated.

Change-Id: I53435596274c935c028a625b610c54eadda9d1de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647092
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80551}
2022-05-16 13:04:06 +00:00
Tobias Tebbi
b209cdf5bb [compiler] add test for crbug-1323114
This is a follow-up to
https://chromium-review.googlesource.com/c/v8/v8/+/3630081

Bug: chromium:1323114
Change-Id: Ie6e3cbdecf370c5fdf9544c2f47f7b4f8f27bd70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647826
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80550}
2022-05-16 11:50:56 +00:00
Jakob Kummerow
48a4195370 [wasm-gc] Fix type checking of null/undefined
The LookupIterator only handles JSReceivers, so special-case oddballs.

Change-Id: I03d2875124775390c9b928fb7cfe4d938213b5d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645409
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@{#80548}
2022-05-16 10:44:46 +00:00
Clemens Backes
5696b52624 [utils] Introduce SparseBitVector
We currently have a BitVector implementation which is used a lot by the
two (mid-tier and top-tier) register allocators. Their size is the
number of virtual registers or the number of blocks in the function. If
one of those numbers gets huge, the BitVector does not perform well any
more, and it consumes huge amounts of memory (we see up to several GBs
for huge Wasm functions).

This CL introduces a SparseBitVector implementation with a compatible
interface, meant to replace the BitVector implementation. Usages will be
introduced in follow-up CLs, first for the mid-tier allocator, then
top-tier. This will allow us to assess performance changes better, and
revert individual usages.

R=mslekova@chromium.org

Bug: chromium:1313379, v8:12780
Change-Id: I804311e0c188526961f70e88a43dd1ea26497cda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634780
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80546}
2022-05-16 10:23:26 +00:00
Andy Wingo
7d8b8b4f2f [stringref] Add support for parsing stringref instructions
Bug: v8:12868

This wires up the parser and the decoder interface for stringref.  All
of the interfaces throw UNIMPLEMENTED, however.

Change-Id: If8cb131032e425a5672f793c6e4c24ddd188aebc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645115
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80545}
2022-05-16 10:10:06 +00:00
Dominik Inführ
34da5f5b5b Reland^3: [heap] Store size with invalidated object
This is a reland of commit 2b79eefed3

A DCHECK was using map[key] and inadvertently inserted into the map
that way.

Original change's description:
> Reland^2: [heap] Store size with invalidated object
>
> This is a reland of commit 23b2d571a7
>
> When updating pointers during a full GC, a page might not be swept
> already. In such cases there might be invalid objects and slots
> recorded in free memory. Updating tagged slots in free memory is fine
> even though not strictly necessary.
>
> However, the GC also needs to calculate the size of potentially dead
> invalid objects in order to be able to check whether a slot is within
> that object. But since that object is dead, its map might be dead as
> well which makes size calculation impossible on such objects. The CL
> changes this to cache the size of invalid objects. A follow-up CL will
> also check the marking bit of invalid objects.
>
> Reason for reverts:
>
> Revert #2: In-object slack tracking on JSObjects doesn't update the
> cached size of invalidated objects. The fix here was to stop
> invalidating recorded slots on JSObjects at all and avoid that problem
> completely (see https://crrev.com/c/3620274).
>
> Revert #1: Not all size changes go through NotifyObjectLayoutChange, so
> https://crrev.com/c/3607992 introduced NotifyObjectSizeChange as a
> bottleneck for object size changes/right-trimming. This method is
> now used to update the size of invalidated objects.
>
> Bug: v8:12578, chromium:1316289
> Change-Id: I0478d04601c0270ddb39419ca6cf98719951eb4d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623542
> Reviewed-by: Jakob Linke <jgruber@chromium.org>
> Reviewed-by: Patrick Thier <pthier@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80344}

Bug: v8:12578, chromium:1316289
Change-Id: Ibcc04c209213c584860a7c473082526cb4e53c59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627635
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80542}
2022-05-16 09:25:16 +00:00
Marja Hölttä
36565f6b5c [rab/gsab] Fix memory size computations close to size_t limit
Bug: v8:11111,v8:1321980
Change-Id: I4dead5d50a2e1a9c1011c16d13aad2722598e456
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642297
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80541}
2022-05-16 09:13:38 +00:00
Nikolaos Papaspyrou
36610bbdd7 heap: Recalculate the object start bitmap if needed
This CL adds to the existing experimental implementation of the
object start bitmap, that is evaluated as a mechanism for resolving
inner pointers (behind the flag v8_enable_conservative_stack_scanning).

It fixes method ObjectStartBitmap::FindBasePtr to ensure that the
correct base pointer is returned, even if the bitmap is not fully
populated (e.g., with object evacuation or inline object allocation).
This method now recalculates the part of the bitmap that is
required for returning the correct result, by iterating through
objects of the page. A special constructor has been introduced to the
PagedSpaceObjectIterator for this purpose.

It also moves the existing inline methods of ObjectStartBitmap to a
new -inl.h header file, to avoid circular dependencies.

Bug: v8:12851
Change-Id: Iabd0df020bee3bb63ef9d4888591b25d24d79dd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641179
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80538}
2022-05-16 08:48:56 +00:00
Simon Zünd
9ca7491b35 Reland "[inspector] Re-enable Debugger#restartFrame"
This is a reland of commit 8278cb5015

The reland adds the RestartFrameTrampoline to the list of
builtins that the deoptimizer is allowed to return from for
control flow integrity.

Original change's description:
> [inspector] Re-enable Debugger#restartFrame
>
> Doc: https://bit.ly/revive-restart-frame
>
> This CL "undeprecates" Debugger#restartFrame and adds a new optional
> "mode" parameter for back-wards compatibility. Moreover, the return
> values are all deprecated. They were never actually used in the
> DevTools frontend and the same information is available from the
> Debugger#paused event that fires once execution stops at the
> beginning of the restarted function.
>
> The CL also re-baselines all the restart-frame inspector tests that
> now run successfully.
>
> R=bmeurer@chromium.org, kimanh@chromium.org
>
> Bug: chromium:1303521
> Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80491}

Bug: chromium:1303521
Change-Id: I13e2f8b5011795a38e541310622b8333a3d08049
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644624
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80534}
2022-05-14 09:32:14 +00:00
Clemens Backes
16d948312f Fix MSVC compilation of FormattedStringTest
MSVC does not implicitly convert the std::array iterator to a char*,
hence explicitly use the {data()} accessor instead of {begin()}, which
is cleaner anyway.

R=mlippautz@chromium.org

Bug: chromium:1323177
Change-Id: I65c6836889eb57a18b655cb9e6c98008a8fbcaac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644794
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80533}
2022-05-13 17:46:23 +00:00
Leszek Swirski
e0d0fa2dec [maglev] Disable on TickLines test
This test tests the interpreted/baseline and optimized behaviour of cpu
profiler ticks. We should eventually support this for maglev too, but
for now just disable it.

Bug: v8:7700
Change-Id: Iba89ab2c718025ebf90c86a84ed937c2d1d0af7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647363
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80531}
2022-05-13 16:25:34 +00:00
Samuel Groß
6f5f5662cc [sandbox] Turn V8_SANDBOX into V8_ENABLE_SANDBOX
This is more consistent with similar features, for example
V8_ENABLE_WEBASSEMBLY or V8_ENABLE_MAGLEV.

Drive-by: remove V8_SANDBOX_IS_AVAILABLE as it's no longer needed.

Bug: v8:10391
Change-Id: I8658c5b0c331a4c73892737083b2c2f9b8f84056
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647355
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80530}
2022-05-13 16:23:23 +00:00
Clemens Backes
fa8c5950e0 [base] Introduce FormattedString
This introduces a class which can be used for formatting dynamic values
into a constant-size, stack-allocated array. You get ostream-style code
but printf-style performance, and in particular no dynamic allocation.
This makes this class also suitable to be used in OOM or other fatal
situations where we cannot rely on dynamic memory allocation to still
work.

Using FormattedString will automatically compute the format string
depending on the types. It also computes the maximum size of the output.
Last but not least, it makes the code a lot more readable than
traditional printf style printing.

R=mlippautz@chromium.org

Bug: chromium:1323177
Change-Id: I47228b3603c694c1fa23516dd3f1c57e39c0ca35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644622
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80529}
2022-05-13 16:20:43 +00:00
Andy Wingo
59518b083a [stringref] Add stringref type, section, feature flag definitions
Bug: v8:12868
Change-Id: I69e149aa607ee77dd00267a0bbe4e5828dceb75e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647350
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80526}
2022-05-13 14:28:43 +00:00
Clemens Backes
dd74a0232c Replace STATIC_ASSERT with static_assert
Now that we require C++17 support, we can just use the standard
static_assert without message, instead of our STATIC_ASSERT macro.

R=leszeks@chromium.org

Bug: v8:12425
Change-Id: I1d4e39c310b533bcd3a4af33d027827e6c083afe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647353
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80524}
2022-05-13 13:46:27 +00:00
Andy Wingo
94ba69011e [stringref] Add tests that stringrefs are unsupported by default
Bug: v8:12868
Change-Id: I9008da5f89c4c18ea45ddbe44cae832087c76b01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647349
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80523}
2022-05-13 13:44:24 +00:00
Anton Bikineev
2c40f3af4f cppgc: Speed up pointer decompression
With this CL, the decompression simply becomes:
       movsxd  rax, edi
       add     rax, rax
       and     rax, qword ptr fs:[base@TPOFF]

Bug: chromium:1325007

Change-Id: I931e4e667a9b9697671bccf14575420f8cb705e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629871
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80521}
2022-05-13 12:38:43 +00:00
Anton Bikineev
19b6e5f468 cppgc: Introduce pointer compression based on thread-local base
With caged heap enabled, we can halve Member<> by storing only the least
significant half. The base of the heap is stored in a thread local
variable. The feature has therefore an implication that only single heap
is allowed per thread.

The feature is gated by the new GN arg:
  cppgc_enable_pointer_compression.

Bug: chromium:1325007

Change-Id: Ic7f1ecb7b9ded57caad63d95bbc8e8ad6ad65031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739979
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80518}
2022-05-13 11:15:43 +00:00
Al Muthanna Athamina
ad126104f1 Skipping benchmarks/octane/typescript on NumFuzz until the issue is fixed
NOTRY=true

Bug: v8:12445
Change-Id: I67bd72e2369ffc0e4afc75e0436d80d3c5c0fae2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632101
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80515}
2022-05-13 09:45:18 +00:00
jameslahm
557cc8a464 [web snapshot] Add support for double array
This CL adds serialization and deserialization for
packed double array and holey double array.

Bug: v8:11525
Change-Id: Idce22e1c5d707e45127ae972587c6b7808ca2cda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640751
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80514}
2022-05-13 09:22:45 +00:00
Frank Tang
4819584a2c [Temporal] Implement the iso8601 part of Calendar.prototype.era(Year)?
Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.era
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.erayear

Notice this only implement the "iso8601" calendar and we will implement the
code for other calendar later by calling ICU with other Calendar methods.
This CL reduce the differences of testing result between ALWAYS and no_i18n
because the code in no_i18n will not call Calendar era or eraYear and therefore
passed the test even w/o this CL but the ALWAYS tests will cause Temporal
object to internal call era and eraYear and therefore fail if w/o this CL.

Bug: v8:11544
Change-Id: I921fbfbbd26473c238024161eb58b096c38b881b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641938
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80513}
2022-05-13 09:01:23 +00:00
Tobias Tebbi
b16d2a4e2f [wasm] add experimental string/Wasm GC array conversion fast-path
This CL adds two experimental JS builtins to convert between
i16 Wasm GC and JS strings. This is a non-standard experimental
feature only available with the flag --wasm-gc-js-interop.

WebAssembly.experimentalConvertArrayToString(array, start, count)
Convert the `count`-many WTF-16 code units starting at index `start`
into a JS string. Throws a TypeError if `array` is not an i16 array,
or if `start` and `count` are not numbers or not in range.

WebAssembly.experimentalConvertStringToArray(string, sampleArray)
Convert `string` to an i16 array. The `sampleArray` parameter needs
to be an arbitrary i16 array, which is only used to extract the rtt.
Throws a TypeError if `string` is not a string or `sampleArray` is not
an i16 array.

Change-Id: I7ac2f6bd89b8f638427f61da1bb01ccba90d735b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642301
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80505}
2022-05-12 20:12:53 +00:00
Deepti Gandluri
334cc5f8d6 [wasm-relaxed-simd][liftoff] Enable relaxed LaneSelect on Arm/Arm64
Bug: v8:12284
Change-Id: Ica2564e8b34f8edd9492ef379cf3a3eb5575633d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642948
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80504}
2022-05-12 19:49:33 +00:00
Deepti Gandluri
6a9c8553f9 [wasm-relaxed-simd] Enable relaxed swizzle tests on all platforms
Bug: v8:12284
Change-Id: I7f6a4a5182ad61dfdc13faf2ced99fba7d64c9c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640926
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80502}
2022-05-12 18:25:52 +00:00
Chong Gu
2eaf6205ed [Fuchsia] Deprecate fuchsia_package_runner
Change-Id: Id6c520cd3cc6218fb32fea2c82b0ff8985e2b58e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627012
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Chong Gu <chonggu@google.com>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80501}
2022-05-12 18:07:18 +00:00
Jakob Kummerow
8f3581125a [wasm-gc] Fix instantiation of modules with no types
Fixed: v8:12866
Change-Id: Icba2ffc7837bf4942fd4bc741abeb7c98694c2d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644607
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andy Wingo <wingo@igalia.com>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80500}
2022-05-12 17:48:17 +00:00
Deepti Gandluri
8709819285 [wasm-simd][Arm]Prototype Relaxed Rounding Q-format Multiplication
Bug: v8:12284
Change-Id: I9d8f9da8ed736d5119e7af4354e1ddd8a255713d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3640925
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80497}
2022-05-12 16:40:21 +00:00
Francis McCabe
c31105569f Revert "[inspector] Re-enable Debugger#restartFrame"
This reverts commit 8278cb5015.

Reason for revert: breaking https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20CFI/10778/overview

Original change's description:
> [inspector] Re-enable Debugger#restartFrame
>
> Doc: https://bit.ly/revive-restart-frame
>
> This CL "undeprecates" Debugger#restartFrame and adds a new optional
> "mode" parameter for back-wards compatibility. Moreover, the return
> values are all deprecated. They were never actually used in the
> DevTools frontend and the same information is available from the
> Debugger#paused event that fires once execution stops at the
> beginning of the restarted function.
>
> The CL also re-baselines all the restart-frame inspector tests that
> now run successfully.
>
> R=​bmeurer@chromium.org, kimanh@chromium.org
>
> Bug: chromium:1303521
> Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80491}

Bug: chromium:1303521
Change-Id: Ibc33328c31a4b6ea736d07ce5e5ee109039eec8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645767
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80495}
2022-05-12 16:38:03 +00:00
Jakob Kummerow
2f8f536b55 [wasm] Properly reject modules with unknown sections
The IsValidSectionCode function shouldn't include internally-used
numeric identifiers of well-known optional sections.

Fixed: v8:12867
Change-Id: I9d894ee57157455e92a17ddcde94f32f05fb038d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644612
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80494}
2022-05-12 15:08:02 +00:00
Simon Zünd
8278cb5015 [inspector] Re-enable Debugger#restartFrame
Doc: https://bit.ly/revive-restart-frame

This CL "undeprecates" Debugger#restartFrame and adds a new optional
"mode" parameter for back-wards compatibility. Moreover, the return
values are all deprecated. They were never actually used in the
DevTools frontend and the same information is available from the
Debugger#paused event that fires once execution stops at the
beginning of the restarted function.

The CL also re-baselines all the restart-frame inspector tests that
now run successfully.

R=bmeurer@chromium.org, kimanh@chromium.org

Bug: chromium:1303521
Change-Id: I34bddeb1f2f4ff3dee58dd82e779c111495566f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616505
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80491}
2022-05-12 14:24:58 +00:00
Jakob Kummerow
c875e86df1 [bigint] Convert BigInt property names to decimal
Hexadecimal/octal/binary BigInt property names should be converted
to decimal, i.e. the following object literals should all be equivalent:
var o = {0xF: 1}, p = {0xFn: 1}, q = {15: 1}, r = {15n: 1}.

Test case by yangwenming@bytedance.com, uploaded at
https://chromium-review.googlesource.com/c/v8/v8/+/3634937

Fixed: v8:10600
Change-Id: Ie1d8a16e95697cd31cbc0784843779c921ce91fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3642302
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80490}
2022-05-12 13:28:02 +00:00
Igor Sheludko
42dbddf0c4 Fix includes in test-api-interceptors.cc
Bug: chromium:1310062
Change-Id: Iba231f98ef88df07b24b1c2bc9026a5b8ca18e15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644228
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80487}
2022-05-12 13:08:15 +00:00
Andreas Haas
6b57581d24 [wasm] Update spec tests
R=thibaudm@chromium.org

Bug: v8:12864
Change-Id: Ic8f031eafaeab6e17fa070a8447cd093ebb9adf5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3643656
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80486}
2022-05-12 12:34:21 +00:00
Igor Sheludko
8437ed16e3 [runtime] Add interceptors side effects detector
This CL introduces SideEffectDetectorScope which requires explicit
allowlisting of cases when side effects are allowed after calling
interceptor callbacks.
Side effects are not allowed when the callback does not intercept
the request.
The side effects detector is not enabled yet, it will be enabled in
a follow-up CL.

Bug: chromium:1310062
Change-Id: I805764920ed016cb37390aef7bb02cbdf5f72846
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641172
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80484}
2022-05-12 10:33:10 +00:00
Omer Katz
b415cd7c05 [heap] Extend and rename NewSpace base class
NewSpace is renamed to SemiSpaceNewSpace and NewSpaceBase is renamed to
NewSpace (the new PagedSpace new space implementation will be named
PagedNewSpace).

Most usecases are updated to use the base class rather than the concrete
semi space based implementation. To that end, the base class is extended
with additional virtual methods (for delegating to the concrete class).

This CL follows these guidelines:
(*) If at a method callsite we should know the exact new space
implementation we use, we cast to the concrete class. This is the case
for example for callsites in scavenger.*.
(*) If a method is called from outside the heap implementation or should
be present regardless of the concrete implementation, that method is
made virtual.
(*) Other cases are usually methods that are specific to a concrete
implementation but the concrete implementation is not known at the
callsite and there's no clear way to nicely abstract the method. In such
cases we cast to the concrete SemiSpaceNewSpace implementation for now
and we will revisit these cases once PagedNewSpace exists.

Bug: v8:12612
Change-Id: I7b85626774ce0d785b0257bf8d32b9f50eeaf292
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625975
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80482}
2022-05-12 07:17:23 +00:00
Deepti Gandluri
fe443a4e1f [wasm-simd] Prototype Relaxed Rounding Q-format Multiplication
Prototype the instruction on the interpreter, and Arm64. Details of
instruction lowerings on all relevant architectures can be found at:
https://github.com/WebAssembly/relaxed-simd/issues/40

Bug: v8:12284
Change-Id: Id4cb3889d94cf0bb7169ea068efe5ca68cfcbad9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3636365
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80475}
2022-05-11 16:10:32 +00:00
Marja Hölttä
94b4391dab [web snap] Support inheriting from builtins
Side product: enable null as __proto__.

Bug: v8:11525,v8:12820
Change-Id: I2b9508d0f3563d9000ddede24e7684aab18c2b5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637791
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80474}
2022-05-11 14:54:43 +00:00
Seth Brenith
2507217839 Improve Script reuse in isolate compilation cache, part 1
Once the root SharedFunctionInfo for any Script gets its bytecode
flushed, the Isolate's compilation cache currently evicts that entry, to
reduce memory usage. However, the associated Script is likely still
alive, since scripts often declare functions which outlive the initial
evaluation of the script. If an identical script is loaded later, a
duplicate Script is created for it, which can waste memory.

In this change, I propose that the compilation cache keys can refer
weakly to the Script. When the root SharedFunctionInfo gets old, instead
of deleting the cache entry entirely, we can just drop the strong
reference to the SharedFunctionInfo. A subsequent lookup in the cache
will retrieve the Script instead of the root SharedFunctionInfo,
indicating an opportunity to save some memory by reusing the existing
Script.

Eventually, all callers to CompilationCache::LookupScript should reuse
the Script if possible. This change implements only the easy case of
reusing the Script for synchronous parsing. Follow-up changes will be
required for the TODO comments left by this change.

Bug: v8:12808
Change-Id: Ia8b0389441a682de9a43e73329049fd2e7835d3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3597106
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80472}
2022-05-11 14:27:43 +00:00
Jakob Kummerow
8fbefa4797 [wasm-gc] Experiment: ref.cast_nop_static
This adds a non-standard, unsafe instruction for performance
experiments: ref.cast_nop_static behaves like ref.cast_static
as far as static types are concerned, but emits no code.

Bug: v8:7748
Change-Id: Ic5797a941146a06d7c6ff249d8e29919145d8ea1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3639206
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80471}
2022-05-11 13:19:12 +00:00
Igor Sheludko
a62c040451 [rwx][mac] Fix component build
The issue is that a thread_local variable used in RwxMemoryWriteScope
can't be directly accessed from another component, so the workaround is
to avoid inlining accesses the variable into other components.

Bug: v8:12797, chromium:1324333
Change-Id: I0f83358ac0c663c92ef7b3dff54a068472d61aed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641169
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80470}
2022-05-11 12:33:52 +00:00
Nico Hartmann
338c12b3af [turbofan] Fix length accessor for RAB/GSAB in compiled code
Bug: v8:11111, chromium:1307340
Change-Id: I7c68d4985c080bf5c595a4ae3360fc924b1bdefb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627595
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80452}
2022-05-10 15:34:25 +00:00
jameslahm
abe1b97dd2 [web snapshot] Add support for sparse array
This CL adds the array type flag to distinguish between
sparse array and dense array and adds serialization
and deserialization for sparse array.

Bug: v8:11525
Change-Id: Ia302af017d6f52924256a2b3fa9e3d2b34caa442
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629739
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80449}
2022-05-10 12:40:58 +00:00
Marja Hölttä
395350c064 [web snap] Fix: allow empty objects to have non-trivial prototypes
Bug: v8:11525
Change-Id: I226ba870cee7df20a7960defb0c03607d64e27b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634962
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80445}
2022-05-10 10:29:16 +00:00
Igor Sheludko
7beb93cdff [rwx][mac] Fix jitless mode
In some cases we were still trying to change permissions of RWX pages
which is not allowed.

Bug: v8:12797
Change-Id: I9f4ca319d842c524fc6f60bfd3bb3726f8d3029d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635719
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80442}
2022-05-10 09:00:23 +00:00
Frank Tang
1f09e46859 [Temporal] Change Parser from Maybe to Optional
Bug: v8:11544
Change-Id: I16b1fb2cb4f6f4104b2f972a06b8fe0798ac6835
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632675
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80435}
2022-05-10 05:31:24 +00:00
Frank Tang
988aa5139f [Temporal] Sync w/ PR2028
Sync to spec changes in
PR2028 Consistently call observable operations with undefined options
https://github.com/tc39/proposal-temporal/pull/2028

Bug: v8:11544
Change-Id: I850761e76ba1bb33f6c3b655a71163d1b68bb4c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3633618
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80433}
2022-05-09 23:09:34 +00:00
Deepti Gandluri
e6b50eb017 [wasm-simd] Update new relaxed SIMD opcodes
Add new opcode numbers for relaxed-simd opcodes as in:
https://github.com/WebAssembly/relaxed-simd/pull/61, and updates
for decoded opcodes larger than two bytes.

Bug: v8:12284
Change-Id: I0bff22812243a39599bfeee3c0bc69171dd3c7d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625835
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80432}
2022-05-09 22:47:24 +00:00
Marja Hölttä
ce488c0156 Reland: [web snapshot] Recognize builtins
Builtins are not snapshotted, but instead we insert "builtin wrappers"
into the snapshot, and create references to the corresponding builtin
when deserializing.

Subclassing builtins will be implemented in a follow-up CL.

First version: https://chromium-review.googlesource.com/c/v8/v8/+/3630080
Fix: initialize builtin_objects_handle_

Bug: v8:11525,v8:12820
Change-Id: Ia2b5d41af5d7f577f1b02356b22a8760963009e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3635718
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80430}
2022-05-09 16:41:25 +00:00
henrika
fee2336535 [api] Adds script column number to code-creation events in CodeEventLogger
Bug: v8:11043
Change-Id: I8cbdd8a5f68bdadbe7fc44414c6d46cdd57e6802
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627512
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80429}
2022-05-09 14:29:24 +00:00
Peter Kasting
190fda57ee Remove "volatile" on arguments where deprecated in C++20.
Many uses of "volatile" are deprecated in C++20 because they don't
actually do anything.  Remove "volatile" in these cases.

Bug: chromium:1284275
Change-Id: I64a3989d73f25e0cd933375dd6fa0b3f2b3acb54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630343
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80428}
2022-05-09 14:15:44 +00:00
Camillo Bruni
d60d36a89f [log] Use v8_file_logger variable names more consistently
In preparation of renaming i::CodeEventDispatcher to i::Logger

Bug: v8:12795, chromium:1316443
Change-Id: I28e129130852d41cf5e464e083bc27cff97a0fff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623543
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80427}
2022-05-09 13:58:24 +00:00
jameslahm
9e3f20b225 [test] Move cctest/test-log to unittests/logging/log-unittest
This is a reland of https://chromium-review.googlesource.com/c/v8/v8/+/3607389.
The previous revert is https://chromium-review.googlesource.com/c/v8/v8/+/3610448.
Reason for revert: https://crbug.com/v8/12838.

The original CL has merge conflicts and cannot be relanded,
so this CL is newly opened.

This CL moves cctest/test-log to unittests/logging/log-unittest
, fixes the flaky tests in https://bugs.chromium.org/p/v8/issues/detail?id=12838 and updates the unittests status for log-unittest.


Flaky Tests:
- https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20stress-incremental-marking/7287/overview
  - flaky LogTest.Issue539892 is caused by in stress-incremental-marking
    mode, Heap::MarkCompact will trigger CodeMovingGCEvent in https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/heap.cc;l=2586;drc=52f06e6b43ff95eccf79e0a5df8d4d83c029130a for
    FakeCodeEventLogger which was already destructed
    when Heap::PerformGarbageCollection task was handled in
    DefaultPlatform::PumpMessageLoop. This should be fixed by removing
    FakeCodeEventLogger in LogTest.Issue539892.

  - flaky LogTest.LogAccessorCallbacks is caused by the data race in
    Sampler::DoSample. This should be fixed in https://chromium-
    review.googlesource.com/c/v8/v8/+/3616429.

-https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/41327/overview
  - flaky LogTest.ExternalLogEventListenerWithInterpretedFramesNativeStack
    is caused by the data race of i::FLAG_* which were written again after
    setting up the isolate. This should be fixed by only writting
    i::FLAG_* before setting up the Isolate.

- https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64/47277/overview
  - flaky LogTest.BuiltinsNotLoggedAsLazyCompile is caused by the data
    race in Sampler::DoSample. This should be fixed in https://chromium-
    review.googlesource.com/c/v8/v8/+/3616429.

Bug: v8:12781
Change-Id: I3f736d4ffb3b8f147006bebe92285684b0c3952a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616424
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80423}
2022-05-09 12:31:45 +00:00
Clemens Backes
d48558e6b7 Revert "[web snapshot] Recognize builtins"
This reverts commit 71dbb03e21.

Reason for revert: gc-stress failures: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/38357

Original change's description:
> [web snapshot] Recognize builtins
>
> Builtins are not snapshotted, but instead we insert "builtin wrappers"
> into the snapshot, and create references to the corresponding builtin
> when deserializing.
>
> Subclassing builtins will be implemented in a follow-up CL.
>
> Bug: v8:11525,v8:12820
> Change-Id: If72695d46bdfc8bf7e477471be1264b668551854
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630080
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80419}

Bug: v8:11525,v8:12820
Change-Id: I49f65103ad7b367c5bccb498f698e9afb29b1fec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3634799
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Owners-Override: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80422}
2022-05-09 12:25:24 +00:00
Marja Hölttä
71dbb03e21 [web snapshot] Recognize builtins
Builtins are not snapshotted, but instead we insert "builtin wrappers"
into the snapshot, and create references to the corresponding builtin
when deserializing.

Subclassing builtins will be implemented in a follow-up CL.

Bug: v8:11525,v8:12820
Change-Id: If72695d46bdfc8bf7e477471be1264b668551854
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630080
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80419}
2022-05-09 10:45:44 +00:00
Anton Bikineev
070b5f309f cppgc: young-gen: Return range size for AgeTable to 4KB
Allocation granularity (8 bytes on 64bit platforms) is already subsumed
by whatever range size we choose.

Bug: chromium:1029379
Change-Id: Iab95e6f36955c9ffbbe9ea0c98cb9d1f8dd0337b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3629869
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80415}
2022-05-09 08:42:44 +00:00
Frank Tang
d36c7f1f8a [Temporal] Add TimeZone.prototype.getPossibleInstantsFor
Also add the basic version of GetIANATimeZoneEpochValue AO which only
implement UTC. Verison to support other TimeZone will come later w/ intl
work which depends on ICU.

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getpossibleinstantsfor
https://tc39.es/proposal-temporal/#sec-temporal-getianatimezoneepochvalue

Bug: v8:11544
Change-Id: Ib603530d1c70f7a2b85691860a815d44b48eece2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3624980
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80406}
2022-05-07 00:25:33 +00:00
Frank Tang
187ecb8b72 Reland "[Temporal] Add TimeZone get*Transition and getPlainDateTimeFor"
This is a reland of commit 4251c285e6

Change the test262.status by moving test which passing on no_i18n
but not on ALWAYS:
1) Change the [FAIL] of that test in the ALWAYS section to [SKIP].
2) Add the same test the no_i18n section as [PASS]

Original change's description:
> [Temporal] Add TimeZone get*Transition and getPlainDateTimeFor
>
> Also add non-intl (only support UTC) version of AO:
> GetIANATimeZoneNextTransition, GetIANATimeZonePreviousTransition
> (support of other timezone in Intl will come later)
>
> Spec Text:
> https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getplaindatetimefor
> https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getnexttransition
> https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getprevioustransition
> https://tc39.es/proposal-temporal/#sec-temporal-getianatimezonenexttransition
> https://tc39.es/proposal-temporal/#sec-temporal-getianatimezoneprevioustransition
>
>
> Bug: v8:11544
> Change-Id: I17d5a60638dcd8543e5d9f22c6560b311f2f402a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534450
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80383}

Bug: v8:11544
Change-Id: Ieddadbc9d0708bda24f88dd2083b0dbe7dc1b9f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632607
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80405}
2022-05-06 20:30:53 +00:00
Thibaud Michaud
bd22e3bec0 [wasm-relaxed-simd] Add relaxed laneselect in Liftoff on ia32/x64
R=clemensb@chromium.org
CC=gdeepti@chromium.org

Bug: v8:12284
Change-Id: Ied63b2c7b57210f2cf2e1580520405ce1be5dc33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625979
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80400}
2022-05-06 15:51:42 +00:00
Frank Tang
9ae5bfa5b9 Reland "[Temporal] Add Calendar.prototype.yearMonthFromFields"
This is a reland of commit 2b140a9f96

Original change's description:
> [Temporal] Add Calendar.prototype.yearMonthFromFields
>
> Add AO: IsValidISOMonth, RegulateISOYearMonth, ISOYearMonthFromFields
> Spec Text:
> https://tc39.es/proposal-temporal/#sec-temporal-isvalidisomonth
> https://tc39.es/proposal-temporal/#sec-temporal-regulateisoyearmonth
> https://tc39.es/proposal-temporal/#sec-temporal-isoyearmonthfromfields
> https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.yearmonthfromfields
>
>
> Bug: v8:11544
> Change-Id: I1baadbbe54fb0c3fd45750eddb13b790465c3a3b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3408773
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80384}

Bug: v8:11544
Change-Id: Ic5831c7094cd235526d93010cd722110f2951d77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3631706
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80399}
2022-05-06 15:01:23 +00:00
Peter Kasting
cb222018a3 Avoid math with disparate enums.
This is deprecated in C++20.  Use constexprs and explicit casts to work
around.

Bug: chromium:1284275
Change-Id: I6a3974f3c678cb797081938622036a12a99c5d1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630349
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80392}
2022-05-06 08:36:19 +00:00
Michael Lippautz
08348dba4e [api] Rework heap snapshot exposing internals
- Repurpose flag `treat_global_objects_as_roots` when taking a heap
  snapshot for toggling whether internals should be exposed (to
  `hide_internals`).
- Use the toggle in creating heap snapshots for exposing class names
  as object names for C++ objects that have not explicitly been given a
  name.

Change-Id: I77d71babfdfe53269964fe81ed985037a431c28b
Bug: chromium:1321620
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623740
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80391}
2022-05-06 08:10:40 +00:00
nedenwang
3c7b563e28 Fix typos, shit_right -> shift_right
Change-Id: I88a1bbddc7604fc5e557ae875ca196cf9c46574c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3626453
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Neden Wang <nedenwang@tencent.com>
Cr-Commit-Position: refs/heads/main@{#80390}
2022-05-06 07:51:55 +00:00
Michael Achenbach
9b3bd2c81a Revert "[Temporal] Add TimeZone get*Transition and getPlainDateTimeFor"
This reverts commit 4251c285e6.

Reason for revert: Fails on CI bots:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/46503/overview

Original change's description:
> [Temporal] Add TimeZone get*Transition and getPlainDateTimeFor
>
> Also add non-intl (only support UTC) version of AO:
> GetIANATimeZoneNextTransition, GetIANATimeZonePreviousTransition
> (support of other timezone in Intl will come later)
>
> Spec Text:
> https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getplaindatetimefor
> https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getnexttransition
> https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype.getprevioustransition
> https://tc39.es/proposal-temporal/#sec-temporal-getianatimezonenexttransition
> https://tc39.es/proposal-temporal/#sec-temporal-getianatimezoneprevioustransition
>
>
> Bug: v8:11544
> Change-Id: I17d5a60638dcd8543e5d9f22c6560b311f2f402a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534450
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80383}

Bug: v8:11544
Change-Id: Icfbb643578ac028b06aa07c3ac6bbce030f49390
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3630079
Auto-Submit: Michael Achenbach <machenbach@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@{#80386}
2022-05-06 06:13:12 +00:00