Commit Graph

71146 Commits

Author SHA1 Message Date
Camillo Bruni
48ed752ac5 Revert "[codegen] Disable host-defined options checks in cache"
This reverts commit 810d34dfe6.

Reason for revert: The stricter host checks prevent
certain security issues. We will have to live with regressions
until we have a more flexible caching solution in place.

Original change's description:
> [codegen] Disable host-defined options checks in cache
>
> We see too many regressions for now in M94 (~10% more misses in
> some cases).
>
> This CL reverts the logic to the state before landing
> https://crrev.com/c/3069152 without having to revert the several
> refactoring CLs that landed on top of it.
>
> Bug: v8:10284, chromium:1238312, chromium:1237242
> Change-Id: I57e66b9e0d58c36d2f1563b07720e3729c88ec94
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3103006
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76362}

Bug: v8:10284, chromium:1238312, chromium:1237242
Change-Id: I4c662dd0ac16a4406f06fb2a62b9e4e65fa428ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114057
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76504}
2021-08-26 13:02:23 +00:00
Michael Lippautz
f4fb979b27 heap: ArrayBufferSweeper: Fix freed counter overflow
The array buffer sweeper has its own freed counter which is migrated
back to a global counter. There exist two paths for finalizing array
buffer sweeping which both need to merge back the counters. If we miss
out on merging back the counter, the freed counter may overflow in the
next cycle.

Bug: chromium:1241332
Change-Id: Ic985f72414198de2eaf900b8e2e9b39bed24d87e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3121905
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76503}
2021-08-26 12:18:00 +00:00
Jakob Gruber
a56874d3eb [regexp] Early errors 🤯
This CL implements early SyntaxErrors for regular expressions. Early
errors are thrown when a malformed pattern is parsed, rather than when
the code first runs.

We do this by having the JS parser call into the regexp parser when
a regexp pattern is found. Regexps are expected to be relatively
rare, small, and cheap to parse - that's why we currently accept that
the regexp parser does unnecessary work (e.g. creating the AST
structures).

If needed, we can optimize in the future. Ideas:

- Split up the regexp parser to avoid useless work for syntax validation.
- Preserve parser results to avoid reparsing later.

Bug: v8:896
Change-Id: I3d1ec18c980ba94439576ac3764138552418b85d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3106647
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76502}
2021-08-26 11:33:39 +00:00
Joyee Cheung
862391b909 [class] add microbenchmark for evaluating classes with fields
Taken from https://chromium-review.googlesource.com/c/v8/v8/+/2944249

Bug: v8:10793
Change-Id: I7bd0ed9b4af48d3cade6cd98b49a1733f3101da3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3105650
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#76501}
2021-08-26 10:07:59 +00:00
QiuJi
ba9ccd972e [riscv64] Fix of accidently sampled corrupt stack frame by cpu-profiler
Bug: v8:12144
Change-Id: I19821db79a6a4453ad2120450b5f7b247599f276
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118554
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#76500}
2021-08-26 08:36:47 +00:00
Anton Bikineev
454272dfca cppgc: Check poisoness only on 64bit archs.
On 64bit we guarantee that object alignment and sizes are multiple of
the default shadow memory granularity (8 bytes). The CL also introduces
CHECKs that the assumption holds.

Having kObjectAlignment be multiple of this granularity allows us to
check poisoness of each byte of an object. On 32bit we can not do that,
since the object alignment requirement is 4 bytes.

Bug: chromium:1241514
Change-Id: Ib19667724adaa7bc791ffa054eea618c365d65cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118552
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76499}
2021-08-26 08:35:43 +00:00
Lu Yahan
c16c682e3a [riscv64][builtins] Clear c_entry_fp when entering JS and at exception path
Port: 07b03b8353

