Commit Graph

57372 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Frank Tang
043a56d143 [intl] Ship Ext. TimeZone option
Stage 3 proposal
R4T: https://groups.google.com/a/chromium.org/g/blink-dev/c/e4Ict1TT9FE/m/aq69ne3rBAAJ
I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/-6bANPdHR7c/m/netwFVfEAQAJ
Spec: https://tc39.es/proposal-intl-extend-timezonename/
https://chromestatus.com/guide/edit/4506375298220032
LGTM1:bratell.d@gmail.com
LGTM2:chrishtr@chromium.org
LGTM3:tkent@chromium.org

Bug: v8:11661
Change-Id: I1e92ac473dd42f6238feebe9ac8dad6be96ac210
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088518
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76332}
2021-08-17 03:20:50 +00:00
Yu Yin
c15962741d [mips64][riscv64] Export get_pc and get_register
Fix build failed with:
is_component_build = true
use_goma = true

Change-Id: Ia06175c091e94e36aa71c134b056b4d6b88e5c96
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3098826
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#76331}
2021-08-17 03:17:40 +00:00
Frank Tang
f24d77455e [Intl] Ship Intl.DisplayNames v2
Stage 3 proposal
Spec: https://tc39.es/intl-displaynames-v2/
R2T: https://groups.google.com/a/chromium.org/g/blink-dev/c/XOJE7zVlxnI/m/cnkuazxHAwAJ
I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/uld_YkbzL0Q/m/L7VjjNTDAQAJ
Design Doc: https://docs.google.com/document/d/17hQz4nOC7PJYhxc_MU-BRoT6BnYGZv66XlU1iGX0ywQ
LGTM1:bratell.d@gmail.com
LGTM2:chrishtr@chromium.org
LGTM3:tkent@chromium.org

Bug: v8:11637
Change-Id: I555c5425ff5ee5854a43608aa56ee5399651408a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087976
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76330}
2021-08-17 02:05:40 +00:00
Milad Fa
ada169ed4f PPC: remove unused opcodes from codegen
Change-Id: I6f0bdcedb55bc673ac7381ac94bca3e17e360e21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097449
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76328}
2021-08-16 20:51:59 +00:00
Ng Zhi An
9aaf664253 Reland "[wasm][diagnostics] Support WasmCode in gdb JIT integration"
This is a reland of a3b2c4ec81

The fix is in PS3, for UBSan. We use WriteUnalignedValue for
potentially unaligned memory writes.

Original change's description:
> [wasm][diagnostics] Support WasmCode in gdb JIT integration
>
> - Add new enum WASM_CODE to JitCodeEvent::CodeType
> - Use AddressRegion instead of AddressRange (remove the latter)
> - Change CodeDescription constructor to take an AddressRegion,
>   both JIT_CODE and WASM_CODE use this
> - Add a simple mjsunit test that sets --gdbjit to check that
>   we don't crash.
> - Add a api test for adding WASM_CODE
>
> Bug: v8:11908
> Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76271}

Bug: v8:11908
Change-Id: I5ded6d01cff40803b2f70525163f760edcf97165
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093506
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76327}
2021-08-16 20:46:49 +00:00
Jakob Kummerow
150d1bd3c4 [test262] Fix number of toString lookups for BigInt -> String
When the ToString Torque builtin has already found and called a
`toString` or `valueOf` method on a JSReceiver, and still needs
to call the runtime afterwards, it should do so with the result
of that first step, as opposed to the original input.

Fixed: v8:11689
Change-Id: I672249f9a6c230c3e61921b043f372c25a0178cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097270
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76326}
2021-08-16 20:45:29 +00:00
Michael Lippautz
334d439c77 cppgc: Introduce cppgc_enable_verify_heap
Adds a heap verification GN arg to gate the marking verifier and live
bytes verification on. The flag may be used in future for other more
expensive checks as well.

Currently, the flag is automatically enabled in dcheck_is_on and debug
builds.

The change enables live bytes verification for the library in regular
debug builds which may flush out issues.

