Commit Graph

68854 Commits

Author SHA1 Message Date
Shu-yu Guo
68c9af01f5 [parser] Allow escaped future reserved keywords as identifiers
Bug: v8:11688
Change-Id: I35cf5d11d1a9af68be29c8e00224667ddbf07e7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2864388
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74362}
2021-05-04 17:58:26 +00:00
Huáng Jùnliàng
2b69a1f049 [parser] Allow escaped async in for-of
Bug: v8:11722
Change-Id: I34569071d74f0fe68b30cf3a596ea944440f1fec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2864703
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74361}
2021-05-04 17:11:45 +00:00
Clemens Backes
3c047b960a [cleanup][strings] Remove redundant NOLINT annotations
cpplint rules change over time, and we change the exact rules we enable
for v8. This CL removes NOLINT annotations which are not needed
according to the currently enabled rules.

R=leszeks@chromium.org

Bug: v8:11717
Change-Id: I7b54d7c75ef474749e22599a4bf16d9d309f4436
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859950
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74360}
2021-05-04 17:10:35 +00:00
Seth Brenith
1bf7efbf13 Adjust loading of ntdll functions
Use a function pointer rather than lambda when loading unwinding
functions on Windows.

Bug: v8:7301
Change-Id: I00e9c895d9ffdce6ba485eaf4401a749faa5e825
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867489
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#74359}
2021-05-04 16:18:05 +00:00
Nico Hartmann
bcfc82ef54 [Torque] Provide a specialization of Cast<Context|Zero|Undefined>
Bug: v8:11727
Change-Id: Id78995e250e16f43687db1c7ce97a59c635b5424
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2871459
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74358}
2021-05-04 15:28:45 +00:00
Santiago Aboy Solanes
799fa7b0a8 [object] Set/Get JSFunction::prototype_or_initial_map atomically
Maps set on the JSFunction were done so in a non-atomic way, which meant
that we were failing to have a synchronization point and the read/writes
could be reordered.

This started happening after a previous CL[1] moved some methods from
relaxed to non-atomic, which triggered TSAN (see v8:11696).

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

Bug: v8:7790, v8:11696
Change-Id: I8472ff8b63d391376ee2f1dcf0a8b4fd7cecfcd1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2851893
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74357}
2021-05-04 13:52:45 +00:00
Camillo Bruni
e75736aed4 [tools][system-analyzer] Allow hiding tooltips when clicking elsewhere
Drive-by-fix:
- Show tooltips in list-panel entries
- Use fixed kChunkWidth in timeline-track

Bug: v8:10644
Change-Id: I738f613c9a35726b9ab4a6c51f784638eade9335
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867467
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74356}
2021-05-04 13:45:45 +00:00
Andreas Haas
78fa1453e1 [wasm] Change return type of WasmCode::index to int
WebAssembly.Function and functions of the C-API do not have a function
index. Their index is kAnonymousFuncIndex = -1. Therefore it is
necessary to change the return type of WasmCode::index() from uint to
int.

The changes in WasmFrame::Print produces output like the following:

[9]: CWasmEntryFrame [pc: 0x9d200084091]
[10]: Anonymous wasm wrapper [pc: 0x101c5975c972]
[11]: WASM [wasm://wasm/f4bee83a], function #1 ('fibonacci_wasm'), pc=0x101c5975c5dc (+0x7c), pos=123 (+32)

R=jkummerow@chromium.org

Bug: v8:11713
Change-Id: I1012e92713d64d24ed2a92729dd3c2e4a013b9c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2871455
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74355}
2021-05-04 13:19:25 +00:00
Clemens Backes
fc377b056b [cleanup][codegen] Remove redundant NOLINT annotations
cpplint rules change over time, and we change the exact rules we enable
for v8. This CL removes NOLINT annotations which are not needed
according to the currently enabled rules.

R=mslekova@chromium.org

