Commit Graph

75969 Commits

Author SHA1 Message Date
Shu-yu Guo
0d6e95b43e [change-array-by-copy] Implement TypedArray.prototype.toSpliced
Bug: v8:12764
Change-Id: I5f915d1c4dad22f1ce12423f6149a85ad32d6725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733043
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81477}
2022-06-30 21:47:38 +00:00
Deepti Gandluri
45c29ba6a0 Disable regression test when hardware doesn't support SIMD
Bug: chromium:1338980
Change-Id: Iae76931fb375ab792659c937d673dfe65e364360
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3739339
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81476}
2022-06-30 21:29:54 +00:00
Jakob Kummerow
711b65f723 [wasm][simd][liftoff][arm] Fix f64x2.pmin/pmax
The previous combination of a conditional and an unconditional move
produced an incorrect value when dst == rhs and lhs contained the
expected result.

Fixed: chromium:1338980
Change-Id: If3f722999ed9c0ffd687736280d048d232d75736
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738219
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81475}
2022-06-30 18:25:08 +00:00
Jakob Kummerow
838a220cf8 [wasm] AdaptiveMap for DecodedNameSection
This is a performance improvement; no change in functional
behavior is intended.
AdaptiveMap is an abstraction over a std::map or a std::vector:
after being initialized iteratively with a set of entries, it
can switch to dense vector-based storage if that would be more
efficient.
The motivation is that we expect most name sections, if they
are present at all, to give fairly complete information, so the
dense mode will likely be the typical case. However, it's easy
enough to support sparse mode as well, and parsing the name
section into a std::map at first is particularly convenient for
cases where we can't guess the expected number of entries, such
as for function locals.

Change-Id: Ia17f27576a3061eb05c912f7081411d6f38137e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726150
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81474}
2022-06-30 16:06:57 +00:00
JianxiaoLuIntel
c651551f26 [x64] Remove unnecessary WordAnd in WordCompare
If the WordAnd aims to take low 8/16/32 bits of an oprand for later cmp8/cmp16/cmp32, it can be removed.

Change-Id: I0040e596ab65a6a9255ddbdb4fca573fd765879e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3731488
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81473}
2022-06-30 16:05:08 +00:00
Seth Brenith
1f97a2dfcb Reuse existing Scripts during synchronous parsing
This is a partial reland of https://crrev.com/c/3597106

With this change, an existing Script from the compilation cache can be
reused after its top-level SharedFunctionInfo was discarded, but only if
the new script is parsed on the main thread (not deserialized from code
cache data, and not parsed on a background thread).

Bug: v8:12808
Change-Id: I1edaee2095306a89e2c3b91f2fd01ac053f3c770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3689348
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#81472}
2022-06-30 15:41:07 +00:00
Omer Katz
71e72ea770 [heap] Fix bazel build
Bug: v8:12612
Change-Id: Ifa85407c506bb3192dfe7446a01cd71a9e803462
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736448
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81471}
2022-06-30 15:19:18 +00:00
Maya Lekova
b243d54421 Revert "[foozzie] Silence a frequently occuring correctness bug"
This reverts commit a618a4a341.

Reason for revert: Original CL got reverted, we don't need the suppression anymore.

Original change's description:
> [foozzie] Silence a frequently occuring correctness bug
>
> This CL adds back a patch of Math.pow for correctness fuzzing, which
> drops some precision and hides a difference on the fast path.
>
> The same suppression was previously used on https://crbug.com/693426.
>
> No-Try: true
> Bug: chromium:1339320
> Change-Id: Id52f25f8a2b6b5aeca956587b16a10c61aa68e36
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726295
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Auto-Submit: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81408}

Bug: chromium:1339320
Change-Id: Id4cf04f9480b3052978ee7ca3dd83d7ee16845c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736446
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81470}
2022-06-30 14:44:38 +00:00
Liviu Rau
db0f1dd4a1 Revert "White space to trigger Skia branch rollers"
This reverts commit 49d15209d2.