Bug: v8:11785
Change-Id: I0f41bc0d76ebea9f6a8c9315c947598015ee5d68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097868
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76325}
2021-08-16 17:29:01 +00:00
Junliang Yan
fa66bda5a5 ppc: [liftoff] implement Registers push and pop
Change-Id: I1fec4575a84d22488fb6d572b302810655c78240
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097811
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76324}
2021-08-16 17:22:40 +00:00
Clemens Backes
2d055a1f81 Check that there are some opcodes left unused
This ensures that we have enough slack to land or merge important fixes
(and temporarily coming closer to the limit).
If the static assertion is ever violated, we should immediately create a
tracking bug to free some opcode space. Temporarily reducing the
required slack (16 in this CL) is OK then.

R=zhin@chromium.org

Bug: v8:12093
Change-Id: I0934061c38cefb713ae83ccc4d81791dc4b2d312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097281
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76323}
2021-08-16 17:19:40 +00:00
Clemens Backes
0d0e29f30b Reland "[d8] Use predictable platform if --predictable is passed"
This is a reland of e2016cf013. The fix is
in PS2, with a comment why it is needed.

Original change's description:
> [d8] Use predictable platform if --predictable is passed
>
> We currently only use the predictable platform if --verify-predictable
> is passed, which is confusing and not following the comment on the
> --predictable flag ("enable predictable mode").
>
> This CL fixes that and makes --verify-predictable imply --predictable to
> also allow to only pass --verify-predictable.
>
> R=ahaas@chromium.org
> CC=mlippautz@chromium.org
>
> Bug: v8:11879
> Change-Id: Ifb9683ddc4fab374ce519169533c90244175bb48
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094010
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76305}

Bug: v8:11879
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Change-Id: I7bb7a6af722ee1cc447bc668385543dd72fd309b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097867
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76322}
2021-08-16 16:59:00 +00:00
Junliang Yan
d0e579f58d ppc: [liftoff] remove nearest_int fp rounding
Change-Id: I908854415c0d86d44f3b2b011c8b72df707421e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097810
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76321}
2021-08-16 16:25:01 +00:00
Jakob Kummerow
78e3e7ae80 [test] Drop slow intl/regress-12059 test
In this particular case, a comment in the code provides sufficient
protection against regressions.

No-Try: true
Fixed: v8:12087
Change-Id: If9cad800bcc822b7b5ab91669ccda8b4314009f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3098185
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76320}
2021-08-16 16:16:30 +00:00
Santiago Aboy Solanes
bf52459def [compiler] Add release/acquire accessors for SFI::feedback_metadata
Bug: v8:7790, chromium:1239122
Change-Id: Id2f72035c968fba859be8b4685385b3f543eee2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094008
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76319}
2021-08-16 15:35:22 +00:00
Santiago Aboy Solanes
589f526414 [compiler] Do StringRef::GetCharAsStringOrUndefined concurrently
We can reuse part of ConcurrentLookupIterator::TryGetOwnConstantElement
to read a char from a string concurrently.

Bug: v8:7790, v8:11012
Change-Id: Iaa75e0cdb457963e89e6bbbdb79766502286cc2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097277
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76318}
2021-08-16 15:34:12 +00:00
Junliang Yan
31a91cb89b ppc: [liftoff] fix floating point set condition
Change-Id: I7826df99d08cd8732fa1db0b1540457971428efa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097873
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76317}
2021-08-16 15:29:12 +00:00
Junliang Yan
47bcce5b4b ppc: [liftoff] fix shift op 2nd input overflow
Change-Id: Idcb68ad86edbd1855c41532f776d0e7f42b7223b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097872
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76316}
2021-08-16 15:27:15 +00:00
Junliang Yan
22553aa4f8 ppc: [liftoff] fix f32/f64 constant loading
Change-Id: I65a96957216856d334303968f954c035b355f547
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097871
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76315}
2021-08-16 15:21:02 +00:00
Junliang Yan
e607a9a59b ppc: fix builtin_ctz undefined behaviour on 0
Change-Id: I3d166575a5828b4ac1a1a7d11e5f67460428a00c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097870
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76314}
2021-08-16 15:19:42 +00:00
Junliang Yan
1bbd9b9488 ppc: fix fcpsgn encoding in Assembler
Change-Id: I6573caaead1c402265469ce7ec4e14f51d770e79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097386
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76312}
2021-08-16 14:28:44 +00:00
Clemens Backes
a8609e06b7 [wasm] Remove a long-living CodeSpaceWriteScope
The {CodeSpaceWriteScope} in {InstanceBuilder::Build} was kept open
while processing imports, which could compile another wasm module via
{compiler::ResolveWasmImportCall} and
{WasmEngine::SyncCompileTranslatedAsmJs}. This leads to errors since
{CodeSpaceWriteScope}s for different modules cannot be held open at the
same time.

