Commit Graph

69725 Commits

Author SHA1 Message Date
Igor Sheludko
046b58d6e7 [ext-code-space] Migrate Baseline/InterpreterData's code fields to CodeT
This CL migrates BaselineData::baseline_code field and
InterpreterData::interpreter_trampoline field to CodeT.

Bug: v8:11880
Change-Id: Ibd202f0dcd4266e5b98aa5c46754ba8a4fadff43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968415
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75233}
2021-06-18 08:41:45 +00:00
Victor Gomes
8d24d68c32 [test262] Roll test262
Bug: v8:7834
Change-Id: I6ea4b67841104ba438b1b07b9e85bf955c152d34
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967465
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75232}
2021-06-18 08:36:43 +00:00
Maya Lekova
605c14dbac [test] Disable slow benchmark on TSAN
Bug: v8:11905
Change-Id: Ie43c7240383ceae522d715970615286aaeff7379
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2971744
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75231}
2021-06-18 08:02:22 +00:00
Daniel Lehmann
d0cfa6aab5 [wasm] Align different write protection scopes
Currently, we have two different classes for switching the WebAssembly
generated code space to writable (e.g., before patching jump tables, or
when adding or removing code): `CodeSpaceWriteScope` (with the macro
`CODE_SPACE_WRITE_SCOPE`) and `NativeModuleModificationScope`.
The former was introduced for Apple Silicon ARM64 hardware ("Apple M1"),
which uses `MAP_JIT` + `pthread_jit_write_protect_np()` to change memory
permissions. The latter uses either Intel PKU (aka. memory protection
keys) to switch permissions (fast and thread-local, like on M1), and
alternatively `mprotect()`, on systems that do not have PKU support.

Since both classes serve the same purpose just with different
implementations on different platforms, we want to merge them in
follow-up CLs. As a first step, here we align all uses of
`CODE_SPACE_WRITE_SCOPE` with existing `NativeModuleModificationScope`s.
The two had diverged due to optimization work, where we moved
`NativeModuleModificationScope`s around (pulling them out of loops and
across function boundaries) to lower the amount of mprotect switches.

This should have none, or at best a very small positive performance
impact on Apple M1, since we now also switch less often (even though
switching should be very cheap). In terms of security, this in theory
makes the code space writable for longer time spans, but this is
probably not a large effect because
(1) we often moved the scope outside of loops, where it was open for
every iteration anyway, or
(2) in some cases a CODE_SPACE_WRITE_SCOPE was open somewhere on the
call stack already.

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

Bug: v8:11714
Change-Id: Id8744429e1183e118ab5e078750d294a99c9dce0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968946
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Daniel Lehmann <dlehmann@google.com>
Cr-Commit-Position: refs/heads/master@{#75230}
2021-06-18 07:58:42 +00:00
v8-ci-autoroll-builder
f74e02becb Update V8 DEPS.
Rolling v8/build: 1a575de..11f1e3d

Rolling v8/third_party/aemu-linux-x64: D99f9rA6SsUg1U4VGdh-MSQQX94eeW2Mi8I_xw6-ccwC..R61GnhotR5EpRE5ZeVtRvIQPRz8z-LSXnxN1ighigqMC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/96bc38d..2573cff

Rolling v8/third_party/depot_tools: 74ef838..59140d4

Rolling v8/third_party/googletest/src: e2239ee..7153098

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

Change-Id: I0fafb6e0e25119a87669352d188850459c9ec8a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2970788
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@{#75229}
2021-06-18 03:41:42 +00:00
Frank Tang
dd8845cd74 [intl] Improve test coverage of "best fit" localeMatcher
https: //docs.google.com/document/d/1cPGfiihn76yj2iAomKcspPFyLLcnk3WkCiqceBQPQyk/edit#heading=h.cc9tt7s0iwsd
Bug: v8:7051
Change-Id: I8c35e859062c5bdb009334dd1b725751e6df2123
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965481
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75228}
2021-06-18 03:04:32 +00:00
Milad Fa
1fd74664a4 PPC/s390: [codegen] Save the full 128bit FP register for Push/PopCallerSaved
Note that `kFixedFrameSizeFromFp` is hard coded to include space
for Simd registers however it is only used when Wasm is
enabled so adding V8_ENABLE_WEBASSEMBLY guards under MultiPushF64AndV128
and MultiPushF64OrV128 will be safe, more detail are
in the comment section of this CL: https://crrev.com/c/2656857

Port b0eb59fb4b

Original Commit Message:

    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

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

Change-Id: Ica4230f31b207e5933ed5c891b091a2f32782284
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969823
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75227}
2021-06-17 19:00:11 +00:00
Igor Sheludko
8db8b6c2f5 [ext-code-space][wasm] Migrate code entries to CodeT in Wasm engine
Namely,
- WasmFunctionData::wrapper_code
- WasmJSFunctionData::wasm_to_js_wrapper_code
- exported JS-to-Wasm wrappers

