Commit Graph

71410 Commits

Author SHA1 Message Date
legendecas
89f36a1576 [builtins] DataView should throws on detached buffer
DataView constructor, DataView.prototype.byteLength
and DataView.prototype.byteOffset should throw
TypeError when the buffer was detached.

Both SpiderMonkey and JSC passed the test262 suites.

Bug: v8:12162
Change-Id: I126d24213c00e4d26540519bce9b5388862eb32c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3140015
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76818}
2021-09-14 16:49:36 +00:00
Francis McCabe
04b5a3f37e Fix nit in comment
s/&/,/

Bug: v8:12191
Change-Id: Ib933470455c4a0f6e133bd1277cc2bba6aa83e12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158549
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76817}
2021-09-14 16:09:36 +00:00
Manos Koukoutos
4319876d96 [wasm][turbofan] Introduce wasm inlining heuristics
We introduce the WasmInliningHeuristics virtual class and implement it
with a trivial heuristics that inlines direct calls based on callee
index only. Other, more meaningful heuristics will be introduced later.

Bug: v8:12166
Change-Id: I74fd8f61e0c97b975827fa062629e9ff7463e058
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157952
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76816}
2021-09-14 15:51:37 +00:00
Georg Neis
d90e873ef3 [compiler] Fix two FeedbackCellRef uses
1) Code in JSCallReducer read a FeedbackCell twice and expected the
   result to be the same.

2) JSInliningHeuristics, in the CheckClosure case, assumed that the
   FeedbackCell contains a FeedbackVector.

Bug: chromium:1248743, v8:7790
Change-Id: I66d6dd5f7a879c2479572e1896dd78aeedd2fa27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3160200
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76815}
2021-09-14 10:20:55 +00:00
Clemens Backes
e28f0cc4aa [wasm] Fix death tests with signal handling
The previous setup of the test was suboptimal and could easily hide
bugs. Since the whole test body was wrapped in an ASSERT_DEATH call
(without checking any message of the crash), any CHECK failure inside
the test body would make the test pass.

This CL leverages the fact that in our setup the "death test style" is
set to "threadsafe" anyway, so the process that is forked for the death
test just runs the whole test body including the single death test of
interest, and the parent checks that it indeed crashes. This allows us
to undo our previous setup and just include death test assertions
regularly in the test body. By checking that the child process fails
exactly between two print statements (around the write access) we ensure
that we observe the crash we intend to observe.

R=jkummerow@chromium.org
CC=​mpdenton@chromium.org

Bug: v8:11974
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
Change-Id: I293079ae2dbcbe154bef91314ed08cab567f4d18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151965
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76814}
2021-09-14 09:36:35 +00:00
Leszek Swirski
f2e987d6e7 [string] Make WriteToFlat take 'length' instead of 'end'
CopyChars takes a count parameter, not an end parameter, so we can save
some subtractions by passing in the count to WriteToFlat. Most of the
time the start,end arguments into WriteToFlat are 0,length anyway, so
this doesn't change a lot of places.

Change-Id: I9587c7afce529218a16b728c0477b87569df8e21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157947
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76813}
2021-09-14 09:30:29 +00:00
Thibaud Michaud
9a4f353a87 Reland "[wasm] Add tests for NaN detection in Liftoff"
This is a reland of deb66c84c0

Added missing cctest.status entries to disable the tests on
non-simd hardware.

Original change's description:
> [wasm] Add tests for NaN detection in Liftoff
>
> Check that the flag is also set if only one of the lanes is NaN for SIMD
> operations.
>
> R=clemensb@chromium.org
>
> Bug: v8:11856
> Change-Id: I3860ed1beac4faee1ade7180b67ca06762ca9b95
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158322
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76801}

Bug: v8:11856
Change-Id: If45451703d80fe217eac8c610dac022dc778436f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158329
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76812}
2021-09-14 08:41:58 +00:00
Michael Lippautz
1461e09297 cppgc-js: Explicitly initialize a moved-away struct
The struct is reused across various GC cycles and std::move() may leave
the vector in valid but unspecified state.