Bug: v8:11717
Change-Id: Ic986c01ac151cee9fc6f7d950d0c4c139ebac6d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859852
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74354}
2021-05-04 12:34:25 +00:00
Clemens Backes
b82dd0b061 [cleanup][compiler] Remove redundant NOLINT annotations
cpplint rules change over time, and we change the exact rules we enable
for v8. This CL removes NOLINT annotations which are not needed
according to the currently enabled rules.

R=mslekova@chromium.org

Bug: v8:11717
Change-Id: Ib7dc2c9dbb1710f4fe47e083df7e373e8b8aef27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859956
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74353}
2021-05-04 12:28:55 +00:00
Jakob Gruber
0a407ecc12 [compiler] Use MakeRef in heap-refs.cc
Also add convenience overloads that take handles, and use them in
access-info.cc.

Bug: v8:7790
Change-Id: I47e14b407b6a57c15da06b0396f8ae9ebb3a447d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2871445
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74352}
2021-05-04 12:00:05 +00:00
v8-ci-autoroll-builder
98275f18f6 Update V8 DEPS.
Rolling v8/build: 153efb2..b057259

Rolling v8/third_party/zlib: e8da4da..eb9ce8c

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

Change-Id: Ibdd230ba16b2f23938bae359d576eaec3443fb9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2871396
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@{#74351}
2021-05-04 11:20:05 +00:00
Alex Rudenko
03c6a2350c Revert "Expose V8CommandLineAPIScope and V8InspectorSession::createCommandLineAPI"
This reverts commit 1527c4878a.

Reason for revert: reverted in favour of https://chromium-review.googlesource.com/c/v8/v8/+/2857640

Original change's description:
> Expose V8CommandLineAPIScope and V8InspectorSession::createCommandLineAPI
>
> This CL extracts CommandLineAPIScope from V8Console and exposes it
> as V8CommandLineAPIScope. Also, it exposes V8InspectorSession::createCommandLineAPI.
> These changes will be used by InspectorPageAgent to install command
> line APIs when evaluating scripts added using CDP's command
> Page.addScriptToEvaluateOnNewDocument.
>
> Chromium CL: https://crrev.com/c/2835786
>
> Doc: https://docs.google.com/document/d/1zGG7-NZMb-aOfFfHf1u4VsP4C-lZettopCvYDC6pkBw/
> Bug: chromium:1200705
> Change-Id: I39b27f957cfb6d682ea84e385eaf25d09d261b58
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2835712
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74096}

Bug: chromium:1200705
Change-Id: Ic7f411f3c66dd33c1b021dab90f202b361ee85c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859953
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74350}
2021-05-04 10:38:06 +00:00
Jakob Gruber
bfc8950ef0 [compiler] Fix --stress-concurrent-inlining
.. when concurrent recompilation is disabled by indirect means, e.g.
when --trace-turbo-graph is enabled.

Drive-by: Add an explicit isolate argument to GetOptimizedCode.

Bug: chromium:1204624
Change-Id: Iee4c10e60643473dbbe2b777ea8dbc0bc259282c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2866767
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74349}
2021-05-04 09:24:04 +00:00
Wenyu Zhao
4484a80f08 [heap] Skip iterator check in HeapObjectIterator when using TPH
Bug: v8:11641
Change-Id: I8138b8bfca661749cd73fcaca759c2a854fc1ada
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2870205
Auto-Submit: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74348}
2021-05-04 09:19:24 +00:00
Andreas Haas
d36918bc9f [wasm] Make manoskouk and thibaudm full wasm owners
R=bbudge@chromium.org, clemensb@chromium.org, gdeepti@chromium.org, jkummerow@chromium.org, zhin@chromium.org, mslekova@chromium.org

