Commit Graph

71140 Commits

Author SHA1 Message Date
Milad Fa
cd5830d8c7 S390 [simd]: Implement vector load lane
This CL takes advantage of the z15 `load byte reverse element`
instruction to optimize Simd LoadLane opcodes.

On the simulator we only run `load element` as reversing is
not required.

Change-Id: I038535f7e038bed7972844806644f50519d4919c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138212
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76648}
2021-09-02 22:32:57 +00:00
Michael Achenbach
0508f27705 [release] Get tools main-branch ready
No-Try: true
Bug: chromium:1222092
Change-Id: I9f662691f1cd1a221162052789a66ea99b98d371
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135579
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76647}
2021-09-02 16:37:26 +00:00
Luis Fernando Pardo Sixtos
b8feade615 Fix ContainsArgument on class fields shorthands
Fixed issue were using the `arguments` object as a shorthand for a class
field initializer was not producing an early error.

Bug: chromium:1216261
Change-Id: I7d8f5a85c6881f7ca12a0e8450954de15bdd6033
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3095017
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Luis Fernando Pardo Sixtos <lpardosixtos@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#76646}
2021-09-02 15:56:36 +00:00
Milad Fa
132d963627 s390: [wasm][liftoff] Detect NaNs for fuzzing
Port e6961df23f

Original Commit Message:

    Instrument floating-point operations to set a flag if the result is NaN.

R=martyn.capewell@arm.com, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I6f3fe550bf30f85bbb3fa9437d676896e876fd30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3137418
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76645}
2021-09-02 15:23:46 +00:00
Nico Hartmann
ecefa2a40a Revert "[arm64][liftoff] Fix trap handling on load lane"
This reverts commit 1786f8d770.

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

Original change's description:
> [arm64][liftoff] Fix trap handling on load lane
>
> This fixes the registered {protected_load_pc} to (always) point to the
> actual load instruction. If {dst != src} we would emit a register move
> before the load, and the trap handler would then not recognize the PC
> where the signal occurs, leading to a segfault.
>
> R=​thibaudm@chromium.org
>
> Bug: chromium:1242300, v8:12018
> Change-Id: I3ed2a8307e353fd85a7ddedf6ecb73e90a112d32
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3136454
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76642}

Bug: chromium:1242300, v8:12018
Change-Id: I7bc9d00a4fba3101e7ee68695961d1b543268c4e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138202
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76644}
2021-09-02 12:50:58 +00:00
Yoshisato Yanagisawa
7fc37adc63 Add mb_config.pyl for 'V8 Win32 - builder (reclient)'
Bug: chromium:1233780
Change-Id: I9f8a83233606d55af43e2cc31263440af342e36f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3140034
Auto-Submit: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76643}
2021-09-02 12:30:15 +00:00
Clemens Backes
1786f8d770 [arm64][liftoff] Fix trap handling on load lane
This fixes the registered {protected_load_pc} to (always) point to the
actual load instruction. If {dst != src} we would emit a register move
before the load, and the trap handler would then not recognize the PC
where the signal occurs, leading to a segfault.

R=thibaudm@chromium.org

Bug: chromium:1242300, v8:12018
Change-Id: I3ed2a8307e353fd85a7ddedf6ecb73e90a112d32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3136454
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76642}
2021-09-02 12:23:22 +00:00
Georg Neis
dc81345f7e [compiler] Fix a bug in SimplifiedLowering
Bug: chromium:1245949
Change-Id: Ib0a9b3b9307c925d6c3bb0b9c294eea5545b3819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138200
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76641}
2021-09-02 11:37:45 +00:00
Jakob Gruber
66234a4d94 [compiler] AssumeMemoryFence in FeedbackCellRef::value
Drive-by: simplifications and avoid a repeated concurrent read.