Change-Id: I3c40795be7397d015b96116d3549953024b98808
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3160197
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76811}
2021-09-14 08:40:55 +00:00
Manos Koukoutos
b2c5afb9d8 [wasm][turbofan] Handle exceptions in inlined calls
Bug: v8:12166
Change-Id: Ic15170b6e2dbaf5c9218c8fd951f4f7462b1d37a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157951
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76810}
2021-09-14 05:56:10 +00:00
v8-ci-autoroll-builder
71242abd39 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 400ed3f..713b917

Fix mention of --benchmarks in comment (#1229) (Vy Nguyen)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/713b917

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,mlippautz@chromium.org

Change-Id: Idb2eccc9daf197d26f37d765a81623a1297bbd26
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3159606
Reviewed-by: 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@{#76809}
2021-09-14 05:18:30 +00:00
v8-ci-autoroll-builder
771d60d6c0 Update V8 DEPS.
Rolling v8/build: 38820a5..f16814b

Rolling v8/third_party/aemu-linux-x64: _MqlabIiZ-51x79A36MyMSHmpsXJ6kjMY-4BqteuKPoC..FqiWusPGPs0zkuCyCSj2axBNOhCaD117fjIbnnj6h8kC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7a4741c..53aef64

Rolling v8/third_party/depot_tools: 8f09549..984ce94

Rolling v8/third_party/instrumented_libraries: 20795c9..cb29f9c

Rolling v8/tools/luci-go: git_revision:7b62727dc713b47d7a7ce9bca27500cb8e82ebd7..git_revision:4a0f3da2840eaa5341470174b57047313e074ecd

Rolling v8/tools/luci-go: git_revision:7b62727dc713b47d7a7ce9bca27500cb8e82ebd7..git_revision:4a0f3da2840eaa5341470174b57047313e074ecd

Rolling v8/tools/luci-go: git_revision:7b62727dc713b47d7a7ce9bca27500cb8e82ebd7..git_revision:4a0f3da2840eaa5341470174b57047313e074ecd

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

Change-Id: Idfa651e9a56ed67f7d95647903f1b29f4e4e7c97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3159602
Reviewed-by: 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@{#76808}
2021-09-14 03:43:11 +00:00
Lu Yahan
569929c25b [riscv64] When load imm32, ensure imm32 + 0x800 is int32
If load imm32 using auipc/lui, for example load 0x7FFFFBF9, we should ensure imm32 + 0x800 is int32

Bug: v8:12171

Change-Id: I605ae9cad0b67cfd68d727ebdb3bcefea21904fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141264
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76807}
2021-09-14 01:39:50 +00:00
Lu Yahan
3a76ebe0b3 [riscv64] Add force constant pool into PrepareForDeoptimizationExits
Change-Id: I9b65bdc772b00177e48547823c3a3bea79f8b875
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3156589
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76806}
2021-09-14 01:03:40 +00:00
Ng Zhi An
aefa80ce60 [wasm-simd] Share F32x4 Min Max implementation
We move the implementation in Liftoff (which is the most general and
handles AVX/SSE and also register aliasing) into shared-macro-assembler.
Also consolidate SSE/AVX for ia32.

No functionality change is expected.

Bug: v8:11589
Bug: v8:11217
Change-Id: I64cc71791f04332dd3505055f4672430c2daf5ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3131373
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76805}
2021-09-13 20:51:19 +00:00
Ng Zhi An
b586e795f3 [x64] Add missing SSE4_1 scope for pextrq
Bug introduced In crrev.com/c/3150138.

Fixed: v8:12220
Change-Id: I5cae11fdd43dc47dad0c8bf55daa6b925b629da0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158543
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76804}
2021-09-13 20:14:30 +00:00
Ng Zhi An
89d22866eb [ia32][x64] Share Absps/Abspd/Negps/Negpd implementation
Move this from macro-assembler-x64 to shared-macro-assembler, and use
this implementation for ia32 (TurboFan and Liftoff).

