Commit Graph

69307 Commits

Author SHA1 Message Date
Michael Lippautz
c80331af72 cppgc: Fix snapshot unittest
Bug: chromium:1056170
Change-Id: I84bc0f77ac4a27d310416bb00c4caf7fa3d76551
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2922104
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74815}
2021-05-27 11:36:23 +00:00
Dominik Inführ
f2fd431a19 [heap] Use base::SharedMutex in Heap::IsPendingAllocation
Use a read-write lock for protecting original_top, original_limit and
pending_object for all spaces. This way Heap::IsPendingAllocation is
always guaranteed to read a consistent top/limit-pair and also the
last values for those fields.

The main thread will acquire an exclusive lock to update those fields.
Concurrent Turbofan threads will use shared locks to read them.

This may be quite expensive on the Turbofan-side, so landing this CL
should help us figure out how big of a regression this simple fix would
be. For main thread execution performance is supposed to be okay, since
this is only used on the allocation slow path.

Bug: v8:11778, chromium:1213266
Change-Id: I9464f53fd50057ec2540ab5b79f74ee52a5d7500
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2903143
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74814}
2021-05-27 11:17:23 +00:00
Clemens Backes
2542ce2562 Move DISABLE_ASAN macro to base/sanitizer/asan.h
Bug: chromium:1056170
Change-Id: I09c6764c62cb459f3cfe317508bbc663debb66b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919961
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74813}
2021-05-27 11:03:23 +00:00
Michael Lippautz
22135c13b5 Manually update google_benchmark
Rolling v8/third_party/google_benchmark/src: e539e80..db2de74

Fix pedantic compilation flag violation (#1156) (Mariusz Wachowicz)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/db2de74

fix version recorded in releases (#1047) (Kai Germaschewski)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/a4bcd93

Implementation of random interleaving.  (#1105) (haih-g)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/a6a738c

remove appveyor and add libera.chat as IRC resource (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/c983c3e

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

Bug: chromium:1213169
Change-Id: Ic89fd04b6f121e8997b54dcbbbd4a43b2ce8ecb8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919959
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74812}
2021-05-27 10:42:13 +00:00
Ross McIlroy
1955ef64b3 Disable untrusted code mitigations on Android.
BUG=chromium:1003890

Change-Id: I3d4f51095ad33828857647be02290bfd5511399d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919965
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74811}
2021-05-27 10:31:03 +00:00
Daniel Abraham
87132919a4 Fix various typos in PDL comments + 1 event param.
Based on an analysis of auto-generated code, based on
browser_protocol.pdl and js_protocol.pdl:

https://goreportcard.com/report/github.com/daabr/chrome-vision#misspell

Bug: chromium:1213460
Change-Id: Ib96b2d2700d0bf1ac90e88accd0bc15eccbb9d7b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848874
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74810}
2021-05-27 09:42:43 +00:00
Frank Tang
6da3dc6e3c Implement "Extend TimeZoneName Option Proposal"
https://tc39.es/proposal-intl-extend-timezonename/
https://chromestatus.com/guide/edit/4506375298220032

Bugs: v8:11661

Change-Id: I6d7e1bccf5a26ca02d39dc72d9362134a60ad6b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2757899
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74809}
2021-05-27 08:49:22 +00:00
Dominik Inführ
f5ac0c1f40 [heap] Timer might not be started after shutdown
The timer might not be started when the main thread starts shutdown
between a background thread invoking RequestGC() and
AwaitCollectionBackground().

Add early bailout to AwaitCollectionBackground() in case shutdown
was already initiated.

Bug: v8:11823
Change-Id: Id646cdefa99adb04553c21337ad19538071ee3d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919957
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74808}
2021-05-27 08:48:18 +00:00
Lei Zhang
7ff6609a53 Move DCHECK() in JSCallOrConstructNode ctor into a helper function.
As is, the DCHECK() has a #if inside, and MSVC has trouble
pre-processing that. Fix this by moving the conditional inside the
DCHECK() into a separate helper function.

Bug: v8:11760
Change-Id: Ib4ae0fe263029bb426da378afa5b6881557ce652
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919421
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74807}
2021-05-27 08:47:13 +00:00
Manos Koukoutos
dfdc8f6879 [wasm-gc] Implement array.copy (experimental)
Changes:
- Add --experimental-wasm-gc-experiments flag.
- Add array.copy opcode. Implement it in decoding and code generation
  behind the new flag.