Bug: v8:7790,v8:12157
Change-Id: I460c44853a78bcd9a1427e62a92994ff8602dbed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133148
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76640}
2021-09-02 10:56:21 +00:00
Marja Hölttä
76adfd1c86 [super ic] Add tests for an already fixed security bug
Bug: chromium:1203122
Change-Id: Ief88320b620dbf2f347bf6f6fc1ebd459e60af3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138194
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76639}
2021-09-02 10:13:06 +00:00
Lu Yahan
1c6e8f93c4 [riscv64] Fix 'Debug check failed: op->IsAnyLocationOperand().'
Bug: v8:12151

Change-Id: I51a6ebc1fb94b62acdc018cfcf6fed498f1c9d21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3139576
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@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@{#76638}
2021-09-02 09:12:18 +00:00
Patrick Thier
02d8b8a97b [csa] Prepare for argument count consistency
- Replace CodeStubArguments::GetLength() with GetLengthWithReceiver()
and GetLengthWithoutReceiver()
- Introduce and use Torque macros to load the formal parameter count
(with and without receiver).
- Add actual_count to Torque arguments structure for cases where the
argument count is not used, but just forwarded to other builtins.

Bug: v8:11112
Change-Id: I32278efeffa2fb08361989c6df8de56c74add8b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124804
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76637}
2021-09-02 09:11:15 +00:00
Liu Yu
8b26bd2cf6 [mips][wasm][liftoff] Implement s128_set_if_nan in liftoff
Besides, fix an error in set_if_nan, because if src is a NaN, we should
set the i32 instead of i64 at address dst to a non-zero value.

Port e6961df23f

Bug: v8:11856

Change-Id: Icc9afda35d4cca4fd5ae82356ecaec77bf92d009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3139055
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76636}
2021-09-02 08:35:46 +00:00
Zhao Jiazhong
ed6058c619 [loong64][regexp] Support unaligned accesses in regexp
Change-Id: Icf548bcbb619dd6d5fa8ac6f11f9ba01820e4215
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3139481
Reviewed-by: Liu yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76635}
2021-09-02 07:26:16 +00:00
v8-ci-autoroll-builder
e47b46bf23 Update V8 DEPS.
Rolling v8/build: 85ec285..1dfc04f

Rolling v8/buildtools: ac4ea2d..9e8b0c9

Rolling v8/buildtools/third_party/libc++abi/trunk: be47d0e..9f0517e

Rolling v8/third_party/aemu-linux-x64: 8RPB9bFL9jMqtkuzgf6G69QDdAGV9Re0Exh-3rzLXvoC..LrM1UivUqag71JX4WdAnr5pc_zp92frKvtN6GhDs2zEC

Rolling v8/third_party/android_platform: e98c753..6e5dc9a

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/83a41f1..d9a9ebb

Rolling v8/third_party/depot_tools: 9c1a533..ae44ef1

Rolling v8/third_party/instrumented_libraries: ee10dbd..ea83816

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