Bug: v8:10026
Change-Id: I4d7dc0fef98aa1754d3aea1d0f5d13b9bad9d645
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118615
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/main@{#76498}
2021-08-26 08:09:20 +00:00
Anton Bikineev
a936be5721 cppgc: Fix NoSanitizeMemset
'volatile Address' is a volatile pointer to non-volatile memory, which
means that writes to dereferenced memory may still be omitted. The CL
fixes it by treating dereferenced memory as volatile.

Change-Id: Ide4949c317467cb4440f98a1114991a102577e00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118946
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76497}
2021-08-26 07:51:00 +00:00
Ng Zhi An
7daa04d879 [compiler] Remove unreachable code
This should be the last remaining thing that fails the
-Wunreachable-code-aggressive warning.

Currently V8 DEPS update is failing due to the update containing
https://crrev.com/c/3115354, with this, the update should then be fine.

Bug: chromium:1066980
Change-Id: Ic74b3a95f90204333b0724d30463c6953047e5f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3119999
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76496}
2021-08-26 00:42:13 +00:00
Ng Zhi An
593ab78f7c [wasm-simd] Share i32x4.trunc_sat_f64x2 s,u zero implementation
Bug: v8:11589
Change-Id: I7b55efa76f60eacf31700a544f54042eec963f57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3115545
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76495}
2021-08-25 23:10:59 +00:00
Ng Zhi An
c604dcb57b [wasm-simd] Share f64x2.convert_low_i32x4_u implementation
We create a ExternalReferenceAsOperand helper function in
SharedTurboAssemblerBase that delegates to the actual arch specific
implementation of TurboAssembler, because the ia32 and x64
ExternalReferenceAsOperand differs slightly in their implementation.

Bug: v8:11589
Change-Id: I378ea6b72fb2bba1a37482cc31cd58db0ba35721
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114604
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76494}
2021-08-25 19:13:46 +00:00
Michael Lippautz
3161d6786a Reland "cppgc: Fix CTP for destruction""
This avoids a benign race in setting the raw pointer inside CTP
destructor by not emitting the write at all. The handle is destructed
which means that we only need to destroy any backing node but may
leave the handle untouched.

Drive-by:
- Add a few more docs.
- Make Clear() thread-safe.
- Make assignment of a sentinel pointer thread-safe.
- Make assignment of a nullptr thread-safe.

Depends on the Blink change: https://crrev.com/c/3116259

Bug: chromium:1242795, chromium:1243350
Change-Id: I8d76da30893c165e3946322b6d02f6ea2c8e529e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114064
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76493}
2021-08-25 18:45:56 +00:00
Ng Zhi An
9c1d42d3dc [fuzzer] Use new d8.file.execute API in generated test case
This function was added (and tests updated) in
https://crrev.com/c/2928505.

Change-Id: I8e5ab63a832e5689811b09ab624e7f88b1c449b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116116
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76492}
2021-08-25 15:59:05 +00:00
Sami Kyostila
c493978853 tracing: Disable system instrumentation tracing when using Perfetto
Disable the system instrumentation tracing feature when Perfetto is
used as a tracing mechanism. This is because with Perfetto, trace events
no longer flow through the legacy TRACE_EVENT macro mechanism and thus
can't be intercepted by v8::platform::tracing::Recorder.

Perfetto has an interceptor API[1] for this purpose, but the existing
Recorders first need to be ported to it.

[1] https://perfetto.dev/docs/instrumentation/interceptors

Change-Id: I3d10b3470ae45a4c8aedd8e128369508a462cd27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118546
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76491}
2021-08-25 15:29:16 +00:00
Milad Fa
3489bdf8d1 S390 [simd]: Implement vector load and splat
This CL takes advantage of the z15 `load reverse and replicate`
instruction to optimize Simd LoadSplat opcodes.

On the simulator we only run `load replicate` as reversing is
not required.

We will need to implement the rest of the `load transform` ops
before enabling this from wasm-compiler on BE machines.

Change-Id: I81ffedf51c3d35dbbc2a6455a2756cad25434127
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3115142
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76490}
2021-08-25 15:27:36 +00:00
Jakob Kummerow
409e02c1dd [wasm-gc] Experiment: non-validated non-nullable locals
This introduces a new flag, --experimental-wasm-unsafe-nn-locals, which
allows arbitrary unvalidated local.get operations on non-nullable
locals.
For invalid accesses, this will crash. The intention is to allow module
producers to experiment; if they find these locals particularly useful,
we will add engine-side validation later.