- Add WasmCodeBuilder::BoundsCheckArrayCopy. Move BoundsCheckArray to
  the private section.
- Add WasmArrayCopy and WasmArrayCopyWithChecks builtin.
- Add WasmArrayCopy runtime function.
- Add WasmArray::ElementSlot.
- Always print two hex digits in CHECK_PROTOTYPE_OPCODE.
- In test-gc, print the thrown-error message if the function should not
  throw.
- In test-gc, add GetResultObject with one argument.

Bug: v8:7748
Change-Id: I58f4d37e254154596cdef5e78482b55260dd3782
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912729
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74806}
2021-05-27 08:46:08 +00:00
Wenyu Zhao
2243a8632b [heap] Fix third-party-heap PageFromAddress check in CSA
Use compile-time DCHECK instead of Unreachable().

GenerateRecordWrite is disabled to prevent the use of PageFromAddress
when TPH is enabled.

Another user of PageFromAddress is TrapAllocationMemento, this will
be disabled in https://chromium-review.googlesource.com/c/v8/v8/+/2897326.

Bug: v8:11641
Change-Id: I1393d5ad52695a79750be00f2205648458f9c79d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2909216
Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74805}
2021-05-27 08:45:03 +00:00
Clemens Backes
2f97241650 Rename msan blacklist.txt to ignorelist.txt
This is needed after https://crrev.com/c/2911096, which rolled to V8 in
https://crrev.com/c/2921031.

Tbr: machenbach@chromium.org
No-Try: true
No-Tree-Checks: true
Change-Id: I0e884111aa605fe136321eb0d924bbf6d51e74b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919958
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74804}
2021-05-27 08:24:50 +00:00
v8-ci-autoroll-builder
edd882248a Update V8 DEPS.
Rolling v8/build: 74f9de2..2f6e88e

Rolling v8/buildtools/third_party/libunwind/trunk: 7846d25..c8d0fb8

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3caaaaa..e83a92e

Rolling v8/third_party/depot_tools: 72bc20e..6fc394f

Rolling v8/third_party/zlib: e4c7c48..5ef44f0

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I092c4ab1f3df290826d6861194a786f640c95f8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2921031
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@{#74803}
2021-05-27 03:43:39 +00:00
QiuJi
8bac848777 [riscv64] Fix a typo in li_ptr
Change-Id: I12ed18a488584b144bec6b1c1cef7ab01d1b5ce8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917597
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74802}
2021-05-27 02:05:19 +00:00
Derek Tu
115db49c25 [riscv64] Add RVC Instr CB and fix some RVC Instr CA
Adds the following CB type RISC-V instructions to the assembler:
c.beqz, c.bnez, c.andi, c.srai, c.srli. Also removes sext_xlen
from RVC instructions c.xor, c.or, c.and.

Change-Id: I96ce4693019c28235ccd4f85d0a68ca89a3f4096
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912922
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74801}
2021-05-27 01:52:40 +00:00
Lu Yahan
7c30ae29c0 [riscv64] Fix build failed
Change-Id: Ib86c4d6237251308fb16cef73e22f2efaa8ecbdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919308
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#74800}
2021-05-27 01:25:49 +00:00
Mathias Bynens
37b5c8cb4d Add placeholder .mailmap file
People change their names and email addresses for many reasons. Adding
a `.mailmap` ensures that e.g. `git log` and `git blame` respect
people’s choices.

Bug: chromium:1213438
Change-Id: I03fcacff90d996d423283c345ddfc4ed9fccf98e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919671
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74799}
2021-05-26 22:56:59 +00:00
Junliang Yan
74fb1357dd ppc: rename StoreU32/U16/U8
Change-Id: Id90dbf6dca8c3c06221922b6f65b2d72f5ac981a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2920747
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@{#74798}
2021-05-26 20:04:20 +00:00
Manos Koukoutos
85a5e2089a Reland "Reland "[wasm][bug] Fix a couple of bugs in validation of unreachable code""
This is a reland of 916eb86952

Change compared to original:
Remove ternary operator from lambda, as this triggers a gcc bug.

Original change's description:
> Reland "[wasm][bug] Fix a couple of bugs in validation of unreachable code"
>
> This is a reland of 4a037f871e
>
> Changes compared to original change: None. This seems not to create
> problems after all.
>
> Original change's description:
> > [wasm][bug] Fix a couple of bugs in validation of unreachable code
> >
> > Changes:
> > - SetBlockType now instantiates the block's start merge with values of
> >   the correct type in unreachable code.
> > - EnsureStackArguments now keeps the existing stack values and moves
> >   them over the new bottom values.
> > - Drop stack size validation in Drop().
> > - Add new tests in unreachable-validation.js.
> >
> > Change-Id: Ie68b3d9abb0a41d1623d4a123fb526e71941c4e7
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2902733
> > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#74650}
>
> Change-Id: Id620f7fb6677b772b0dcfd38108256384db44439
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905598
> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74677}