Change-Id: I90d1c0251372cd4d5ff2ca6db7f28842747b7769
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138519
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@{#76634}
2021-09-02 03:49:34 +00:00
QiuJi
880ae4be19 [riscv64] Fix callee-saved checks in CallInternal
Also fix several out of date comments.

Change-Id: I15ee6c718ad50f231cd0a8e5c6416ccb58375140
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3121693
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/main@{#76633}
2021-09-02 02:11:20 +00:00
Liu Yu
f27d254a70 [mips][loong64] Modify the method of get a scratch register
Acquire a scratch register instead of passing scratch register
in JumpIfSmi and JumpIfNotSmi.

Change-Id: I21776e1cd9d19f0d55c25a5bb3f7efcc247c80e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135155
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76632}
2021-09-02 02:00:53 +00:00
legendecas
4dc425c5f9 [builtins] TypedArray.prototype.set with number
Removes outdated type-error throwing on TypedArray.prototype.set
when the first argument is a number.

Bug: v8:11294
Change-Id: Ida3a46dec154b645620e2b064ded7a18de238649
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3136773
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76631}
2021-09-02 00:06:23 +00:00
QiuJi
a8506d949c [riscv64][sparkplug] Clobber accumulator in StaGlobal
Port: 732f394c5d
Change-Id: I1a7a8dd7870a71df9f0e7c30392cd9a23b5cab3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3126820
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/main@{#76630}
2021-09-01 19:21:03 +00:00
Pierre Langlois
aece1a2a32 [turbofan] Record pipeline statistics in traces.
The --turbo-stats and --turbo-stats-wasm flags are useful but they do
not work on Chromium on Android, given we cannot print on exit of the
renderer process.

To cover all scenarios, we can encode the statistics as a string
argument in the trace format. It's also helpful to see those statistics,
as well as the code kind and function name, when clicking on a slice in
chrome://tracing or perfetto.

As a drive-by cleanup, rename ESCAPE to QUOTE in the JSON serialization
code.

Change-Id: I86f03d0e020c9543feb869620164bf1aad3a2432
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132966
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/main@{#76629}
2021-09-01 17:15:33 +00:00
Georg Neis
97a5b366d0 [test][compiler] Fix bug in %DisableOptimizationFinalization
After manually triggering finalization we should clear a potential
pending InstallCode interrupt request as there's nothing else to do
and keeping the request would defeat the purpose of the intrinsic.

Fixed: v8:12152
Change-Id: I063959c97c31868864a82c0584cabf779750d10d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135578
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76628}
2021-09-01 15:58:24 +00:00
Manos Koukoutos
2583028289 [wasm] Add helper function for CheckForNull
Bug: v8:7748
Change-Id: I78a41e593b668f417f1cc18b24bc61a4b6e098c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135577
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76627}
2021-09-01 15:34:23 +00:00
Clemens Backes
dd152c4877 Reland "[wasm] Move write scope out of NativeModule::AddCode"
This is a reland of 6ae18c2d3c, with
{CompileWasmCapiCallWrapper} fixed to also contain a
{CodeSpaceWriteScope}.

Original change's description:
> [wasm] Move write scope out of NativeModule::AddCode
>
> {NativeModule::AddCode} is a central method that should usually be
> called in batches, where the caller holds a {CodeSpaceWriteScope} for a
> longer time (over several compilations).
> This CL moves us closer to that by removing the scope from that central
> method and instead putting it in callers where it becomes more visible.
> There are already TODOs to introduce caching or batching to avoid some
> switching, and one more TODO is added.
>
> Drive-by: Remove an unneeded {CodeSpaceMemoryModificationScope}.
>
> R=jkummerow@chromium.org
>
> Bug: v8:11974
> Change-Id: Ia13c601abc766e5fca6ca053bf1fc4d647b53ed0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3098186
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76344}

Bug: v8:11974
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Change-Id: I6367bbd9dc52c403513eb1a168aa1f6eb4044ca1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3129703
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76626}
2021-09-01 15:32:26 +00:00
Manos Koukoutos
57cee71e1e [fuzzer] Generate tables before function bodies
This is needed so tables are available for table operations.

Bug: v8:11954
Change-Id: If0cbb07ddf0852d2e2515aca3e1f54168c2e0ab8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135576
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76625}
2021-09-01 15:31:24 +00:00
Victor Gomes
d6c588af77 Revert "[baseline] Enable SP on the heap on future"
This reverts commit 20dc4dcc13.

Reason for revert: We're killing SP on the heap.

Original change's description:
> [baseline] Enable SP on the heap on future
>
> Bug: v8:11872
> Change-Id: Iaaf3ed68950a6a9fe60f91d73be8a0fbc17e1116
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3129424
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76578}

Bug: v8:11872, v8:12158
Change-Id: Ib12912250013cdebeca1597f6c9dcd4f763b7a4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135660
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76624}
2021-09-01 15:28:43 +00:00
Jakob Gruber
b1bdde9168 [compiler] Fix the gcc build
Broken by crrev.com/c/3129420

error: ‘CompilationDependency::AsTransition() const’ defined but not used.

Bug: v8:7790
Change-Id: I06839c4d33d3a52909e0e5a276c567eca83e910f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133147
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76623}
2021-09-01 15:06:53 +00:00
Michael Lippautz
4e1baf132b heap: Ignore TSAN when walking the stack conservatively
Other threads may write the stack of a different thread and use a lock
to synchronize such an access. An example for this is interrupt
handling.

