Commit Graph

12712 Commits

Author SHA1 Message Date
Marja Hölttä
28545f7aea [rab/gsab] Fix toPrimitive resizing the backing store
Bug: v8:11111,chromium:1381064
Change-Id: Id4f5f56758f0ec7999fe523a0849dd26d84ecc47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4002208
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84054}
2022-11-03 23:30:36 +00:00
Andreas Haas
49afdd90b2 [wasm] Do bounds check before BigInt allocation in atomic.wait
A failing memory bounds check is a debugging event. At debugging events
the value stack is observable and therefore has to match the speced
value stack. In Atomic.Wait the value stack got modified before the
bounds. With this CL memory bounds check gets moved to the beginning.

R=clemensb@chromium.org

Bug: chromium:1380498
Change-Id: I4a5fe4d49f05d5376cb717f3dc7ecca4fdcbd998
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3998816
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84051}
2022-11-03 17:32:26 +00:00
Shu-yu Guo
0dcbdfa016 [shared-struct] Fix for-in enumeration
for-in enumeration creates an EnumCache, which is currently incorrectly
allocated in the per-thread heap. This CL preallocates the enum cache at
SharedStructType-creation time.

Also drive-by fixes typos in the enum cache code.

Bug: v8:12547, chromium:1379616
Change-Id: I1930f88844eca5ccfeebd8dfdcce4ad0bd80ee38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3997701
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84047}
2022-11-03 16:38:15 +00:00
Nico Hartmann
2caf5d18db [turbofan] Fix incorrect size shift computation for DataViews
Bug: v8:11111, chromium:1380398, chromium:1380990
Change-Id: I99ee88341d1119d1372210741ddccb0e2cd33bf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4002688
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84045}
2022-11-03 15:55:17 +00:00
Leszek Swirski
ef1ac478bf [test] %PrepareFunctionForOptimization is permanent
Change the test helper, %PrepareFunctionForOptimization, to permanently
mark functions for manual optimization (rather than being marked only up
to their next optimization). These functions will now never be heuristic
optimized, and will always require tier-up via intrinsics.

This prevents variants with low interrupt budgets from messing with
tests that are carefully controlling optimization state across
multiple optimisations, as well as simplifying the mechanism since we
no longer have to maintain the state machine of 'function state'.

Change-Id: I9a45312c70ba4a03b57924c3b3ee17e892ede5a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3990787
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84038}
2022-11-03 13:44:45 +00:00
Marja Hölttä
2adb1df7ab [compiler] Fix the type of JSFindNonDefaultConstructorOrConstruct more
Bug: v8:13091,v8:13445
Change-Id: I2d9ed6fe2cec75bfb3146f8b47aeeef8a95bfc29
Fixed: v8:13445
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3998818
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84028}
2022-11-03 09:36:04 +00:00
Shu-yu Guo
381b8f55e9 [shared-struct] Fix in/out-of-object property storage
In a few places, shared structs currently incorrectly assume all storage
is in-object. This CL fixes those and rename
CSA::StoreJSSharedStructInObjectField to CSA::StoreSharedObjectField to
reflect the genericity.

Bug: v8:12547
Change-Id: I7c155b6bc584fbdcdbd484fda38f9f8a1940953d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3997700
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84022}
2022-11-02 18:50:49 +00:00
Leszek Swirski
cecd01ac18 [maglev] Fast path instanceof
Copy the instanceof fast path from TurboFan, which emits an
'OrdinaryHasInstance' when there is no @@hasInstance symbol (which can
eventually become a constant true/false if we can look through the
prototype chain), and a direct call of @@hasInstance otherwise.

In particular, the call to @@hasInstance requires a continuation builtin
(to call ToBoolean), so add support for these too.

