Commit Graph

69554 Commits

Author SHA1 Message Date
Peter Kasting
90c7d8ab6e Fix -Wc++11-narrowing in V8.
Bug: chromium:1216696
Change-Id: I0918215c2e2b845bd7b39e06128d74382a467b05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2950262
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75062}
2021-06-09 22:47:37 +00:00
Manos Koukoutos
ca0cde8986 [wasm-gc] Fix issues with struct.new init. expressions
- Add support for packed types.
- Emit arguments first in wasm-module-builder.cc.

Bug: v8:7748
Change-Id: I358ca13db4332e026ee5850de6f629822bc92b04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948887
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75061}
2021-06-09 19:41:18 +00:00
Michael Lippautz
dda3f50913 cppgc: Fix atomic read in DCHECK
Pass along the intended atomicity parameter for a getter in a DCHECK.

Bug: chromium:1218072
Change-Id: Ib83c8f548d3de9c944546c74291cd148643e185c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2950242
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75060}
2021-06-09 19:38:28 +00:00
Jakob Kummerow
54bf45519f [wasm-gc][inspector] Fix handling of very long type names
And also make sure that even long names don't get truncated.

Fixed: chromium:1216284
Change-Id: I2792b60ddeb40a87816cb54fb0414ef0dea45da0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947409
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75059}
2021-06-09 18:39:58 +00:00
Shu-yu Guo
da45d855de Fix data races in TypedArray fill and reverse
Bug: chromium:1217573
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Change-Id: Ida9cabc4f46f0ad4f35e2b97f5803cc7c30fb972
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947857
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75058}
2021-06-09 18:38:18 +00:00
Junliang Yan
d62df907b5 ppc: Unify Memory Operation 7
Change-Id: Ieeb437abf3ebc59461ee828aeb6c65e06fdb17fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2950241
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75057}
2021-06-09 18:14:48 +00:00
Ng Zhi An
2e4666ab93 [compiler] Remove redundant is_tail_call param
For tail calls, we already set the flag kCallTail on CallBufferFlags,
the bool is_tail_cal always matches the flag (and there is only one call
site (L3037).

Drive-by clean up to get SaveFPRegsMode once, this is used when we need
to save and restore caller-saved registers.

Change-Id: Id175922c4cb5162d38b5ab61b84e151aaf2083e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945536
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75056}
2021-06-09 17:37:08 +00:00
Dan Elphick
e63a71eafe [build] Move RuntimeCallStatsTimerScope into its own header
By moving this out of counters.h, counters.h no longer needs to depend
on isolate.h.

Change-Id: Ic5272e3b3a729c0a438124dc5cdc1835817f3341
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949098
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75055}
2021-06-09 16:50:48 +00:00
Dominik Inführ
9140d00172 [heap] Optimize Heap::IsPendingAllocation
IsPendingAllocation will now load the space from the object's page
header first and then only check the object against the current LAB
of that particular space. Previously we were looking up that object
in the LABs of all spaces.

This new design also makes it feasible to have one dedicated mutex for
original_top/original_limit (respectively pending_object) for each
space. This will reduce contention on the mutexes.

Change-Id: I8e7636410259fd03b7970084bfbbaeadb2d8ba61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2936606
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75054}
2021-06-09 16:40:58 +00:00
Junliang Yan
8732b2ee52 ppc: rename StoreF32/F64/WithUpdate
Change-Id: Ife5883cf5108dfc25603a57df0044d096b6c5855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949105
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75053}
2021-06-09 16:07:28 +00:00
Dominik Inführ
0072968067 [heap] Add comment to Factory::InternalizedStringMapForString
Better explain why internalized strings have to be in old space. The
scavenger doesn't need to iterate and update references in the string
table and the stub cache.

Change-Id: I93c3e0b743f85fbf4de2ad877f3667abb2e0ae53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949101
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75052}
2021-06-09 15:45:09 +00:00
Junliang Yan
d2595e6de7 ppc: Unify Memory Operation 6
Change-Id: I4728042456c884f7ba91bd74e3a296973c663715
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949967
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75051}
2021-06-09 15:25:38 +00:00
QiuJi
7c6578d634 [riscv64] Fix build error
Port f68e1be795
Fix build error for 8ab75a56a2

