Commit Graph

79640 Commits

Author SHA1 Message Date
Clemens Backes
bfa76578c8 [wasm] Simplify {RemoveCompiledCode}
Inline {GetCodeLocked} and {ResetCodeLocked} to make the code simpler
and more efficient.

Drive-by: Make {FindJumpTablesForRegionLocked} private.

R=ahaas@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel
Change-Id: Id0649924440737f3a04dbb536bd2141732f4f3bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123535
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85048}
2023-01-02 11:16:29 +00:00
Andreas Haas
cc6fd8c8c0 [d8] Check profile for nullptr before serializing it
`CpuProfiler::StopProfiling()` return `nullptr` if no profiling is
active. Thus a `nullptr` check is needed before serializing the profile
returned by `CpuProfiler::StopProfiling()`.

R=clemensb@chromium.org

Bug: chromium:1394663
Change-Id: I364eeb1d9bd670de5179e242c4462f0fbfc9c607
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126234
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85047}
2023-01-02 10:33:50 +00:00
Darius M
fede2e9dcb [maglev][arm64] Add StoreTaggedFieldWithWriteBarrier IR
Bug: v8:7700
Change-Id: I64801703a23ea4c2485aacb6ae907259fff73990
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128519
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85046}
2023-01-02 10:30:24 +00:00
Darius M
d019c8367e [maglev][arm64] Implement Float64Ieee754Unary node
Bug: v8:7700
Change-Id: I509e4cbd55a60dc0bbd809e35e563dde92278714
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128097
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85045}
2023-01-02 10:25:23 +00:00
Darius M
e490cf4a72 [arm64] Make CheckPageFlag behave as on x64/ia32/arm
The condition to pass to CheckPageFlag was inverted on arm64 compared
to x64/ia32/arm. This caused a bug in Maglev (fixed in
https://crrev.com/c/4128556), and seems like it could easily cause
other bugs in the future.
With this CL, CheckPageFlag now behaves similarly on arm64 and
x64/ia32/arm.

Change-Id: Ib6b7f157db08d2e771ceb450ab16344c3578c546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128518
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85044}
2023-01-02 09:16:22 +00:00
v8-ci-autoroll-builder
1f9ff9cef4 Update V8 DEPS (trusted)
Rolling v8/build: e8a1124..7ba88a0

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221231.3.1..version:11.20230101.3.1

Change-Id: Ie9d8ce221aee75e6d578dacaa6fbbecb63e26286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127151
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85043}
2023-01-02 03:47:54 +00:00
v8-ci-autoroll-builder
bd708c27bb Update V8 DEPS (trusted)
Rolling v8/build: d60073f..e8a1124

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221230.3.1..version:11.20221231.3.1

Change-Id: I4c7a1d8fd5420cad3b704364aae703a1b105e889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127145
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85042}
2023-01-01 04:02:26 +00:00
v8-ci-autoroll-builder
4f7a03ca5b Update V8 DEPS (trusted)
Rolling v8/build: 83df13d..d60073f

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221229.3.1..version:11.20221230.3.1

Change-Id: If6dca69c7f4f975d512a8b4253861b7808db5945
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129170
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85041}
2022-12-31 03:47:34 +00:00
v8-ci-autoroll-builder
d8aeae69df Update V8 DEPS (trusted)
Rolling v8/build: d9fb377..83df13d

Rolling v8/buildtools: 134af4c..cf8d11e

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/fa82fd2..a404e6d

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221228.1.1..version:11.20221229.3.1

Change-Id: I15521073cf263003381aed151b4e48a77e7dc86e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129163
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85040}
2022-12-30 03:43:40 +00:00
Jakob Linke
ba1fed5ccb [maglev] Fix several bugs in codegen for x % x
.. which should result in 0 if x is non-negative, and -0.0 otherwise.

- Fix two invalid modulus-related folds.
- Handle aliased inputs in Int32ModulusWithOverflow.
- Drive-by: rename left/right to lhs/rhs to match the algorithm
  description.

Note there is no deopt loop here since a result of -0.0 will update
feedback to kSignedSmallInputs.