Bug: v8:7700
Change-Id: I14aee4346e98cd650f190b811cc7a733e33addae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3990844
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84012}
2022-11-02 14:37:48 +00:00
Marja Hölttä
1e463aca7c [rab/gsab] Fix %TypedArray%.from
Bug: v8:11111, chromium:1378900
Change-Id: I01548502e9aa101e9e60bae01d9b24f8aa417bca
Fixed: chromium:1378900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3991492
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84004}
2022-11-02 09:25:20 +00:00
Maya Lekova
c2c2ef3775 [test] Proper fix for float overflow in uint64 tests
Bug: chromium:1379467
Change-Id: Ie82162b2a04a1b52edba21765e6d9c68a6fb7313
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3991016
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84000}
2022-11-01 09:39:49 +00:00
Clemens Backes
2f5fbb1381 [liftoff][arm64] Remove frame size padding to 4k
Before https://crrev.com/c/3054114 we needed to pad the frame size to 4k
so that it fits into a 'sub' instruction as an immediate.
Since frame sizes larger than 4k use special OOL code now, this is not
required any more.
We thus remove the padding to save stack space.

R=ahaas@chromium.org

Bug: chromium:1379364
Change-Id: I155628141d2c0438415ccff36a4de8f7d1ad4fd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3991050
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83999}
2022-10-31 16:44:29 +00:00
Victor Gomes
fbd4541fe7 [maglev] Tag Int32Constant in Phi boundaries
An Int32Constant might need to be tagged in Phi boundaries.
This exposes the Graph's smi constants to frames state
merger logic.

Bug: v8:7700, chromium:1378814, chromium:1379571
Change-Id: Ib373b44a76324eeb23cf9fef4483f70160cd54b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3993220
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83993}
2022-10-31 14:30:41 +00:00
Marja Hölttä
1e199f11a6 [compiler] Fix the type of FindNonDefaultConstructorOrConstruct
Object doesn't mean an Object, but JSObject.

Bug: v8:13091,chromium:1374995
Change-Id: I7a9eef3de195c1aa7f2afd5ac3dbcac59b8b0781
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3990786
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83977}
2022-10-28 12:33:29 +00:00
Leszek Swirski
da04b88f69 Revert "[ic] Remove SameValue optimisation for constant fields"
This reverts commit e7f6d34cfe.

Reason for revert: Regressions and clusterfuzz bugs

Original change's description:
> [ic] Remove SameValue optimisation for constant fields
>
> We would previously try to preserve field constness if field assignment
> was assigning the same value. It's unexpected that real-life code would
> be assigning the same value multiple times to an intentionally constant
> field, so this was additional bookkeeping with unclear value.
>
> Replace this with not doing it, and considering any write to a constant
> field to convert it to mutable. In particular, this means that stores to
> existing constant fields in TurboFan become unconditional deopts, rather
> than emitting additional code to check whether the value is the same.
>
> Locally, this deopt doesn't fire on our peak-performance benchmarks.
>
> Bug: v8:5495
> Change-Id: I12216c5f10a00f42be32c64ca3afe7cf59b4e7f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976516
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83955}

Bug: v8:5495
Change-Id: Ifeeceb773af04e9dd5e069821cd128a1cdbedcf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3990683
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
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>
Cr-Commit-Position: refs/heads/main@{#83970}
2022-10-28 08:23:09 +00:00
Nico Hartmann
cfc4a2d16e Reland^2 "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
This reverts commit 57db447bf2.

This reland adds handling for Oddballs in Int64Add and Int64Sub in the
SLVerifier and updates the Verifier to check that Int32Constant and
Int64Constant are correctly typed with Type::Machine().

Original change's description:
> [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
>
> This CL adds TurboFan optimizations for length and element access
> of TypedArrays and DataViews that are rab/gsab-backed.
>
> To enable this optimization, this CL builds the necessary machinery
> required to allow machine operators at the front of the pipeline
> (before simplified lowering). Some key changes to allow this are:
>  - Introduce Type::Machine() to allow the typer and the verifier to
>    provide a type to those machine operators in parts of the pipeline
>    that require nodes to be typed.
>  - Add EnterMachineGraph and ExitMachineGraph operators that define
>    the boundary between early machine graphs and the normal graph with
>    JS semantics.
>  - Give Branch operators a BranchSemantics parameter to distinguish
>    between machine branches (condition is a machine level value) and
>    JS branches (condition is a JS boolean value) and have phases that
>    handle branches decide on the branch's semantics based on this
>    parameter instead of the position in the pipeline.
>  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
>    machine graphs. In particular, constants required special handling,
>    because they are cached in the graph but they may have uses in both
>    a machine and the JS graph, which prevents consistent typing of
>    them.
>  - Moved lots of logic from JSCallReducerAssembler into
>    [JS]GraphAssembler such that functionality can be shared between
>    different phases (e.g. JSNativeContextSpecialization and
>    JSCallReducer need to generate logic to compute a TypedArray's
>    byte length). Extended assembler interface in general with
>    additional TNode<> overloads.
>
>
> Bug: v8:11111, chromium:1358505
> Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83881}

Bug: v8:11111, chromium:1358505, v8:13412, chromium:1378439, chromium:1378162
Change-Id: I89702c4be05e0e71cd6836dc50d2e26736a55429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3980759
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83956}
2022-10-27 13:06:06 +00:00
Leszek Swirski
e7f6d34cfe [ic] Remove SameValue optimisation for constant fields
We would previously try to preserve field constness if field assignment
was assigning the same value. It's unexpected that real-life code would
be assigning the same value multiple times to an intentionally constant
field, so this was additional bookkeeping with unclear value.