Change-Id: I162e59b8b474d2189e3827472ac7b1a68d7de3e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867480
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74347}
2021-05-04 08:11:05 +00:00
Victor Gomes
fab276ea61 [runtime] Remove dead code: FeedbackNexus::GetTypeProfile
Change-Id: Ide2262b9d0d6a5269ed9bf6694c194aeba8da828
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867465
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74346}
2021-05-04 08:05:24 +00:00
Dominik Inführ
9b78e758af [heap] Make creation of NewSpace and NewLargeObjectSpace optional
Both NewSpace and NewLargeObjectSpace aren't used with
FLAG_single_generation enabled. So far both spaces still existed but
weren't used in this mode. This CL makes both spaces optional, which
ensure that we do not inadvertently create objects in them or use them
in any other way.

Bug: v8:11644
Change-Id: I52a449c62e9d3df126c95419433d2abbd75539a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862768
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74345}
2021-05-04 06:47:54 +00:00
Benedikt Meurer
3fa681db7a [liveedit] Reduce peak memory usage of text diffing.
The algorithm used to compute the textual differences uses requires
quadratic space (in the size of the input scripts). Previously the
implementation was naively allocating a single matrix, which is commonly
very sparse, since the expectation for LiveEdit is that only a small
portion of the script is actually altered. So we can use a std::map here
instead to reduce the cost.

We can also significantly reduce the cost (especially of the stack grow
due to the recursion) by precomputing the common prefix, and pre-filling
the table for the common suffix, both of which are also assumed to make
up for the majority of the script in case of LiveEdit.

This is still only ducktape, but should mitigate the crashes in the wild
significantly. Ideally we'd eventually replace this with an
implementation of the Myers algorithm that runs in linear space.

Fixed: chromium:1199807
Change-Id: Ib5fa0b1aa63c67631f919dc3b6641dfc0b20ae74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867470
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74344}
2021-05-04 05:01:14 +00:00
v8-ci-autoroll-builder
e98bc3f2e8 Update V8 DEPS.
Rolling v8/build: 3309cd8..153efb2

Rolling v8/buildtools: 5da6005..e72cd45

Rolling v8/third_party/aemu-linux-x64: IkJe_PGoF9FZE4NgmhuVPlSogmI0pgjjHezTAckYoEYC..Q9wrtYCFy4whHc75FrdwzygrqI5DSmX_tuj8UJUcrckC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/00b6eba..785c56f

Rolling v8/third_party/depot_tools: f663e54..0292793

Rolling v8/tools/clang: 7bc447f..84ada2d

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

Change-Id: I2668bd697a330723b215cb6daa626c17b368f63e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2870483
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@{#74343}
2021-05-04 03:46:12 +00:00
Shu-yu Guo
2391742099 [heap] Require shared RO heap when using shared Isolate
The only exception is when pointer compression is on with a per-Isolate
cage.

Bug: v8:11708
Change-Id: Ice9b0114bc102c20b4151ec66a861ba673934605
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2864563
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74342}
2021-05-04 00:57:22 +00:00
Omer Katz
39c43692c1 cppgc: Add AtomicCtorTag to Member types
AtomicCtorTag is needed by Blink to force atomic initialization of
members. This is used when reinitializing a member in a backing store.

Bug: chromium:1056170
Change-Id: I410766a9c9133a1f1c2ea2e1153cb1c61363459f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859944
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74341}
2021-05-03 20:31:12 +00:00
Andreas Haas
dc35435802 [wasm-api] Enable trap handler in c-api tests
Additionally a bug in the wasm-to-C wrapper got fixed, which caused
problems with the thread-in-wasm flag: An invalid effect-chain got
constructed. With the write of the thread-in-wasm flag not being
properly placed in the effect chain, the write got scheduled too late.

R=jkummerow@chromium.org

Bug: v8:11713
Change-Id: I351bf622081850b7b0c7aebfd798d1e73ae34a4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867468
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74340}
2021-05-03 19:48:22 +00:00
Michael Achenbach
f98f496f9e Revert "[wasm] Add PKU alloc/free and support counter"
This reverts commit a4c37558d1.

Reason for revert: Speculative revert.
Seems to break all gpu builders, e.g.:
https://ci.chromium.org/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20(NVIDIA)/14577