Bug: v8:11589
Change-Id: If851560c8db1293924ca024725609c399c553a4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124099
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76803}
2021-09-13 18:34:30 +00:00
Clemens Backes
d23dfb904f Revert "[wasm] Add tests for NaN detection in Liftoff"
This reverts commit deb66c84c0.

Reason for revert: Fails in no-sse config: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/36712

Original change's description:
> [wasm] Add tests for NaN detection in Liftoff
>
> Check that the flag is also set if only one of the lanes is NaN for SIMD
> operations.
>
> R=​clemensb@chromium.org
>
> Bug: v8:11856
> Change-Id: I3860ed1beac4faee1ade7180b67ca06762ca9b95
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158322
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76801}

Bug: v8:11856
Change-Id: I16c50b3d0c1831a6d61159bdcf29610fd5aed8a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158328
Auto-Submit: Clemens Backes <clemensb@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@{#76802}
2021-09-13 17:55:14 +00:00
Thibaud Michaud
deb66c84c0 [wasm] Add tests for NaN detection in Liftoff
Check that the flag is also set if only one of the lanes is NaN for SIMD
operations.

R=clemensb@chromium.org

Bug: v8:11856
Change-Id: I3860ed1beac4faee1ade7180b67ca06762ca9b95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158322
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76801}
2021-09-13 16:57:30 +00:00
Brice Dobry
f400ab0c9a Add Lu Yahan to RISC-V owners list
Lu Yahan is a key contributor to the RISC-V target and I would like to
add him to the owners list so that he can approve changes in Gerrit.

Change-Id: I017fb2ef20320887959e9830fb63e05df121c7b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145370
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/main@{#76800}
2021-09-13 16:35:00 +00:00
Leszek Swirski
fbf51c7ad9 [string] Add PtrComprCageBase to WriteToFlat, HashString, and Get
Also a couple of microoptimizations and consistent formatting in
WriteToFlat.

Change-Id: Ie642a4b8e0819b04603ee5c5d12eebccf6a2d59c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151963
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76799}
2021-09-13 15:43:40 +00:00
Clemens Backes
c6bb56302c [liftoff] Fix declaration order in some classes
This fixes the order of declaring class members for LiftoffCompiler,
LiftoffAssembler, LiftoffRegister, and LiftoffRegList.
The recommended order according to the style guide is: types, constants,
constructors, other members, data members.

R=thibaudm@chromium.org

Bug: v8:11879
Change-Id: I5c550ed11ed0169f07477b6a1723053316374707
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157960
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76798}
2021-09-13 15:10:09 +00:00
Junliang Yan
fee0051bac ppc: [liftoff] fix Float copysign operation
Change-Id: Icdef3916993e14e39ef9da70af128b9fde2d3b60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3158323
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76797}
2021-09-13 15:00:30 +00:00
Benedikt Meurer
de46367d46 [inspector] Speed up DebugPropertyIterator.
This unblocks https://crrev.com/c/3099011 by speeding up the case for
the DebugPropertyIterator where only non-indexed properties (for large
arrays or typed arrays) are requested. Previously we'd walk through all
properties - including all indexed properties - and only filter out the
indexed properties in the end in `ValueMirror::getProperties()`.

Bug: chromium:1199701, chromium:1162229
Change-Id: I2555e3129fef29da347314eee400ea97ebf5e5b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114135
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76796}
2021-09-13 12:52:11 +00:00
Michael Lippautz
210987a552 heap: ArrayBufferSweeper refactoring
The refactoring is triggered by https://crrev.com/c/3121905 where we
noticed that a bunch of tricky counter paths could be simplified,
making reasoning about corectness easier.

In this CL:
1. Use uniqe_ptr instead of Optional to allow moving SweepingJob away
   from the header file.