Replace this with not doing it, and considering any write to a constant
field to convert it to mutable. In particular, this means that stores to
existing constant fields in TurboFan become unconditional deopts, rather
than emitting additional code to check whether the value is the same.

Locally, this deopt doesn't fire on our peak-performance benchmarks.

Bug: v8:5495
Change-Id: I12216c5f10a00f42be32c64ca3afe7cf59b4e7f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976516
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83955}
2022-10-27 13:05:03 +00:00
Marja Hölttä
4bef10308f [rab/gsab] Fix RAB/GSABness in %TypedArray%.of
Bug: v8:11111,chromium:1377840
Change-Id: I0a3d86b9f160c0daf28f45b9ec7a37f0a88be614
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976511
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83942}
2022-10-27 08:33:01 +00:00
Marja Hölttä
fb6b3f7373 [compiler] Fix depending on the prototype chain w/ --omit-default-ctors
Bug: v8:13091,chromium:1374746
Change-Id: If36d80f956db000d02faa155cf6b302d53b52e53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976517
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83941}
2022-10-27 08:21:42 +00:00
Matthias Liedtke
1688cad47f [wasm-gc] Add new ref.cast null taking any reference
This extends crrev.com/c/3948663 (ref.cast) by adding the new
"ref.cast null" which only behaves different for null for which
it doesn't trap but instead casts the null value to the target
(null)type.

Bug: v8:7748
Change-Id: I3ac85d83cc06c95af8830c1c60ae2f28414e2570
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960329
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83934}
2022-10-26 15:06:50 +00:00
Victor Gomes
539d2b7dc3 [maglev] Stable maps can become stale after a side effect
Unstable maps can transition to stable ones after a side effect,
therefore we cannot trust the set of stable maps. The CL nukes
from the set from stable_maps, equivalent of setting it to
the universal set.

Bug: v8:7700
Change-Id: I457f76efd48ec7eec747233ec063ebe265d3085a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3978169
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83923}
2022-10-26 09:39:59 +00:00
Ilya Rezvov
57db447bf2 Revert "Reland "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews""
This reverts commit 05bd7d9cd6.

Reason for revert: Still looks like a reason for rollout tests failure https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/1179312/overview

