Commit Graph

71075 Commits

Author SHA1 Message Date
Camillo Bruni
d7fb54776c [d8] Fix stack overflow issues with async hooks
This fix consists of 2 parts:
a) Fix async hooks:
 - Allow initialising the promise hook properties
 - Do not call async hooks if we're overflowing the stack

b) Avoid some more recursion when reporting the stack trace

Bug: chromium:1240723
Change-Id: Icedfc8b48655bacc3f79591944e3869b85f1c4de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103321
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76383}
2021-08-19 10:36:45 +00:00
Michael Lippautz
847f6d9aba heap: Fix TSAN race when setting a flag after page initialization
HAS_PROGRESS_BAR is set after page initialization at which point all
flags are assumed to be immutable while a GC is running.

Separating out the progress bar from flags allows setting it lazily at
allocation time.

Bug: v8:11915
Change-Id: I48a877e0e80d583d7a0fadef2546fc70417806e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3085268
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76382}
2021-08-19 10:28:57 +00:00
v8-ci-autoroll-builder
975af4d117 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 990299f..c4b06e5

Set theme jekyll-theme-minimal (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/c4b06e5

wrap things that look like tags but aren't with `{% raw %}` (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/0fb4b75

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

Change-Id: I54b77aef6cbfb4593e9853086c293b168b4fb503
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3105448
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76381}
2021-08-19 10:04:15 +00:00
Samuel Groß
33fb126a57 Fix missing namespace for GetVirtualMemoryCageDataPageAllocator
Bug: chromium:1218005
Change-Id: I533e9fccc48767f4fccc8746e182682abd36c5e5
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106387
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76380}
2021-08-19 09:25:15 +00:00
Jakob Gruber
d586518a36 [regexp] Break dependency on JSRegExp::Flags
The JSRegExp heap object should not be the source of truth for regexp
flags, which are also relevant in places that don't need or want to
care about the heap object layout (e.g.: the regexp parser).

Introduce RegExpFlags as a new source of truth, and base everything
else on these flags.

As a first change, remove the js-regexp.h dependency from the regexp
parser. Other files in src/regexp/ should be updated in follow-up
work.

Change-Id: Id9a6706c7f09e93f743b08b647b211d0cb0b9c76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103306
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76379}
2021-08-19 09:12:55 +00:00
Al Muthanna Athamina
2c70eb764a [infra] Change loong-v comment to Loongson
Bug: v8:12100
Change-Id: I24a562d6e448b5f422ad3c891b00e15b9283a4ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106385
Auto-Submit: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76378}
2021-08-19 09:11:19 +00:00
Omer Katz
ea8ed0a9d1 Revert "cppgc: Enable checks for assignments in prefinalizers"
This reverts commit edcc8ff5b5.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Blink%20Linux%20Debug/10806/overview
A prefinalizer is creating a WeakMember from a raw pointer to a dead object for checking whether it is in a set.

Original change's description:
> cppgc: Enable checks for assignments in prefinalizers
>
> Bug: v8:11749
> Change-Id: Ic027f732030fb6a2befeffeca9db2eacfd0830a5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099953
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76370}

Bug: v8:11749
Change-Id: I0c90f232df9ae363f05f8b9ba26c2a7eede8a269
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106646
Auto-Submit: Omer Katz <omerkatz@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@{#76377}
2021-08-19 08:57:24 +00:00
Al Muthanna Athamina
a78cf61852 Add D8 flag --no-fail that ignores exceptions on exit.
The NumFuzz fuzzers need to make use of this flag to ignore
Mjsunit exceptions and other exceptions. The flag ignores
the exit code 1.

R=​clemensb@chromium.org
R=cbruni@chromium.org

Bug: v8:11826
Change-Id: Ic0878078edec7292e43cdb18dd6fb32f7bbad12c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103310
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76376}
2021-08-19 08:23:18 +00:00
Lu Yahan
f2da7ce0de [riscv64] Delete s10 from scratch_list
S10 is a Callee save register and be used in scratch_list.
In cctest, could use scratch but not does't go through the JSEntry function that can save callee save reg. So cctest could be crashed due to using s10.

Bug: v8:12124
Change-Id: I62c3582ad490681d5efb24e8bfe0884006d42e66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103425
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76375}
2021-08-19 07:11:26 +00:00
Nico Weber
6711342469 Fix -Wunreachable-code-aggressive warnings in arm and arm64 code
Like https://chromium-review.googlesource.com/c/v8/v8/+/2994804, but
for arm and arm64.