Change-Id: I1014b8c036b0b8a8fcad5207fc9692e0668e2cce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945175
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#75050}
2021-06-09 14:19:58 +00:00
Patrick Thier
fa188e832f [sparkplug] Enable batch compilation per default
Use batch compilation per default for Sparkplug.

Bug: v8:11790, v8:11420
Change-Id: Ie0fd8a0614d674170b0878064292caa0a5ab06e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948659
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75049}
2021-06-09 14:11:08 +00:00
Michael Lippautz
1f0b0ed0e4 Reland "heap: Fix initial GC configuration for C++-only heaps"
This is a reland of 7ef67b2e9e

Manually checked that the CL was not the culprit breaking
  media_blink_unittests --gtest_filter=WebMediaPlayerImplTest.MemDumpReporting

Original change's description:
> heap: Fix initial GC configuration for C++-only heaps
>
> Heaps in V8 start with a large limit that is shrunk upon young
> generation GCs, based on some liveness estimate. This provides best
> throughput during startup while at the same time finding a reasonable
> first limit.
>
> For C++ (embedder memory) there is no estimate which is why it was
> piggy-backing on V8. This breaks in scenarios where no JS memory is
> allocated.
>
> In this fix we start a memory reducer after embedder memory has hit
> the activation threshold if no GC happened so far. As soon as a single
> Scavenger has happened, we leave it up to the JS estimate to figure
> out a limit. Memory reducing GCs will then find a regular limit based
> on the initial live size.
>
> Drive-by: Give embedders the same activiation threshold of 8MB as JS.
>
> Bug: chromium:1217076
> Change-Id: I8469696002ac2af8d75d6b47def062d2608387a1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944935
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75012}

Bug: chromium:1217076
Change-Id: I482d8525379e33095834d5b41be8bb49bdd8a5d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949094
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75048}
2021-06-09 14:00:48 +00:00
Manos Koukoutos
8e602fbf6c [wasm] Merge WriteGlobal* functions
Changes:
- Implement a single function
  WriteGlobalValue(const WasmGlobal&, const WasmValue&). Compute an
  intermediate WasmValue when needed.
- Add WasmValue::CopyTo() to avoid reading little endian values in
  WasmValue, and then transforming back to little endian.
- Add WasmValue::to_string() for tracing.

Change-Id: Ia7d9b9cddc7b8f77ae35fc588fe34c41ef444a2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948664
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75047}
2021-06-09 13:48:28 +00:00
Zheng Liu
6ac9c652fa [riscv64] Fix decode error of neg instruction.
The disassembler cannot decode neg instruction correctly because a single
quote is missed.

Bug: v8:11833
Change-Id: I43f12e8e8e3f1e51244dc891e9bfb611a95f393b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2934617
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#75046}
2021-06-09 13:34:18 +00:00
Manos Koukoutos
9eebd147c0 [wasm][comment] Explain magic wasm-to-js wrapper parameter
Change-Id: Ic0edb4a424b7358a40c54984f0f56f5c0ba05b09
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2930171
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75045}
2021-06-09 13:13:28 +00:00
Michael Lippautz
191b637f28 cppgc-js: Fix ephemerons for C++ heap snapshots
Previously, for generating the snapshot, ephemerons containers were just
traced strongly, without handling their ephemeron pairs. This resulted
in the snbapshot missing out on all the value objects (as keys were
traced through regular Visit()).

The fix here
a) Adds ephemeron tracing;
b) Adds a flag to avoid showing the key being retained by the
   ephemeron collection;

Bug: chromium:1056170
Change-Id: I45cc95bf4876879fa78b83154b13f20751b262b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948889
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75044}
2021-06-09 13:01:18 +00:00
Manos Koukoutos
a14f4215a0 [wasm] Fix a bug in unreachable code
Loop fallthroughs should leave values according to their out-type on the
stack, even when the stack is polymorphic.

Bug: chromium:1217470
Change-Id: I0a7e0569fa24fc16fcac76569a5ba14b6c7b0a9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2949090
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75043}
2021-06-09 12:33:28 +00:00
Santiago Aboy Solanes
54157310c1 [string] Skip concurrent tests if FLAG_single_generation is on
Similar to https://crrev.com/c/v8/v8/+/2270548, we can add an early
return since we will not be creating thin strings while
single_generation is on.