Original change's description:
> Reland "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
>
> This reverts commit 4b28d53011.
>
> Original change's description:
> > [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
> >
> > This CL adds TurboFan optimizations for length and element access
> > of TypedArrays and DataViews that are rab/gsab-backed.
> >
> > To enable this optimization, this CL builds the necessary machinery
> > required to allow machine operators at the front of the pipeline
> > (before simplified lowering). Some key changes to allow this are:
> >  - Introduce Type::Machine() to allow the typer and the verifier to
> >    provide a type to those machine operators in parts of the pipeline
> >    that require nodes to be typed.
> >  - Add EnterMachineGraph and ExitMachineGraph operators that define
> >    the boundary between early machine graphs and the normal graph with
> >    JS semantics.
> >  - Give Branch operators a BranchSemantics parameter to distinguish
> >    between machine branches (condition is a machine level value) and
> >    JS branches (condition is a JS boolean value) and have phases that
> >    handle branches decide on the branch's semantics based on this
> >    parameter instead of the position in the pipeline.
> >  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
> >    machine graphs. In particular, constants required special handling,
> >    because they are cached in the graph but they may have uses in both
> >    a machine and the JS graph, which prevents consistent typing of
> >    them.
> >  - Moved lots of logic from JSCallReducerAssembler into
> >    [JS]GraphAssembler such that functionality can be shared between
> >    different phases (e.g. JSNativeContextSpecialization and
> >    JSCallReducer need to generate logic to compute a TypedArray's
> >    byte length). Extended assembler interface in general with
> >    additional TNode<> overloads.
> >
> >
> > Bug: v8:11111, chromium:1358505
> > Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#83881}
>
> Bug: v8:11111, chromium:1358505, v8:13412
> Change-Id: I61664e18a9dba1741bcb70ec22ba6342521f500a
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976512
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83904}

Bug: v8:11111, chromium:1358505, v8:13412
Change-Id: I960a34cfdb861feddf51cbcd759218f39b26cd56
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3980313
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Ilya Rezvov <irezvov@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83914}
2022-10-25 22:37:08 +00:00
Nico Hartmann
05bd7d9cd6 Reland "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
This reverts commit 4b28d53011.

Original change's description:
> [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
>
> This CL adds TurboFan optimizations for length and element access
> of TypedArrays and DataViews that are rab/gsab-backed.
>
> To enable this optimization, this CL builds the necessary machinery
> required to allow machine operators at the front of the pipeline
> (before simplified lowering). Some key changes to allow this are:
>  - Introduce Type::Machine() to allow the typer and the verifier to
>    provide a type to those machine operators in parts of the pipeline
>    that require nodes to be typed.
>  - Add EnterMachineGraph and ExitMachineGraph operators that define
>    the boundary between early machine graphs and the normal graph with
>    JS semantics.
>  - Give Branch operators a BranchSemantics parameter to distinguish
>    between machine branches (condition is a machine level value) and
>    JS branches (condition is a JS boolean value) and have phases that
>    handle branches decide on the branch's semantics based on this
>    parameter instead of the position in the pipeline.
>  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
>    machine graphs. In particular, constants required special handling,
>    because they are cached in the graph but they may have uses in both
>    a machine and the JS graph, which prevents consistent typing of
>    them.
>  - Moved lots of logic from JSCallReducerAssembler into
>    [JS]GraphAssembler such that functionality can be shared between
>    different phases (e.g. JSNativeContextSpecialization and
>    JSCallReducer need to generate logic to compute a TypedArray's
>    byte length). Extended assembler interface in general with
>    additional TNode<> overloads.
>
>
> Bug: v8:11111, chromium:1358505
> Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83881}

Bug: v8:11111, chromium:1358505, v8:13412
Change-Id: I61664e18a9dba1741bcb70ec22ba6342521f500a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976512
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83904}
2022-10-25 13:01:38 +00:00
Matthias Liedtke
0486ef3727 Reland "[wasm] ref.call: Consume sig index immediate"
Follow-up to commit 6168782925
With this change 0x14 now also consumes a sig index immediate.
This will allow users to switch from 0x17 back to 0x14 without
breaking changes. After another grace period, 0x17 can be removed.

Reland of commit I65fe8b5bceb70323dd5e6450ec7bcc02696b15fa adapted by the concurrent changes in 35cc93aa42.
(This reverts commit 01379ba6d65371b70908da8e8386a9d9993aa2f9.)

Change-Id: I699095afb85d460e1fef8bd88abfd4c748090eda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3977828
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83900}
2022-10-25 09:39:13 +00:00
Qifan Pan
7eb43bf494 [turbofan] Decompose CheckBigInt64 and make it precise
This CL solves two problems:

