Commit Graph

64619 Commits

Author SHA1 Message Date
Milad Fa
1474e595cf PPC/s390: fix NAN propagation on float/double min and max
Using the proper `add` operation assures the NAN value
is properly propagated to the result register.

Change-Id: Icb86193f85534604f2a4a583d177a6f319ca38c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2429804
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70127}
2020-09-24 21:03:18 +00:00
Dominik Inführ
e487a7daa2 [heap] Access wasted_memory() while holding lock
PagedSpace::RefillFreeList() needs to invoke wasted_memory()
while holding the lock. Otherwise this races with
PagedSpace::FreeLinearAllocationArea() which uses add_wasted_memory()
and already holds the lock.

Bug: v8:10315
Change-Id: I3a57191529cdd81d75833ec334a57f84a9a59194
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428930
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70126}
2020-09-24 19:21:28 +00:00
Andreas Haas
4af3a33327 [wasm] Don't overwrite register in atomic.notify if it is still used
In atomic.notify we overwrote the register which stored the index,
without checking if it was still in use or not.

R=clemensb@chromium.org

Bug: v8:10898
Change-Id: I59ed7a2c1f1342ff4252e3c4d33822111caee82c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426616
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70125}
2020-09-24 18:59:07 +00:00
evih
b728ad817e [wasm] Use proper load in the generic js-to-wasm wrapper
When loading from the exported function data without pointer
compression, wrong load was used before.

Bug: v8:10701, chromium:1130385
Change-Id: If66913bcd5284eeb6fb7b795357f1512682a062f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426383
Commit-Queue: Eva Herencsárová <evih@google.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70124}
2020-09-24 18:46:08 +00:00
Junliang Yan
230da091d4 [wasm][ukm] relax the condition for Turbofan
On ppc64 and s390x, Liftoff is not implemented yet, so if a Liftoff
compilation unit finishes after all top-tier units (hence after the "top
tier finished" callback), it will still increase the turbofan counter.

R=clemensb@chromium.org, ecmziegler@chromium.org

Bug: chromium:1092417
Change-Id: I0b99061f26851288f1abb8fcc3a30ca92a55164e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2429564
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70123}
2020-09-24 17:59:37 +00:00
Dominik Inführ
cc69503552 [test] Disable --stress-concurrent-allocation with TestSizeOfObjects
This test checks SizeOfObjects after GC, but there might be concurrent
allocations in-between.

Bug: v8:10315
Change-Id: Id904c8865e44ac5c3b486ff6f1316e536cf20e9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428864
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70122}
2020-09-24 16:50:47 +00:00
Clemens Backes
618a28883c [wasm][memory64] Fix types used for bounds checks
The memory offset is read as a u64 in the memory64 proposal, independent
of the actual type of the memory. The actual memory size of a module (at
runtime) can only be within intptr_t/uintptr_t range though. This
assumption was already used when constructing the TurboFan graph, but
the C++ types did not reflect it yet.

This CL fixes that:

1) Use uint64_t type for bounds checks (only within the method for now,
   callers still pass a uint32_t).
2) Use uintptr_t for storing the minimum and maximum possible memory
   size at runtime (in CompilationEnv); clamp memory sizes to values
   that can actually happen at runtime.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I6559f9a3abc2aa338eba4618479456f6efb5e772
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426405
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70121}
2020-09-24 16:34:07 +00:00
Dominik Inführ
620c13b58a [test] Tests should only invoke NewSpace::Grow in safepoint
Make sure that tests grow the new space in a safepoint. This fixes
races with concurrent allocation.

Bug: v8:10315
Change-Id: I6fce6740bc3c9385f18bbbcde4b06ba881a03635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428946
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70120}
2020-09-24 16:14:10 +00:00
Santiago Aboy Solanes
d941d31cc8 [compiler] Read the FixedDoubleArray value from the Ref only once
When reading the FixedDoubleArray value and representation, we are
reading the same value but bitcasting it diffrently. In this vein, we
can read it only once and ask whether it is the hole or not.

Bug: v8:7790
Change-Id: I0d7b29ce037b9abb55c5a1332c7e6d06887905e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428587
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70119}
2020-09-24 15:12:47 +00:00
Manos Koukoutos
e241c6da39 [wasm-gc] Some cleanup and documentation
Changes:
- Add dedicated exception for call_ref invoking a WasmJSFunction.
- Small restructuring of read_value_type.
- Change HeapType::kLastSentinel to point to the last valid type,
  update is_valid().