Bug: chromium:1066980
Change-Id: I5f3ac0d64a5031a62d4923d55a89f1d4e88cbc8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103905
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76374}
2021-08-19 06:10:18 +00:00
Ng Zhi An
a9561d1652 [wasm-simd] Move Store64Lane into shared code
liftoff-assembler-ia32.h can now use it. TurboFan ia32 doesn't use it
because it generates different instruction codes (movlps, movhps).

Bug: v8:11589
Change-Id: I07540814acff2d8ea48e06d1e00023d80b276a3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3095009
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76373}
2021-08-19 03:53:56 +00:00
Ng Zhi An
acf0f4698a [wasm-simd] Share and optimize load 8, 16, 32 splat
Move optimized implementation (accounts for AVX2) into
shared-macro-assembler, and use it everywhere.

Drive-by fix in liftoff-assembler-ia32.h to use Movss and Movsd
macro-assembler functions to that they emit AVX when supported.

Bug: v8:11589
Change-Id: Ibc4f2709d323d5b835bcac175a32b422d47d3355
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3095008
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76372}
2021-08-19 01:13:45 +00:00
Igor Sheludko
268a160857 [gdbjit] Fix the way script name is accessed
Bug: chromium:1240661
Change-Id: I5552d63e3a50cd7f870af4ce135dba60cd33fc0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103322
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76371}
2021-08-18 16:47:30 +00:00
Omer Katz
edcc8ff5b5 cppgc: Enable checks for assignments in prefinalizers
Bug: v8:11749
Change-Id: Ic027f732030fb6a2befeffeca9db2eacfd0830a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099953
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76370}
2021-08-18 16:36:40 +00:00
Michael Achenbach
f16da87de2 [foozzie] Drop incompatible flags
This adds the option to list disallowed flags for differential
fuzzing directly in the harness. Flags that can crash in smoke
tests shoule be added there.

No-Try: true
Bug: chromium:1240812
Change-Id: I57c772bedeac0ca6ba023c6b4929515b4b0e6cca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103314
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76369}
2021-08-18 16:19:11 +00:00
Ng Zhi An
f9ddf2d2bf [gdbjit] Fix GetFilename when script name is undefined
This is probably a latent bug, but since we didn't have a test that used
'--gdbjit', our fuzzers weren't testing this code path.

Bug: chromium:1240714
Change-Id: I6225e17b60d3a7a73a9c5502fde315207b8e721a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101265
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76368}
2021-08-18 16:09:31 +00:00
Darshan Sen
00bb1a77c0 [date] Fix Date#getMinutes() test failures
After building V8 using Clang (./out/x64.release/v8_build_config.json
says that "is_clang" is true), I could reproduce the referenced bug
report locally. Replacing the getMinutes() calls with getUTCMinutes()
calls fixed the test failure.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
Bug: v8:11200
Change-Id: Ia36be481f2c8728380d550ead856ef8e51b1069c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093362
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76367}
2021-08-18 14:54:40 +00:00
Al Muthanna Athamina
dfef303272 [infra] Add loong64 ports waterfall and opt-in trybot
Bug: v8:12100
Change-Id: I35d71d7649221febcf911010577330e1a264dc34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103005
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76366}
2021-08-18 12:31:22 +00:00
Jakob Gruber
e72ecf1e0a [regexp] Change the RegExpParser to operate on raw input arrays
.. instead of a FlatStringReader. This is in preparation for reusing
the regexp parser directly from the JS parser, which uses different
string types (AstRawString instead of heap Strings).

Drive-by: Hide parser internals in the .cc file.

Bug: v8:896
Change-Id: I06bd08f2ef5fd7a5e9812c123d88b89cacf5d864
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101488
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76365}
2021-08-18 11:55:00 +00:00
Seth Brenith
53a527f6a3 Avoid reporting incorrect retaining paths in heap snapshots
The heap snapshot view in the dev tools reports a lot of incorrect
retaining paths involving weak references from FeedbackVectors. To fix,
when IndexedReferencesExtractor encounters a weak reference, it should
record a weak reference rather than a hidden reference. This way, the
forward reference is still visible when exploring in the summary view,
but weak references aren't reported as retainers.