Bug: v8:11819
Change-Id: I9b8d915547ec9aee7cb5233937089d431db54c8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919833
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74797}
2021-05-26 18:24:29 +00:00
Igor Sheludko
ddc43d9cad [wasm-gc][ic] Support WasmObjects in LoadIC
Bug: v8:11804
Change-Id: I6eddf2d836c3916622768ef2a7d878157e89e4c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772980
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74796}
2021-05-26 17:49:49 +00:00
Santiago Aboy Solanes
6d6438eb3b [ia32] Use Movdqu/Movsd macro-assembler functions
They check for AVX and uses the AVX instruction if available. This is a
follow-up CL to https://crrev.com/c/v8/v8/+/2912778

Change-Id: Ib53f06f03ac1067366b76b9193d8db98c394ce50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919853
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74795}
2021-05-26 17:16:29 +00:00
Dominik Inführ
0e01a45452 [codegen] Fix DCHECK in single generation mode
Build with single generation mode failed because
new_space_allocation_top() and new_space_allocation_limit() both return
nullptr now without a new space. Previously the DCHECK succeeded because
both methods would call the NewSpace methods with null as this pointer.

Bug: v8:11708
Change-Id: I74babded2c790642e74722ed53794aecebec4344
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917604
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74794}
2021-05-26 17:09:49 +00:00
Manos Koukoutos
ef4de56695 [turbofan] Optimize BranchConditions in BranchElimination
When BranchElimination has to find the common prefix of a set of
BranchConditions in a Merge, it has to traverse a number of linked lists
of individual conditions, which is inefficient.
This CL improves its performance by grouping conditions between an
IfTrue/IfFalse and a Merge in a single entry of BranchConditions.
Additional change: Improve documentation of FunctionalList.

Change-Id: I93a58886151f6831cafb483aafb48e8e6c2433e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917600
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74793}
2021-05-26 16:59:29 +00:00
Michael Achenbach
f370d60711 [test] Add verbose output of flaky tests
The verbose output shown on bots didn't print the first failing result
of a flaky test before. Now the result line shows all results and
the details in the end show the output of the first failure.

Previously it was confusing as it seemed that the json results and
the test runner output differed.

We now print PASS in all caps like the other statuses. A test for
this case already existed and the output is now updated.

Bug: v8:8434
Change-Id: I473ec392e0028bf64b3da53d4b37446ffcd17277
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919670
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74792}
2021-05-26 16:22:59 +00:00
Lei Zhang
a5cea1bfc3 Mark Node::opcode() and Operator::opcode() as constexpr.
Without the explicit constexpr keyword, Clang seems to be able to treat
these methods as constexpr, whereas MSVC will not.

Bug: v8:11760
Change-Id: I9f6492f38fb50dcaf7a4f09da0bd79c0da6a50eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912916
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74791}
2021-05-26 15:58:39 +00:00
Igor Sheludko
db245ed83a [wasm-gc] Support WasmObject field loading in runtime
The new functionality is hidden behind the --wasm-gc-js-interop flag.

Bug: v8:11804
Change-Id: I9dd779efe3dbf3c773948b6fd8872e3aea8cd7a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912784
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74790}
2021-05-26 15:03:19 +00:00
Junliang Yan
f72ec73993 ppc: [liftoff] implement StoreTaggedPointer
Change-Id: I55a80003a148c80f2b7a1f644c127d81963f8ac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918141
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74789}
2021-05-26 13:59:19 +00:00
Omer Katz
c2d5e408b5 cppgc: Reduce noise and increase tolerance in flaky test
Bug: v8:11367
Change-Id: I2d21d3deea73a9930acb3bf2efd3268ec1fd64b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919830
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74788}
2021-05-26 13:35:09 +00:00
Clemens Backes
d2a4e8ec92 [nowasm] Fix compilation
This fixes a compile error in no-wasm / jitless builds introduced in
https://crrev.com/c/2912779.

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

Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Change-Id: Ia256679dba5093b30821859376aba81b4900efed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919829
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74787}
2021-05-26 13:30:09 +00:00
Ross McIlroy
09a2ada4d7 [snapshot] Remove no-snapshot initialization path.
This is no longer supported and currently fails later when V8 is
executed if taken, so remove it and fail early during initialization.