- Remove redundant DCHECK from ValueType constructors.
- Rename a few section-related macros in module-decoder-unittest.cc,
  add a small test.
- Rename "Simd128" -> "s128" in error message.
- Write some documentation, mostly in value-type.h and wasm-subtyping.h.

Bug: v8:7748
Change-Id: I4fc4826fbdeac50e21ef524787c2024d7aa1b3b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424139
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70118}
2020-09-24 12:50:17 +00:00
Ulan Degenbaev
0b8c39162c [heap] Remove the unused Map parameter from the marking barrier
Change-Id: I5d82528cd07c263bfbedfdd3a090bcd4f67ef55d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428593
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70117}
2020-09-24 12:46:27 +00:00
Camillo Bruni
78c42a1f8e [log] Support logging two-byte characters
Bug: chromium:1130673
Change-Id: I78ae388daa1c4c2b594981bdadd201c2dfb39eb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426618
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70116}
2020-09-24 12:34:07 +00:00
Dominik Inführ
d382dab9e5 [test] Only update FLAG_local_heaps if disabled
Avoid data race by only setting FLAG_local_heaps to true if not
already enabled.

Bug: v8:10315
Change-Id: Ib562b6d525448f5c088da39bf60928debd97db43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426610
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70115}
2020-09-24 12:18:17 +00:00
Clemens Backes
5f265c3379 [wasm] Remove --wasm-max-mem-pages-growth flag
This unifies {max_initial_mem_pages} and {max_maximum_mem_pages} into
{max_mem_pages}.
The {CompilationEnv} constructor was incorrectly using the former
instead of the latter anyway. This did not really matter though, since
they typically have the same value.
Also, there is not a single test that sets --wasm-max-mem-pages-growth.

R=manoskouk@chromium.org
CC=jkummerow@chromium.org

Bug: v8:10949
Change-Id: Ib7ab9b4c239d50b72013087eda5a214829c90369
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426619
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70114}
2020-09-24 12:17:07 +00:00
Emanuel Ziegler
b77c63c0a6 [wasm][ukm] Add tests for Wasm events (reland)
Ensure that events are triggered when a module is decoded, compiled,
instantiated and tiered-up.

This is a reland of Ib5883a338c3756c6f3488fbdd7b6861ecc2ba218.

R=clemensb@chromium.org
TBR=adamk@chromium.org

Bug: chromium:1092417
Change-Id: I803ae3db23a5f71f26e8ec118251eccdfc551353
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2425056
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70113}
2020-09-24 12:05:27 +00:00
Marja Hölttä
24fbcf8847 Try 2: [super ic] Fix more receiver vs lookup start object vs holder confusion
The actual fix is in LoadIC::ComputeHandler (checking
lookup_start_object == holder instead of receiver == holder) + the
LookupIterator changes for preserving lookup_start_object.

The rest is renaming / refactoring.

Reland: not relying on the prototype validity cell after all

Previous version: https://chromium-review.googlesource.com/c/v8/v8/+/2414039

Bug: v8:9237, chromium:1127653
Change-Id: I1949442f8ddcecb776f0c5d2cf737cb75f80e313
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2428588
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70112}
2020-09-24 11:45:18 +00:00
Dominik Inführ
d17b83e5df [test] Fix WeakGlobalHandle test with --stress-concurrent-allocation
Use Global instead of Persistent such that GlobalHandle is reset at the
end of the function. Persistent doesn't reset in the destructor,
which means that the GC resets the GlobalHandle. With
--stress-concurrent-allocation this might not happen in the test
function itself but when the cctest framework itself works through
the event queue. At that point the Persistent isn't live anymore.

Bug: v8:10315
Change-Id: If77388ad5acb80538852beca0ab22a4ebaf0b5c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426612
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70111}
2020-09-24 10:13:57 +00:00
Clemens Backes
18da08757f [wasm][memory64] Start implementing the memory64 proposal
This is a first small step for implementing the memory64 proposal:
1. Add a feature flag.
2. Add the 0x04 and 0x05 limits flag for memory64.
3. Read memory limits as LEB-encoded u64 (instead of u32) if a memory64
   limit flag was read.
4. Unify {MaximumFlag} and {MemoryFlag}, which was used inconsistently
   before.
5. Add test for memory limits encoded with >5 bytes.
6. Move some macros from module-decoder-unittest.cc to wasm-macro-gen.h.