Reason for revert: Trigger Skia branch roller

Original change's description:
> White space to trigger Skia branch rollers
>
> Bug: skia:10306
> Change-Id: Ibcddc8c724130e315471413c2835687fe0571475
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3718660
> Auto-Submit: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81317}

Bug: skia:10306
Change-Id: I5b6f232dca57c305369fd58e912e46d980769634
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735133
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81469}
2022-06-30 14:24:17 +00:00
Omer Katz
7626202118 [heap] Merge marking states
MinorMC maintained a separate marking state to support interleaved GCs.
Since MinorMC now assumes that interleaving is not possible, MinorMC can
use the same marking state as the full GC.

Bug: v8:12612
Change-Id: Ibeb7df2eb24e448f811b497c9d16b3b132f87ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735163
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81468}
2022-06-30 14:16:48 +00:00
Leszek Swirski
b9af74c80a [codegen] Use ABI caller saved regs for Pop/PushCallerSaved
The set of registers used for Pop/PushCallerSaved is a superset of the
ABI caller-saved registers. In the past it may have been the case that
these extra registers had to be saved, but at this point
Pop/PushCallerSaved is only used for fast C calls from JS, so we can
rely on the C-compiled functions saving callee-saved registers
correctly, and only save ABI-required registers ourselves.

Change-Id: I2a172bdbb381a1485654e54e3561d695b6672ed0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735130
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81467}
2022-06-30 13:51:28 +00:00
Andreas Haas
d1d4c648e7 Disable cross-compilation of clobber-registers.cc
This file uses inline assembly, but inline assembly does not work
for cross-compilation. As this file only contains debug code, no-oping
this file for cross-compilation seems acceptable.

R=ishell@chromium.org

Bug: v8:12926
Change-Id: I01276cf019e8c31e4db6f7f61a3d91526f660578
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735165
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81466}
2022-06-30 13:42:19 +00:00
Omer Katz
82398cc65b [heap] MinorMC implies separate GC phases
This is a necessary assumption for concurrent marking in MinorMC and
will simplify the code as it allows MinorMC to reuse the same marking
bitmap as full GCs.

Bug: v8:12612
Change-Id: I5e9be45c7d84320721ce7f7578dee1eb972d6f6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732933
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81465}
2022-06-30 13:12:01 +00:00
Manos Koukoutos
9d642b11c2 [wasm] Simplify {Result}
Change-Id: I6e84533581917afe90796265c563868fa1ab4448
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734810
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81464}
2022-06-30 12:18:49 +00:00
Maya Lekova
8d496bed07 Revert "[turbofan] Add fast path for Math.pow with small positive integer exponent"
This reverts commit 83470dee90.

Reason for revert: Introduced inconsistencies with the runtime (https://crbug.com/chromium/1339320) and increased inaccuracy
(https://crbug.com/v8/12996). Even though this is currently not specified, the speed improvement doesn't seem to be worth the
lower precision.

Bug: chromium:1339320, v8:12996

Original change's description:
> [turbofan] Add fast path for Math.pow with small positive integer exponent
>
> For small positive integer exponents, calculate the result with an inlined loop.
>
> This change may improve the average runtime of JetStream2/raytrace for ~8%.
>
> Change-Id: I0e3939dc9c21b0c392c04d61fd197bf618004ab4
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3708024
> Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81341}

Change-Id: Idfaa229b3d37a1831f016453c6091d2498cb6bcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735129
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81463}
2022-06-30 11:08:41 +00:00
Andreas Haas
0271db6013 [cpu] Do not set jscvt on iOS
On old iPhones, jscvt is not availale. This CL diables jscvt on iOS in
general.

R=tebbi@chromium.org

Bug: v8:13004
Change-Id: Ib2651d7fa43892c06dc8c36e497a8c76344b5051
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726297
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81462}
2022-06-30 11:07:37 +00:00
Leszek Swirski
2caac217f1 [maglev] Expand bitfield to 64-bit
We need this to expand the max input count to be big enough for our
biggest calls (and to add more bits to the op properties).