Bug: v8:7748
Change-Id: I9a05747eaff312448ce0acf57a412e76679ff061
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110192
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76489}
2021-08-25 14:03:37 +00:00
Leszek Swirski
1acb1cd9ba Revert "[codegen] Align the code start at 64 byte in x64"
This reverts commit 40af03b8c3.

Reason for revert: Breaks on win https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20debug/39151/overview

Original change's description:
> [codegen] Align the code start at 64 byte in x64
>
> In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte.
>
> Bug: chromium:1231471
> Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
> Cr-Commit-Position: refs/heads/main@{#76484}

Bug: chromium:1231471
Change-Id: I93ad896d40e8bb906a05eab8e03980ce2061b9c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118005
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@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/main@{#76488}
2021-08-25 12:26:38 +00:00
Mythri A
d7d5b448ee [sparkplug] Enable baseline code flushing in --future
Bug: v8:11947
Change-Id: I89d97feba5e13577a768675122173b65af207dcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060479
Auto-Submit: Mythri Alle <mythria@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76487}
2021-08-25 12:25:36 +00:00
Samuel Groß
e84ac8bc3b [sandbox] Disallow ArrayBuffers outside the VM Cage
In a follow-up CL, the backing stores will, when the sandbox is enabled,
be referenced from V8 objects through offsets rather than raw pointers.
For that to work, all backing stores must be located inside the virtual
memory cage. This CL prepares for that.

Bug: chromium:1218005
Change-Id: Ibb989626ed7094bd4f02ca15464539f4e2bda90f
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114136
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76486}
2021-08-25 09:52:38 +00:00
Leszek Swirski
9a54cc55c7 [interpreter] Port GetDispatchCountersObject to internal
Make the GetDispatchCountersObject function return an internal Handle
rather than an API Local. Also, port its implementation to use internal
methods rather than API methods.

Change-Id: I191e0483263009c835c801462822e4fc7e78680e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110198
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76485}
2021-08-25 09:50:51 +00:00
Hao Xu
40af03b8c3 [codegen] Align the code start at 64 byte in x64
In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte.

Bug: chromium:1231471
Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#76484}
2021-08-25 09:11:59 +00:00
Mythri A
9ec7089687 lazy-feedback-allocation conflicts with stress-concurrent-inlining
stress-concurrent-inlining has a negative implication for
lazy-feedback-allocation. So add lazy-feedback-allocation as
incompatible flag with stress-concurrent-inlining.

Bug: v8:12088, v8:11947
Change-Id: Ia8ff66c595f6c6288b44f7a066729ace0d7ad9d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113630
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76483}
2021-08-25 08:58:55 +00:00
Michael Achenbach
8ab11efbd5 Revert "cppgc: Fix CTP for destruction"
This reverts commit 5a6c7dee4e.

Reason for revert: Speculative: Lots of Chrome crashes:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Blink%20Linux/13353/overview

Original change's description:
> cppgc: Fix CTP for destruction
>
> This avoids a benign race in setting the raw pointer inside CTP
> destructor by not emitting the write at all. The handle is destructed
> which means that we only need to destroy any backing node but may
> leave the handle untouched.
>
> Drive-by:
> - Add a few more docs.
> - Make Clear() thread-safe.
> - Make assignment of a sentinel pointer thread-safe.
> - Make assignment of a nullptr thread-safe.
>
> Bug: chromium:1242795
> Change-Id: I0d9dafa31c298053e87ba1eb75f99fa6e33fa10b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114134
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76455}

Bug: chromium:1242795
Change-Id: Ia96d66f4908894091a4e498116d9568bd7b0e0a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114058
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76482}
2021-08-25 08:50:16 +00:00
Samuel Groß
e821cc7a50 Fix name collision of v8::internal::IsolateData
The v8::internal::IsolateData class in test/inspector/isolate-data.h
collides with v8::internal::IsolateData defined in
src/execution/isolate-data.h. In some circumstances, this can lead to
compilation or runtime issues. To fix that, this CL renames the class in
test/inspector to InspectorIsolateData.