Bug: v8:7790, v8:10614
Change-Id: Ib6ccc00bc79058daa163920a944ad328515f667e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948888
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75042}
2021-06-09 12:30:28 +00:00
Simon Zünd
0b95f282f7 Introduce Isolate::ClearCachesForTesting API method
This CL adds a new method intended for tests or lab settings to
cleanup V8 caches. The synchronous nature of the method greatly reduces
flakiness of blink leak detection in many cases.

Bug: chromium:1217831
Change-Id: I107eddc8b88d91aa7e69430ecfc135fe39538a5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948666
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75041}
2021-06-09 12:14:28 +00:00
Manos Koukoutos
783b4e5000 [wasm] Remove EvaluateUintXXInitExpr
These can now be implemented with EvaluateInitExpression

Change-Id: I891e0ef91627eaac1af85af10748ada5f032e5c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948663
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75040}
2021-06-09 11:34:48 +00:00
Santiago Aboy Solanes
1bc7d17435 [string] Remove FLAG_thin_string and enable it all the time
It was added years ago and in 2017 it was enabled by default[1], which
means enough time has passed and we can remove the flag.

[1]: https://chromium-review.googlesource.com/c/v8/v8/+/528076/

Change-Id: I059417d4683910e86ebfddd93f504006094fa342
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947406
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75039}
2021-06-09 09:52:48 +00:00
Igor Sheludko
368a20bcd7 [runtime] Refactor interceptor handling
... and add regression test for contextual stores to JSGlobalObject
with interceptor in the prototype chain.

Bug: chromium:1216437
Change-Id: Ibd344288c6327b35f3276f59517995d591acb967
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944895
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75038}
2021-06-09 09:16:42 +00:00
Patrick Thier
c871945055 [sparkplug][test] Fix NumFuzz (mjsunit/baseline/batch-compilation.js)
--stress-concurrent-inlining has a negative implication for
--lazy-feedback-allocation. We need to explicitly add
--no-stress-concurrent-inlining, since the test relies on lazy feedback
allocation.

Bug: v8:11853
Change-Id: I2bd8f0da05a766dd7282cdb3b70c4a1b478c71cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2948647
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75037}
2021-06-09 08:52:28 +00:00
Wenyu Zhao
4217bfd2ad [heap] Fix or skip tests for TPH non-moving GC
* Skip 8 tests that timeout due to the low-performance of current MMTk non-moving GC.
  - This will be enabled after TPH performance issues are addressed.
* Skip 2 new tests that creates a second isolate -- TPH does not support it at the moment.
* Skip 1 test that expects concurrent sweeping behavior of cppgc.

Bug: v8:11641
Change-Id: If86cdcc303b01536d278368886bb30d91da5c5c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909692
Auto-Submit: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75036}
2021-06-09 08:44:48 +00:00
Jakob Gruber
9c1d730863 [compiler] Remove dead method declarations
Tbr: neis@chromium.org
Bug: v8:7790
Change-Id: Iaa094977b3c1099880ead9819df8418bc85e3dde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947416
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75035}
2021-06-09 07:34:08 +00:00
Maya Lekova
4acc0358da Revert "heap: Fix initial GC configuration for C++-only heaps"
This reverts commit 7ef67b2e9e.

Reason for revert: Speculative revert for a blocked roll - https://chromium-review.googlesource.com/c/chromium/src/+/2947365

Original change's description:
> heap: Fix initial GC configuration for C++-only heaps
>
> Heaps in V8 start with a large limit that is shrunk upon young
> generation GCs, based on some liveness estimate. This provides best
> throughput during startup while at the same time finding a reasonable
> first limit.
>
> For C++ (embedder memory) there is no estimate which is why it was
> piggy-backing on V8. This breaks in scenarios where no JS memory is
> allocated.
>
> In this fix we start a memory reducer after embedder memory has hit
> the activation threshold if no GC happened so far. As soon as a single
> Scavenger has happened, we leave it up to the JS estimate to figure
> out a limit. Memory reducing GCs will then find a regular limit based
> on the initial live size.
>
> Drive-by: Give embedders the same activiation threshold of 8MB as JS.
>
> Bug: chromium:1217076
> Change-Id: I8469696002ac2af8d75d6b47def062d2608387a1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944935
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75012}