- Eliminating redundant CheckBigInt/CheckBigInt64 by decomposing
  CheckBigInt64 to CheckBigInt and CheckedBigIntToBigInt64.
- Having precise checks for SignedBigInt64 to make the range of BigInt64
  consistent in CheckedBigInt64Ops and CheckedBigIntToBigInt64.
  Otherwise, there would be semantic difference between the subgraphs
  where we keep CheckBigInt64 inbetween two CheckedBigInt64Ops (e.g.,
  the variant assert_types) and the subgraphs where we eliminate the
  checks.

Bug: v8:9407
Change-Id: I79a5c99e12eb3f3ffc7b5cbfc51191e6792f634b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960333
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83899}
2022-10-25 08:57:30 +00:00
Marja Hölttä
100fbd89f2 [compiler] Fix FrameStates after a possible lazy deopt around JSFindNonDefaultConstructorOrConstruct
Bug: v8:13091,chromium:1375073
Change-Id: I160961625c40747ca01d5cc3a50e93f5e289c940
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3967902
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83898}
2022-10-25 08:12:13 +00:00
Michael Achenbach
01379ba6d6 Revert "[wasm] ref.call: Consume sig index immediate"
This reverts commit 8f3047531d.

Reason for revert: CL collision:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20builder/63710/overview

Original change's description:
> [wasm] ref.call: Consume sig index immediate
>
> Follow-up to commit 6168782925
> With this change 0x14 now also consumes a sig index immediate.
> This will allow users to switch from 0x17 back to 0x14 without
> breaking changes. After another grace period, 0x17 can be removed.
>
> Change-Id: I5d0039fd1ca9d62c3d42e5834fe7924de45ad7ef
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974512
> Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83890}

Change-Id: I65fe8b5bceb70323dd5e6450ec7bcc02696b15fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976029
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>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83894}
2022-10-24 17:37:22 +00:00
Matthias Liedtke
8f3047531d [wasm] ref.call: Consume sig index immediate
Follow-up to commit 6168782925
With this change 0x14 now also consumes a sig index immediate.
This will allow users to switch from 0x17 back to 0x14 without
breaking changes. After another grace period, 0x17 can be removed.

Change-Id: I5d0039fd1ca9d62c3d42e5834fe7924de45ad7ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974512
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83890}
2022-10-24 17:28:54 +00:00
Michael Achenbach
4b28d53011 Revert "[turbofan] Optimize rab/gsab-backed TypedArrays and DataViews"
This reverts commit bd590292b3.

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

Original change's description:
> [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
>
> This CL adds TurboFan optimizations for length and element access
> of TypedArrays and DataViews that are rab/gsab-backed.
>
> To enable this optimization, this CL builds the necessary machinery
> required to allow machine operators at the front of the pipeline
> (before simplified lowering). Some key changes to allow this are:
>  - Introduce Type::Machine() to allow the typer and the verifier to
>    provide a type to those machine operators in parts of the pipeline
>    that require nodes to be typed.
>  - Add EnterMachineGraph and ExitMachineGraph operators that define
>    the boundary between early machine graphs and the normal graph with
>    JS semantics.
>  - Give Branch operators a BranchSemantics parameter to distinguish
>    between machine branches (condition is a machine level value) and
>    JS branches (condition is a JS boolean value) and have phases that
>    handle branches decide on the branch's semantics based on this
>    parameter instead of the position in the pipeline.
>  - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
>    machine graphs. In particular, constants required special handling,
>    because they are cached in the graph but they may have uses in both
>    a machine and the JS graph, which prevents consistent typing of
>    them.
>  - Moved lots of logic from JSCallReducerAssembler into
>    [JS]GraphAssembler such that functionality can be shared between
>    different phases (e.g. JSNativeContextSpecialization and
>    JSCallReducer need to generate logic to compute a TypedArray's
>    byte length). Extended assembler interface in general with
>    additional TNode<> overloads.
>
>
> Bug: v8:11111, chromium:1358505
> Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83881}