Bug: v8:7700
Change-Id: I6d63cf39b3079c3c85a32f208ce925ae795ef5a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734811
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@{#81461}
2022-06-30 09:51:17 +00:00
Michael Lippautz
1a82b90e47 [heap] Fix stack scan to include client Isolates
Stack scan during marking for shared heap broke in
  https://crrev.com/c/3703837

This CL re-adds the client Isolate handling which is necessary as
those client Isolates may refer to the shared Isolate from stack.

Bug: v8:13019
Change-Id: I1ee27fb8bab173087a98a0b79f4126612427b016
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736444
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81460}
2022-06-30 08:02:08 +00:00
Jakob Kummerow
6e429dcc9b [test] Make regress-12945 pass with --predictable
Waiting for a background thread to finish a task isn't going to
work when there are no background threads. Luckily, we can sidestep
the problem by compiling with Turbofan immediately, instead of
triggering dynamic tier-up through repeated execution. As a nice bonus,
this makes the test faster in non-predictable modes too.

Fixed: v8:13020
Change-Id: I2d47bc07bbde48a210c6ea59551ae16e63bdae05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736443
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81459}
2022-06-30 07:38:23 +00:00
Benedikt Meurer
0de01928b7 [debug] Always return a valid PropertyDescriptor.
In DebugPropertyIterator::iterator() we were assuming that the call to
JSReceiver::GetOwnPropertyDescriptor() would always yield either an
exception or a valid property descriptor. But that's not guaranteed to
be the case (anymore), because JSReceiver::GetOwnPropertyDescriptor()
nowadays can chicken out with `false` for many different reasons.

Coincidentally the callsites to DebugPropertyIterator::iterator() are
already equipped to handle the case where of an empty property
descriptor, which is basically what we get out here. So this CL adjusts
the DebugPropertyIterator to return an empty descriptor in this case.

Fixed: chromium:1291240
Change-Id: I22a9d0cde2b2c6d3966a85478ed0b87fb4c5d232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736445
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81458}
2022-06-30 07:02:58 +00:00
v8-ci-autoroll-builder
feccd6389b Update V8 DEPS (trusted-origins)
Rolling v8/build: 5b369fe..26f8da3

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: Ia7497d20609919082eef79230051053d61c8460d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3737363
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@{#81457}
2022-06-30 04:50:27 +00:00
v8-ci-autoroll-builder
726d73ad26 Update V8 DEPS (trusted-versions)
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c76626e..322e254

Rolling v8/third_party/fuchsia-sdk/sdk: version:8.20220627.3.1..version:8.20220629.1.1

Rolling v8/third_party/googletest/src: 9406a60..af29db7

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I769c1ece184dd94a752cf17bcf890a11fc70dab4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735118
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@{#81456}
2022-06-30 03:52:10 +00:00
Jakob Kummerow
c63092b7ae [wasm][arm][liftoff] Fix another GetUnusedRegister
Fixed: chromium:1340488
Change-Id: Id3da10dd13256dfc15a6fef4dc412b5d30ccc8cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735126
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81455}
2022-06-30 03:48:27 +00:00
Lu Yahan
74955ee1c7 [riscv64][wasm] Fix and harden all conditional tier-up checks
port commit b9c4a84955

Change-Id: Id2764f7b37b287a76bd9b22e55f4153b9b619bd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736554
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81454}
2022-06-30 03:37:51 +00:00
Frank Tang
8a14d953e2 [Temporal] Sync to PR1953 and PR1917 to fix bugs.
https://github.com/tc39/proposal-temporal/pull/1917
https://github.com/tc39/proposal-temporal/pull/1953

Bug: v8:11544
Change-Id: I667980e312248ccbaf826d4e3104fb1ddabef890
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721464
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81453}
2022-06-30 02:36:57 +00:00
Anton Bikineev
4f49b8a2ac cppgc: Fix undefined behaviour when decompressing
Shifting negative integrals is undefined behavior. The CL simply
switches to uint64_t when decompressing, which anyway results in
sign-extension (in standard terms, integral promotion must preserve the
value and the sign of the source operand).