Ignore TSAN for the methods performing the stack walk. There's no need
to use relaxed atomic reads as same-thread writes are consistent and
for other-thread writes there's no guarantee on what values to observe.

Bug: chromium:1245409
Change-Id: Ia3d3621590f1f5524d245632a2e8a2db23313f35
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135573
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76622}
2021-09-01 13:42:13 +00:00
Al Muthanna Athamina
ca5a119497 Skip compiler/inlined-call-polymorphic on numfuzzer
Bug: v8:12013
Change-Id: I382f505914633598865586bc6a1d5dac7c875994
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135581
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76621}
2021-09-01 13:11:33 +00:00
Pierre Langlois
97e7dc3dea [turbofan] Fix tracing with perfetto.
Building with v8_use_perfetto requires that the categories passed to
TRACE_EVENT* be a constexpr.

Change-Id: Iee4b713d8fe0b3f52f6e5cfe5baef0ced87f9855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135575
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/main@{#76620}
2021-09-01 12:47:05 +00:00
Jakob Kummerow
11cd2317ac [bigint] Truncate huge error messages
When an attempt to parse a huge string to a BigInt fails, then
including the entire string in it makes the exception's message
unwieldy, so this patch puts only the first 1000 characters of
such invalid strings into the exception message.

Bug: chromium:1245239
Change-Id: I2c62f0d34256653ba67da9666e8c5a1a4bbe0599
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133142
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76619}
2021-09-01 10:09:52 +00:00
Al Muthanna Athamina
eb7e8fb5af Skip compiler/concurrent-inlining-1 on deopt_fuzzer
Bug: v8:12013
Change-Id: I7cee883f22b96b291ac9679fbe05ca2742993dc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3135574
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76618}
2021-09-01 09:48:03 +00:00
Hao Xu
7e8270dd4e Reland "[codegen] Align the code start at 64 byte in x64"
This is a reland of commit 40af03b8c3

The original CL failed one test in Windows, and this CL fix this issue.

Original changes's description:
> [codegen] Align the code start at 64 byte in x64
>
> In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte.
>
> Bug: chromium:1231471
> Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
> Cr-Commit-Position: refs/heads/main@{#76484}

Bug: chromium:1231471
Change-Id: Ia927305c792c7486588bc15e9e87840d6db18478
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133957
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#76617}
2021-09-01 08:20:22 +00:00
Camillo Bruni
6f80c9a619 [mjsunit] Prevent module test from accidentally loading common files
- Disable automatic module file extensions for the test
- Use uncommon name suffix to prevent accidental loading of an
  existing file

Change-Id: I26c1092a1e559cbbebce442a8d5ff3fb6dd5aa84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3122145
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76616}
2021-09-01 07:35:59 +00:00
Michael Lippautz
64c808784a cppgc: Fix compilation of young generation
Drive-by: Pointer to reference conversions and other smaller cleanups.

Change-Id: I83ed114e4b27d5986a389a9753333716b0e20524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133146
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76615}
2021-09-01 07:24:23 +00:00
Jakob Gruber
28d2b323e6 [compiler] Fine-grained JSFunctionData validation
JSFunctionData has a fairly heavy serialized payload, and likewise
consistency validation validates many fields and thus has many
opportunities to fail. We therefore want to avoid or reduce validation
whenever possible.

This CL adds tracking s.t. we know which fields were actually used,
and we limit validation to used fields.

Drive-by: Make serialized_ debug-only.
Drive-by: Don't create deps for context/native_context/shared.

Bug: v8:7790
Change-Id: Ic32c9919f0c75a76d9c36e4396b6bce383151b62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132962
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76614}
2021-09-01 05:42:14 +00:00
v8-ci-autoroll-builder
0105be26df Update V8 DEPS.
Rolling v8/build: 36b1f71..85ec285