This CL fixes that by only opening the {CodeSpaceWriteScope} for the
actual compilation of import wrappers.

Drive-by: Only call {ProcessImports} if there are imports to be
processed, to avoid some of the overhead of {ProcessImports} and
{CompileImportWrappers}.

R=jkummerow@chromium.org

Bug: chromium:1239522
Change-Id: Ifbaf64a4be92088ae4a3fd7e9700a33397b2a967
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097283
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76311}
2021-08-16 14:11:02 +00:00
Yu Yin
816e9fa3b9 [LOONG64] Add LoongArch64 backend
Bug: v8:12008
Change-Id: I2e1d918a1370dae1e15919fbf02d69cbe48f63bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089095
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76308}
2021-08-16 13:05:19 +00:00
Liu Yu
c149551809 [mips64][compiler] Fix kAtomicLoadWord32
Allows atomic loading of an unsigned 32bit value from 64bit widths.

Bug: v8:12093
Change-Id: Ib6ca2f3f44d4e82e5e41bf1ca0494e48ca90a21a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3096888
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/master@{#76307}
2021-08-16 13:04:17 +00:00
Clemens Backes
4424ac4b57 Revert "[d8] Use predictable platform if --predictable is passed"
This reverts commit e2016cf013.

Reason for revert: TSan issues: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20isolates/16209

Original change's description:
> [d8] Use predictable platform if --predictable is passed
>
> We currently only use the predictable platform if --verify-predictable
> is passed, which is confusing and not following the comment on the
> --predictable flag ("enable predictable mode").
>
> This CL fixes that and makes --verify-predictable imply --predictable to
> also allow to only pass --verify-predictable.
>
> R=​ahaas@chromium.org
> CC=​mlippautz@chromium.org
>
> Bug: v8:11879
> Change-Id: Ifb9683ddc4fab374ce519169533c90244175bb48
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094010
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76305}

Bug: v8:11879
Change-Id: I8a76c1d1dcfefd296b9cca959192af63aa1219bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097282
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/master@{#76306}
2021-08-16 13:03:14 +00:00
Clemens Backes
e2016cf013 [d8] Use predictable platform if --predictable is passed
We currently only use the predictable platform if --verify-predictable
is passed, which is confusing and not following the comment on the
--predictable flag ("enable predictable mode").

This CL fixes that and makes --verify-predictable imply --predictable to
also allow to only pass --verify-predictable.

R=ahaas@chromium.org
CC=mlippautz@chromium.org

Bug: v8:11879
Change-Id: Ifb9683ddc4fab374ce519169533c90244175bb48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094010
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76305}
2021-08-16 12:02:02 +00:00
Manos Koukoutos
2c6cb8ba2a [wasm-gc] Drop values from liftoff for trivial ref.test
We need to drop the object and the rtt from the liftoff stack before
loading the result.

Bug: v8:7748
Change-Id: Idbd4878ededc35892c951cafb3f8a8298133adff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094015
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76304}
2021-08-16 11:59:13 +00:00
Jakob Kummerow
bb5870d63f [wasm-gc] Fix max array length
The static limit didn't account for possible S128 elements.
This patch makes the limit element type specific.

Fixed: chromium:1237024
Change-Id: Ic1e37656e2882c0eb7ea6400c83e4094eb747e88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097269
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76303}
2021-08-16 11:53:02 +00:00
Santiago Aboy Solanes
c357f4472d Revert "Reland "[debugger] Try to trigger pause-on-oom flakes with an extra printf""
This reverts commit a4a152ecc5.