Change-Id: I4b62b2a9d141169480c5a0591c1bcb2f275f87f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116248
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76481}
2021-08-25 08:45:53 +00:00
Michael Lippautz
ef84e57e1d cppgc: Prohibit Oilpan usage from within V8
Until setup and general API direction are clear no C++ types should be
GCed.

Bug: chromium:1056170
Change-Id: I9d51e57065b22f025898114d20887166ef756319
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116256
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76480}
2021-08-25 08:24:33 +00:00
Peter Kasting
899f624500 Fix an instance of -Wdeprecated-copy.
Bug: chromium:1235909
Change-Id: I1eb320bafb276ff093a4f0d6b184fe77607c4678
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116887
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76479}
2021-08-25 07:41:34 +00:00
v8-ci-autoroll-builder
869dafd450 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: e7fa637..2b09332

replace #warning with #pragma message  (#1216) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/2b09332

force cmake version to 3.5.1 (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/04c4666

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

Change-Id: I2ce53b2f649834f75b079de206a990117b43cebc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3117090
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/main@{#76478}
2021-08-25 05:43:53 +00:00
Lu Yahan
d4f3182a98 [riscv64] riscv64 do not support Simd instructions
Change-Id: Idcb4f6263ff20866c166e44c33de1a37c4b6b896
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3115743
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76477}
2021-08-25 05:41:44 +00:00
Ng Zhi An
c282e8ef45 [ia32] Merge some SSE/AVX i32x4, i16x8, i8x16 ops
These instructions are all single instruction lowering, so it's a matter
of changing the code-gen to call macro-assembler functions (that will do
the AVX check).

Bug: v8:11217
Change-Id: I472eacf74933f4b504299fc85f63fd07062db320
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114602
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76476}
2021-08-24 23:27:53 +00:00
Ng Zhi An
5e80730fb6 [wasm-simd] Share i16x8.q15mulr_sat_s implementation
Bug: v8:11589
Change-Id: Ie51cfd6cd6315f7f14f0c584f190a478ed565b0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114603
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76475}
2021-08-24 23:09:15 +00:00
Ng Zhi An
b415fa3824 [ia32] Merge some SSE/AVX i32x4 and f32x4 ops
We also set these operations to explicitly require Register for the
second operand (rhs) even if AVX is supported. Although AVX instructions
support unaligned operands, there is potentially a performance hit,
especially on older hardware. This matches the x64 instruction selector
as well.

Bug: v8:11217
Change-Id: Iae11ec23cc607842a034250028f7667fb2fcb0d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114601
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76474}
2021-08-24 21:51:33 +00:00
Ng Zhi An
5d38a300f5 [ia32] Merge SSE/AVX float32/float64 abs neg
This removes 4 arch opcodes.

Bug: v8:11217
Change-Id: Idff04fb205c7d7d1577ce123cc2160d678dfe39a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114599
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76473}
2021-08-24 21:34:16 +00:00
Shu-yu Guo
c6c2629998 Revert "heap: Use generic flags for main-thread only flags"
This reverts commit 2a8e2a9b98.

Reason for revert: Linking error on UBSan https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20UBSan%20-%20release%20builder/17755/overview

Original change's description:
> heap: Use generic flags for main-thread only flags
>
> BasicMemoryChunk flags should only be mutated from the main thread
> when no concurrent task can access them. For that purpose it is enough
> to use regular non-atomic flags as they are immutable while the GC is
> running.
>
> Change-Id: I0a9f8ecb2eb2aafaf17e77626ae27604abd1b618
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107230
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76471}

Change-Id: I5da7dff91549fd4aadd0bc9ae0a29c52748d9dcb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116810
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76472}
2021-08-24 21:33:14 +00:00
Michael Lippautz
2a8e2a9b98 heap: Use generic flags for main-thread only flags
BasicMemoryChunk flags should only be mutated from the main thread
when no concurrent task can access them. For that purpose it is enough
to use regular non-atomic flags as they are immutable while the GC is
running.

Change-Id: I0a9f8ecb2eb2aafaf17e77626ae27604abd1b618
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3107230
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76471}
2021-08-24 21:16:28 +00:00
Shu-yu Guo
c8c7bae07e Revert "[cleanup] Remove harmony-intl-dateformat-day-period"
This reverts commit 5e041b8269.