Bug: v8:12112
Change-Id: Ib3bafc49482fb4f515877a90bae8707483d0a7a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101266
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#76364}
2021-08-18 09:56:39 +00:00
Camillo Bruni
e7f4c2a15a [api] Make JSStackComparableAddress private
This is an internal property that should not be used publicly.
The following methods are going to be deprecated:
- v8::TryCatch::JSStackComparableAddress
- v8::BackupIncumbentScope::JSStackComparableAddress

Change-Id: Iaecfdece4660eaf1aef88121ff0f0c501c0ced5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097451
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76363}
2021-08-18 09:42:39 +00:00
Camillo Bruni
810d34dfe6 [codegen] Disable host-defined options checks in cache
We see too many regressions for now in M94 (~10% more misses in
some cases).

This CL reverts the logic to the state before landing
https://crrev.com/c/3069152 without having to revert the several
refactoring CLs that landed on top of it.

Bug: v8:10284, chromium:1238312, chromium:1237242
Change-Id: I57e66b9e0d58c36d2f1563b07720e3729c88ec94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103006
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76362}
2021-08-18 09:36:50 +00:00
Samuel Groß
4dea399ffb [sandbox] Use the virtual memory cage when the sandbox is enabled
The heap sandbox will rely on the virtual memory cage to protect the
data pointers in ArrayBuffers, TypedArrays, and DataViews.

Bug: v8:10391
Change-Id: Ib0ee352e0eba07dea0fb9e0dc4957cb74d37ba3b
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101489
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76361}
2021-08-18 09:22:10 +00:00
Benedikt Meurer
ffa4cda65c [inspector] Add nonIndexedPropertiesOnly to Runtime.getProperties.
This introduces a new, optional `nonIndexedPropertiesOnly` flag to the
`Runtime.getProperties` inspector request, which tells the inspector to
only report properties whose name is not an (typed) array index. This is
to support retrieving all properties except for the indexed ones when
the DevTools front-end decides to use the array bucketing mechanism.
Previously the DevTools front-end had some quite complicated logic in
place to simulate this via injected JavaScript, but that logic didn't
pick up internal properties and was also interfering with the inherited
accessor mechanism. With this new flag, it's straight-forward to
implement the correct behavior in the DevTools front-end.

The corresponding devtools-frontend CL is https://crrev.com/c/3099011.

Before: https://imgur.com/hMX6vaV.png
After: https://imgur.com/MGgiuJQ.png
Bug: chromium:1199701
Change-Id: Iacbe9756ed8a2e6982efaebe1e7c606d37c05379
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099686
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76360}
2021-08-18 07:34:19 +00:00
Jakob Gruber
f46dec2e21 [regexp] Avoid heap allocations in the regexp parser
In follow-up work, the parser will be refactored to take the input as
raw char arrays instead of a FlatStringReader s.t. it can be reused by
the V8 parser (which has AstRawStrings instead of Strings).

Bug: v8:896
Change-Id: I0e0bda4b34bc23b8bc427ddf3f9516081c42bb8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099947
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76359}
2021-08-18 07:32:00 +00:00
Shu-yu Guo
5cca428ac1 Skip {map,set}-grow-failed tests on more slow bots
TBR=adamk@chromium.org

Bug: v8:11852
Change-Id: Ifa42d8f15433ac2328a5852e1b16e9da423d798b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101578
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76358}
2021-08-18 07:05:30 +00:00
v8-ci-autoroll-builder
3a7aa9feee Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 2d054b6..990299f