Reason for revert: We haven't seen the flakes in a while, we can re-enable functionality

Original change's description:
> Reland "[debugger] Try to trigger pause-on-oom flakes with an extra printf"
>
> This is a reland of 8f7e915839
>
> Original change's description:
> > [debugger] Try to trigger pause-on-oom flakes with an extra printf
> >
> > We have an issue that we can't repro locally. Enable back the
> > pause-on-oom tests with an extra printf with DEBUG. We will be able to
> > better assess the failures when they appear on the bot.
> >
> > Bug: v8:10876
> > Change-Id: I066539c4b5865ecb6f2e589e9543e8c9ebd4830b
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2474782
> > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> > Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#70558}
>
> Bug: v8:10876
> Change-Id: Ice31c9455830da320ab057293c341f69e1f0c510
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2484799
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70643}

Bug: v8:10876
Change-Id: I901d31e1e92bfef0b2917ea611354618e5cda585
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3071404
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76302}
2021-08-16 11:50:22 +00:00
Omer Katz
1a3c5144ef cppgc-js: Fix snapshot crash
The snapshot merges nodes with their back ref if one exists.
The implementation assumed that the back ref state already has its node
set. However it's possible for the node to be set later.
If the node is not set yet, we stash the back ref and update it after
setting the node.

Bug: chromium:1239144
Change-Id: If6e18cdc0e25ff13bd09218791e3f1052ea0dda8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094009
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76301}
2021-08-16 10:46:42 +00:00
Omer Katz
12bbe90fc3 cppgc: Drop high-address stack assumption
The assumption doesn't necessarily hold on linux and Android either.

Bug: chromium:1056170, chromium:1239287
Change-Id: Ibb0d8f5f814580bff4e8a7dce9a3397df1385896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097273
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76299}
2021-08-16 10:18:04 +00:00
Georg Neis
2257f6b145 [compiler][test] Remove --block-concurrent-recompilation
- Remove flag --block-concurrent-recompilation and its implementation,
  including %UnblockConcurrentCompilation.
- Rewrite tests that used it in terms of the primitives introduced in
  my previous CL:
  https://chromium-review.googlesource.com/c/v8/v8/+/3071400/
- Remove "sync"/"no sync" arguments from %GetOptimizationStatus,
  assertOptimized, etc. These are now always "no sync": they don't
  do any magic.
- Remove "if %IsConcurrentRecompilationSupported then quit" from some
  tests in favor of --concurrent-recompilation in their Flags line.

Bug: v8:12041, v8:7790
Change-Id: I966aae4fec85e6f9e7aeed2ba2c12e9198a3991f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3077149
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76298}
2021-08-16 10:15:53 +00:00
Camillo Bruni
a016cce5fc Revert "[DevTools] Implemented DevTools protocol API to retrieve V8 RunTime Call Stats."
This reverts commit 91c8be9599.

RCS should not be exposed through the API or the inspector protocol as
they are meant as an internal debugging feature.
The only regularly tested and supported way is through chrome-tracing.

Given that this was used mostly for an experiment to analyse chrome's
performance, we can use pprof support as a replacement.

Original change's description:
> [DevTools] Implemented DevTools protocol API to retrieve V8 RunTime Call Stats.
>
> The new APIs are:
> enableRuntimeCallStats
> disableRuntimeCallStats
> getRuntimeCallStats
>
> The RunTime Call Stats are collected per isolate.
>
> Change-Id: I7e520e2c866288aa9f9dc74f12572abedf0d3ac8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1881601
> Commit-Queue: Peter Kvitek <kvitekp@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64784}

Change-Id: Ia7575436e97d3420dd7e68414d89477e6a86bb05
Bug: v8:11395
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2998585
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76297}
2021-08-16 09:46:43 +00:00
Lu Yahan
e74d6918fb [sparkplug] Simplify arch-guards to ENABLE_SPARKPLUG
There is still a place to simplify.