Rolling v8/third_party/aemu-linux-x64: CPOECXfDP5keozFnmr0QOiSuGL3ELWB3zIOKJ0CkoAwC..8RPB9bFL9jMqtkuzgf6G69QDdAGV9Re0Exh-3rzLXvoC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2bbb839..83a41f1

Rolling v8/third_party/depot_tools: d4534cc..9c1a533

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

Change-Id: Ie6227f85af716753d32d51b62099cfc814be4ba7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133209
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@{#76613}
2021-09-01 03:47:52 +00:00
Shu-yu Guo
01b06e9967 [compiler] Add TSAN seq cst store support for generated code
This CL does the following for x64:

- Add seq cst TSAN helpers.

- Refactors codegen's handling of TSAN helpers to also support
  seq cst accesses.

- Perform stores only once instead twice under TSAN, since
  duplicating stores is unsound. Previously this was "fine"
  because all duplicated stores were relaxed. SeqCst stores
  are used for synchronization, however, and duplicating them
  breaks the synchronization.

Bug: v8:7790, v8:11600, v8:11995
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: I43071b0ed516cb0917a10f3b2b9861d74edca041
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103308
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76612}
2021-09-01 01:29:13 +00:00
legendecas
3926d6cde4 [builtins] typed array detaching in builtin iterations
%TypedArray.prototype% methods that receive a user callback
fn should not break in the mid-way of the iteration when the
backing array buffer was been detached. Instead, the iteration
should continue with the value set to undefined.

Notably, %TypedArray.prototype%.filter was throwing when the
backing buffer was detached during iteration. This should not
throw now.

Refs: https://github.com/tc39/ecma262/pull/2164
Bug: v8:4895
Change-Id: Ia7fab63264c8148a11f8f123b43c7b3ee0893300
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3066941
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76611}
2021-08-31 21:32:17 +00:00
Milad Fa
9cc414068e S390 [simd]: Implement vector load and zero
This CL takes advantage of the z15 `load byte reverse element`
instruction to optimize Simd Load and Zero opcodes.

On the simulator we only run `load element` as reversing is
not required.

Change-Id: I868bda865249cdc525f804c8ddf4d45df5977a86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132965
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76610}
2021-08-31 16:51:51 +00:00
Camillo Bruni
2e5e2f1530 [execution] Limit noise from differing stack traces with fuzzing
Always return an empty string when formatting stack traces with
--correctness-fuzzer-suppressions. In out-of-stack-space situations
it's easy to get different values depending on whether emergency
formatting is chosen or not.

Bug: chromium:1244626
Change-Id: I2f3d1692deae2533b70b62f28b39875e812b4b0c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132968
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76609}
2021-08-31 16:42:02 +00:00
Ng Zhi An
326ab1b15f [wasm] Log Wasm stub code creation
Wasm stubs (C to Wasm and Wasm to JS) aren't logged, so they show up as
??? in GDB backtraces. Emit a CodeCreateEvent in the finalization phase
of the compilation job so that the JitCodeLogger can keep track of it.

With this, a backtrace shows up like (truncated):

-(gdb) bt
-#0  v8::internal::Runtime_WasmArrayCopy
-#1  0x00007fc69d2e155f in Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit
-#2  0x00001c368159fcfc in Function:wasm-function[0]-0-turbofan
-#3  0x000000fa00044096 in Stub:c-wasm-entry:i:i
-#4  0x00007fc69dc76b76 in v8::internal::GeneratedCode
-#5  0x00007fc69dc75b25 in v8::internal::Execution::CallWasm
-#6  0x000056506d1a2b6b in v8::internal::wasm::test_gc::WasmGCTester::CallFunctionImpl

Bug: v8:11908
Change-Id: I1223b496091f99a94f2e4e665831462cc9617286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109050
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76608}
2021-08-31 16:17:01 +00:00
Omer Katz
e691014acd cppgc: Use references instead of pointers for non-null fields
Replace non-null pointer in ObjectAllocator with references.