Note that still the same limits for the maximum number of pages applies
as before, i.e. you cannot specify a memory >4GB yet. But you can encode
that small number in >5 bytes.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I90a4f08426ae714a67440281785eb00cfc24a349
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423712
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70110}
2020-09-24 09:38:08 +00:00
gengjiawen
717543bbf0 [zone]: fix build on msvc in wasm module
Fix: https://github.com/nodejs/node-v8/issues/172
Change-Id: Ibdbee76470ec8a4c20af7650dc5fac4602873430
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414688
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70109}
2020-09-24 09:10:30 +00:00
Michael Achenbach
10b6b9781b Revert "Update V8 DEPS."
This reverts commit 00b540f224.

Reason for revert: https://crbug.com/v8/10955

Original change's description:
> Update V8 DEPS.
> 
> Rolling v8/build: c8dc0f5..cd7202b
> 
> Rolling v8/third_party/aemu-linux-x64: laU2vAii09mMfCaTLtA8O6UYjPdUXy0B-0zzOR0OPekC..e3-wbMXwDkejPE6v6BbVayEu9ikm4GVS2rHZkzAxpYgC
> 
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/0de9874..52c1ebb
> 
> Rolling v8/third_party/icu: 83b2ac6..aef20f0
> 
> TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
> 
> Change-Id: I52e67f8331c638d5f02b93e6db7fbeb81844a878
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426480
> 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/master@{#70102}

TBR=machenbach@chromium.org,v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Bug: v8:10955
Change-Id: I62688e8a5605e1ef44fd91f995ae28238a862903
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426622
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70108}
2020-09-24 09:09:27 +00:00
Marja Hölttä
8443390f71 Revert "[super ic] Fix more receiver vs lookup start object vs holder confusion"
This reverts commit ab7e6df074.

Reason for revert: Several fuzz bugs: chromium:1131469, chromium:1131525, chromium:1131779

Original change's description:
> [super ic] Fix more receiver vs lookup start object vs holder confusion
>
> The actual fix is in LoadIC::ComputeHandler (checking
> lookup_start_object == holder instead of receiver == holder) + the
> LookupIterator changes for preserving lookup_start_object.
>
> The rest is renaming / refactoring.
>
> Bug: v8:9237, chromium:1127653
> Change-Id: Ieef46fb46ababa79623951c48639429c5b552d2d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414039
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70045}

TBR=marja@chromium.org,ishell@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:9237
Bug: chromium:1127653, chromium:1131469, chromium:1131525, chromium:1131779
Change-Id: I1bad5ba1dcfe9a0de8ce775feac2d3bfd7264c8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426620
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70107}
2020-09-24 09:07:25 +00:00
Jakob Gruber
5b42e3f334 [regexp] Assign proper flags to TextNode
This fixes a case in which we forgot to assign flags to TextNodes
created through

AddBmpCharacters
AddNonBmpSurrogatePairs
AddLoneLeadSurrogates
AddLoneTrailSurrogates

functions. If these initially had a flag (e.g. case-insensitive 'i')
set, that information was lost. This bug resulted in missing case
folding in no_i18n builds (perhaps other things as well that just
aren't covered by our test suite).

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Bug: v8:10131,v8:10120
Change-Id: Icef4f0dbd47971a538e07bab2f1067c383fd59c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423718
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70106}
2020-09-24 08:51:15 +00:00
Marja Hölttä
5d5b728b8a [logical assignment] Disallow foo() &&= 1 etc
Having the web compatibility hack (allowing foo() = 1) enabled for
logical assignment was unintentional.

Browser compatibility data:
https://docs.google.com/document/d/1cGorRZ73KvQqu57tT4ahCjSLncibFMUwlkaL-XIstzI/edit?usp=sharing

Bug: v8:10372, v8:10950
Change-Id: I87f6348b75ce72ee5bd5db143f789ceeee596070
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423721
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70105}
2020-09-24 08:17:17 +00:00
Jakob Gruber
2c354c3634 Skip failing stress_sampling tests
Bug: v8:10915
Change-Id: I96fb546cea47d382b2ca160bbbf1fb270468e51b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426617
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70104}
2020-09-24 08:10:17 +00:00
Jakob Gruber
a980adfcc4 [nci] Delay NCI compilation to second request
Benchmarks showed a large number of useless NCI compilation
tasks, i.e. code objects were generated and cached but never used.

Ideally, we'd only spawn an NCI task when the generated code will
be used in the future. To approximate this behavior, we now delay
task creation to the *second* time a function is optimized; the
thought being that a function that has been optimized twice is likely
to be optimized (= become hot) again in the future.