Bug: v8:11420, v8:11421
Change-Id: I774139c52d911323f162350532a493e70f518643
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3096885
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76296}
2021-08-16 09:05:52 +00:00
Lu Yahan
3cab84c247 [riscv64] Use s1 to save code_obj
The caller saved a4 may be clobbered by the callee function. So we substitute it with the callee saved s1 to save code_obj.

Change-Id: Iebe707cbaa62d47fdee0aa117e32e88f67dac743
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3096886
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#76294}
2021-08-16 08:08:42 +00:00
Nico Weber
574b105d63 Fix some -Wunreachable-code-aggressive warnings
Bug: chromium:1066980
Change-Id: I03a6b5253043bfb9825a1a64a1d9b060958e5a98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094866
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/master@{#76293}
2021-08-16 06:45:22 +00:00
Michael Lippautz
479bfdb11b cppgc: Optimize GCInfo setup
In Blink's version of Oilpan, GCInfo objects would reside in .bss and
a table would translate between an index and the .bss address. Upon
retrieving a GCInfoIndex, the slow path merely passes a .bss pointer
to a slow path setup method to create the table mapping.

In cppgc, we set up GCInfo entries directly in the table. This is
slightly faster for actually using GCInfo objects as there's no
indirection between table and .bss, and it also saves one pointer (the
indirection) per type that is set up. The downside of this approach is
that individual components of a GCInfo objects, that are all
type-dependent, need to be passed to the conditional setup method.
Since GCInfo indices must be retrieved on each allocation, this
pollutes the fast path with additional instructions.

However, GCInfo components are actually known at compile-time for many
objects. In such cases, we can use a compile-time static dispatch to
encode the known parameters in different functions. This saves around
40KiB of memory on ChromePublic.apk and also creates a more compact
fast path for allocation.

Bug: chromium:1238884, chromium:1056170
Change-Id: Iedd809a8baefcc02f131d2b2c77d341b0abe43bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094007
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76291}
2021-08-14 11:16:11 +00:00
Shu-yu Guo
3682731838 [compiler] Compress atomic opcode encoding
To free up some ArchOpcode bits (especially for arm64), encode all
atomic opcodes that are duplicated between 32bit and 64bit widths with a
single opcode and encode the width in another field.

Bug: v8:12093
Change-Id: Ide05e8f0b2aa877ea776851e47df60dd410deae2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093257
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76289}
2021-08-13 22:34:39 +00:00
Ng Zhi An
8798c2380d [wasm-simd] Optmize F64x2ReplaceLane when lane == 0
Use movsd/vmovsd instead of pblendw/vpblendw. It is two bytes shorter,
and avoids mixing integer and floating-point domain instructions.

Bug: v8:12074
Change-Id: Ia41072fbf8da7d99618a55d59634f7399a7105ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088358
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76287}
2021-08-13 20:15:20 +00:00
Ng Zhi An
ebdc98824f [wasm-simd] Improve i8x16 shift ins-sel and temps usage
We no longer require dst == src (output = input[0]) in all cases, only
when AVX is not supported. This can help remove an extra move when AVX
is supported. Also in many cases (when input[0] is an immediate), we
require less temporary registers.

Bug: v8:11589
Change-Id: I0d272df12de54f55b4c7a0a330c38ccaca82e927
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092553
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76286}
2021-08-13 18:17:26 +00:00
Frank Tang
c4e4868e03 Use std::function
Repalce old C style function pointer declaration

Bug: v8:12083
Change-Id: I0e7b0c808a7c195989cc75da5d6617d7295918f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088357
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76285}
2021-08-13 18:01:59 +00:00
Clemens Backes
4d0730084d [wasm][arm64] Fix 16-bit to 32-bit sign extension
This is identical to https://crrev.com/c/3094011, but for 16-bit values.
We introduce another instruction to differentiate between 16->32 bit
sign extensions and 16->64 bit sign extensions.

R=ahaas@chromium.org, mslekova@chromium.org

Bug: chromium:1239116
Change-Id: I2742e9d9c2b4a038fc7a0b1715faf8f25fa20b1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094012
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76284}
2021-08-13 15:48:46 +00:00
Clemens Backes
748ae7cbf4 [wasm][arm64] Fix zero-extention of i32.load8_s
InstructionSelector::ZeroExtendsWord32ToWord64 assumes that a
Load[kRepWord8|kTypeInt32] generates a zero-extended value. This
assumption makes sense, but was not fulfilled by the instruction
selector which emitted an "ldrsb" instruction which sign-extended to the
full 64-bit register.