Bug: chromium:1056170
Change-Id: I55124610490bb903819f88a70b1f8e0fea4e430d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132969
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76607}
2021-08-31 15:45:11 +00:00
Omer Katz
2a7bfabf47 cppgc: Allow allocations in prefinalziers
Prefinalizers have long been forbidden to allocate.
This restriction often proved problematic and has caused several
issues in the past.

This CL adds support for allowing allocations in prefinalizers.
At the start of prefinalizer invocations we clear the linear
allocation buffers, such that all allocations go through the slow
path for allocation. The slow path checks whether prefinalizers
are currently being invoked and marks the newly allocated object
if they are (i.e. black allocation during prefinalizers).

The new behavior is disabled by default and can be enabled by
setting the cppgc_allow_allocations_in_prefinalizers gn arg to true.

Bug: chromium:1056170
Change-Id: Ib86e780dcff88fa7b0f762ac2ab83c42393d33af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097877
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76606}
2021-08-31 15:29:52 +00:00
Martyn Capewell
e6961df23f [wasm][liftoff][arm][arm64] Detect NaNs for fuzzing
Instrument floating-point operations to set a flag if the result is NaN.

Port: e699762e06
Bug: v8:11856
Change-Id: Iae8121dd17ae8acf402ac74e41122cad77387db7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099945
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/main@{#76605}
2021-08-31 15:15:51 +00:00
Camillo Bruni
23b9d13be1 [d8] Fix TestVerifySourcePositions with bound Proxy callable
Bug: chromium:1244320
Change-Id: I4472f7ffbc3f6a0ec5ca12f9e8b3501d3f0d3dc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133140
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76604}
2021-08-31 14:14:11 +00:00
Pierre Langlois
d826adf65e [turbofan] Fix tracing when compiling JS.
The PipelineRunScope scope is live on every Run() phase and it isn't
allowed to nest. This means we cannot open a new PipelineRunScope during
TraceScheduleAndVerify() because it can be called in the middle of a
Run(), which we do during effect-control-linearization in the JS
pipeline.

We can fix this by directly using a RuntimeCallTimerScope and a tracing
event, instead of relying on PipelineRunScope to do that.

Change-Id: I3c17b2c0a58ff3cac0d1dcc796f54d29b3444468
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132506
Auto-Submit: Pierre Langlois <pierre.langlois@arm.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76603}
2021-08-31 13:58:51 +00:00
Georg Neis
b029ac2111 [compiler] Fix Ref creation in ReadFeedbackForGlobalAccess
Fixed: v8:12154, v8:7790
Change-Id: Ib5f3617f6d992b5916faf623ddced06d6e81bbfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132960
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76602}
2021-08-31 13:45:03 +00:00
Jakob Gruber
7b38608601 [compiler] Remove unused JSFunctionData::function_data_
Bug: v8:7790,v8:12149
Change-Id: I0c23b2c1126b2a950efe848973618407f64afeb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132268
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76601}
2021-08-31 13:44:01 +00:00
Clemens Backes
494da13b05 [wasm] Simplify logging of js-to-wasm wrappers
Avoid an additional copy of the name, and inline single-use (and small)
functions. Also, use an early exit for the generic wrapper to make the
code simpler.

R=zhin@chromium.org

Bug: v8:11879
Change-Id: Ic66a2c9430f7c3481b9038d2a517c4c76888503b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132267
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76600}
2021-08-31 13:11:21 +00:00
Michael Lippautz
760682da3e cppgc: Fix CTP destruction
Double-checked locking pattern for destruction was missing the acquire
barrier for the initial load.

TSAN complained with a data race where:
T1: ClearAllUsedNodes(), clearing out the node
T2: a. if(GetNodeSafe()) { Lock; ... }
T2: b. operator delete

Since GetNodeSafe() was a relaxed load, operator delete was allowed to
be reordered which raced with ClearAllUsedNodes().

Bug: chromium:1239081, chromium:1242795
Change-Id: I3906555b13cc51538a1a54b7ca481a96d81fd84e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3132264
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76599}
2021-08-31 12:13:01 +00:00