2. sweeping_in_progress_ is replaced with simply checking for a job.
3. freed_bytes_ are moved to the job and the dependency is reversed,
   avoiding the inside-out (Job->Sweeper) dependency completely.
4. Merge() and counter updates are merged into a Finalize() method.
5. FinishIfDone() allows for conditional finization.
6. young_bytes_ and old_bytes_ are removed as they were always updated
   when the corresponding bytes in the ArrayBufferList was updated.

Change-Id: I56e5b04087166ce03d3a9195ac48359122a84c73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124776
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76795}
2021-09-13 11:49:02 +00:00
Lu Yahan
6d457a9005 [riscv64] Alter MaxPCRelativeCodeRangeInMB
In riscv64, pc-relatice call need meet IsInt32(offset + 0x800), so max pcrelatice code range is 4094MB.

Change-Id: Id3481483eb3131b5c08f22bde08206ee30cc25db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3156585
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76794}
2021-09-13 11:11:52 +00:00
Jakob Kummerow
fc6f621387 [bigint] Move bitwise ops to src/bigint/
No asymptotic improvements, and none are planned either.
Minor speedups (25-50%) through reduced overhead: accessing Digits
is faster than working with Handle<BigInt>, and this implementation
avoids allocating intermediate results.

Bug: v8:11515
Change-Id: I2aab2b1c5c9cbb910800161b8514c497daf2b587
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149453
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76793}
2021-09-13 10:56:53 +00:00
Manos Koukoutos
b757471c81 [wasm][turbofan] Enable inlining tail calls
Bug: v8:12166
Change-Id: I4e9322ff5289cc76b4434b200f9369d9231e5bc8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145416
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76792}
2021-09-13 10:53:16 +00:00
Thibaud Michaud
7e33e56a8c [wasm][eh] Fix catchless try in interpreter
The "unreachable" state is usually reset in the first catch block.
Ensure that this is done for catchless tries too.

R=clemensb@chromium.org

Bug: chromium:1246712
Change-Id: If746a3fe3158b0bac4b9b02e4978ca444f8ce427
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157949
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76791}
2021-09-13 10:52:13 +00:00
Thibaud Michaud
fd3f7d8f68 [wasm][tail-call] Allow subtypes in return calls
R=clemensb@chromium.org

Bug: v8:12108
Change-Id: Iad128d108df64a5a0c205f7ed69a06cdffb40c31
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148133
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76790}
2021-09-13 10:20:18 +00:00
Marja Hölttä
042e3e025b [builtins] Fix ArrayPrototypeSlice
The bug was introduced in
https://chromium-review.googlesource.com/c/v8/v8/+/3147910 : We only
want the fast path when "start" is either missing or the number 0, not
when it's something which converts to 0.

Bug: chromium:1248704
Change-Id: I72bb8fa8a9b90a13aae216c6a8e16e7be54285fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157948
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76789}
2021-09-13 10:19:16 +00:00
Darshan Sen
4a02c06b53 [message] Print to a std::ostream from PrintCurrentStackTrace()
Signed-off-by: Darshan Sen <raisinten@gmail.com>
Change-Id: I51650e87261c817d6a58a34d56920b6fb8c1e281
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3112985
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76788}
2021-09-13 10:18:13 +00:00
Manos Koukoutos
e8708fe355 [wasm][turbofan] Enable tail calls in inlined functions
Bug: v8:12166
Change-Id: If77ecea8102e4ba5d98d3e1e6700e9c1efaa319a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144913
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76787}
2021-09-13 10:11:23 +00:00
Andreas Haas
2255e418b8 Revert "[wasm] Ship Reference Types"
This reverts commit 91b72485a3.

Reason for revert: Some spec tests are failing, see WPT tests.

Original change's description:
> [wasm] Ship Reference Types
>
> R=​ecmziegler@chromium.org
>
> Bug: v8:7581
> Change-Id: I9acd99f3cf6832ee393d839cde7444a475a8f808
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3123409
> Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76565}