This CL fixes that by introducing a separate "LdrsbW" instruction which
is selected if we are sign-extending an 8-bit value to 32-bit.

R=ahaas@chromium.org, mslekova@chromium.org
CC=v8-arm-ports@googlegroups.com

Bug: chromium:1239116
Change-Id: I2da1ad6062805acf5558f3e66b8db9a50e830302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094011
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76283}
2021-08-13 15:22:23 +00:00
Clemens Backes
55e6a51f8d Revert "[arm64][wasm] Use NEON S/Usra for Wasm SIMD add(shr(x, imm), y)"
This reverts commit 2261e05333.

Reason for revert: No issues with the CL, but it is taking the
last two available opcodes on arm64 (we use 9 bits to encode it,
so we are limited to 512 opcodes). We need to land a security fix
which includes the addition of two opcodes. Before relanding this,
we need to figure out a strategy to either reduce opcodes, or use
one more bit to encode them.

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: Ifad0625ed8a6b66e7a7a74da11ad7d60941207e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094014
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/master@{#76282}
2021-08-13 15:04:26 +00:00
Ilja Iskovs
2261e05333 [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}
2021-08-13 13:22:26 +00:00
Nicolò Ribaudo
b3b9466a05 [class] Improve errors for reinitialized private elements
Previously V8 was reusing the error fur duplicate declarations, using
the private name for class fields or the class name for class methods
as the redeclared identifier.

    class A { constructor(o) { return o } }
    class B extends A { #x }
    class C extends A { #x() {} }
    let D = (0, class extends A { #x() {} });

    new B(new B({})) // Identifier '#x' has already been declared
    new C(new C({})) // Identifier 'C' has already been declared
    new D(new D({})) // Identifier '' has already been declared

This patch changes it to use error messages that better explain what's
happening:

    new B(new B({})) // Cannot initialize #x twice on the same object
    new C(new C({})) // Cannot initialize private methods of
                     // class C twice on the same object
    new D(new D({})) // Cannot initialize private methods of
                     // class anonymous twice on the same object

I initially tried to use the same message for both fields and methods,
but the problem with that is that when initializing fields we only
have access to the field name, while when initializing methods we only
have access to the class name (using the "private brand" symbol).
However, almost all the error messages are different for private fields
and for methods so this shouldn't be a problem.

Bug: v8:12042
Change-Id: Iaa50c16e4fa5c0646ad9ef2aa7e65bb649b3fce2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3078362
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Joyee Cheung <joyee@igalia.com>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76279}
2021-08-13 10:04:36 +00:00
Manos Koukoutos
f2c4695b22 [turbofan] Unroll loops calling kWasmStackGuard
Loops with function calls are not unrolled. This should not include
calls to kWasmStackGuard, which exist in many loops.

Bug: v8:11298, v8:12047, chromium:1238752
Change-Id: I62a17e708eaca9872f8244175be80ba22a68454c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090338
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76278}
2021-08-13 09:40:47 +00:00
Lu Yahan
d8dc66f921 [riscv64][sparkplug] Fix sparkplug verify framesize failed
Change-Id: I7481749ba3d5c41d7405b0d88a51defbc8bec9d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093009
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#76277}
2021-08-13 08:45:46 +00:00
Benedikt Meurer
52720f63da [inspector] Don't pretend that native accessors are own properties.
Previously the V8 inspector would report native accessors, whose getter
evaluates to a value without causing a side effect, as own data
properties. But then the DevTools front-end will not be able to tell
whether that accessor was actually an own property or just an inherited
accessor.

The reason for reporting them as own properties in the first place was
to ensure that these properties show up in the object's preview. But
that we can handle differently by just marking these properties as
synthetic internally and including them in the preview.

Bug: chromium:1076820
Change-Id: I223299af7954e7b1a4a16bb5180d4ceff50f170f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094005
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76276}
2021-08-13 08:31:37 +00:00
Zhi An Ng
b9c7fc2786 Revert "[wasm][diagnostics] Support WasmCode in gdb JIT integration"
This reverts commit a3b2c4ec81.

Reason for revert: UBSan https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8839060153390139249/+/u/Check/gdbjit

Original change's description:
> [wasm][diagnostics] Support WasmCode in gdb JIT integration
>
> - Add new enum WASM_CODE to JitCodeEvent::CodeType
> - Use AddressRegion instead of AddressRange (remove the latter)
> - Change CodeDescription constructor to take an AddressRegion,
>   both JIT_CODE and WASM_CODE use this
> - Add a simple mjsunit test that sets --gdbjit to check that
>   we don't crash.
> - Add a api test for adding WASM_CODE
>
> Bug: v8:11908
> Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76271}

Bug: v8:11908
Change-Id: Ic1a74a9239e8ef6107efd36f61c089ae6bfc5b6c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093365
Auto-Submit: Zhi An Ng <zhin@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/master@{#76274}
2021-08-12 23:59:14 +00:00
Milad Fa
457112f622 PPC: optimize word and dw byte reverse on Power10
Change-Id: I89694796962d46b4fb1ae244ee39639576659465
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092025
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76273}
2021-08-12 23:27:04 +00:00
Ng Zhi An
d58ef12c63 [wasm-simd] Optimize S16x8Dup and S8x16Dup
Use punpcklqdq/punpckhqdq instead of pshufd.

Bug: v8:12075
Change-Id: I0260136d3727fde7bae4359df015d2b0090e8b29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092554
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76272}
2021-08-12 23:02:24 +00:00
Ng Zhi An
a3b2c4ec81 [wasm][diagnostics] Support WasmCode in gdb JIT integration
- Add new enum WASM_CODE to JitCodeEvent::CodeType
- Use AddressRegion instead of AddressRange (remove the latter)
- Change CodeDescription constructor to take an AddressRegion,
  both JIT_CODE and WASM_CODE use this