Bug: v8:11880
Change-Id: I85f60daea22b8b1270f813f903ebdea1249b4de1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969826
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75226}
2021-06-17 18:10:31 +00:00
Igor Sheludko
39c1f718b5 [ext-code-space] Migrate JSRegExp code fields to CodeT
Bug: v8:11880
Change-Id: Idf23521d6cb1885922f92e1050937daa2d29acd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968409
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75225}
2021-06-17 17:37:01 +00:00
Camillo Bruni
899f4ccdae [tools][system-analyzer] Various fixes
- Add tests and fix Chunk calculations in Timeline class
- Cache DOM nodes directly as properties in TimelineTrackBase
- Keep track of last focused entry in timeline tracks and reuse it
  to position the tooltip when the view is locked

Bug: v8:10644
Change-Id: I356dcf7eed220df89f6a7ff926f00f78b119160e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968943
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75224}
2021-06-17 15:45:33 +00:00
Milad Fa
049760ec3b Revert "S390: fix byte count when pushing/popping doubles"
This reverts commit 9caf26b94c.

Reason for revert: Needed to be changed to kNumCallerSavedDoubles

Original change's description:
> S390: fix byte count when pushing/popping doubles
>
> `NumRegs` runs a `population count` and must be used with
> a `RegList` and not with a regular integer value.
>
> kCallerSavedDoubles is a regular integer and should be used as is.
>
> Change-Id: Id9535134ad4ea02bebed9b506012084d93acc2c2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965159
> Reviewed-by: Junliang Yan <junyan@redhat.com>
> Commit-Queue: Milad Fa <mfarazma@redhat.com>
> Cr-Commit-Position: refs/heads/master@{#75213}

Change-Id: Ifae6ee99b698f5a1f68a7c42cda1743fd1cbf0d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2969623
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75223}
2021-06-17 15:29:22 +00:00
Andreas Haas
4168661924 [wasm] Reenable externref globals inspector test
The test was a bit out-dated, the expected file did not match the test
or the data delivered by V8 anymore. However, all the expected data was
available, so I just adjusted the test accordingly.

R=clemensb@chromium.org

Bug: v8:10356
Change-Id: I1d94f2a295038a4320e07706d46258a278a6dee5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968410
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75222}
2021-06-17 15:27:31 +00:00
Maya Lekova
cb0b7eed47 [test] Mark a Wasm test as slow on TSAN
Bug: v8:11780
Change-Id: I646092d7e54893ff065db0cf1ce72533617ea38d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968408
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75221}
2021-06-17 15:17:51 +00:00
Toon Verwaest
a71ab76a60 [interpreter] Remove %_Call
This isn't used outside of tests, so let's just remove it.

Change-Id: I06b7ec11911fd8ebc3bbabcba16d0c2a3fafddab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968413
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75220}
2021-06-17 15:16:41 +00:00
Igor Sheludko
4c53593010 [ext-code-space][ic] Migrate IC handlers to CodeT
Bug: v8:11880
Change-Id: I08b9eb182a42ca612a60fdafc0a059f97a3f0d87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968411
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75219}
2021-06-17 14:55:31 +00:00
Andreas Haas
710b88ff35 [wasm] Add histogram for deserialization time
At the moment deserialization happens synchronously on the main thread.
This is fine at the moment because deserialization is fast. However,
future refactorings may affect deserialization time, and may force us
to deserialize in the background. This CL adds a timer to monitor
deserialization time, so that we get a signal if deserialization time
regresses.