Bug: v8:7581
Change-Id: I18ed821ffda51cdc9869e0e36666c816d0bf00df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141576
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76786}
2021-09-13 08:31:19 +00:00
Marja Hölttä
fc3fce0122 [rab/gsab] TypedArray.prototype.at: Support RAB / GSAB
Bug: v8:11111
Change-Id: I0e7db9ca74b9d61f2e86581b0cd2f424ad006db9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151958
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76785}
2021-09-13 07:32:27 +00:00
Lu Yahan
471f862954 [riscv64] Link should greater and equal zero
Change-Id: Ieeb5888efc068707766aef6ba6fc842c5deaaf9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3146673
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76784}
2021-09-13 06:43:05 +00:00
v8-ci-autoroll-builder
c9afe63c05 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 1bd8098..400ed3f

Added support of packaged GTest for running unit tests. (#1226) (Vitaly Zaitsev)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/400ed3f

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,mlippautz@chromium.org

Change-Id: If97861f0a44893f81754d21dcc7f8d3c3f207ef2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157436
Reviewed-by: 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@{#76783}
2021-09-13 05:39:42 +00:00
v8-ci-autoroll-builder
46debc464b Update V8 DEPS.
Rolling v8/build: fafbd9b..38820a5

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

Change-Id: I7212e63e5cd185c06578633a347d39c7947b9e04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3157433
Reviewed-by: 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@{#76782}
2021-09-13 03:23:11 +00:00
Lu Yahan
4e524e90f6 [riscv64]Implement PrepareForDeoptimizationExits
Bug: v8:12211

Change-Id: Ib12b2327bcbb93ef2556ce32a43a8b5749bbdd39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3153835
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76781}
2021-09-13 02:28:51 +00:00
v8-ci-autoroll-builder
f90c1ec351 Update V8 DEPS.
Rolling v8/build: af371a9..fafbd9b

Rolling v8/buildtools/third_party/libc++abi/trunk: 17de752..a5b6419

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/50911df..7a4741c

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

Change-Id: I2bff5fac27fef407cdb8625684cba5b0d7e2046c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3156376
Reviewed-by: 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@{#76780}
2021-09-12 03:53:01 +00:00
v8-ci-autoroll-builder
24daf47da2 Update V8 DEPS.
Rolling v8/build: 0c04087..af371a9

Rolling v8/third_party/aemu-linux-x64: vFeMtD7pamorE14xM1EkyVug7KRVEPRc7i89yT2sdaYC.._MqlabIiZ-51x79A36MyMSHmpsXJ6kjMY-4BqteuKPoC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8141144..50911df

Rolling v8/third_party/depot_tools: e1482c5..8f09549

Rolling v8/tools/clang: 664e425..e74330f

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

Change-Id: I5d8cd20c120559a87c60e5a8bac3fafb451846f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3156362
Reviewed-by: 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@{#76779}
2021-09-11 03:46:09 +00:00
Frank Tang
983ed35461 [intl] Reject _ in calendar id to fix test262 test
see https://github.com/tc39/test262/pull/3173

Bug: v8:12167
Change-Id: I49bed6bf361dbc216a5174be16d747fe2b104208
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3152714
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76778}
2021-09-11 00:06:49 +00:00
Ng Zhi An
c2ac4811aa [ia32] Use AVX if supported
This is a follow-up on https://crrev.com/c/3131374 to support more
instructions, float32 sqrt, cmp, round, float64 cmp.

Rename the opcodes since they are no longer SSE specific.

Bug: v8:12148
Change-Id: Ie5f74bc1b4510092cbfbcb7e420ef82cb1c39a14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3154983
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76777}
2021-09-10 23:24:49 +00:00
Junliang Yan
0f980ffa85 ppc: fix formating issue
Change-Id: I1935a1ce50fcfb5f33511502367df624cc50a9df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3155382
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76776}
2021-09-10 22:00:49 +00:00
Ng Zhi An
5f622d21a5 [ia32] Fix partial regression in Cvtsi2ss/Cvtsi2sd
In https://crrev.com/c/3131374 we switched some instructions to use
macro-assembler functions which can handle AVX and SSE. However for
Cvtsi2ss and Cvtsi2sd, the behavior subtly changed. The old behavior
directly called cvtsi2ss/cvtsi2sd in the code-generator. The new
behavior used the macro-assembler functions, which xor the dst operand.
This led to more instructions and larger code size in some benchmarks.
The xor is supposed to help reduce dependence chain length (see comments
on Cvtsi2ss), but doesn't seem to have helped in this benchmark.

So, partially revert the changes, and rename all affected IA32 opcodes
back to SSE.

Bug: chromium:1248509
Change-Id: Ie700e2980fe9ed083c1160bda3a28f64e1e43041
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3154349
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76775}
2021-09-10 21:58:19 +00:00
Junliang Yan
d7c9b31a77 ppc: [liftoff] implement DropStackSlotsAndRet
Change-Id: I05bcba3ad27b46b7c7888940895605ad463fc960
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3155302
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76774}
2021-09-10 21:25:00 +00:00
Junliang Yan
465c845285 ppc: [liftoff] implement call functions
Change-Id: Iea662aa79bf6d8fc7f8951482b6dfc0bcf30d081
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151964
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76773}
2021-09-10 20:45:20 +00:00
Ng Zhi An
c560191f74 [x64] Move and remove some AVX_OP from macro-assembler
Move some AVX_OP into shared macro-assembler, for reuse by ia32 in
future patches.