BUG=chromium:1208472

Change-Id: I0a1fe947facef0128c6695a4091c5fe8d4c56cc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919668
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74786}
2021-05-26 12:19:00 +00:00
Santiago Aboy Solanes
1f9f0a4a19 [compiler] Read ThinStrings concurrently, as InternalizedStrings do
ThinStrings are essentially a pointer to an InternalizedString. Read
them concurrently in places where we read InternalizedStrings.

Bug: v8:7790, v8:11791
Change-Id: I3be4dd27336f58706c9c57d5042f96cb8f56bcaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905608
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74785}
2021-05-26 11:53:59 +00:00
Michael Lippautz
1924e5b9db cppgc: Returns BasePage::space() as reference
Also change:
- {NormalPageSpace, LargePageSpace}::From()
- ObjectAllocator::*

Bug: v8:11822
Change-Id: I78a1a5379e16fc1e1c95136d7aa8cc34caed0413
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917042
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74784}
2021-05-26 11:46:10 +00:00
Vicky Kontoura
c32ba7e04d [web snapshot] Support mjsunit tests
This CL adds support for testing web snapshots through mjsunit tests.
To allow for taking and using web snapshots from JavaScript, two
methods, Realm.takeWebSnapshot() and Realm.useWebSnapshot(), are
introduced in d8.

Both of these methods accept a Realm as a parameter, allowing for
mjsunit tests to create and use the snapshot in different realms.

To return the snapshot data, Realm.takeWebSnapshot() creates and
returns a snapshot object with the snapshot data stored as an embedder
field.

Bug: v8:11525, v8:11706
Change-Id: I6e514e10eabf5bdb96d81e2697d4ddc49d92de73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905610
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#74783}
2021-05-26 11:37:42 +00:00
Liu Yu
c24b5a2bc9 [mips][nowasm] Fix compile errors
Port ec4fd32cf7

Change-Id: Ia952dc6f7478b90dc61ceb029f10feb79243d01d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918988
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#74782}
2021-05-26 11:20:09 +00:00
Santiago Aboy Solanes
59d158d07d [codegen] Use separate TSANRelaxedStore stubs
Inline the SaveFPMode flag directly into the TSANRelaxedStore stubs:
 - Saves one register for input arguments
 - Avoid branches in the TSANRelaxedStore stubs

Bug: v8:7790, v8:11600
Change-Id: Ib1083f8c1a7e856028ff606ba8c2a93efb10db69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917037
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74781}
2021-05-26 11:00:00 +00:00
v8-ci-autoroll-builder
72adfb0db6 Update V8 DEPS.
Rolling v8/build: d3e8244..74f9de2

Rolling v8/buildtools: b9af93e..fba2905

Rolling v8/buildtools/third_party/libc++abi/trunk: 767de31..da3e6cb

Rolling v8/third_party/aemu-linux-x64: uDQJbkoDWGwLYtnDu3A7LnRVwsKkaFQkUWtChrVO_hYC..Hf11zqHzrfja2miAIic8j5jVjfs3rcuSFj8vUK-AVYAC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7da48e9..3caaaaa

Rolling v8/third_party/depot_tools: 51e3708..72bc20e

Rolling v8/third_party/fuchsia-sdk: efa4658..1ea7a15

Rolling v8/third_party/googletest/src: 23ef295..a3460d1

Rolling v8/third_party/jinja2: 11b6b3e..6906af9

Rolling v8/third_party/zlib: 5b8d433..e4c7c48

Rolling v8/tools/clang: a38f01b..d663c27

Rolling v8/tools/luci-go: git_revision:9cd9603def7a649cd3e29517180d6622be2fa898..git_revision:03ab00ce4982877f2d4a0b0db48cd355e5ca65ab