R=clemensb@chromium.org

Bug: v8:11862
Change-Id: I18b52c19106b92158cd986492926a24d0d57e6ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966389
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75218}
2021-06-17 14:01:01 +00:00
Toon Verwaest
863a2d6c24 [interpreter] Remove unused interpreter intrinsics
This also removes intrinsics that were just used in tests. It keeps
InlineIncBlockCounter for now because it's a less straightforward.

Change-Id: I77e55d7a746294892d0fd7ab577ebf8eb42f1f08
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953195
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75217}
2021-06-17 13:43:41 +00:00
Dan Elphick
11f7e43833 [utils] Use new instead of NewArray in Vector
Replace all uses of NewArray/DeleteArray with new[]/delete[] in
utils/vector.h which allows removing the dependency on
utils/allocation.h.

As a result allocation failures here will not call
FatalProcessOutOfMemory any more, but it's likely it wouldn't have been
called anyway.

Also adds some missing includes that were being previously being brought
in via vector.h depending on allocation.h.

Bug: v8:11879
Change-Id: I5055b49fad0d06642a9bd3eebb93a6a0e4acca60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968405
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75216}
2021-06-17 13:37:41 +00:00
Dominik Inführ
37ecee6a42 [heap] Cache regular code object size
MemoryChunkLayout::MaxRegularCodeObjectSize() can be cached in a
global variable on process initialization. This should help to increase
code object allocation performance, since this method was called on
each code object allocation.

Bug: v8:11891
Change-Id: I870bd37202370aec89ef2db24264e363099bf8a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966387
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75215}
2021-06-17 13:35:21 +00:00
Thibaud Michaud
f420a26451 [wasm][eh] Add WebAssembly.Exception constructor
WebAssembly.Exception is the static representation of a wasm exception.
It holds the signature and the tag of the exception, can be imported and
exported from a wasm module, and will eventually allow inspecting a
wasm-thrown exception from JS.

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: Ided352777e1217e6f873b84a2fc21c3acf59ff6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966384
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75214}
2021-06-17 13:34:11 +00:00
Milad Fa
9caf26b94c S390: fix byte count when pushing/popping doubles
`NumRegs` runs a `population count` and must be used with
a `RegList` and not with a regular integer value.

kCallerSavedDoubles is a regular integer and should be used as is.

Change-Id: Id9535134ad4ea02bebed9b506012084d93acc2c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965159
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75213}
2021-06-17 13:05:41 +00:00
Igor Sheludko
603910ffe8 [wasm-gc][ic] Support more Wasm field types in LoadIC
Bug: v8:11804
Change-Id: Ief0ade232c4f120b62a6d83f75ed0095abbe797a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966388
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75212}
2021-06-17 12:35:51 +00:00
Lu Yahan
2dfe4236b5 [riscv64] Fix mjsunit/regexp-global fatal error
Change-Id: Ic36d34ca928b2dbc7427f60818dbd612b386e7a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967709
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#75211}
2021-06-17 11:56:31 +00:00
QiuJi
79b16f8254 [riscv64] Add riscv64 to the architecture list of js-perf-test
Change-Id: I541973c5b0570c1a1c23ce8e09cd20d3904df749
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966198
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#75210}
2021-06-17 11:46:21 +00:00
Mike Stanton
4d2869dc1f [compiler] Fix data race in JSObject::RawFastInobjectPropertyAtPut
Mark the write of the property as relaxed atomic. The compiler thread
is examining the value. It is fine if the value is stale or new, we
simply need to let TSAN know we are aware of the race.

BUG=v8:11896

Change-Id: I42505a6e12c7eb3c1ef8d9376d7a420567646d62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968403
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75209}
2021-06-17 11:43:51 +00:00
Mike Stanton
52b6258645 [compiler] Fix data race in PropertyArray length and hash
The PropertyArray may store the hash of it's parent object. This hash
can be installed at various points. Meanwhile, the background compiler
thread inspects the length field.