Movlhps is also unused in x64, so remove it.

Drive-by cleanup to use macro assembler helper Move to move 128-bit
const into a XMMRegister.

The change in liftoff-assembler-x64 is required because now the
macro-assembler functions are defined in the base class, so even though
we can use &TurboAssembler::Pcmpeqd to refer to that member function,
it actually resolves to &SharedTurboAssembler::Pcmpeqd.

Bug: v8:11589
Change-Id: Ie8f6a4dfd95b41192936f6e6be48c683042acec4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3150138
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76772}
2021-09-10 18:35:29 +00:00
Clemens Backes
51eac99b9b [arm64] Optimize counting set half-words
The {CountClearHalfWords} method is called whenever loading a constant
into a register. It showed up with >0.5% in Liftoff compilation
profiles. This CL refactors the method to return the number of *set*
halfwords instead of *cleared* halfwords and avoids the loop in the
implementation. This makes the method roughly twice as fast, and makes
the code more readable.

R=zhin@chromium.org

Bug: v8:11879
Change-Id: I7da8160b3c045e5fc1e97fc0e575083b3920cb5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151962
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76771}
2021-09-10 17:43:19 +00:00
Clemens Backes
43cfc627e4 [wasm] Fix memory protection tests for tier up
If background threads are tiering up, they could temporarily make code
writable (if using the mprotect based approach). This would make our
death tests fail (i.e. not crash).
This CL fixes that by repeatedly writing in that case. Eventually, the
code should be protected again, and then we would crash. Failure to
crash would manifest as a timeout of the tests.

R=jkummerow@chromium.org
CC=​mpdenton@chromium.org

Bug: v8:11974
Change-Id: Ibe34af499da9b964ad260d58e9b4e390007898e9
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151959
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76770}
2021-09-10 17:27:49 +00:00
Ng Zhi An
a207c15b08 [wasm] Print function name in disassembly
We already have some logic to try to get a reasonable name for the
function when logging code. It looks up the name custom section, and
falls back to the function index. Extract this into a helper, and call
it when disassembly the code.

Bug: v8:12098
Change-Id: Ieebe6594bc3184fa655f878faa0cb67c248d7f56
Fixed: v8:12098
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3125355
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76769}
2021-09-10 17:09:29 +00:00