The CL doesn't have any functional changes, the generated code is the
same. It only fixes the ubsan report.

Bug: chromium:1325007
Change-Id: I491a87b84d4e98b0225f76825dac2f9e85f168d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736442
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81452}
2022-06-29 20:08:47 +00:00
Shu-yu Guo
c00444b927 [rab/gsab] Fix toStringTag for RAB/GSAB-backed TypedArrays
Bug: v8:11111
Change-Id: I4846910d05bb5d83c964b2279efdb7cf2a4545b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733028
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81451}
2022-06-29 19:33:57 +00:00
Jakob Kummerow
9b2b9b80c2 [gcc] Fix build with GCC
Change-Id: I172f684515e363fc29e299c70fa3d6eac2789818
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735127
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81450}
2022-06-29 19:27:39 +00:00
Deepti Gandluri
aac1c2b533 Revert "[stringrefs] Implement string.new_wtf16_array"
This reverts commit b9821eff10.

Reason for revert: Tests fail on gc-stress: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/39147/overview

Original change's description:
> [stringrefs] Implement string.new_wtf16_array
>
> See https://github.com/WebAssembly/stringref/issues/1.
>
> Bug: v8:12868
> Change-Id: Iea3940c48d5f47609ff7d32e366d2f41d2161372
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734808
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Andy Wingo <wingo@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#81448}

Bug: v8:12868
Change-Id: I7abf8817c51057d9b984175ce162364acbb41ac4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735894
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81449}
2022-06-29 18:20:47 +00:00
Andy Wingo
b9821eff10 [stringrefs] Implement string.new_wtf16_array
See https://github.com/WebAssembly/stringref/issues/1.

Bug: v8:12868
Change-Id: Iea3940c48d5f47609ff7d32e366d2f41d2161372
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734808
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81448}
2022-06-29 16:32:26 +00:00
Anton Bikineev
2699e0c0e7 cppgc: Fix gcc build when pointer compression is enabled
GCC doesn't have __attribute__((require_constant_initialization)). Use
it only for clang.

Bug: chromium:1325007
Change-Id: Ide5d428ed107d3244072774c0031c042ed0cee31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735125
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81447}
2022-06-29 16:14:26 +00:00
Jakob Kummerow
9983fda8a9 [wasm] Introduce NamesProvider
NamesProvider class:
This consolidates logic used so far for the debugger interface.
It also adds support for the "extended name section" proposal:
https://github.com/WebAssembly/extended-name-section

StringBuilder class:
Like std::ostringstream, but 4x faster for this use case.

This lays the groundwork for an updated Wasm disassembler.

Bug: v8:12917
Change-Id: I98aa258147834bc0e314ba98c5927b4cd6070b8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3720714
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81446}
2022-06-29 16:00:07 +00:00
Toon Verwaest
73ba62bc05 [code-cache] Drop checking we increased the age
We might be racing with code that resets the age to 0, causing CAS to
fail (or us to read an already reset value).

Change-Id: I3ba555d64d48c4e2d2399978427c764c0e6e7128
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735167
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81445}
2022-06-29 15:59:05 +00:00
Andy Wingo
bd149e9fab [stringrefs] Implement string.new_wtf8_array
See https://github.com/WebAssembly/stringref/issues/1.

Bug: v8:12868
Change-Id: Ic1c9b55b1ec35c32c79d9b2cb0be243b96fc4453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734807
Commit-Queue: Andy Wingo <wingo@igalia.com>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81444}
2022-06-29 15:58:01 +00:00
Anton Bikineev
cf92762b8a Revert "cppgc: Enable pointer compression by default on Desktop"
This reverts commit 4cf08c1ac6.

Reason for revert: broke ubsan.