See shards for detailed output, e.g.:
https://chromium-swarm.appspot.com/task?id=534a8fbeaca4df10

Check failed: valid_arguments. V8.WasmMemoryProtectionKeysSupport

Original change's description:
> [wasm] Add PKU alloc/free and support counter
>
> To enforce W^X for the WebAssembly code space, we want to explore using
> Intel memory protection keys for userspace, also known as MPK, PKEYs, or
> PKU. Instead of flipping page protection flags with mprotect (which
> incurs a high syscall overhead; and which switches flags for the whole
> process), this associates a key with each page once, and then changes
> the permissions of that key with a fast thread-local register write.
> That is, this gives both finger-grained permissions (per-thread) and
> more performance.
>
> This CL is starts experimenting with PKUs by
> (1) trying to allocate a protection key once per {WasmEngine} in x64
> Linux systems, and
> (2) adding a counter for recording the sucess/failure of that, to assess
> the support for PKUs on the target machine.
>
> The low-level PKU allocating functions should be moved into base/platform
> long-term, but are inside wasm/ for this CL.
>
> R=​clemensb@chromium.org
> CC=​​jkummerow@chromium.org
>
> Bug: v8:11714
> Change-Id: Ia4858970ced4d0b84cc8c2651e86dceb532c88a7
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2850932
> Commit-Queue: Daniel Lehmann <dlehmann@google.com>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74319}

Bug: v8:11714
Change-Id: I70349d413ac9092e2f033d138887678bfecaae17
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2868607
Auto-Submit: Michael Achenbach <machenbach@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@{#74339}
2021-05-03 19:15:13 +00:00
Michael Achenbach
8f68f32fdb Reland "[compiler] Slightly generalize type assertions"
This reverts commit 6eee152b21.

Reason for revert: Revert causes more problems and build failures:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20debug%20builder/52914

Original change's description:
> Revert "[compiler] Slightly generalize type assertions"
>
> This reverts commit ccbfa9182b.
>
> Reason for revert: Speculative revert for:
> https://ci.chromium.org/p/v8/builders/ci/V8%20NumFuzz%20-%20debug/14050
>
> Original change's description:
> > [compiler] Slightly generalize type assertions
> >
> > ... to also apply to common integer bitset types.
> >
> > Bug: v8:11724
> > Change-Id: I41077488688e924e4235911d3a90e15044c229bd
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865747
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Auto-Submit: Georg Neis <neis@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#74330}
>
> Bug: v8:11724
> Change-Id: I52268d5d553ba271e0a383b6af89b971892a67da
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2868605
> Auto-Submit: Michael Achenbach <machenbach@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@{#74337}

Change-Id: I60eb5930c4c532fe52865b8e198bae8d08dec23b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:11724
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2868606
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74338}
2021-05-03 18:51:22 +00:00
Michael Achenbach
6eee152b21 Revert "[compiler] Slightly generalize type assertions"
This reverts commit ccbfa9182b.

Reason for revert: Speculative revert for:
https://ci.chromium.org/p/v8/builders/ci/V8%20NumFuzz%20-%20debug/14050

Original change's description:
> [compiler] Slightly generalize type assertions
>
> ... to also apply to common integer bitset types.
>
> Bug: v8:11724
> Change-Id: I41077488688e924e4235911d3a90e15044c229bd
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865747
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Auto-Submit: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74330}

Bug: v8:11724
Change-Id: I52268d5d553ba271e0a383b6af89b971892a67da
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2868605
Auto-Submit: Michael Achenbach <machenbach@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@{#74337}
2021-05-03 18:30:13 +00:00
Anton Bikineev
3a2575c270 Reland "cppgc: Try to fix test IteratePointersFindsCalleeSavedRegisters, vol.2"
Fix crash on Mac64 Debug build. The reason of the failure: misaligned
stack. Fix: apply attribute to force the stack be realigned.

Original description:
> The previous attempt has broken the tsan bot. The only reliable way to
> make sure that registers are not clobbered is by doing direct call from
> inline assembly, which is what this CL does.

> Change-Id: I6adbd5e735949a7cc4cc7fc686ee8c428863ffb9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859947
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74313}