Bug: v8:11111, chromium:1358505
Change-Id: Ifa7b81523237ebda941cab2feed42c176846b618
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3976028
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Owners-Override: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83888}
2022-10-24 17:09:09 +00:00
Maya Lekova
bf0bd4868d [fastcall] Disable fast calls with stack args on M1
Bug: v8:13171
Change-Id: I549d942d8ae24e2de0aa3202d7400b587254fb75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3963995
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83886}
2022-10-24 14:23:17 +00:00
Qifan Pan
1806ad7313 [mjsunit] Fix flaky deopt loop tests
Bug: v8:13408, v8:9407
Change-Id: I2f7eefde11c63517bb59036b38ca20173a0adf03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3971367
Auto-Submit: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#83885}
2022-10-24 14:19:18 +00:00
Fanchen Kong
086d92d4f3 [turbofan] Fix bug in gasm and add tests.
This CL fixes bug introduced with https://chromium-review.googlesource.com/c/v8/v8/+/3799214 and add tests.

Bug: chromium:1377095
Change-Id: I98d05efb88a75bd3eac378abe2bc60522aba0781
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3973811
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83883}
2022-10-24 14:00:28 +00:00
Nico Hartmann
bd590292b3 [turbofan] Optimize rab/gsab-backed TypedArrays and DataViews
This CL adds TurboFan optimizations for length and element access
of TypedArrays and DataViews that are rab/gsab-backed.

To enable this optimization, this CL builds the necessary machinery
required to allow machine operators at the front of the pipeline
(before simplified lowering). Some key changes to allow this are:
 - Introduce Type::Machine() to allow the typer and the verifier to
   provide a type to those machine operators in parts of the pipeline
   that require nodes to be typed.
 - Add EnterMachineGraph and ExitMachineGraph operators that define
   the boundary between early machine graphs and the normal graph with
   JS semantics.
 - Give Branch operators a BranchSemantics parameter to distinguish
   between machine branches (condition is a machine level value) and
   JS branches (condition is a JS boolean value) and have phases that
   handle branches decide on the branch's semantics based on this
   parameter instead of the position in the pipeline.
 - Extend SimplifiedLowering and SimplifiedLoweringVerifier to handle
   machine graphs. In particular, constants required special handling,
   because they are cached in the graph but they may have uses in both
   a machine and the JS graph, which prevents consistent typing of
   them.
 - Moved lots of logic from JSCallReducerAssembler into
   [JS]GraphAssembler such that functionality can be shared between
   different phases (e.g. JSNativeContextSpecialization and
   JSCallReducer need to generate logic to compute a TypedArray's
   byte length). Extended assembler interface in general with
   additional TNode<> overloads.


Bug: v8:11111, chromium:1358505
Change-Id: Ife006b8c38a83045cd3b8558acbfdcb66408891f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3898690
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83881}
2022-10-24 13:02:36 +00:00
Manos Koukoutos
12d8e6a54a [wasm-gc] Remove --wasm-gc-js-interop
This removes the temporary option and sets its value to {true}
everywhere.

Bug: v8:7748
Change-Id: Icbc3071b531b130c0eb007758452d09b65491c04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3974510
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83880}
2022-10-24 12:58:36 +00:00
Adam Klein
9e55d25735 [cleanup] Remove Wasm SIMD flag & deprecate embedder-enabling API
It's been enabled by default since Chrome 91.

Bug: v8:6020
Change-Id: Id26b7fb0b7dffe19a88a6f0071dd59203b06415a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3957636
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83862}
2022-10-22 00:47:42 +00:00
Qifan Pan
7aa6a7e659 [turbofan] Extend typers of JSUnaryOps to BigInt
This CL fixes the types of JSUnaryOps with BigInt input.