Original change's description:
> cppgc: Enable pointer compression by default on Desktop
>
> The CL enables pointer compression in Oilpan.
>
> For sherrifs: the CL may cause some slight perf regressions (likely
> blink_perf.*), due to slightly higher cost of compression and
> decomrpession.
>
> Speedometer2 is not expected to regress, as was checked locally. Such a
> slight performance degradation is compensated by memory savings that are
> expected to be around 10-20% of Oilpan committed size (~2.5-5% of Renderer
> PMF).
>
> Bug: chromium:1325007
> Change-Id: I2e31fc56250dbe6354a7614fa1f9e926260d842b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695565
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81442}

Bug: chromium:1325007
Change-Id: Iabc31ed683841ba0189dee9028da330dc03d7e09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735168
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81443}
2022-06-29 15:51:37 +00:00
Anton Bikineev
4cf08c1ac6 cppgc: Enable pointer compression by default on Desktop
The CL enables pointer compression in Oilpan.

For sherrifs: the CL may cause some slight perf regressions (likely
blink_perf.*), due to slightly higher cost of compression and
decomrpession.

Speedometer2 is not expected to regress, as was checked locally. Such a
slight performance degradation is compensated by memory savings that are
expected to be around 10-20% of Oilpan committed size (~2.5-5% of Renderer
PMF).

Bug: chromium:1325007
Change-Id: I2e31fc56250dbe6354a7614fa1f9e926260d842b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695565
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81442}
2022-06-29 14:01:08 +00:00
Leszek Swirski
2974148daf [gcc] Fix gcc warnings in wasm decoder
gcc warns against passing a nullptr to a printf '%s' string print, and
the default args of varint consuming functions in the wasm decoder were
providing a null name.

Bug: chromium:1307180
Change-Id: I7a4e7a38119c2568025a597423d391a7c2c573f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735123
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81441}
2022-06-29 13:55:47 +00:00
Andy Wingo
7a158c3195 [stringrefs] Parse GC opcodes
Add parser support for wasm instructions that create stringrefs from GC
arrays, and which encode strings to GC arrays.

Bug: v8:12868
Change-Id: I38446855b7a55366f8107970811aec935defcdb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732935
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andy Wingo <wingo@igalia.com>
Cr-Commit-Position: refs/heads/main@{#81440}
2022-06-29 13:48:08 +00:00
Marja Hölttä
46bd4afee8 [rab/gsab] Tests for Array.p methods, part 4
In this part: indexOf, lastIndexOf

Bug: v8:11111
Change-Id: I51481ccf44ad6c3ebc9216c1b6cc870fda73566e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726209
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81439}
2022-06-29 13:29:07 +00:00
Michael Lippautz
34112c3a9f [heap] Remove shared heap barrier for code
The barrier is currently not thread-safe but may be executed via
concurrent Sparkplug compilation. Remove the actual barrier code as
the remembered set is anyways not used yet.

Bug: v8:13018, chromium:1336850, chromium:1333414
Change-Id: I9287516d559cc3b10d170fa0fda36b26ca487a15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734809
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81438}
2022-06-29 13:08:37 +00:00
Toon Verwaest
e5dd7a400e [code-cache] Add a flag to control bytecode aging limits
Change-Id: Ia09e8c4528e59116be39be12d688f5b99a34c8e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732938
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81437}
2022-06-29 13:00:17 +00:00
Leszek Swirski
a1b1b75929 [gcc] More gcc build fixes
Fix some final gcc warnings:

  * Manually roll googletest to get the fix in:
    https://crrev.com/d5ad28dbe14fca51038fb8c7610f11602b98f682
  * Remove some anonymous namespaces in tests because the types in those
    anonymous namespaces ended up being visible in non-anonymous
    classes.
  * Fix a RVO breaking std::move.
  * Change some known-too-short strncpys into memcpys