Bug: v8:7700
Change-Id: I84fca0e43ded152d3520cbe73cc43299ff1c4230
Fixed: chromium:1403575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128081
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85039}
2022-12-29 14:26:17 +00:00
Michael Achenbach
0aa0b44a40 Whitespace to test bots
Change-Id: Ia9152f8821baf8f2ebeaf71125f05100cacf898d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4129496
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85038}
2022-12-29 13:50:18 +00:00
Olivier Flückiger
4bbbb521f4 Reland "Reland "[static-roots] Enable static roots on supported configurations""
This is a reland of commit b247270178

But with static roots disabled on non-external code space builds.


Original change's description:
> Reland "[static-roots] Enable static roots on supported configurations"
>
> This is a reland of commit c04ca9cc63
>
> Original change's description:
> > [static-roots] Enable static roots on supported configurations
> >
> > The static root values are not actually used yet.
> >
> > Bug: v8:13466
> > Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84850}
>
> Bug: v8:13466
> Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84991}

Bug: v8:13466
Change-Id: Id1f55c1cf8d349338fd49f6cb0ed7dc2e1054a72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123534
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85037}
2022-12-29 09:19:11 +00:00
Jakob Linke
b2ab857f39 Properly print minus zero (-0.0) heap numbers
.. print them as '-0.0' instead of '0.0'.

Change-Id: I425d78e245868e7ff878c07282a0f9d8ca67a8d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128558
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85036}
2022-12-29 09:18:07 +00:00
Darius M
f23bf2752d [maglev][arm64] Fix wrong write barrier usage
The arm64 version of GeneratorStore was using the write barrier
incorrectly, triggering it when it shouldn't be triggered (and
vise-versa), and a "PointersFromHere" was mistakenly used instead of a
"PointersToHere".

The reason for the incorrect ne/eq used in CheckFlags is that this
function works a bit differently on x64 and arm64, cf their
implementations:

  - x64: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/x64/macro-assembler-x64.cc;l=3425;drc=605e46479aca3449a6ba1350a1de7927c76b86ad

  - arm64: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/arm64/macro-assembler-arm64.cc;l=3248;drc=dc950c32bd5262d66d845d2bfeb1ff4a17a857bc

For an example of both of those functions used for similar purposes,
see `MacroAssembler::RecordWrite` in macro-assembler-x64.h and
macro-assembler-arm64.h: the former uses `zero` in `CheckFlags`, while
the latter uses `ne`.

When --stress-maglev and --verify-heap were enabled, this mistake was
causing a crash in the heap verifier in the
`mjsunit/es6/typedarray-from.js` and `mjsunit/wasm/gc-js-interop.js`
benchmarks. I was able to reproduce those crashes on x64 by replacing
the "not_equal" in CheckFlags by "equal".


Bug: v8:7700
Change-Id: I42316931fba858433317238fc42f7c33985f46ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128556
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85035}
2022-12-29 07:30:21 +00:00
QiuJi
cfec73d847 [riscv][regalloc] Port the rest part of "Resolve tail-call gap moves"
Port commit 2f4397d652

Bug: chromium:1269989
Change-Id: I5929a605300b9c127e61710585314c3fc50a1aff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128600
Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#85034}
2022-12-29 05:41:55 +00:00
v8-ci-autoroll-builder
4a719abf8e Update V8 DEPS (trusted)
Rolling v8/build: c171e77..d9fb377

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/816a551..fa82fd2

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221227.3.1..version:11.20221228.1.1

Rolling v8/third_party/jinja2: 4633bf4..264c07d

Change-Id: I76e336b991407015c2789fdcdb6e27c96733c1e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126919
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85033}
2022-12-29 03:46:39 +00:00
Olivier Flückiger
d65596fc36 [static-roots] Fix performance regression from 4116776
Addresses two potential performance regressions introduced in
https://crrev.com/c/4116776. First, the left-over CHECK is changed to a
DCHECK. Second, calling `EarlyGetReadOnlyRoots` should at least be as
efficient as `GetReadOnlyRoots` before the earlier change.