BUG=chromium:1220974

Change-Id: I7b13fd4546fb48e649fcbf67dee02d7c668393f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967471
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75208}
2021-06-17 11:38:51 +00:00
Igor Sheludko
c49bd06876 [ext-code-space][x64] Migrate JSFunction::code field to CodeT
This CL adds
- CodeT type - an alias for CodeDataContainer or Code depending on
  whether the v8_enable_external_code_space is enabled or not,
- a set of conversion functions from CodeT to Code or CodeDataContainer
  and back (both in C++ and CodeStubAssembler),
- masm support for calling/tailcalling via CallDataContainer which
  contain the code entry point address,
- masm support for calling/tailcalling via CodeT.

Bug: v8:11880
Change-Id: Ib36f4c6db69ec49aaea29412647e59ada95da19b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967463
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75207}
2021-06-17 10:15:32 +00:00
Victor Gomes
c5d49a57b2 [bazel] Adds new bigint files
Bug: v8:11234
Change-Id: I5fa2d97e01df25171c2a80aafb265b508176b334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967470
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75206}
2021-06-17 10:05:21 +00:00
Victor Gomes
a6cc119c92 [bazel] Add bazel files to watchlist
Bug: v8:11234
Change-Id: I6b3d3a72ad272b8b98e58c0de02b6a9b3dcfb5a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967466
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75205}
2021-06-17 09:26:11 +00:00
Santiago Aboy Solanes
26652d27fd [compiler] Add TSAN support for generated code movl and movq
This finishes the TSAN support for loads as we do not use movb or movw
to load from memory

Bug: v8:7790, v8:11600
Change-Id: I3c319da95c24cfa03f4de2367e007fd4cf7dd355
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953321
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75204}
2021-06-17 08:46:41 +00:00
Sigurd Schneider
0fe26ef950 Expose WeakMap::Delete on debug interface
Bug: chromium:1213393
Change-Id: I100c5caba38cab3a1ef9511125937ef7b34d818f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966381
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75203}
2021-06-17 08:38:11 +00:00
Camillo Bruni
a117f6657a [compiler] Turn InstructionBlock bool members into bitfield
Change-Id: I19b06e8590e7555e64b3ad59b2f0defe504f87ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2933502
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75202}
2021-06-17 08:33:01 +00:00
Sigurd Schneider
60dfa4de6b Use vanilla context for exception meta data
Bug: chromium:1213393, chromium:1218340
Change-Id: Icde33c97d39a3504ca2ab8290ec2f0b0d923060d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953194
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75201}
2021-06-17 08:25:21 +00:00
Victor Gomes
80f204a6ee [bazel] Add v8_enable_webassembly
Adds support to webassembly and enables it by default.
Adds wee8 target.

We can compile without wasm with:
`bazel build :d8 --no//:v8_enable_webassembly`

Bug: v8:11234
Change-Id: I90b11eb71aed808005b66e40e37894616d8b1658
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960803
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75200}
2021-06-17 08:09:26 +00:00
Lu Yahan
239898ef8c [riscv64] Fix node.js build failed
Change-Id: I0a614fa6c381770f56037f0401db008a37c71dca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966209
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#75199}
2021-06-17 08:08:21 +00:00
Adam Kallai
866ebed4f3 Fix the build on Windows on ARM
Adopt Windows ARM64 related source to Builtin changes:
https://chromium-review.googlesource.com/c/v8/v8/+/2949104

Bug: v8:11892
Change-Id: I267aac720c832ce11ce2708a92e212241b368ee6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964605
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75198}
2021-06-17 07:32:30 +00:00
Paolo Severini
9fa7ce514e [turbofan] Fix iterator-generator issue with --turbo-optimize-apply
Fuzzing found a problem with --turbo-optimize-apply when the
Array.prototype iterator is replaced with a generator function.
We can the issue by installing a protector on the array iterator.