Bug: v8:8888
Change-Id: Ia37ae6a4c3861a611086964c20c313dda1974f14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414032
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70103}
2020-09-24 04:47:45 +00:00
v8-ci-autoroll-builder
00b540f224 Update V8 DEPS.
Rolling v8/build: c8dc0f5..cd7202b

Rolling v8/third_party/aemu-linux-x64: laU2vAii09mMfCaTLtA8O6UYjPdUXy0B-0zzOR0OPekC..e3-wbMXwDkejPE6v6BbVayEu9ikm4GVS2rHZkzAxpYgC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/0de9874..52c1ebb

Rolling v8/third_party/icu: 83b2ac6..aef20f0

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I52e67f8331c638d5f02b93e6db7fbeb81844a878
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426480
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/master@{#70102}
2020-09-24 03:43:15 +00:00
Milad Fa
8164eca869 S390:[wasm-simd] fix I64x2Mul codegen on s390
Change-Id: I24627a0fafbafa370877a3794fe2d1e40f11f622
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2427384
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70101}
2020-09-23 20:26:35 +00:00
Milad Fa
06a1a689a9 s390:[wasm-simd] fix unpack low/high on the simulator
Change-Id: I1c7715d5133bc9fb0711c8d9922e2ca31ed37042
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426947
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70100}
2020-09-23 18:26:45 +00:00
Gus Caplan
4263f8a5e8 parser: better error message for await+tla
Bug: v8:9344, v8:6513
Change-Id: I1854e483515e7da99192367b6764a0ec7c8b41d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2411687
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Gus Caplan <snek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70099}
2020-09-23 17:41:05 +00:00
Ng Zhi An
ac544ffaae [wasm-simd][arm64] Merge load splat opcodes
Load splat implementation is almost the same, except for the vector
format used for the output register. We encode this information in
MiscField (the size of each lane), and with some helper functions we can
easily reuse a single opcode for 4 load splats.

Bug: v8:10930
Change-Id: Ieed4dc7358821a0d1d7bab4add7a59d808c5aad8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2422354
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70098}
2020-09-23 16:49:04 +00:00
Ng Zhi An
32f85f7dbe [wasm-simd][scalar-lowering] Fix lowering for f64x2
Add lowering for F64x2 in S128Const and converting to and from f64x2.

Bug: v8:10507
Change-Id: Ic2c4f1f41d3dd804e012a943391a46b534864b51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424679
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70097}
2020-09-23 16:44:24 +00:00
Ng Zhi An
ebe43399b1 [wasm-simd] Surface V128 in inspector
For now, V128 values are converted to String16 (since they are not
serializable). It is shown as a list of 16 uint8_t (hex). This
description can be tweaked as necessary.

Some updates to ARM64 required to push/pop the full Q register.

Bug: v8:10347
Bug: chromium:1130474
Change-Id: I1bffbb49f47c06da3cd26d830addae0416a4441a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2422082
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70096}
2020-09-23 16:21:14 +00:00
Clemens Backes
f20230afd1 [profiler] Include the generic js-to-wasm builtin in profiles
This CL fixes two things:
1) It properly creates code entries for the generic js-to-wasm builtin
(others are left out because we don't want to include all builtins in
profiles).
2) It includes js-to-wasm frames in profiles. The generic js-to-wasm
builtin will map to that frame type in the future (see referenced
bug). js-to-wasm frames are currently included because they are wrongly
mapped to OPTIMIZED frames by the SafeStackTraceIterator.

R=petermarshall@chromium.org
CC=ahaas@chromium.org, evih@google.com

Bug: v8:10701
Change-Id: I26e3fa6901890e041feab7c001069e67a616c986
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416495
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70095}
2020-09-23 15:21:34 +00:00
Camillo Bruni
5259691ccb [runtime] Module code cleanup
- Make Module::RecordErrorUsingPendingException and
  Module::RecordError static (There is no need for them to be
  "fast" instance methods with raw pointers)
- Share various debug print snippets
- Share status change code in SetStatusInternal
- Simplify several casts

Change-Id: I159dc3dd9104bf76858a2d5ad142a72a75640716
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416490
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70094}
2020-09-23 14:00:01 +00:00
Camillo Bruni
61d0c2bbb3 [mjsunit] Simplify log test to avoid timer issues
Avoid --log-all which activates profiling timers that have issues on
certain bots. --log-code is good enough to test whether logging works.