Change-Id: I842d6876c2cf287cfe74e53e7cb45028dff61a56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865748
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74336}
2021-05-03 18:14:22 +00:00
Georg Neis
99f4bb8400 [compiler] Fix a DCHECK
The DCHECK was outdated since my last change.

Tbr: nicohartmann@chromium.org
Bug: chromium:1205054, v8:11724
Change-Id: If9dc9614f4cf298e1e29c74abcc1718886197db9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2868265
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74335}
2021-05-03 18:08:02 +00:00
Igor Sheludko
d570bbe0c7 [const-tracking] Generalize constness when delete properties
When fast deleting properties generalize all outgoing transitions
to mutable instead of generalizing when property is reconfigured.

Bug: chromium:1201938
Change-Id: I080f2f43de1691a742be2a2bec5cd20d02d78dbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859960
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74334}
2021-05-03 17:16:36 +00:00
Thibaud Michaud
620da72cef [wasm][eh] Make stack overflows uncatchable
R=jkummerow@chromium.org

Change-Id: Ibc772d81765e10331fa8753e8b7dfd3d18509819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859864
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74333}
2021-05-03 16:18:41 +00:00
Michael Lippautz
d6fa333dda cppgc: Replace SetUp/TearDown with ctor/dtor
Change-Id: I8a8ce7008887f807726ddafdbd8048b64e1e1b84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867472
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74332}
2021-05-03 16:17:36 +00:00
Thibaud Michaud
d4c3c1a5ea [cctest][wasm] Ensure FLAG_stack_size has an effect
Some cctests set the FLAG_stack_size in the TEST() macro which is run
after the cctest runner initializes the main isolate. The flag is only
used during isolate initialization, so this did not have any effect.

This fixes it by using the UNINITIALIZED_TEST() macro, creating the
isolate after setting the flag and passing it through to the WasmRunner.

See also https://crrev.com/c/2862778 which fixes JS cctests.

R=jkummerow@chromium.org

Change-Id: I46df22b80a283d93c48c1dbd250eb3e4ea5ad4a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865749
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74331}
2021-05-03 14:24:46 +00:00
Georg Neis
ccbfa9182b [compiler] Slightly generalize type assertions
... to also apply to common integer bitset types.

Bug: v8:11724
Change-Id: I41077488688e924e4235911d3a90e15044c229bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865747
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74330}
2021-05-03 14:20:56 +00:00
Camillo Bruni
5e29241db8 [tools][system-analyzer] Postpone updating collapsed panels
- Add CollapsableElement helper
- Collapse all panels by default
- Only update panels if they are opened
- Only update CodePanel Select element if the data has changed
- Fix focusing SourcePosition selection

Bug: v8:10644
Change-Id: Id9b5159e86623c7ca0f437dd9db6b0faff3ec573
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859952
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74329}
2021-05-03 14:14:46 +00:00
Nico Hartmann
c42a0c957e Revert "[elements] Avoid racy data reads/writes"
This reverts commit 296fa964fe.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Arm%20-%20debug/18616/overview

Original change's description:
> [elements] Avoid racy data reads/writes
>
> Instead of annotating those racy reads / writes to be ignore by TSan,
> just use relaxed atomics. This makes us not rely on undefined behaviour,
> and is unlikely to introduce noticeable overhead.
>
> This removes the only uses of TSAN_ANNOTATE_IGNORE_WRITES_BEGIN and
> friends, which allows us to remove the whole tsan.h header.
>
> R=​ulan@chromium.org
> CC=​​mlippautz@chromium.org
>
> Bug: v8:11704
> Change-Id: Ie6694c0ae5b40856b56fb97253ce626ec1f4c263
> 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/+/2859957
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74321}