install docs folder when installing library (#1212) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/990299f

add .DS_Store to .gitignore (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/91ce110

refactor the documentation to minimise `README.md` (#1211) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/201b981

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

Change-Id: Idf8867d550ac0eccb330b6275fd9911f4cc859a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3102598
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@{#76357}
2021-08-18 05:33:10 +00:00
Shu-yu Guo
b60f15f77b Skip {map,set}-grow-failed tests on MSAN
These tests test allocation failure and time out on MSAN.

TBR=adamk@chromium.org

Bug: v8:11852
Change-Id: Ie0b042ab6bc37028c41a4b12d4911aba7f9af375
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3101574
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76356}
2021-08-18 02:54:01 +00:00
Shu-yu Guo
ed1473bd38 Improve error message for Set/Map grow failures
Bug: v8:11852
Change-Id: I1d3c01b827e847bb7edcd2ebe7d3b340f7d53069
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097473
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76355}
2021-08-18 01:30:10 +00:00
Ng Zhi An
bdb22362de [wasm] Log code without holding lock
We snapshot all the code first, then log it without holding the lock.

Change-Id: I8c18b2db56678a9320ea6b63cd06290453c0a66a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097472
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76354}
2021-08-17 23:35:20 +00:00
Ng Zhi An
39fb4e1457 [wasm-simd] Share and optimize i16x8.splat
Change i16x8.splat to use Punpcklqdq instead of Pshufd as the final step
to move low 32 bits to all lanes.

Move this implementation to shared-macro-assembler and use it
everywhere.

Bug: v8:11589,v8:12090
Change-Id: I968b1dca5a262e4e67875caea18c5c09828cb33a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092558
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76353}
2021-08-17 22:36:00 +00:00
Ng Zhi An
bb12c48ac3 [wasm-simd] Share i8x16.splat implementation
The optimal implementation is in TurboFan x64 codegen, move it into
shared-macro-assembler, and have TurboFan ia32 and Liftoff use it. The
optimal implementation accounts for AVX2 support.

We add a couple of AVX2 instruction to ia32 in sse-instr.h, not all of
them are used, but follow-up patches will use them, so we add support
(including diassembly and test) in this change.

Drive-by clean up to test-disasm-x64.cc to merge 2 AVX2 test sections.

Bug: v8:11589
Change-Id: I1c8d7deb0f8bb70b29e7a680e5dbcfb09ca5505b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092555
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76352}
2021-08-17 21:05:00 +00:00
Josip Sokcevic
9b772187a4 Manually set Cr-Commit-Position
Cr-Commit-Position: refs/heads/main@{#76351}
2021-08-17 16:31:03 -04:00
Frank Tang
7f0ed5cba3 [arm] Prepare CallFunction builtin for more roots
The old implementation had an implicit assumption that
IsolateData::builtin_entry_table_offset is a uint12, i.e.
<4096. We're about to cross that threshold, so this patch
frees up a temp register to let the code generator handle
larger offsets.

Bug: v8:12110
Change-Id: I2c313918be4b1c4fdd2984259e5e8cc02bb24035
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097108
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76350}
2021-08-17 20:25:55 +00:00
Milad Fa
b7efdc0533 PPC/s390: [ptr-compr][turbofan] Make compressions no-ops
Port 1821aff2d0

Original Commit Message:

    Since we can just use the lower bits, we can make the compressions no-ops.
    As a note, they still change the representation so that the machine graph
    verifier is happy.

    X64's version of: https://chromium-review.googlesource.com/c/v8/v8/+/1751722

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

Change-Id: I414fa30a17e5af4fa5b3e84b1b321d890431f27e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3100587
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76349}
2021-08-17 18:29:34 +00:00
Samuel Groß
f5634b56b5 [sandbox] Don't use external pointer table for ArrayBuffers
ArrayBuffer backing stores will instead use the virtual memory cage and
be referenced through offsets rather than pointers when the sandbox is
enabled. This will be implemented in an independent CL.

Bug: v8:10391
Change-Id: Icc9781003e53c76dbbf4c84ee165151e4182da4b
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086458
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76348}
2021-08-17 17:24:05 +00:00
Leszek Swirski
366b97a5e7 [compiler] Remove bad "no cache reason" DCHECK
The API doesn't forbid passing in a "no cache reason" even when there's
a cache.

Change-Id: I4392bd9707333e8bc39129de72de753d88265c5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099950
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76347}
2021-08-17 15:47:55 +00:00
Michael Lippautz
831dd7c34a cppgc: Remove experimental notice
Bug: chromium:1056170
Change-Id: I71375a2ac8f4ac51de8b6c1899f7f146e4f107ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099949
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76346}
2021-08-17 15:11:04 +00:00
Al Muthanna Athamina
1f83d4d8f4 Add stack size option to fuzzer
Bug: v8:11826
Change-Id: I30a582351305e1548948086709fc9ba0b0a91bd8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3069286
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76345}
2021-08-17 12:47:44 +00:00
Clemens Backes
6ae18c2d3c [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}
2021-08-17 12:38:34 +00:00
Georg Neis
78ffa51209 [compiler] Fix a bug concerning PropertyAccessInfo
Don't create DataField and FastDataConstant access infos with a kNone
field representation. Instead return Invalid.