Bug: chromium:1376930, v8:9407
Change-Id: I7a6603db08d3af1e40d440fe4c499e7f825b59d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3971119
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Cr-Commit-Position: refs/heads/main@{#83853}
2022-10-21 13:16:57 +00:00
Nikolaos Papaspyrou
60dfddf03c [heap][test] Fix code coverage tests for conservative stack scanning
Code coverage tests invoke garbage collection, to test that coverage
data is not reclaimed by the garbage collector and that the native
%DebugTogglePreciseCoverage works as intended. One of them tests that
garbage collection indeed reclaims the coverage data, if the above
native is not used. When conservative stack scanning is used, this may
fail.

This CL fixes the tests, ensuring that a precise garbage collection
will be invoked, without scanning the stack. To achieve this, the
garbage collection is invoked not with %CollectGarbage but by using
--expose-gc and the asynchronous execution mode, which ensures that
it will be invoked from the event loop without a stack.

Bug: v8:13257
Change-Id: Id44ef0d442bfd0a8afda282c3345e5ebeb239356
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3968708
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83851}
2022-10-21 13:09:40 +00:00
Nikolaos Papaspyrou
8c7c087812 [heap] Make stack thread-local and introduce stack markers
This CL makes the object keeping stack information thread-local, moving
it from Heap to ThreadLocalTop. In this way, stack scanning will work
correctly when switching between threads, e.g., using v8::Locker.

It also introduces a mechanism for setting a stack marker, to be used
for scanning only the part of stack between its start and the marker
(instead of the current stack top).

Bug: v8:13257
Change-Id: I01091f5f49d9a8143d50aeef53789a98bdb29048
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960991
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83848}
2022-10-21 13:02:07 +00:00
Marja Hölttä
724e7ce174 [arraybuffers, api] Implement [[ArrayBufferDetachKey]] support
Bug: chromium:1344595
Change-Id: Ic1075361b92c776789ce2fbf1e105dea174f3a2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3925936
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83847}
2022-10-21 12:55:18 +00:00
Clemens Backes
c745dab977 [wasm][memory64] Support shared memory
For some reason we overlooked shared memory64 so far. Supporting it is
trivial, we just need to fix flag parsing.

To make parsing simpler, we replace the switch by a bit-decoding logic.

R=jkummerow@chromium.org

Bug: v8:10949, v8:13401
Change-Id: I1d884a174f901ed359c1d385055c9f2d24b0e2f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3967904
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83846}
2022-10-21 12:40:17 +00:00
Manos Koukoutos
65c6a068d7 [wasm] Type inlined tail call nodes
When inlining a tail call node into a regular call, the tail call node
is transformed into a regular call. This new call node (or its
projections in the case of multi-return) has to be typed.

Bug: v8:13406, v8:12166
Change-Id: I39cc619e6ee4f0d16763699fe4facebe461a750f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3968715
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83839}
2022-10-21 11:23:22 +00:00
Victor Gomes
f22dea3c9e Revert "[NumFuzz] Skip processor and whitespaces test until issue is fixed"
This reverts commit 93f3f3369e.

Reason for revert: Tests should pass after:
https://crrev.com/c/3964754 and https://crrev.com/c/3964754

Original change's description:
> [NumFuzz] Skip processor and whitespaces test until issue is fixed
>
> No-Try: true
> Bug: v8:13397, v8:13396
> Change-Id: I7fdabc5f5c165b375d150b4228ff627fc13aacc3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966429
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#83801}

Change-Id: I858524c1c34be8d38c02615a3c043e6b792fd40c
Fixes: v8:13397, v8:13396
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3968477
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#83829}
2022-10-20 17:37:52 +00:00
Adam Klein
fafd7c5d22 [cleanup] Remove flag for Wasm threads & atomics
It's been enabled everywhere since Chrome 88, and the related
Chromium flag was removed in https://crrev.com/c/2886421.

Bug: v8:6532
Change-Id: I987a5761f9453d4e7d77d16199e8f0b3a659c70a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3956131
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83809}
2022-10-19 23:05:37 +00:00
Nico Hartmann
c437ecdf21 [mjsunit] Fixing two test flakes due to unexpected deopts
(at least hoping to).