Bug: v8:13466
Change-Id: I93e9c06ce651cae90e9c969e54ec73e4eab80fd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127159
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85032}
2022-12-28 14:59:35 +00:00
Michael Achenbach
48495722ce [js-fuzzer] Add optimization template for Maglev
This makes js-fuzzer use %OptimizeMaglevOnNextCall in 30% of the
times when optimization patterns are chosen. Other probabilities
of the function-call mutator are tuned a bit to keep using
%OptimizeFunctionOnNextCall proportionally similarly to before.

(~ some round number preferences... exact choices might not matter
much, since the original probability choices are rater arbitrary
anyways)

Bug: v8:7700
Change-Id: I7727ea27fd956efab6fbee2b4a090213d1d7ff05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124118
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85031}
2022-12-28 14:50:03 +00:00
Olivier Flückiger
be9c39d3d9 [static-roots] Rename --static-roots to --generate-static-roots
Rename the flag in order to avoid confusion with `V8_STATIC_ROOTS_BOOL`.
The flag is used by `./mksnapshot` to generate a new static-roots.h
file.

Bug: v8:13466
Change-Id: Ieb5af89b9839673fd2b8aeef197c104aa3c580aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111933
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85030}
2022-12-28 14:46:41 +00:00
Darius M
0f3036ce09 [maglev][arm64] Fix scratch register shortage on funs with many args
The Sub macro sometimes needs a scratch register when the 2nd operand
is too large to be encoded in the instruction. The prologue was
already reserving 2 scratch registers, which made Sub crash on a
DCHECK when trying to reserve one more scratch register.

Bug: v8:7700
Change-Id: I995689b8b16e3ef216641f0b6cadbf58f7f3740b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128554
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85029}
2022-12-28 14:02:51 +00:00
Jakob Linke
b8b136cb36 [maglev] Skip the TieringManager on TieringState::kInProgress
When the interrupt_budget is exhausted, Maglev code calls into runtime
for tiering logic in TieringManager. As always, the runtime call
itself has a certain (noticeable) overhead.

This CL is an optimization based on the observation that the
TieringManager only performs simple bookkeeping if the
tiering_state (or osr_tiering_state) is kInProgress. We can avoid
the runtime call overhead in this case. Changes are:

1. Extract the interrupt check (= stack check) into generated code s.t.
   it's separate from tiering logic. Note, combining the interrupt
   check and tiering logic was a previous optimization to reduce
   generated code size, introduced in crrev.com/c/3049076.
2. Skip the runtime call to Runtime::kBytecodeBudgetInterrupt if
   `tiering_state == kInProgress || osr_tiering_state == kInProgress`.

Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel
Bug: v8:7700
Change-Id: Ibcd416aaea7abdd087741551fa213fa033fe12e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4127157
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85028}
2022-12-28 13:49:33 +00:00
Vladimir Nechaev
28cb67cdec Runtime.callFunctionOn supports uniqueContextId
Bug: v8:13620
Change-Id: I802deb3325a5c8ac9e7e378d60be591af66e6fee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126215
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Vladimir Nechaev <nechaev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85027}
2022-12-28 10:45:28 +00:00
Darius M
dff5fc1b23 [maglev] Fix wrong EmitDeoptIf instead of EmitEagerDeoptIf
A recent CL refactored some Deopts
(https://chromium-review.googlesource.com/c/v8/v8/+/4120575), and
mistakenly wrote EmitDeoptIf (which isn't an existing function)
instead of EmitEagerDeoptIf, which broke the Arm64 build (which
isn't covered by the bots yet).

Bug: v8:7700
Change-Id: I1301a26584bd76d1a2608c37c07c58fe990446d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128095
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85026}
2022-12-28 09:48:27 +00:00
Jakob Linke
4914da9d01 Update comments and names related to stack checks
.. and several other minor changes (branch hints, moving code around
for better grouping, const).

Bug: v8:7700
Change-Id: Ia07aa478a5ae5d1852e4ad2dce39f42743376e65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4128096
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85025}
2022-12-28 09:46:40 +00:00
v8-ci-autoroll-builder
eb008c433e Update ICU (trusted)
Rolling v8/third_party/icu: 1b7d391..2c51e5c

Update TZ to 2022g (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/2c51e5c

[fuchsia] Limit the visibility of ICU targets (Filip Filmar)
https://chromium.googlesource.com/chromium/deps/icu/+/9a2f72a

[config] Declare the args conditionally (Filip Filmar)
https://chromium.googlesource.com/chromium/deps/icu/+/b6d6790

Change-Id: Iea9aa1ada43e2a457a8950e533fc1d1c460e1003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126757
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85024}
2022-12-28 04:21:27 +00:00
v8-ci-autoroll-builder
a788519ab7 Update V8 DEPS (trusted)
Rolling v8/build: 4e33131..c171e77

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2786327..816a551

Rolling v8/third_party/depot_tools: 0b96058..03af44a

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221226.2.1..version:11.20221227.3.1

Change-Id: I3f81156fa98c1f989319c43760060fcda87e390e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4126756
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85023}
2022-12-28 03:58:53 +00:00
Jakob Linke
2b976c1c3f [maglev] Fix an outdated fallthrough in AttemptOnStackReplacement
.. that should now be a jump to `no_code_for_osr` since
AttemptOnStackReplacement is now emitted in deferred code and may thus
no longer fall through.