Bug: v8:10937
Change-Id: I3284801f7b423480756abb0f3c33980a9776575d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424349
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70093}
2020-09-23 13:56:31 +00:00
Milad Fa
6ab94c85ff PPC: [wasm-simd] Implement f32x4 and f64x2 rounding
Change-Id: If6555f4e0601f3c0f0bf25f9c81c1663bf8935f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424642
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70092}
2020-09-23 13:54:11 +00:00
Camillo Bruni
89e0d45c66 [tools] Add markers to system-analyzer source panel
- Create SourcePosition objects for Map and IC log entries
- Display source code with markers for SourcePositions
- Avoid some try-catches for a better debugging experience

Bug: v8:10644
Change-Id: I559b0eaeaa1442986a00d2ef720d19ba85178509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424258
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70091}
2020-09-23 13:06:11 +00:00
evih
607414e91c [wasm] Use js-to-wasm generic wrapper for f32 and f64 return
Currently, the generic wrapper is used for i32 and i64 params and 0 or 1
i32, i64, f32, f64 return value.

Bug: v8:10701
Change-Id: I610172995457354879afd3c9c2c6c2d55c2b700f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2414219
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Eva Herencsárová <evih@google.com>
Cr-Commit-Position: refs/heads/master@{#70090}
2020-09-23 12:38:01 +00:00
Michael Achenbach
98db2c842f [test] Mark slow test
No-Try: true
Bug: v8:10952
Change-Id: Iee858419b160a354a4df61f51b18782fcbc4a521
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424155
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70089}
2020-09-23 12:10:40 +00:00
Leszek Swirski
ba088da239 [handles] Add a PatchValue method for Handle
We currently have a pattern of setting a dereferenced Handle location to
update that Handle's value:

  *handle.location() = new_value.ptr()

This is slightly opaque, and definitely not type-safe, so add a new
Handle<T>::PatchValue method which does this operation.

Ideally we would make Handle::location() return a const pointer to
discourage this sort of use, but there's a bunch of places where that
location pointer is used and passed around as a Handle surrogate, so
those would have to be updated first.

Change-Id: I157f7e2473ed1b86f7a93cae260b0932fed0ad88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424249
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70088}
2020-09-23 12:09:36 +00:00
Zhao Jiazhong
4df7b0bdae [mips][wasm] Fix kWasmInstanceOffset
Currently the kWasmInstanceOffset is computed according to the reg
a0(kWasmInstanceRegister)'s position in the frame. And according
to Builtins::Generate_WasmCompileLazy, it's the 7th gp_regs that
are pushed on to stack, so the index should be 6 other than 7.

Since the kWasmInstanceRegister will be pushed on to stack after
all parameter registers, so we can use it's index, which does not
reply on which reg kWasmInstanceRegister is, and what order the
parameter registers are pushed on to stack.

So the new index is equal to the number of all parameter registers.

Change-Id: I7a77fb052a5d68ee28dab10409462260ad491578
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2425329
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70087}
2020-09-23 12:08:31 +00:00
Thibaud Michaud
043193187f [wasm] Fix non-determinism with --predictable
For invalid modules, the {kFinishedExportWrappers} event and the
validation error can happen in any order. Make the order deterministic
for predictable mode.

R=clemensb@chromium.org

Bug: v8:10936
Change-Id: Ib5b1e5a1a3af901a81bc37919b5aff4e5c237579
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424134
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70086}
2020-09-23 12:07:26 +00:00
Dominik Inführ
cb758969dd [heap] Reset pending object in final atomic pause
Not needed for correctness but this avoids adding the pending object
to the on_hold worklist.

Bug: v8:10315
Change-Id: Ide910cee37a4069c71c4046c32fa9f663265775e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424137
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70085}
2020-09-23 12:06:21 +00:00
Omer Katz
4f9fc8468d cppgc: Fix overflow in marked bytes deadline
ProcessWorklistsWithDeadline now takes deadlines instead of durations.

Bug: chromium:1131203
Change-Id: Ie346334cfb043567836262614958282de078a1dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424129
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70084}
2020-09-23 11:09:21 +00:00
Camillo Bruni
a09632b9e2 [test] Skip flaky test
Bug: chromium:1129854, v8:10937
Change-Id: I0a9fd3e16a6ae8ea47a7a3f0a9325542d9e46014
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424133
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70083}
2020-09-23 11:03:20 +00:00
Martin Bidlingmaier
e6e9cbac37 [regexp] Support the msy flags in experimental engine
The m (multiline) and s (dotall) flags just needed to be marked as
allowed; the required logic was already in the regexp parser.