This CL also defines the --turbo-optimize-apply as 'future' to get
more test coverage.

Bug: v8:9974
Change-Id: Id5bc68fde98ea5d1f6a951c4381ca6283b892632
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966058
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75197}
2021-06-17 06:40:30 +00:00
Maya Lekova
2b552bff3d [test] Disable slow intl test on TSAN
Bug: v8:11898
Change-Id: If0e3c21a2b1b84ae81ac962417cdf91ca78a95c6
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967464
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75196}
2021-06-17 06:33:35 +00:00
v8-ci-autoroll-builder
7cea6a6a4b Update V8 DEPS.
Rolling v8/build: bc21621..1a575de

Rolling v8/buildtools: be7dcbc..466954e

Rolling v8/buildtools/linux64: git_revision:72d5a6e15d868abc8451fe0a3b6596e86a2ffc40..git_revision:d2dce7523036ed7c55fbb8d2f272ab3720d5cf34

Rolling v8/buildtools/third_party/libunwind/trunk: 7e85c7a..a38ef11

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6434229..96bc38d

Rolling v8/third_party/depot_tools: e319aba..74ef838

Rolling v8/tools/clang: c6949cb..66b4484

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

Change-Id: Ica54fc71a73e1ae7ff791fadde4fe7f402416205
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967749
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@{#75195}
2021-06-17 06:32:30 +00:00
Frank Tang
f8a40f6d27 [intl] Ship "best fit" LocaleMatcher for m93
LGTM1 Mike West mkwst@chromium.org
LGTM2 Chris Harrelson chrishtr@chromium.org
LGTM3 Yoav Weiss yoavweiss@chromium.org

Design Doc:
https://docs.google.com/document/d/1cPGfiihn76yj2iAomKcspPFyLLcnk3WkCiqceBQPQyk
R2T: https://groups.google.com/a/chromium.org/g/blink-dev/c/W7TcX1tSHDI/m/1AthUhEWBAAJ
I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/TpAvyXwHM_c/m/QXJKbClfAwAJ
Stage in m92 Canary 92 92.0.4500.0 Dev 92 92.0.4503.3 Beta 92 92.0.4515.40
https://chromiumdash.appspot.com/commit/eb6482784ca71d3b22db449fd941bfa9872d244a


Bug: v8:7051, v8:11868, v8:11869
Change-Id: Id1ae20234b764e6f6def83af651daf70056d0725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2950559
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75194}
2021-06-16 23:15:32 +00:00
Andrew Comminos
9cd0b56397 [cpu-profiler] Reland reference counting for code entries
To enable deallocation of CodeEntry objects after they're no longer
being referenced by an active profile or alive on the heap, replace the
|used| bit with a proper reference count maintained by a CodeMap.

Bug: v8:11054
Change-Id: I3016cdbcbd1b4e8a26c3b1689e968cb2eef8e6d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965493
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#75193}
2021-06-16 18:19:50 +00:00
Milad Fa
0e45107416 PPC/s390: [masm] Read builtin off builtin_entry_table rather than EmbeddedData...
Port c7949470f8

Original Commit Message:

    ... when we do have an isolate. This is a little leaner.

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

Change-Id: Ifd466b48f4f7a909d00fc32304f90ebd19e93110
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965156
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75192}
2021-06-16 16:31:10 +00:00
Clemens Backes
af7ae7882d [wasm] Remove wrong DCHECK
Empty function bodies can actually reach the compiler. We could prevent
this by making this a decoder error instead, but that would be a
redundant check, so we should just remove the DCHECK instead.

R=ahaas@chromium.org

Bug: chromium:1219898
Change-Id: Ie1bed30cee44be9ac42b5f5f980a122c8dc8b2ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966385
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75191}
2021-06-16 16:07:10 +00:00
Frank Tang
0690a6bda7 Call uloc_toUnicodeLocaleType to convert key
Add tests for Intl Locale Info API to ensure the return items fit the
type definition in UTS35