Bug: v8:11704
Change-Id: Ia14b39eccfc02051728a562685a3a8eb8ffde4b6
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2867475
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74328}
2021-05-03 13:53:47 +00:00
Almothana Athamneh
b7325bedd0 [infra] split heap sandbox builders to builder tester pairs
Bug: v8:11694
Change-Id: I52e21a07b3a90d43d321fe9d680b129eb8f9aca7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2866770
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74327}
2021-05-03 13:34:26 +00:00
Camillo Bruni
fa4cb172cd [runtime] Fix Promise.all context promise hooks
We have to take the slow path in Promise.all if context promise hooks
are set. The fast-path doesn't create intermediate promises by default.

Bug: chromium:1204132, v8:11025
Change-Id: Ide92de00a4f6df05e0ddbc8814f6673bd667f426
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2866771
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74326}
2021-05-03 13:23:06 +00:00
Jakob Gruber
ca7f28527d [compiler] Introduce TryMakeRef/MakeRef factory functions
In the near future we'll have more cases where Ref construction is not
guaranteed to succeed. Currently, we don't have convenient patterns to
support optional construction. This CL adds the following helpers:

 base::Optional<FooRef> ref = TryMakeRef(broker, o);
 if (!ref.has_value()) return {};  // bailout
 // .. use ref.

Or, in the case where construction is guaranteed to succeed:

 FooRef ref = MakeRef(broker, o);
 // .. use ref.

Bug: v8:7790
Change-Id: I759235c314056c080d79ec413125d3957452c64c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859169
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74325}
2021-05-03 13:20:26 +00:00
Leszek Swirski
15803e5fa9 [test] Replace turboprop_as_toptier with always_sparkplug
In the 'extra' variant, replace turboprop_as_toptier (which is mostly
covered by turboprop) with always_sparkplug, to increase Sparkplug's
coverage on tests.

Bug: v8:11420
Change-Id: I43b7009d184a03cb163d78f1f8bd05233ef7c34e
Fixed: v8:11686
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862769
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74324}
2021-05-03 12:33:38 +00:00
Jakob Gruber
aa14ec7c64 [objects] Add Isolate* arg to JSObject::ForceSetPrototype
.. to avoid the GetIsolate() call.

Change-Id: Ia8bf7a4e835d681decbc3965b582c0e788472877
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2857639
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74323}
2021-05-03 11:38:58 +00:00
Jakob Gruber
eeb8428b52 [compiler] Make BigInts bg-serialized
BigInts are immutable after initialization, thus safe to access
concurrently if the Heap::IsPendingAllocation predicate returns false.

Bug: v8:7790
Change-Id: Icf3954b1e50af2132846eca5304c7947afb8f298
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2856535
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74322}
2021-05-03 11:30:33 +00:00
Clemens Backes
296fa964fe [elements] Avoid racy data reads/writes
Instead of annotating those racy reads / writes to be ignore by TSan,
just use relaxed atomics. This makes us not rely on undefined behaviour,
and is unlikely to introduce noticeable overhead.

This removes the only uses of TSAN_ANNOTATE_IGNORE_WRITES_BEGIN and
friends, which allows us to remove the whole tsan.h header.

R=ulan@chromium.org
CC=​mlippautz@chromium.org

Bug: v8:11704
Change-Id: Ie6694c0ae5b40856b56fb97253ce626ec1f4c263
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/+/2859957
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74321}
2021-05-03 11:29:28 +00:00
Michael Lippautz
995f122e13 cppgc-js: Fix MarkingVerifier
The marking verifier used to run on a different stack than the marker
which could lead to it finding more objects than the marker. Fix this
by recording a stack end from which the verification starts. This
ensures that the verifier only finds a subset of the objects that the
actual stack scan finds.

Bug: v8:11709
Change-Id: I44fe7b247e56e75deded45b64c25379f1ad9e381
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859848
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74320}
2021-05-03 10:36:18 +00:00
Daniel Lehmann
a4c37558d1 [wasm] Add PKU alloc/free and support counter
To enforce W^X for the WebAssembly code space, we want to explore using
Intel memory protection keys for userspace, also known as MPK, PKEYs, or
PKU. Instead of flipping page protection flags with mprotect (which
incurs a high syscall overhead; and which switches flags for the whole
process), this associates a key with each page once, and then changes
the permissions of that key with a fast thread-local register write.
That is, this gives both finger-grained permissions (per-thread) and
more performance.