Bug: v8:12486, v8:13354
Change-Id: I5bd9fedde5369b5644a4e9ab36e103902ee5b2b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3964273
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83802}
2022-10-19 14:28:37 +00:00
Al Muthanna Athamina
93f3f3369e [NumFuzz] Skip processor and whitespaces test until issue is fixed
No-Try: true
Bug: v8:13397, v8:13396
Change-Id: I7fdabc5f5c165b375d150b4228ff627fc13aacc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3966429
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83801}
2022-10-19 14:11:07 +00:00
Maya Lekova
51ef09078e [fastcall] Disable Clamp lowering with SSE4 disabled
Lowering the Clamp annotation relies on float rounding, which is
only supported with SSE4 enabled. Thus disabling generating the
fast call path if such arguments are present and SSE4 is disabled.

Bug: chromium:1374745
Change-Id: I14438902946d4744521dac8d8d314af51a722da5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3960410
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83799}
2022-10-19 13:33:57 +00:00
Jakob Kummerow
a02c56694f Reland "[wasm] Allocate feedback vectors on demand"
This is a reland of commit 4804c4de31.

There are major changes since the previous attempt:
- The WasmLiftoffFrameSetup (formerly WasmGetFeedbackVector) builtin
  now performs as much of the frame setup work as possible, to reduce
  generated code size for each function.
- The WasmLazyCompile builtin/runtime function no longer allocates,
  hence gets frame type INTERNAL, and is un-handlified.

Original change's description:
> [wasm] Allocate feedback vectors on demand
>
> We previously allocated feedback vectors when instantiating the module,
> or when lazily compiling a function. That's not sufficient when there
> are multiple instances of the same NativeModule, or when we eagerly
> tier-down all code for debugging. This patch changes the "get vector from
> instance" sequence at the beginning of every Liftoff function to "get
> or allocate vector"; factored into a builtin call to avoid generating
> more code for every function.
>
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3939667
> Cr-Commit-Position: refs/heads/main@{#83610}

Bug: v8:12852
Change-Id: I58a6a02a55c3e29cae3cbdafad6cf81487faccbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3942206
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83794}
2022-10-19 11:46:57 +00:00
pthier
dadd5f94f5 [regexp] Fix wrong unicode case-insensitive matches
When creating a character class in unicode, case-insensitive mode we use
icu::UnicodeSet::closeOver() to add all characters that case-insensitive
match the characters in the class.
According to the spec only simple case folding shall be performed for
case-insensitive unicode matching, but closeOver() adds all characters
that are equal w.r.t full case folding.
The current approach of just removing strings from the closeOver set is
not enough, as single code point characters still remain in the set if
they were equal only by performing full case folding.
E.g. the characters \u0390 and \u1FD3 both fold to the same string
"\u03B9\u0308\u0301" via full case folding, but they don't have a simple
case folding in common.

To prevent these wrong matches, we calculate the set of all characters
with close overs that are wrong according to the spec at build time and
remove them from the set before adding case-insensitive equivalent
characters.

Bug: v8:13377
Change-Id: I0252c79143f266911691331dd0e1e27044ea8cba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3952095
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83791}
2022-10-19 11:12:27 +00:00
Qifan Pan
0c177366dd [turbofan] Support feedback for arithmetic BigInt operations
Collect feedback for small BigInt division and modulo operation in
the interpreter and use feedback for BigInt subtraction,
multiplication, and division in turbofan except modulo operation
because it is not supported yet in turbofan.

Bug: v8:9407
Change-Id: I931cf9f70778c866599611474f1834417f023a74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3948787
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Qifan Pan <panq@google.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83768}
2022-10-18 10:46:26 +00:00
Dominik Inführ
7c7e774baa [heap] Remove --use-map-space flag
--use-map-space was already disabled by default. This CL removes
the possibility to enable map space again by removing that flag and
all its usages.

Bug: v8:12578
Change-Id: I8af18f39e9bf645316aa8718b49589eb4b852374
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959658
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83758}
2022-10-18 07:04:07 +00:00
Matthias Liedtke
088ea54118 [wasm-gc] Object.p.toString() should throw on wasm struct/array
Bug: v8:7748
Change-Id: I84b0896334e06f6831e543036b8b54ddf9fa0134
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3959914
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83751}
2022-10-17 15:56:56 +00:00