Bug: v8:11887
Change-Id: Ie92d80518909df9472ffd887800832a656807b5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964597
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75190}
2021-06-16 16:05:50 +00:00
Michael Lippautz
6169cbf5fe cppgc: Unpoison live object before compaction
The object may have been poisoned again between marking and compaction
through executing pre-finalizers or custom weakness handling of
related objects.

Bug: chromium:1220666, chromium:1056170
Change-Id: Ibba4b42852a2921640d6f3ded473521febb2114f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966386
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75189}
2021-06-16 15:54:27 +00:00
Milad Fa
df9126336d PPC/S390: Introduce MultiPush/Pop of doubles and/or Simd registers
When pushing/popping registers, we need a way in PPC and S390
to detect if Simd registers need to be pushed or not.

On PPC Simd registers are separate from FP registers, hence we
need to push them both. If Simd is not available then we push
an empty space in place of Simd registers.

On S390 the Simd and FP registers are shared. If Simd is available
then we only push them and not the FPs, else we push FP registers
as well as an empty space the size of FPs as the stack needs to look
like as if Simds were saved too.

We also need to check if we are generating builtins or
call is being made at runtime. We cannot use `SupportsWasmSimd128`
when generating builtin as `CpuFeatures` are turned off, so we need
to emit the `if/else` manually for checking the value of
`SupportsWasmSimd128`.


Change-Id: Id149c6578db9c2f92d903fd871d85c648d43ce70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2958963
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75188}
2021-06-16 15:39:18 +00:00
Manos Koukoutos
2b0b06f350 [wasm-gc] Improve error message for object allocators
Bug: v8:7748
Change-Id: I4382c73bf089672ab9f054754a87e27b51478b86
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964602
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75187}
2021-06-16 15:12:27 +00:00
Mike Stanton
d7f30b1711 [Compiler] Support concurrent read of const fast properties
In heap-refs.cc, GetOwnFastDataPropertyFromHeap() bottlenecks reading
a fast property. To make it safe to use from the background thread we
need to verify the object didn't shrink, and risk an out of heap
bounds read.

Bug: v8:7790
Change-Id: Idebbe0ffea089bf2a70aa7d611618430169082fd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928185
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75186}
2021-06-16 14:50:47 +00:00
Dominik Inführ
e1d12c581e [heap] Remove unprotected_memory_chunks_mutex_
This mutex wasn't really used anymore. This should also speed up
code object allocation a bit.

Bug: v8:11888
Change-Id: I8ddc2ecc1aec74e8eb3e2d4b96354c50f3bff350
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966382
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75185}
2021-06-16 14:42:28 +00:00
Seth Brenith
6b158455f4 [torque] Emit an error if a macro recursively calls itself
Rather than letting a recursive macro expansion cause a stack overflow
and crash the compiler, this change updates Torque to emit an error as
soon as the recursion is detected. Eventually it would be nice to make
Cast macros a little more magical so they don't require so much human
effort to maintain, but at least this way Torque displays some
information about what went wrong. An example error message (manually
wrapped to 72 character width) follows.

src/builtins/cast.tq:157:10: Torque Error: Recursive macro call to
  callable Cast<(class Context | Undefined | Zero)>(implicit class
  Context)(Object): (class Context | Undefined | Zero)
src/builtins/cast.tq:758:3: Torque Error: Note: in specialization
  Cast<(class Context | Undefined | Zero)> requested here
src/builtins/cast.tq:764:10: Torque Error: Note: in specialization
  Is<(class Context | Undefined | Zero), Object> requested here
src/builtins/torque-internal.tq:64:3: Torque Error: Note: in
  specialization UnsafeCast<(class Context | Undefined | Zero)>
  requested here
src/objects/contexts.tq:75:10: Torque Error: Note: in specialization
  ReferenceCast<(class Context | Undefined | Zero), Object> requested
  here
src/builtins/iterator.tq:142:16: Torque Error: Note: in specialization
  ContextSlot<class Context, class Context, (class Context | Undefined |
  Zero)> requested here

Bug: v8:11727
Change-Id: I7b5b1852dee16a6860f593f27783f6b2d9366146
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965032
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#75184}
2021-06-16 14:37:07 +00:00