Fixed: chromium:1403135
Bug: v8:7700
Change-Id: I3dcd7696dc5a19a0cd955b2eef1538c07b2d6e00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124200
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85022}
2022-12-27 11:51:24 +00:00
Toon Verwaest
a91587d380 [maglev] Fix Int32ModulusWithOverflow
Mark rhs as clobbered since we may negate it. Negate the lhs in rax.

Bug: v8:7700, chromium:1403470
Change-Id: I9a26de78fcd8d1db90c1d26617001c0c699c350e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110814
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85021}
2022-12-27 07:42:31 +00:00
v8-ci-autoroll-builder
cdcb3caf2d Update V8 DEPS (trusted)
Rolling v8/build: e3bb433..4e33131

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221225.2.1..version:11.20221226.2.1

Change-Id: I8ff17f992af9cf8a883f6ccec6d067f0fbef07a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124570
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85020}
2022-12-27 03:45:45 +00:00
v8-ci-autoroll-builder
8e063b8066 Update V8 DEPS (trusted)
Rolling v8/build: 6a408e0..e3bb433

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221224.3.1..version:11.20221225.2.1

Change-Id: Idbe82931e04d3b8c296dadc9d2d08c0324e6b066
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124567
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85019}
2022-12-26 04:05:10 +00:00
v8-ci-autoroll-builder
eef61dadf4 Update V8 DEPS (trusted)
Rolling v8/build: 6025acd..6a408e0

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1665385..2786327

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221223.1.1..version:11.20221224.3.1

Change-Id: I49f6c8b0773adbbd7f2b6b3a0aeb25349dfff55b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4124556
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85018}
2022-12-25 03:48:54 +00:00
v8-ci-autoroll-builder
6925036195 Update V8 DEPS (trusted)
Rolling v8/build: ff6be8b..6025acd

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/ebbb83f..1665385

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221222.1.1..version:11.20221223.1.1

Change-Id: I14ec522778eed23878e2a921893bc6ef263f083d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120769
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85017}
2022-12-24 04:03:48 +00:00
Milad Fa
3386dda5d5 PPC[liftoff]: Implement simd FP trunc saturate
Change-Id: I71a0d5e630bf886282989cb314ce2adb967ebaee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110813
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/main@{#85016}
2022-12-23 20:04:41 +00:00
Toon Verwaest
109c8efc55 [maglev] Fix NaN handling after Ucomisd
As a drive-by this also fixes property load from smi. We still need to check that we actually have a smi...

Bug: v8:7700, chromium:1403280, chromium:1403323
Change-Id: I3c4f050b94550b8d7e4e65f733f9c1dad47941d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120575
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85015}
2022-12-23 15:46:12 +00:00
Victor Gomes
1531fec7e6 [maglev] Fix reuse of property load for unstable maps
Even if we have a constant load, if the map is not stable, we cannot
guarantee that the load is preserved across side-effecting calls.