Reason for revert: Mysterious breakage of SIMD tests: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/41767/overview

Original change's description:
> [cleanup] Remove harmony-intl-dateformat-day-period
>
> harmony-intl-dateformat-day-period is shipped in M92
>
> Bug: v8:12109
> Change-Id: I7d24463c0cc353c4baf52326159beb04592b81b5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099087
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76468}

Bug: v8:12109
Change-Id: If7f32c650dc88bf6280573db9d6e42f89277778e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116806
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#76470}
2021-08-24 21:12:30 +00:00
Ng Zhi An
ce81469297 Add class template SharedTurboAssemblerBase as a base class
Previously SharedTurboAssembler was a base class for ia32 and x64
TurboAssembler. This made it easy to share code, only if the
implementation was the same. In some cases, like
ExternalReferenceAsOperand, the implementation defers slightly between
the two architectures.

We add a new class template SharedTurboAssemblerBase,
which derives from SharedTurboAssembler. Using the CRTP pattern, we
can call derived classes functions using the template parameter.
For any function that is exactly the same, we can declare them in
the header and define them in the cc file, instead of inlining
them all into the header.

Bug: v8:11589
Change-Id: I9319bd0c26c76995cef43ae5ec3f69392b3f825b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097109
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76469}
2021-08-24 20:51:25 +00:00
Frank Tang
5e041b8269 [cleanup] Remove harmony-intl-dateformat-day-period
harmony-intl-dateformat-day-period is shipped in M92

Bug: v8:12109
Change-Id: I7d24463c0cc353c4baf52326159beb04592b81b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099087
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76468}
2021-08-24 20:32:53 +00:00
Michael Lippautz
79a07d9187 cppgc-js: Allow custom OOM handling and redirect to V8 handler
Sets up custom OOM handling in cppgc and installs a handler that
redirects to V8's handler when running with unified heap.

Bug: chromium:1242180
Change-Id: I68b7038a3736cc0aa92207db2c3d129a9ff68091
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116253
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76467}
2021-08-24 20:21:28 +00:00
Ng Zhi An
56090f1b59 [wasm-simd][x64][ia32] Fix I64x2ShrS
We were overwriting the shift Register, instead, we should be using the
tmp_shift register.

Bug: chromium:1242689
Change-Id: I732c9c1f8a43401ce003b22893db9e39dfac3817
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116115
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76466}
2021-08-24 19:04:43 +00:00
Frank Tang
dabe7e9fac [Intl] Stage Intl Enumeration API
Stage 3 proposal

flag --harmony_intl_enumeration

Spec: https://tc39.es/proposal-intl-enumeration/
I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/Txtf_rSqGH8/m/e27FY33JAQAJ
Design Doc: https://docs.google.com/document/d/1lbj_YVW-xhzYNMQeHB-qDjVkf4SA-eTHYpYXx3Oaud8
https://chromestatus.com/guide/edit/5649454590853120

Bug: v8:10743
Change-Id: I0c0b8ccb8e1f143b75f6f3f4128bdfe350d299de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099086
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76465}
2021-08-24 18:03:03 +00:00
Liviu Rau
f733008ed6 Make autoroll account owner of auto-updated file
Relanding https://crrev.com/c/3071212

Bug: v8:12049
Change-Id: If7bb3f9f6d9da05eee3d3e8ec355bc9d4e987ea3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3116251
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76464}
2021-08-24 15:05:13 +00:00
Igor Sheludko
a0ef75240f [csa] Let CreateShallowObjectLiteral allocate objects in LO space
... when necessary and drop the now unused flag
ExtractFixedArrayFlag::kNewSpaceAllocationOnly.