Rolling v8/tools/luci-go: git_revision:9cd9603def7a649cd3e29517180d6622be2fa898..git_revision:03ab00ce4982877f2d4a0b0db48cd355e5ca65ab

Rolling v8/tools/luci-go: git_revision:9cd9603def7a649cd3e29517180d6622be2fa898..git_revision:03ab00ce4982877f2d4a0b0db48cd355e5ca65ab

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I619a7c566f37c879da74e36601542519cc46c632
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918435
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@{#74780}
2021-05-26 10:36:09 +00:00
Manos Koukoutos
a41c0c67f0 [turbofan] Separate BranchElimination and CsaLoadElimination
BranchElimination and CsaLoadElimination interracted badly and created
quadratic behavior when run together. This happened when
CsaLoadElimination kept updating arguments of a Merge, and
BranchElimination kept going through all of them to find the common
prefix of all path conditions. Therefore, we separate BranchElimination
and CsaLoadElimination in the csa and wasm optimization pipelines.

Additional changes:
- Split WasmOptimizationPhase from CsaOptimizationPhase.
- Remove now-redundant argument from CsaOptimizationPhase::Run.
- Fine-grain how statistics are measured in the wasm pipeline.

Change-Id: Id166f4f7d1ea69a1a7b7ca108af4ffedbcda8abb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912779
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74779}
2021-05-26 09:56:49 +00:00
Santiago Aboy Solanes
b0eb59fb4b [codegen] Save the full 128bit FP register for Push/PopCallerSaved
Note that Arm32 is already saving the full register in
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/arm/macro-assembler-arm.cc;l=2250;drc=ec4fd32cf7f945923fa6bb332c061ecbdaaaa405

Change-Id: I1f5fe60ca350583fb4cb877ccad74f5e260c3665
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912778
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74778}
2021-05-26 09:54:29 +00:00
Jakob Gruber
1179c6b089 [compiler] Don't serialize object_create_map
.. when concurrent-inlining, use direct reads instead.

Two fields were changed to have a non-atomic getter and acq-rel
accessors:

- Map::prototype_info
- PrototypeInfo::object_create_map

Bug: v8:7790
Change-Id: I05e888240d73ab6e961b1048a25713ec45fb0305
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876852
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74777}
2021-05-26 08:27:13 +00:00
Clemens Backes
f15a656dc1 [wasm] Use unprotected loads for known in-bound accesses
For memory accesses that are statically known to be in bounds, avoid the
out-of-line code for the trap handler. This makes trap handler metadata
smaller, reduces code size (by avoiding OOL code), and enables more
optimizations at later phases, because unprotected memory loads can be
reordered and reused.

Drive-by: Use {GetMemoryAccessKind} consistently.

R=ahaas@chromium.org

Bug: v8:11802
Change-Id: Ia824d3355a95f446a796c5b06f69ecaa1500709b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912585
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74776}
2021-05-26 08:21:53 +00:00
Jakob Gruber
9fe26a861b Reland "[compiler] Replace EnsureElementsTenured by IsElementsTenured"
This is a reland of 6d99f9334b

No changes since revert.

Original change's description:
> [compiler] Replace EnsureElementsTenured by IsElementsTenured
>
> We can't mutate heap state from the compiler thread; turn this into a
> predicate and emit generic code if it returns false.
>
> Bug: v8:7790
> Change-Id: I6186a87e178d0c0206b6e7659fa2a41bf65fd835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876845
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74596}

Tbr: neis@chromium.org
Bug: v8:7790
Change-Id: I9cfdcf9929870a8314486292bab91e83cb448410
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917605
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74775}
2021-05-26 08:02:53 +00:00
Jakob Gruber
6b9c91e78c Reland "[compiler] Make NativeContextRef never-serialized"
This is a reland of 5258364e23

No changes since revert.

Original change's description:
> [compiler] Make NativeContextRef never-serialized
>
> Most NativeContext elements are immutable after initialization;
> additionally, we now use acquire-release semantics to load/store
> elements when possible. Reading and constructing Refs for elements
> is thus possible from the background.
>
> A few notes:
>
> - A few elements are not immutable; if read from the background
> thread, these must use acquire-release semantics.
> - Elements can be stored from generated code; these are not compatible
> with bg-thread accesses.
> - While elements can be read safely from the native context, the
> elements themselves may still require serialization; this is done in
> NativeContextRef::Serialize.
>
> Bug: v8:7790
> Change-Id: I12e9611a292e7dd912438c712390731a5422407d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897254
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74604}