Bug: chromium:1217076
Change-Id: Ic1530162e846c2a767ea5ea902a01a21967d8e35
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947419
Auto-Submit: Maya Lekova <mslekova@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@{#75034}
2021-06-09 07:32:08 +00:00
Jakob Gruber
9bfd401ef5 [compiler] RawFastPropertyAt without serialization
This is a step towards making JSObjectRef non-serialized.

Change JSObjectRef::RawFastPropertyAt to use a direct load with
relaxed semantics. Special handling of `uninitialized` sentinel values
is moved to the only use-site.

A new lock `boilerplate_migration_access` protects against concurrent
boilerplate migrations while we are iterating over properties.

Bug: v8:7790
Change-Id: Ic9de54ca16c1f3364d497a77058cfa33d48dd4a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928184
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75033}
2021-06-09 07:24:58 +00:00
Maya Lekova
75d9e3b83e Revert "Update V8 DEPS."
This reverts commit eb3ce72b87.

Reason for revert: Broke Android Arm64 Builder, see https://bugs.chromium.org/p/chromium/issues/detail?id=1217912

Original change's description:
> Update V8 DEPS.
>
> Rolling v8/build: 8870cb4..921ea58
>
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a8bae77..df0a59a
>
> Rolling v8/third_party/depot_tools: b508ecd..b14cdae
>
> Rolling v8/tools/clang: 0c64e83..d987b04
>
> TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com
>
> Change-Id: I8906ce650c866bd771910fea5db6c735bfe0c7e2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947396
> 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@{#75029}

Change-Id: I4d83f012cf04ab94eb66bab9a8ebec04ed098fbf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947417
Auto-Submit: Maya Lekova <mslekova@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@{#75032}
2021-06-09 07:15:09 +00:00
Iain Ireland
363ab5ae71 [regexp] Propagate eats_at_least for negative lookahead
In issue 11290, we disabled the propagation of EAL data out of
lookarounds, because it was incorrect for lookahead nodes in
loops. This caused performance regressions: for example,
`/^\P{Letter}+$/u` (matching only characters that are not in Unicode's
Letter category) uses negative lookahead when matching lone
surrogates, and became about 2x slower. I spent some time looking into
fixes, and this is what I've settled on.

Some background: the implementation of lookarounds in irregexp is
split between positive and negative lookaheads. (Lookbehinds aren't
relevant here, because backwards matches always have EAL=0.)  Positive
lookaheads are wrapped in BEGIN_SUBMATCH and POSITIVE_SUBMATCH_SUCCESS
ActionNodes. BEGIN_SUBMATCH saves the current state.
POSITIVE_SUBMATCH_SUCCESS restores the necessary state (while leaving
any captures that occurred during the lookaround intact).

Negative lookaheads also begin with a BEGIN_SUBMATCH node, but follow
it with a NegativeLookaroundChoiceNode. This node has two successors:
a lookaround node, and a continue node. It only executes the continue
node if the lookaround node backtracks, which automatically restores
the previous state. Negative lookarounds also can't update captures.

This affects EAL calculations. It turns out that negative lookaheads
are already doing the right thing: EatsAtLeastPropagator only
propagates information from the continue node, ignoring the lookaround
node. The same is true for quick checks (see the comment in
RegExpLookaround:Builder::ForMatch). A BEGIN_SUBMATCH for a negative
lookahead can simply propagate the EAL data from its successor like
any other ActionNode, and everything works.

Positive lookaheads are harder. I tried saving a pointer to the
successor in BEGIN_SUBMATCH, but ran into problems in FillInBMInfo,
because the EAL value corresponded to the nodes after the lookahead,
but the analysis was still looking at the nodes inside. I fell back
to a more modest approach: split BEGIN_SUBMATCH in two, and propagate
EAL info for BEGIN_NEGATIVE_SUBMATCH while keeping the current
behaviour for BEGIN_POSITIVE_SUBMATCH. This fixes the performance
regression at hand.

Two potential approaches for fixing EAL for positive lookahead are:
 1. Handling positive lookahead with its own dedicated choice node,
    like NegativeLookaroundChoiceNode.
 2. Adding an eats_at_least_inside_loop field to EatsAtLeastInfo,
    which is <= eats_at_least_from_possibly_start, and using that
    value in EatsAtLeastFromLoopEntry.

Both of those approaches are more complex than I want to tackle
right now, though.

Bug: v8:11844
Change-Id: I2a43509c2c21194b8c18f0a587fa21c194db76c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2934858
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75031}
2021-06-09 06:54:58 +00:00
Frank Tang
4a78a7d00c Address flaky tests
The test push stack boundary and too flaky (timeout) while
running machine with more memory.

Bug: v8:11845
Change-Id: I5b603f05270d224de71c735ece5dd65a27311c25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2939082
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75030}
2021-06-09 05:48:18 +00:00
v8-ci-autoroll-builder
eb3ce72b87 Update V8 DEPS.
Rolling v8/build: 8870cb4..921ea58

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/a8bae77..df0a59a