This CL is starts experimenting with PKUs by
(1) trying to allocate a protection key once per {WasmEngine} in x64
Linux systems, and
(2) adding a counter for recording the sucess/failure of that, to assess
the support for PKUs on the target machine.

The low-level PKU allocating functions should be moved into base/platform
long-term, but are inside wasm/ for this CL.

R=clemensb@chromium.org
CC=​jkummerow@chromium.org

Bug: v8:11714
Change-Id: Ia4858970ced4d0b84cc8c2651e86dceb532c88a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2850932
Commit-Queue: Daniel Lehmann <dlehmann@google.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74319}
2021-05-03 09:57:48 +00:00
Jochen Eisinger
09479110a0 Add microtasks scope to FinalizationRegistryCleanupTask
This task calls through the V8 API, so it needs to create a microtasks
scope.

Bug: chromium:728583
Change-Id: I47108a64575f1bd670eaea6c8a06720dd4d5552c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865605
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74318}
2021-05-03 09:42:58 +00:00
Wenyu Zhao
7134d7f656 [test] Fix or skip CHECKs in tests for TPH
* Mostly are heap/space/page checks.

Bug: v8:11641
Change-Id: Ia1726f414109ac5e8a3bdb18ccaa46a63db6bc95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2849823
Commit-Queue: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74317}
2021-05-03 09:05:08 +00:00
Michael Achenbach
1a9c9f0fc0 [test] Stress concurrent inlining on numfuzz
This will give extra coverage of the mode on the numfuzz tsan bot.

No-Try: true
Bug: chromium:11655
Change-Id: Ifcc4ad304116fa1b0331cc48e41c07405193d514
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862809
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74316}
2021-05-03 06:45:13 +00:00
v8-ci-autoroll-builder
91a8494c32 Update V8 DEPS.
Rolling v8/build: d928fcd..3309cd8

Rolling v8/third_party/aemu-linux-x64: BGSmhPgYrPBnQ9dUEMh0QHNL988lWdkmpI87DIIfwkoC..IkJe_PGoF9FZE4NgmhuVPlSogmI0pgjjHezTAckYoEYC

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

Change-Id: I43457e9a36ca72417b75ff3e63003482530c6a7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865718
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@{#74315}
2021-05-03 06:44:08 +00:00
Michael Achenbach
a20d18f138 Revert "cppgc: Try to fix test IteratePointersFindsCalleeSavedRegisters, vol.2"
This reverts commit c4cb14c754.

Reason for revert:
https://ci.chromium.org/p/v8/builders/ci/V8%20Mac64%20-%20debug/33969

Original change's description:
> cppgc: Try to fix test IteratePointersFindsCalleeSavedRegisters, vol.2
>
> The previous attempt has broken the tsan bot. The only reliable way to
> make sure that registers are not clobbered is by doing direct call from
> inline assembly, which is what this CL does.
>
> Change-Id: I6adbd5e735949a7cc4cc7fc686ee8c428863ffb9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859947
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74313}

Change-Id: I00260aeacdac8704475b37fd99d4ef552c523249
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2865746
Auto-Submit: Michael Achenbach <machenbach@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@{#74314}
2021-05-03 06:17:09 +00:00
Anton Bikineev
c4cb14c754 cppgc: Try to fix test IteratePointersFindsCalleeSavedRegisters, vol.2
The previous attempt has broken the tsan bot. The only reliable way to
make sure that registers are not clobbered is by doing direct call from
inline assembly, which is what this CL does.

Change-Id: I6adbd5e735949a7cc4cc7fc686ee8c428863ffb9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859947
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74313}
2021-05-02 12:15:57 +00:00