- Add a simple mjsunit test that sets --gdbjit to check that
  we don't crash.
- Add a api test for adding WASM_CODE

Bug: v8:11908
Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76271}
2021-08-12 22:46:53 +00:00
Ng Zhi An
f0ee51001a [wasm-simd][ia32][x64] Share i8x16.shl implementation
Move the implementation into shared macro-assembler. TurboFan and
Liftoff for both ia32 and x64 can now share the implementation. No
functionality change expected.

Bug: v8:11589
Change-Id: Ia1f680ba139fca627e82e7dc0a9cf1c833e483cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088513
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76268}
2021-08-12 20:26:23 +00:00
Frank Tang
266bd5743f [intl] Implement Intl Enumeration API
flag --harmony_intl_enumeration

I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/Txtf_rSqGH8/m/e27FY33JAQAJ
Design Doc: https://docs.google.com/document/d/1lbj_YVW-xhzYNMQeHB-qDjVkf4SA-eTHYpYXx3Oaud8
https://chromestatus.com/guide/edit/5649454590853120


Bug: v8:10743
Change-Id: I3bfe0c25b50eb55025498534eba975a20723bd2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953519
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76265}
2021-08-12 18:00:54 +00:00
Ng Zhi An
4955ecfc68 [wasm-simd] Share i8x16 shr_s shr_u implementation
Move the implementation into shared macro-assembler. TurboFan and
Liftoff for both ia32 and x64 can now share the implementation. No
functionality change expected.

Bug: v8:11589
Change-Id: I8d3567ef6e4a430fe8e007e44d5d55cf8e8a6a7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088273
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76264}
2021-08-12 17:42:03 +00:00
Jakob Gruber
1b22e6fb59 [compiler] Fix multiple races in Map::FindElementsKindTransitionedMap
The concurrent version was added recently in crrev.com/c/3085262.

- UnusedPropertyFields requires the MapUpdater lock.
- instance_descriptors must be read atomically on the bg thread.

Finally, there appears to be a false positive report for the pattern:

 x = is_concurrent ? foo(kAcquireLoad) : foo();