Rolling v8/third_party/depot_tools: b508ecd..b14cdae

Rolling v8/tools/clang: 0c64e83..d987b04

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

Change-Id: I8906ce650c866bd771910fea5db6c735bfe0c7e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947396
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@{#75029}
2021-06-09 03:50:37 +00:00
Jakob Kummerow
766cd46355 [bigint][ia32] Make bigint::Compare inlineable
Due to the limits of ia32's calling convention, being able to
avoid construction of "Digits" objects (thanks to inlining)
helps a lot for microbenchmarks.

Fixed: chromium:1192133
Change-Id: I5676640d96a99dc6422f3946c608bcc93ef222ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947410
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75028}
2021-06-08 19:03:36 +00:00
Frank Tang
c0f90e5923 Implement DisplayNames v2
Add "calendar", and "dateTimeField"
Add option for languageDisplay

https://tc39.es/intl-displaynames-v2/
https://chromestatus.com/feature/5082027281874944
Design Doc:
https://docs.google.com/document/d/17hQz4nOC7PJYhxc_MU-BRoT6BnYGZv66XlU1iGX0ywQ/edit#

Bug: v8:11637
Change-Id: Ie7dc80d16956f0e668b11e600e47f5bafb081ff7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2924523
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75027}
2021-06-08 17:49:36 +00:00
Junliang Yan
c9b1f165dd ppc: rename LoadF32/F64/WithUpdate
Change-Id: I3a4e827f9407286c8665ee032fbbc4552ebd1d89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945272
Commit-Queue: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75026}
2021-06-08 17:37:26 +00:00
Frank Tang
c563e44a13 Fix supportedLocalesOf of "best fit" matcher
Only return "subset of" the requested Locales.


Bug: v8:11860
Change-Id: I917753c6f0f5dfc7a52d071febbe03abfab45b04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946746
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75025}
2021-06-08 16:53:46 +00:00
Michael Lippautz
8c2c22fa9c cppgc: NameProvider:GetName() -> NameProvider::GetHumanReadableName()
GetName() is very generic and arleady exists as virtual method in Blink.

Bug: chromium:1056170
Change-Id: I7aa6e869a06c048e7baea45939894717c872d89e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947404
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75024}
2021-06-08 15:56:46 +00:00
Santiago Aboy Solanes
4cf7a03ae3 [object] Update SlicedStrings' comment regarding ExternalStrings
See set_parent
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/string-inl.h;l=857;drc=a6207b54d010a5bee8611a6ef08f9bee9a9768cf

Change-Id: I2fa5718c04b281016e2d4cae07b7f36e37176d6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947402
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75023}
2021-06-08 15:26:46 +00:00
Thibaud Michaud
c134f0af98 [wasm][liftoff] Add step counter in Liftoff
Add a new testing tier based on Liftoff. In this tier, the Liftoff
compiler takes an address to a counter, and decrements that counter at
every instruction. When the counter reaches 0, execution aborts.

R=clemensb@chromium.org

Bug: v8:11856
Change-Id: I20970e323ff19f7cb6ab6855377c678ca391421e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944440
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75022}
2021-06-08 15:02:36 +00:00
Vicky Kontoura
385f304df9 [d8] Support more ways of passing source code to Realm.eval()
This CL updates Realm.eval() to also handle reading source code as a
JavaScript function or from a file. To distinguish between different
argument types, an additional options bag needs to be provided. If no
options bag is provided, the behavior defaults to the current one,
which is reading source code from a string.