Bug: chromium:1307180
Change-Id: I0f64512f77655f3740fc297bbb2087e6c039f7f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735122
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81436}
2022-06-29 12:27:47 +00:00
Leszek Swirski
b2b1430381 [maglev] Fixed regalloc blocking
Make sure that:

  * Temporaries are consistently free-but-blocked,
  * Blocked registers are ignored when processing free registers (where
    appropriate),
  * Fixed phis are processed before arbitrary register allocation,
  * Blocked state is set and cleared correctly
  * Opportunistic register moves on dropping don't block registers

Bug: v8:7700
Change-Id: I2bc8884f70d9e54ce6ee2fb5bb600b028a9502c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732931
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81435}
2022-06-29 11:23:56 +00:00
Tobias Tebbi
17da9e7083 [compiler] fix FrameState revisit bug in escape analysis
Bug: chromium:1340335, chromium:1315901
Change-Id: Ic348e8a66df098f64cf1893f83c145ac7bdb1ecb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732939
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81434}
2022-06-29 11:01:36 +00:00
Leszek Swirski
e819e24123 [gcc] Fix some more gcc-only warnings
Bug: chromium:1307180
Change-Id: Ia279086ec3df9d64bd6a0255ebe27d9e583014c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732937
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81433}
2022-06-29 09:57:46 +00:00
Leszek Swirski
50d2276347 [msvc] Fix build by guarding gcc pragmas
Bug: chromium:1307180
Change-Id: I45e01e172c04f5c0aac40cd84605ce52cb335cdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732934
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81432}
2022-06-29 09:56:07 +00:00
Leszek Swirski
2359c5eb75 [maglev] Improve graph printing and visiting
Centralise constant visiting into the graph visitor, and adapt graph
printing to print both the labeller node id, and the node numbering node
id.

Bug: v8:7700
Change-Id: I1af8f97e546f7113ac5655522f9206f207a0ae97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732932
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81431}
2022-06-29 09:34:36 +00:00
Leszek Swirski
54ca984f9c [gcc] Silence some more unused var warnings
Change-Id: Id3586eae6580416216bce2c448e6885aaa1589b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732111
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@{#81430}
2022-06-29 09:23:26 +00:00
Omer Katz
6e5941d524 [heap] Fix live bytes accounting in MinorMC
Live bytes were accounted twice. Once when object is marked black and
once explicitly by the marking task. Drop the accounting by the marking
task.

This should also help reduce binary size.

Bug: v8:12612, chromium:1331317
Change-Id: I43e90413309709662b6fcd0dfdec96cac1b5f231
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732930
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81429}
2022-06-29 08:41:09 +00:00
Frank Tang
1a5cfc20e1 [Temporal] Add toJSON, toString, and non-intl toLocaleString to Instant
Also add AOs: FormatISOTimeZoneOffsetString, TemporalInstantToString,
GetUnsignedRoundingMode, ApplyUnsignedRoundingMode, RoundTemporalInstant

Also update the RoundNumberToIncrement implementation and a BigInt version.

Fix the test setup in test/mjsunit/temporal/instant-to-json.js since fromEpochSeconds and fromEpochMilliseconds do not take BigInt

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tolocalestring
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tostring
https://tc39.es/proposal-temporal/#sec-temporal-temporalinstanttostring
https://tc39.es/proposal-temporal/#sec-temporal-formatisotimezoneoffsetstring
https://tc39.es/proposal-temporal/#sec-temporal-getunsignedroundingmode
https://tc39.es/proposal-temporal/#sec-temporal-applyunsignedroundingmode
https://tc39.es/proposal-temporal/#sec-temporal-roundtemporalinstant
https://tc39.es/proposal-temporal/#sec-temporal-roundnumbertoincrement

This does NOT implement the intl version of toLocaleString
specified in (notice the "sup" not "sec" after #) yet.
https://tc39.es/proposal-temporal/#sup-temporal.instant.prototype.tolocalestring

Bug: v8:11544
Change-Id: I807afd5bf550d2a65a4732a8e536056eea79cf8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3696483
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81428}
2022-06-29 08:31:17 +00:00