Here, clang emits code that executes both the atomic and nonatomic
reads when is_concurrent is true. Needs more investigation.

Bug: v8:7790, chromium:1239009
Change-Id: I07d442e72cf0278f79f202a267e8d246f8abca1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090341
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76261}
2021-08-12 14:53:32 +00:00
Michaël Zasso
bdcda72cd1 [platform] Fix compilation on 32-bit Windows
Use `extern "C"` to declare the __readfsdword function.
Fixes error C2732 in the Node.js CI.

Bug: chromium:796644
Change-Id: If261985e65bfdade53ce06ff28afe0e2db402f7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086457
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Cr-Commit-Position: refs/heads/master@{#76259}
2021-08-12 14:03:52 +00:00
Clemens Backes
5798623695 [wasm] Remove special handling for predictable mode
This should not be needed any more after https://crrev.com/c/2944808,
which made job execution deterministic in predictable mode.

R=thibaudm@chromium.org

Bug: v8:11848, v8:10936
Change-Id: I7f71af063d366ca2ba9223afeb6c2caa77b02a99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090334
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76258}
2021-08-12 14:02:49 +00:00
Ross McIlroy
4ab70f6b21 [Compiler] Remove untrusted code mitigations.
These are no longer enabled, so remove the code mitigation logic from
the codebase.

BUG=chromium:1003890

Change-Id: I536bb1732e8463281c21da446bbba8f47ede8ebe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3045704
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76256}
2021-08-12 12:58:24 +00:00
Camillo Bruni
dacb5acd83 [d8] Use more conservative error reporting in d8's async-hooks
d8 throws on unhandled rejected Promises since
https://crrev.com/c/2238569 so no special handling beyond throwing in
the async hooks themselves is needed.

Drive-by-fix: Use v8::Isolate* as local variable.

Bug: chromium:1238467
Change-Id: I271720cd9cfd1d30b58b5407c700b0f730910968
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090333
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76255}
2021-08-12 12:39:10 +00:00
Santiago Aboy Solanes
d861a2b02b [compiler] Make relaxed tag explicit for int32 accessors
Bug: v8:7790
Change-Id: I4e25140a83a0ce851195e274a489ac13cacdf676
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086477
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76253}
2021-08-12 09:41:22 +00:00
Frank Tang
19996d6de5 [intl] Change JSLocale::Is38AlphaNumList
Move from recusion to loop to avoid stack overflow

Bug: v8:12059
Change-Id: I44981f4271495adf00d7697114663f966b8f9f11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087937
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76252}
2021-08-12 09:40:18 +00:00
Jakob Gruber
39ee66f102 [compiler] Set concurrent_inlining flag irrespective of OSR
OSR and concurrent_inlining are not strictly related, thus remove the
!is_osr condition when setting the concurrent_inlining flag.

OSR jobs simply execute on the main thread, whether CI is enabled or
not.

Drive-by: Exhaustive CodeKind switch cases.

Bug: v8:7790,v8:11981
Change-Id: Ia50e083f1c39d1d9845b1ef4e16ae8fd10798fb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086480
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76250}
2021-08-12 09:07:38 +00:00
Leszek Swirski
e16554443e [sparkplug] Fix accumulator clobber in StaDataPropertyInLiteral
The baseline compiler wasn't saving the accumulator when generating code
for StaDataPropertyInLiteral. This could lead to issues in cases where
the bytecode compiler optimized away loads of a register into the
accumulator.

Fixed: chromium:1236978
Change-Id: I8603a4c7446664f82b35db61f81cacefce2e4f3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090326
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76249}
2021-08-12 08:48:38 +00:00
Peter Kasting
de79f4d291 Fix some instances of -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I92570706da4e6f8380f100bec12c8414f6ff2edc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086221
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76248}
2021-08-12 08:20:57 +00:00
Jakob Gruber
763d4c7fd3 [compiler] Remove dead code / refactors in JSHeapBroker
Bug: v8:7790
Change-Id: I9bd852d42cbc81ba12dc81166990a49a6b91168a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089153
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76247}
2021-08-12 08:17:28 +00:00