Fixed: chromium:1403324
Bug: v8:7700
Change-Id: Ib900cf7574711115439e6521ed8cfaa866525e78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4123532
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85014}
2022-12-23 15:14:57 +00:00
Toon Verwaest
b42d19ed11 [maglev] Also drop existing merges in a liveness hole
It's possible that various branches merged already with a value that's
in a liveness hole, but we only figure out later. If so, drop the merge
as well.

Bug: v8:7700, chromium:1403399

Change-Id: Ifd97e0c1959ffe51017e400fb028041047885a9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111932
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85013}
2022-12-23 14:33:18 +00:00
Olivier Flückiger
0c7da9f0ee [static-roots] Branchless access to the SoleReadOnlyHeap
Many locations use the generic GetReadOnlyRoots() function to get access
to read only roots. Prominently this happens in Object::IsUndefined and
friends. The function is quite inefficient on shared read only root
build configurations as it always has to check if the shared read only
heap is already initialized or not. However, the heap is only
uninitialized during bootstrapping.

This CL replaces the branch by a CHECK and deals with the fallout
twofold. First, the SoleReadOnlyHeap is initialized earlier, right
after all heap objects have been created. Second, any location that
calls GetReadOnlyRoots() during initialization is fixed to access
the isolate-local read only roots table instead of the shared one.


Bug: v8:13466
Change-Id: I03e3e68eeefc8651818700629f69ff6163ceb6ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4116776
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85012}
2022-12-23 13:15:32 +00:00
pthier
0d9bacb958 [maglev][arm64] Port Construct and ConstructWithSpread
Bug: v8:7700
Change-Id: Icc26c0081cab1f468829d464a36c2b524be8e251
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120033
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85011}
2022-12-23 12:39:28 +00:00
Michael Achenbach
6b2c271cfb [foozzie] Temporarily lower the amount of --future tests
Drop --future from 25% to 5% for a few days until all currently open
correctness cases associated with --future are fixed.

No-Try: true
Bug: v8:7700
Change-Id: I161a0adbc767c5cec46409443fe58c634531487c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4114292
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85010}
2022-12-23 12:11:10 +00:00
pthier
6f4a3e0c2f [maglev][arm64] Fix calls to TF builtins partly consuming stack args
Some TF builtins (*_WithFeedback variants) consume some of the stack
arguments and pass the rest through to ASM builtins.
We need to seperately align the stack arguments consumed by the TF
builtin and the arguments passed to the ASM builtins via TailCall.

Bug: v8:7700
Change-Id: I26de558fd961cb35b5c642430f9e2c8523ecf096
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118741
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85009}
2022-12-23 11:38:31 +00:00
pthier
3fddd2e9a6 [maglev][arm64] Fix Int32DecrementWithOverflow
Source register has to be 32-bit.

Bug: v8:7700
Change-Id: Ica2a51de100d81bc36447988f6508800f87379ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118740
Auto-Submit: Patrick Thier <pthier@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85008}
2022-12-23 11:16:40 +00:00
pthier
53314cdc78 Re-enable mjsunit/md5 for future/maglev
The issue causing this test to fail on the usban bot was fixed with
https://crrev.com/fcda478d890caea6bf04a50e6106682b64cf8d5a

Bug: v8:13611, v8:13612
Change-Id: I1d0a713160cdddf8623e767d43277a988509bce0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4110955
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85007}
2022-12-23 09:04:58 +00:00
v8-ci-autoroll-builder
b74fc57493 Update V8 DEPS (trusted)
Rolling v8/build: 92221be..ff6be8b

Rolling v8/buildtools/third_party/libc++abi/trunk: df3cc8e..dc82f30

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/1651224..ebbb83f

Rolling v8/third_party/depot_tools: cf31045..0b96058

Rolling v8/third_party/fuchsia-sdk/sdk: version:11.20221221.3.1..version:11.20221222.1.1