A regexp /<x>/ without the y (sticky) flag is equivalent to the sticky
regexp /.*?<x>/y.  The interpreter now assumes that every regexp is
sticky, and the compiler appends a preamble corresponding to /.*?/
before non-sticky regexps.  To reuse existing code for compiling this
preamble, the logic for each kind of quantifier is now in a separate
function and called from VisitQuantifier and for the preamble.

The commit also includes some improvements/fixes for character ranges:
- Empty character ranges/disjunctions should never match, but before
  this commit they would *always* match.
- The check of the range bounds in CanBeHandledVisitor was unncessary;
  without the unicode flag this can't be a range that can't be specified
  in 2-byte codepoints, and once we support unicode we simply support
  all codepoints.
- The capacity of the list containing the complementary intervals of a
  character range is now calculated more accurately.

Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Bug: v8:10765
Change-Id: I71a0e07279b4e1140c0ed1651b3714200c801de9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2404766
Commit-Queue: Martin Bidlingmaier <mbid@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70082}
2020-09-23 09:43:39 +00:00
Manos Koukoutos
339c555ba7 [wasm-gc][bug] Restructure DecodeFunction(), add early exits
This fixes a bug caused by StartFunction() being called for an invalid
module.

Bug: v8:7748
Change-Id: I47a3f3573355d87554b123dd1edc7c829bb43d0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423710
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70081}
2020-09-23 08:55:09 +00:00
Camillo Bruni
d73a775aeb Reland "[d8] Avoid recursive unhandled rejected Promise processing"
This is a reland of 66e4c99c82

Move recursive check variable onto PerIsolateData to avoid data races.

Original change's description:
> [d8] Avoid recursive unhandled rejected Promise processing
>
> Bug: chromium:1126309
> Change-Id: I9d9d33cd151ed8af5ee8af09b8957eae9df2dcb1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2410059
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Auto-Submit: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69986}

Bug: chromium:1126309
Change-Id: I83353e891e8987fa6f828e1efd82968b895638b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423708
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70080}
2020-09-23 08:12:59 +00:00
v8-ci-autoroll-builder
07f471fc13 Update V8 DEPS.
Rolling v8/build: e78873c..c8dc0f5

Rolling v8/third_party/aemu-linux-x64: zVhDYckO5pABaht9PlF8y1S_JicWTnMzwymJyNabQj4C..laU2vAii09mMfCaTLtA8O6UYjPdUXy0B-0zzOR0OPekC

Rolling v8/third_party/depot_tools: cc29098..d1580d5

Rolling v8/third_party/icu: 79326ef..83b2ac6

Rolling v8/tools/clang: 7c1d1f3..3017eda

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I0913fb10fb814a52442b6a942406f2d597635ca3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2425526
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/master@{#70079}
2020-09-23 03:51:29 +00:00
Ng Zhi An
5312340d3b Reland "[wasm-simd][scalar-lowering] Enable some spec tests"
This reverts commit 2bc09b8916.

Reason for revert: Skip some tests on ARM devices for now

Original change's description:
> Revert "[wasm-simd][scalar-lowering] Enable some spec tests"
> 
> This reverts commit cfe9544aa6.
> 
> Reason for revert: Some spec tests fail:
> https://ci.chromium.org/p/v8/builders/ci/V8%20Arm%20-%20debug/15933
> 
> Original change's description:
> > [wasm-simd][scalar-lowering] Enable some spec tests
> > 
> > These tests can now be enabled as we implemented more scalar lowering
> > support.
> > 
> > Bug: v8:10507
> > Change-Id: Ida5f896300e074db079ec24720302729b0582d9d
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2411774
> > Reviewed-by: Bill Budge <bbudge@chromium.org>
> > Commit-Queue: Zhi An Ng <zhin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#70006}
> 
> TBR=bbudge@chromium.org,zhin@chromium.org
> 
> Change-Id: Idb2da40178860f045ffab9ab5b2c8b1f2ebafcf6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:10507
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2419036
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70010}

TBR=bbudge@chromium.org,zhin@chromium.org

# Not skipping CQ checks because this is a reland.

Bug: v8:10507
Change-Id: Ifaf15c49ece65cfeaef83b0ace6cfbb804e93a4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2419039
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70078}
2020-09-22 22:42:19 +00:00