Tbr: neis@chromium.org
Bug: v8:7790
Change-Id: Ica736a4afda2be7276508fe2f734293d0b9eeaf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917606
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74774}
2021-05-26 07:52:13 +00:00
Jakob Gruber
c21d0148d6 [testrunner] Implicitly detect trivial flag contraditions
This changes the test runner to automatically treat cases in which
both a flag and its negation are present as a flag contradiction.
Example: "--foo --no-foo".

With this change it's no longer necessary to explicitly specify these
trivial contraditions in variants.py.

Note: since negations are created through simple string operations,
bogus constructions are possible ("--nobodys-perfect" ->
"--bodys-perfect"). We accept these as unlikely-to-cause-problems.

Bug: v8:10577
Change-Id: Ic52a92ed1e884b495ee4136f6e2f3257cca243c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904218
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74773}
2021-05-26 07:42:43 +00:00
Georg Neis
e39711a615 [compiler] Use kCrashOnError in MakeRef
... to get better error messages.

Bug: v8:7790
Change-Id: I2296e78804e243177a7e984a0284561cd41c61bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917602
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74772}
2021-05-26 07:31:13 +00:00
Jakob Gruber
1f89ee1fb3 Revert "Reland "[wasm][bug] Fix a couple of bugs in validation of unreachable code""
This reverts commit 916eb86952.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20gcc/11805/overview

Original change's description:
> Reland "[wasm][bug] Fix a couple of bugs in validation of unreachable code"
>
> This is a reland of 4a037f871e
>
> Changes compared to original change: None. This seems not to create
> problems after all.
>
> Original change's description:
> > [wasm][bug] Fix a couple of bugs in validation of unreachable code
> >
> > Changes:
> > - SetBlockType now instantiates the block's start merge with values of
> >   the correct type in unreachable code.
> > - EnsureStackArguments now keeps the existing stack values and moves
> >   them over the new bottom values.
> > - Drop stack size validation in Drop().
> > - Add new tests in unreachable-validation.js.
> >
> > Change-Id: Ie68b3d9abb0a41d1623d4a123fb526e71941c4e7
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2902733
> > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#74650}
>
> Change-Id: Id620f7fb6677b772b0dcfd38108256384db44439
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2905598
> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74677}

Tbr: manoskouk@chromium.org
Change-Id: Ia24aa453735464bdd3aafca4617beabb0cbf8823
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917601
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74771}
2021-05-26 07:27:13 +00:00
Liu Yu
a58f812c48 [mips] Remove alignment in kArchStackSlot
In commit 4a5adb43ac, mips may allocate a
bit more memory than actually needed, and move the beginning of the
StackSlot in order to have it aligned.

After commit e639eafea3, we allocated
the memory that was actually needed, so we do not need extra alignment
anymore.

Change-Id: I4c4c01794ed1d2cc5b8c89196eae6834f0da0b6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917578
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@{#74770}
2021-05-26 04:15:43 +00:00
Milad Fa
11069a4e32 PPC/S390: Fix builds without webassembly support
This CL assures builds with "v8_enable_webassembly = false"
compile successfully.

It is an addition on top of this original port:
e73c7b2199

Change-Id: Ic27b3006087e4d4de6fe599a9f469d1f80cf8a8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918136
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74769}
2021-05-25 21:12:35 +00:00
Junliang Yan
a4ae746a76 ppc: [liftoff] implement a few Load functions
Change-Id: Ia709a1c578d05d722690c57ae44019bda4eb8d5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2918213
Auto-Submit: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74768}
2021-05-25 20:36:25 +00:00
Jakob Kummerow
8f021a425b [wasm-c-api] Optional "dump counters" support
Implementation copied from d8. Gated behind a build-time flag.
Can be useful for debugging issues.

Change-Id: I444d625242b1fb8fe9139472a06cb1a90269401a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2906233
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74767}
2021-05-25 20:22:46 +00:00
Junliang Yan
5e825b7220 ppc: replace StorePU by StoreU64WithUpdate
Change-Id: I795d45a02f49e3a0cc62ce5d87b75a1af7b2dcc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2917913
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@{#74766}
2021-05-25 19:42:10 +00:00