Change-Id: I4d28f339541d7ff5a4f717f92f8a83b511303980
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4121537
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85006}
2022-12-23 03:44:35 +00:00
Hao Xu
8a795a593e [csa] Avoid calling to Builtin::StringEqual if possible
Check strings length before calling to Builtin::StringEqual. If length
is not equal, the strings must also be not equal.

Change-Id: I4f8c2e72720d0919b3fd57013d06dcc8d83f2ab4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4090410
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85005}
2022-12-23 03:11:00 +00:00
Choongwoo Han
3175117293 [wasm] Recycling locals array when building a graph.
Wasm graph builder duplicates a vector of local variables for each block or branch, but it never frees them. So, if a single function has a lot of local variables allocated, the graph builder bloats the memory.

This CL actively frees the locals vector and reuses them within the zone. It's easy to reuse them since the locals vector always have the same size. This saves 95% of memory for the reported wasm binary.

Bug: v8:13543
Change-Id: Ibf5e846b405adc24101ed79dd34d08160ceda2fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4112638
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#85004}
2022-12-22 19:28:27 +00:00
Shu-yu Guo
b69c3770b2 [ShadowRealm] Make CallSite#getFunction/getThis throw for ShadowRealm frames
This CL plugs the hole in the outside<-ShadowRealm direction (i.e.
getting a reference to an object inside of the ShadowRealm from outside
the ShadowRealm).

This is a follow-on CL to
https://chromium-review.googlesource.com/c/v8/v8/+/4108810, which
plugged the getFunction hole in the ShadowRealm<-outside direction (i.e.
getting a reference to an object outside of the ShadowRealm from inside
the ShadowRealm).

Bug: v8:1198
Change-Id: Ic06533ba8b1cc6477ef9d55a23cb8b0b6584d4a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4115657
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85003}
2022-12-22 19:06:57 +00:00
Shu-yu Guo
5c7fca4a61 [string-iswellformed] Implement String#{is,to}WellFormed
Bug: v8:13557
Change-Id: I6fa772c70d8307eca047fd839058279ce244f0e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4118066
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85002}
2022-12-22 18:04:40 +00:00
Shu-yu Guo
c74a6cd257 Revert "Reland "[static-roots] Enable static roots on supported configurations""
This reverts commit b247270178.

Reason for revert: Breaking Fuchsia build and blocking roll:
https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-binary-size/186323/overview

Original change's description:
> Reland "[static-roots] Enable static roots on supported configurations"
>
> This is a reland of commit c04ca9cc63
>
> Original change's description:
> > [static-roots] Enable static roots on supported configurations
> >
> > The static root values are not actually used yet.
> >
> > Bug: v8:13466
> > Change-Id: I85fc99277c31e0dd4350a305040ab25456051046
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4101880
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Olivier Flückiger <olivf@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#84850}
>
> Bug: v8:13466
> Change-Id: Id65bb5b19df999dfe930a78993e4bf3343d9f996
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4111641
> Auto-Submit: Olivier Flückiger <olivf@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#84991}

Bug: v8:13466
Change-Id: I9a930649d5c5531f2b8d8472300f6efe3f75ae28
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4122795
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85001}
2022-12-22 17:45:08 +00:00
Toon Verwaest
fcda478d89 [maglev] Always initialize old_type in EnsureType
Bug: v8:7700, v8:13611, v8:13612
Change-Id: Ieaf510750f15dc2c96d8c3adba7ceaee7937c1f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4120070
Reviewed-by: Patrick Thier <pthier@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85000}
2022-12-22 17:37:50 +00:00
Milad Fa
a8f6a56e9a PPC/s390: [wasm] Fix printing of wasm-to-js frames
Port e17eee4894

Original Commit Message:

    After https://crrev.com/c/3859787 those frames would be printed like
    standard Wasm frames, but in the place of the WasmInstanceObject, they
    have a WasmApiFunctionRef object instead.
    So special-case the {WasmToJsFrame::instance()} to load the instance
    properly. Also special-case the {position()} accessor for imported
    functions.

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

Change-Id: I370bc4f4f84e1262c4542879b9058f6cf1d9f84e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4122830
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84999}
2022-12-22 16:40:41 +00:00