Bug: chromium:1239601
Change-Id: I4df7aa298974f9dcd650ead50aaa349c84feb487
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097463
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76343}
2021-08-17 12:21:54 +00:00
Samuel Groß
14c3e2d6c6 Gracefully handle OOM in BoundedPageAllocator
Changing the protections of a kNoAccess region to something different
can fail due to OOM. We should handle this properly.

Bug: chromium:1240062
Change-Id: I35e8837a57d66930390067eb0d1ab4bc76709948
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099685
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76342}
2021-08-17 11:53:05 +00:00
Leszek Swirski
df2b169b3f [compiler] Off-thread deserialization ♥️ Isolate cache
Make off-thread deserialization play well with the Isolate compilation
cache, by moving the Finish call into GetSharedFunctionInfoForScript.

This means that

  a) The isolate cache is checked before the Finish, allowing it to be
     hit, and
  b) Results of off-thread deserializations are written into the Isolate
     cache.

Bug: chromium:1075999
Change-Id: I535935180bbe77f3e718253830e649bd62857634
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094006
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76341}
2021-08-17 09:39:15 +00:00
Ilja Iskovs
a69080060d Reland "[arm64][wasm] Use NEON S/Usra for Wasm SIMD add(shr(x, imm), y)"
This is a reland of 2261e05333

This patch can now be relanded as some space was made for more opcodes:
https://bugs.chromium.org/p/v8/issues/detail?id=12093

Original change's description:
> [arm64][wasm] Use NEON S/Usra for Wasm SIMD add(shr(x, imm), y)
>
> A single AArch64 SIMD signed/unsigned Shift Right and Accumulate can be
> used to implement Wasm SIMD add(shr(x, imm), y). This gives a 1-1.5%
> improvement on some compute intensive Wasm benchmarks on Neoverse-N1.
>
> Mla and Adalp optimisations were refactored to match the style of the
> added code.
>
> Change-Id: Id5959a31ca267e02b7d60e7ff6f942adb029b41e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089157
> Reviewed-by: Zhi An Ng <zhin@chromium.org>
> Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
> Cr-Commit-Position: refs/heads/master@{#76280}

Change-Id: Idd166b7d3c960af33049bbce6e7276763c28f286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097284
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76340}
2021-08-17 09:27:26 +00:00
Camillo Bruni
6a34897e54 [d8] Guard async hooks against stack overflows
Drive-by-fix: Use switch statement in AsyncHooks::PromiseHookDispatch

Bug: chromium:1239907
Change-Id: I882956bfed92b56e1e8d885bdc68e205dd80c135
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097882
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76339}
2021-08-17 09:23:15 +00:00
Georg Neis
a80065e28c [compiler] Weaken induction phi typing validation
The validation was too strong in the case where the incrementation
produces type None.

Bug: chromium:1236716
Change-Id: I948b370594fa7dad1ba6e5b951f473855bf1346b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097865
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76338}
2021-08-17 08:40:40 +00:00
Camillo Bruni
9f2c11f522 [d8] Fix NormalizePath with relative paths
Bug: v8:12060
Change-Id: Ie78329cd6e9f8b19e3be0ccc0c14ae4a1995fb9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3098189
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76337}
2021-08-17 08:12:21 +00:00
Georg Neis
d620467fda Fix a test
Bug: v8:12111
Change-Id: Iaee1f4273c9e7f273bd76ffba5fc60d7507a833d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097450
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76336}
2021-08-17 07:46:51 +00:00
Camillo Bruni
f62653f9be [isolate] Clean up MessageHandler::ReportMessage
- Use early return
- Add exception_string read-only root

Change-Id: Iba935a4a0308d21ced2693047fdf217b7f9e62f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097884
Reviewed-by: Patrick Thier <pthier@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76335}
2021-08-17 07:27:00 +00:00
Georg Neis
05ff5f0a8b Allow fuzzers to use new compiler intrinsics
Namely:
%kDisableOptimizationFinalization
%WaitForBackgroundOptimization
%kFinalizeOptimization

Bug: v8:12091
Change-Id: Iea6c5e1d0c88b62fd02b240b20b0fca0fb79451f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097878
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76334}
2021-08-17 04:59:50 +00:00