Bug: chromium:1239922
Change-Id: Ic68d241ae7422df8e203ec12de800ded8862852e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3110371
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76463}
2021-08-24 14:32:25 +00:00
Georg Neis
a6f3fce3c5 Fix a DCHECK failure with broken asm.js functions
Fixed: chromium:1236286
Change-Id: I90106fce4d6e747f35c638ab00bf9a1696c8eb77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3109668
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76462}
2021-08-24 13:38:24 +00:00
Junliang Yan
79c1b9958a ppc: [liftoff] implement calls to NativeWasmCode
Change-Id: I44f84a91a22cbe6cc364b43d096244fafaea7aca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114850
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76461}
2021-08-24 13:32:33 +00:00
Dan Elphick
ec06bb6ce5 Reland "[include] Split out v8.h"
This is a reland of d1b27019d3

Fixes include:
Adding missing file to bazel build
Forward-declaring classing before friend-classing them to fix win/gcc
Add missing v8-isolate.h include for vtune builds

Original change's description:
> [include] Split out v8.h
>
> This moves every single class/function out of include/v8.h into a
> separate header in include/, which v8.h then includes so that
> externally nothing appears to have changed.
>
> Every include of v8.h from inside v8 has been changed to a more
> fine-grained include.
>
> Previously inline functions defined at the bottom of v8.h would call
> private non-inline functions in the V8 class. Since that class is now
> in v8-initialization.h and is rarely included (as that would create
> dependency cycles), this is not possible and so those methods have been
> moved out of the V8 class into the namespace v8::api_internal.
>
> None of the previous files in include/ now #include v8.h, which means
> if embedders were relying on this transitive dependency then it will
> give compile failures.
>
> v8-inspector.h does depend on v8-scripts.h for the time being to ensure
> that Chrome continue to compile but that change will be reverted once
> those transitive #includes in chrome are changed to include it directly.
>
> Full design:
> https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
>
> Bug: v8:11965
> Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76424}

Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit
Bug: v8:11965
Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76460}
2021-08-24 13:08:55 +00:00
Georg Neis
177f51dfa8 Support concurrent access in TransitionsAccessor::SearchSpecial
Bug: v8:12128
Change-Id: Ie32a582da7b823f75462c0cea3fff68daf483df1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114140
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76459}
2021-08-24 13:04:42 +00:00
Michael Lippautz
954c19c4e1 cppgc: Pass PageAllocator as reference when expecting non-null ref
Change-Id: Id807e5e09fff59f4aedfca67461ffe3af3ffbea3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114144
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76458}
2021-08-24 12:49:13 +00:00
Michael Lippautz
22cd803263 cppgc: Update README
Give a little bit of introduction to Oilpan and provide a few links to
navigate the project.

Bug: chromium:1056170
Change-Id: I4ef8c256c8de7932e3393017be6c58ba48ca45f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114141
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76457}
2021-08-24 11:56:53 +00:00
Maya Lekova
438989d6c1 Revert "[codegen] Assert that deserialized SFIs have correct origins"
This reverts commit 2660997331.

Reason for revert: Breaks code_serializer tests - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20debug/36427/overview

Original change's description:
> [codegen] Assert that deserialized SFIs have correct origins
>
> Re-use the same check we already have in place for the
> compilation cache for when we use CodeSerializer::Deserialize.
>
> - Move HasOrigin to SharedFunctionInfo::HasMatchingOrigin
> - HasMatchingOrigin no longer allocates
> - Pass ScriptDetails in more places
>
> Bug: v8:10284
> Change-Id: I6e074bd1e7db9a35fdf7123d04a65841d9813e02
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090968
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76451}

Bug: v8:10284
Change-Id: I234fcf031001819b05dbcdd421f235f71e9805b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114143
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#76456}
2021-08-24 11:48:22 +00:00
Michael Lippautz
5a6c7dee4e cppgc: Fix CTP for destruction
This avoids a benign race in setting the raw pointer inside CTP
destructor by not emitting the write at all. The handle is destructed
which means that we only need to destroy any backing node but may
leave the handle untouched.

Drive-by:
- Add a few more docs.
- Make Clear() thread-safe.
- Make assignment of a sentinel pointer thread-safe.
- Make assignment of a nullptr thread-safe.

Bug: chromium:1242795
Change-Id: I0d9dafa31c298053e87ba1eb75f99fa6e33fa10b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114134
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76455}
2021-08-24 11:47:21 +00:00