Bug: v8:11525, v8:11706
Change-Id: I68238335eb91171041dca2c83db211c40dd68359
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944435
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#75021}
2021-06-08 14:44:16 +00:00
Vicky Kontoura
08ce6e5c98 [web snapshot] Support top-level non-objects
Currently, the serializer and deserializer assume that all top-level
declarations to be serialized will be objects.

This CL removes this assumption.

Bug: v8:11525, v8:11706
Change-Id: I5acf5e7a3b73aba5ffc5b1d5eb9cb51b3804a4af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945178
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#75020}
2021-06-08 14:38:06 +00:00
Georg Neis
376eb8020d [compiler] Add missing prototype serialization of bound function map
This is needed for JSCallReducer.

Bug: chromium:1217562
Change-Id: I1f06040a74c393598c134301ba0cf04a46380107
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945184
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75019}
2021-06-08 14:09:56 +00:00
Milad Fa
dc5a4c909a PPC/s390: [sparkplug][x64] Reduce CallRecordWrite instructions
Port f68e1be795

Original Commit Message:

    Directly use the correct registers for calling the RecordWrite stubs
    in sparkplug. To keep changes to existing builtins minimal there are
    certain register requirements which are now made explicit in
    WriteBarrierDescriptor::Verify.

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

Change-Id: Id01f936f96cf231dcfc599b4f2662124bc1a7744
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945832
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75018}
2021-06-08 14:02:36 +00:00
Clemens Backes
863f322e68 Add clemensh->clemensb to .mailmap
This adds a .mailmap entry to remap clemensh@chromium.org to
clemensb@chromium.org, with Clemens' new name.

R=mathias@chromium.org

Change-Id: If234c59cf9089e71a1baf56115d5ee900f8af275
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919626
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75017}
2021-06-08 13:18:11 +00:00
Ulan Degenbaev
87e0d0a4d3 Remove ulan@ from OWNERS
Change-Id: I4a30e0f01e35eb0824f5abeec62d55d62970b59f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2910781
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75016}
2021-06-08 13:10:21 +00:00
Wenyu Zhao
09faa661ea Reland "[csa] Remove InnerAllocate and replace with non-folded allocations"
The initial CL is suspected to break the --predictable CI.
But looks like the CI is still crashing and also flaky after the
revert. So reland it again.

This is a reland of 59d58d722e

Original change's description:
> [csa] Remove InnerAllocate and replace with non-folded allocations
>
> This CL removes all uses of InnerAllocate (except memento allocations)
> and replace with non-folded allocations. The change is based on the
> fact that 1. Those InnerAllocates are not guarded by --allocation-folding
> flag. 2. Hopefully the MemoryOptimizer can handle the folding and no
> performance regression will happen.
>
> Two special versions of InnerAllocate is still kept:
> * One for memento allocations (renamed to InnerAllocateMemento).
> * One for AllocateUninitializedJSArrayWithElements (renamed to InnerAllocateElements).
>
> Change-Id: Ie77da6b2fba31b048241f7b7d927065305a01c27
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2873767
> Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74899}

Change-Id: I540c3a6b6e3f7c70c048f8ad1e5f702287fb086b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2946667
Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75015}
2021-06-08 11:52:51 +00:00
Patrick Thier
fd9d6fefd6 [sparkplug] Add tracing for batch compilation
Add flag --trace-baseline-batch-compilation to enable tracing for
baseline batch compilation.

Bug: v8:11790
Change-Id: I2b05017181b95bf3bccb70e2092250211dafb86c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945174
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75014}
2021-06-08 11:37:11 +00:00
Clemens Backes
5c89c4c788 [wasm][predictable] Unskip tests
Predictable does not contradict --wasm-tier-up any more, hence unskip
the tests.

R=ahaas@chromium.org

Bug: v8:11319, v8:11848
Change-Id: Iaefcf6c80e65d27c527aa1a45b054ace1d85fe39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945171
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75013}
2021-06-08 11:21:51 +00:00