Commit Graph

72725 Commits

Author SHA1 Message Date
Frank Tang
69608fc76d [Temporal] Sync Parser to pull/1950
Sync the parser to grammar change in
https://github.com/tc39/proposal-temporal/pull/1950

Bug: v8:11544
Change-Id: I57e9f9c2bd234f930cc06dd730ad4ccf77d239d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313966
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78233}
2021-12-04 01:44:18 +00:00
Milad Fa
9ec5be7d58 [wasm][turbofan] Fix endianness issue with compressed pointers
When pntr compression is enabled, `Pointer()` reads 8 bytes
whereas `TaggedPointer()` reads 4 bytes and decompresses.

TaggedPointer() in this case was causing an incorrect read
on big endian as the desired value was located on the high side
of memory.

Similar patches were also applied in this CL:
https://crrev.com/c/2057355

Change-Id: I77c449256ae1f56f2f8664f687985221badf819f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3314302
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78232}
2021-12-03 19:39:58 +00:00
Shu-yu Guo
975318a30c Add Relaxed_Memcmp
This is in preparation for supporting concurrent access in
String::SlowEquals, which will need to compare character buffers with
relaxed ordering.

Bug: v8:12007
Change-Id: Ie8ac62c15df48ebd605985c35b843b510c7ad167
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313467
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78231}
2021-12-03 18:00:48 +00:00
Patrick Thier
863bc2b88a [turbofan] Improve StoreStoreElimination
Previously, StoreStoreElimination handled allocations as
"can observe anything". This is pretty conservative and prohibits
elimination of repeated double stores to the same field.
With this CL allocations are changed to "observes initializing or
transitioning stores".
This way it is guaranteed that initializing stores to a freshly created
object or stores that are part of a map transition are not eliminated
before allocations (that can trigger GC), but allows elimination of
non-initializing, non-transitioning, unobservable stores in the
presence of allocations.

Bug: v8:12200
Change-Id: Ie1419696b9c8cb7c39aecf38d9f08102177b2c0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295449
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78230}
2021-12-03 17:12:48 +00:00
Junliang Yan
719f9db3f0 s390x: [baseline] implement Jump pt.2
Change-Id: I508b75e9023cc5cff8018aa0c07ce6ca10bf1bbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313443
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78229}
2021-12-03 16:49:08 +00:00
Leszek Swirski
a66c7a38fa [compiler] Create ParseInfo on BG thread
Rather than creating a ParseInfo when creating a BackgroundCompileTask
(and passing ownership across to the BG thread which deallocates it),
create one when running it.

This allows the ParseInfo Zone to be both allocated and deallocated on
the same thread, which will improve its allocator friendliness.

As a side-effect, we now use the on-heap PreparseData from the
SharedFunctionInfo, rather than cloning the in-Zone PreparseData. This
means that we don't have to copy the PreparseData across Zones, but we
do need to Unpark the LocalHeap when accessing preparse data.

Change-Id: I16d976c1ad54c1090180f2936f40a23a6dbb5904
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312483
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78228}
2021-12-03 15:01:11 +00:00
Leszek Swirski
b4f8578f6c [compiler-dispatcher] Opportunistically finalize
Finalize other finalizable jobs in FinishNow, up to a time deadline.
This deadline is set to 1ms for now, because that seems like short
enough to not get in the way of user interaction but long enough to be
worth doing here rather than doing another runtime call for the
subsequent funtions.

Change-Id: I79f0780e9318e97efee03d2d25701009ca7069d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310801
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78227}
2021-12-03 14:27:39 +00:00
Clemens Backes
15272bdcce [d8] Do not delete counters on quit
If multiple isolates are running concurrently and one of them calls
`quit`, we should not delete the counters map, because another isolate
might still access it.

R=mlippautz@chromium.org
CC=nikolaos@chromium.org

Bug: v8:12453
Change-Id: I6d41478f188f0043b7d6055b0872574c28fd3039
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310807
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78226}
2021-12-03 11:55:46 +00:00
Zhao Jiazhong
f507423bb0 [mips64] Temporarily add s0 to scratch register list
Debug build needs more scratch registers, since s0 is not added to
allocatable registers, we could use it as a scratch register.

Change-Id: I1453d78b18cd3abff83a2f0c084ed4dd92e92884
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313967
Reviewed-by: Liu yu <liuyu@loongson.cn>
Commit-Queue: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#78225}
2021-12-03 10:17:26 +00:00
Michael Lippautz
f2bac2ffd6 heap: Remove duplicate code
Bug: chromium:1276129
Change-Id: I5d47e50c0b778e6ac1fbdbc8660c471c74424322
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312272
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78224}
2021-12-03 09:41:46 +00:00
Kim-Anh Tran
8df29f1e15 [debugger] Explicitly encode calls from %ScheduleBreak as 'other'
This CL forwards the information that we are breaking because
of a ScheduleBreak runtime call.

Bug: chromium:1229541, chromium:1133307
Change-Id: I5eb9462c9df135bc3b3080c354e61e301d24e1ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310804
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78223}
2021-12-03 07:05:17 +00:00
v8-ci-autoroll-builder
0a34cc58cc Update google_benchmark
Rolling v8/third_party/google_benchmark/src: fe2e8aa..fd258bb

Update user_guide.md (#1296) (Shawn Zhong)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/fd258bb

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

Change-Id: I3cc7d2151cada95c44276b5c292116f90c427181
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3314337
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78222}
2021-12-03 05:41:57 +00:00
v8-ci-autoroll-builder
b76ed0cad4 Update V8 DEPS.
Rolling v8/build: 99a1dc1..746224d

Rolling v8/buildtools/third_party/libc++abi/trunk: 665b74f..89f2e82

Rolling v8/buildtools/third_party/libunwind/trunk: c936d73..0f447a3

Rolling v8/third_party/android_platform: 72e09e9..abc362f

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/5695a84..dbf8536

Rolling v8/third_party/depot_tools: 5deb9c9..3e68015

Rolling v8/third_party/googletest/src: bb92160..1b26064

Rolling v8/third_party/zlib: e8c257c..efd9399

Rolling v8/tools/clang: 401e727..16279ec

Rolling v8/tools/luci-go: git_revision:e4c95e4e4cdc987f1860e4111589606bcd3a8f32..git_revision:d3f13de997dcae45d2af9210be74e7eb96a98268

Rolling v8/tools/luci-go: git_revision:e4c95e4e4cdc987f1860e4111589606bcd3a8f32..git_revision:d3f13de997dcae45d2af9210be74e7eb96a98268

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

Change-Id: I24c2e7dac871c7d80b719e7887489c1dcdb114b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3311316
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78221}
2021-12-03 04:00:16 +00:00
Frank Tang
4bbb14ea23 [test262] Roll test262
d52b510a..4b7f8b49c

Bug: v8:7834
Change-Id: I9009d97813901348fbbb1dabc1bbcd66cc321d65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3309366
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78220}
2021-12-03 02:21:16 +00:00
Adam Klein
ab3f78a4c7 [parser] Avoid friending std::make_unique to fix MSVC build
Apparently std::make_unique is not a function under MSVC!

Change-Id: I2014e8779ae3434dc265e2a030181e78085beb57
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313349
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78219}
2021-12-02 21:15:44 +00:00
Samuel Groß
42ed4928cd Use CagedPointers for ArrayBuffer backing stores
This CL turns references to ArrayBuffer backing stores from
JSArrayBuffers, JSTypedArrays, and JSDataViews into CagedPointers
when those are enabled.

CagedPointers cannot generally represent nullptr, as NULL usually lies
outside the cage. As such, nullptr backing stores are replaced with a
special empty backing store value, which, in the current implementation,
points to the end of the cage, right in front of the trailing guard
regions. Due to this, it is no longer correct to compare a backing store
pointer against nullptr.

Bug: chromium:1218005
Change-Id: I4a6c7a82aabb4debcb6bb2babe4035ba2da8e79f
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3244419
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78218}
2021-12-02 17:07:15 +00:00
Clemens Backes
4f34cd833b Revert "[codegen] Reduce size of safepoint table fields"
This reverts commit f68242bcb0.

Reason for revert: UBSan error: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8828943333104509889/+/u/build/compile/stdout

Original change's description:
> [codegen] Reduce size of safepoint table fields
>
> Code objects are often small and do not use the full integer range of PC
> offsets and deoptimization indexes. Reducing the size of these fields to
> the required size per table reduces the overall size of safepoint tables
> by roughly 25%.
>
> R=​jkummerow@chromium.org
>
> Bug: v8:12401
> Change-Id: Ie6889a70782f5510436a1d05d31d17aac0bfec6e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306556
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78216}

Bug: v8:12401
Change-Id: I53b574558305ac25fa8f38a843c98f653af201ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312488
Auto-Submit: Clemens Backes <clemensb@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@{#78217}
2021-12-02 16:05:25 +00:00
Clemens Backes
f68242bcb0 [codegen] Reduce size of safepoint table fields
Code objects are often small and do not use the full integer range of PC
offsets and deoptimization indexes. Reducing the size of these fields to
the required size per table reduces the overall size of safepoint tables
by roughly 25%.

R=jkummerow@chromium.org

Bug: v8:12401
Change-Id: Ie6889a70782f5510436a1d05d31d17aac0bfec6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306556
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78216}
2021-12-02 15:54:52 +00:00
Thibaud Michaud
d129b43f4f [wasm] Move JumpBuffer inside StackMemory
The stack memory will be accessed through a global list later, so the
stack pointer should be accessible without the containing
WasmContinuationObject. This also saves some unnecessary allocations and
indirections already.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Ic3d71ecadbb13b18f0440049527ba71d657589b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312486
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78215}
2021-12-02 15:17:33 +00:00
Leszek Swirski
35563db219 [compiler-dispatcher] Allow limiting the number of threads
Add a flag for controlling the maximum number of threads usable by the
LazyCompileDispatcher.

Change-Id: I87fc39d337a00cff0c3d152392630f48da050fff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312482
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78214}
2021-12-02 14:35:43 +00:00
Nico Hartmann
ba62172b82 [js-perf-test] Performance benchmarks for BigInt left and right shift
Bug: v8:11515
Change-Id: I9379187542499439debd293dd7c7d6d02e98accd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308709
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78213}
2021-12-02 14:16:15 +00:00
Thibaud Michaud
81c6be2eed [wasm] Reserve space for runtime in wasm stacks
Set the JS limit at a 40KB offset from the actual limit, like on the
native stack. This is an estimate of the maximum stack space needed for
runtime calls.

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: I709d5b25c5e47d2474cf4205ebcb8ee7fc8e794c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312485
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78212}
2021-12-02 14:14:36 +00:00
Manos Koukoutos
52755f3519 [wasm] Skip failing tests in predictable mode
Bug: v8:12463
Change-Id: I63ac0ab5aa3e5a3fc222c798c8127fef72db8567
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312481
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78211}
2021-12-02 14:13:32 +00:00
Thibaud Michaud
7d6ad91a20 [wasm] Remove unnecessary runtime call
The call to SyncStackLimit is already inlined in the previous runtime
call (WasmAllocateContinuation).

R=ahaas@chromium.org

Bug: v8:12191
Change-Id: Ie602f8317bc9ed5b5b5f9a0eb545a57602aeed42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312484
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78210}
2021-12-02 14:08:28 +00:00
Leszek Swirski
602de389dc [parser] Allow cloning chunked streams
This allows streamed sources to also trigger parallel compile tasks. The
chunk vectors are shared via std::shared_ptr.

Clone chunked streams are initialised with a null source, and are not
allowed to fetch any more data. Similarly, the original stream is not
allowed to fetch data if it has been cloned (since the vector is shared
and would mutate if we added more data to it).

This is ok for the purposes of cloning for parallel compile tasks, as we
fully parse before cloning for the task.

Change-Id: Ic268e4956e0894acb63111bf0aaf32eaad426066
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310917
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78209}
2021-12-02 13:13:33 +00:00
Michael Lippautz
05b241c649 heap: Remove unused Worklist
- Removes the unused Worklist implementation. All uses now refer to
  ::heap::base::Worklist.
- Renames CppgcWorklistTest -> WorklistTest
- Add test for Swap()

Bug: v8:12426
Change-Id: I62c3472c030b853a846cf13ab48597ea1af8f700
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306507
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78208}
2021-12-02 12:43:01 +00:00
Michael Achenbach
c1e0aa1eb4 [numfuzz] Add interrupt budget also to combined fuzzing
No-Try: true
Bug: v8:12434
Change-Id: I62157f06efc8f472ea765278a2a65e3d67c1d973
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308891
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78207}
2021-12-02 12:25:45 +00:00
Hao Xu
712f800e55 [baseline] Improve BitwiseBinaryOp with Smi rhs
Baseline compiler generates calls to builtin Bitwise_Baseline for
bitwise bytecodes with Smi rhs. The builtin still performs type check
for rhs even though it is known to be Smi.

This CL implements new builtins for bitwise operations which does not do
speculation for rhs.

Bug: v8:12442
Change-Id: Ia6e1b25a74d00db8c39600b4f81f6e9aa5d59253
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310520
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
Cr-Commit-Position: refs/heads/main@{#78206}
2021-12-02 12:09:33 +00:00
Manos Koukoutos
c1e3a5dba2 [wasm-gc] Fix a bug in CallRefIC
Bug: v8:7748

Change-Id: I7884b548276372e5dfa130fbe39d29f3cca4f530
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310882
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78205}
2021-12-02 12:05:44 +00:00
Igor Sheludko
56f5d5c23c [ext-code-space] Rename InstructionStream to OffHeapInstructionStream
... as a prerequisite for adding InstructionStream heap object.

Bug: v8:11880
Change-Id: I22b4832cedd46bee4a4c5a0d7b5032eba10b2a7b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310900
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78204}
2021-12-02 11:05:32 +00:00
Tamer Tas
78a475c898 [v8_perf] remove deprecated builder options from v8 perf trybot
R=machenbach@chromium.org,liviurau@chromium.org

Bug: v8:11211,v8:12462
Change-Id: If13e9ac6eaa3edc6b99c77c9cf16f5441f5c33e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310898
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78203}
2021-12-02 11:02:32 +00:00
Kim-Anh Tran
d8e8dab0e7 [debugger] Explicitly encode debugger statements in didPause
This CL makes sure to forward the information that we are pausing
because of a debugger statement, and to encode it explicitly
as an 'other' reason when reporting the pause to the front-end.

Drive-by: refactoring the way break reasons are propagated by
introducing a new enum for break reasons

Bug: chromium:1229541, chromium:1133307
Change-Id: I9d2e8d8da54d96a231eff9d1f62b74507955b18f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306978
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78202}
2021-12-02 10:41:43 +00:00
Manos Koukoutos
70a452ffcc [wasm-gc] Optimize away nominal type upcasts
We optimize away type upcasts for nominal types in WasmFullDecoder.
Upcasts trivially hold for nominal types, which is not the case for
structural types. Note that we already optimize away trivially-failing
checks (when types are unrelated) for both nominal and structural types.

Bug: v8:7748
Change-Id: I720c9803cb8b4071aa4bae112ce06d587b7a68fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306984
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78201}
2021-12-02 10:36:42 +00:00
Manos Koukoutos
c2f7f5964d [wasm] Disable spec. inlining by flag implications
--wasm-speculative-inlining makes no sense if --liftoff-only or
--no-liftoff, since it needs type feedback from Liftoff and is appied
by Turbofan. Therefore, it should be disabled in these cases.
Specifically, --wasm-speculative-inlining implies
--wasm-dynamic-tiering, which contradicts --liftoff-only.

Bug: v8:12166
Change-Id: Idc5e0d7ceb7dbdf82ea6fd14ffc8386fe35a1257
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306554
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78200}
2021-12-02 09:57:22 +00:00
Clemens Backes
dceff4d9d8 [d8] Read flag values before disposing V8
{V8::Dispose} calls {FlagList::ResetAllFlags()}, which resets all flag
values. Thus the values of FLAG_dump_counters and FLAG_dump_counters_nvp
need to be read before disposing v8.

Drive-by: Two unrelated code simplifications / unifications.

R=mlippautz@chromium.org

Bug: chromium:1275117
Change-Id: Ie2bbe0c844efaf3ed50a62533c5ec08b6b423379
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310881
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78199}
2021-12-02 09:27:52 +00:00
Junji Watanabe
55a26dc4f1 Remove --isolated from mb.py
This flag is not supported now.

Bug: chromium:1271841
Change-Id: I6a80ebed79a03164f58f1757b8ebaca74a681441
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306786
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78198}
2021-12-02 08:31:19 +00:00
Junliang Yan
516c17fb3a s390x: [baseline] implement Tail/CallBuiltin
Change-Id: I68f9e6e8edc7054bec7e838f0d3b007be196d240
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312157
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78197}
2021-12-01 21:55:29 +00:00
Manos Koukoutos
ef94d230bf [wasm][turbofan] Match operators to node representation
This fixes operators in wasm Turbofan that were mixing up integer sizes
and pointers with tagged pointers.

Additional changes:
- Remove unused (and non-compiling if V8_MAP_PACKING)
  GraphAssembler::StoreMap.
- Factor out WasmGraphBuilder::IsNull.

Change-Id: I9d99827e35507adc0af391bd39975d55371b98cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306981
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78196}
2021-12-01 19:15:49 +00:00
Jaroslav Sevcik
cb90b21fca [inspector] Remove the code for computing node description
That code should be dead now that we compute the description in Blink
(see crbug.com/1048143).

Bug: chromium:1275591
Change-Id: I6e8c4dec27eb981807ab4eba75572635ee655a3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310837
Auto-Submit: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78195}
2021-12-01 19:14:29 +00:00
Richard Stotz
286747bb97 [wasm] Remove CallRefData
This CL removes the CallRefData data structure and accesses a funcref's
target and instance through the funcref.

Bug: v8:7748
Change-Id: Ic46b127f7775052d5df13b03c447e3b15328ad74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306486
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78194}
2021-12-01 18:46:59 +00:00
Victor Gomes
574d4a8bbe [baseline] ConcurrentSparkplug --> Sparkplug
Bug: v8:12054
Change-Id: I30ab8540b698ea6e5e838e6aa27f8ec5efca414c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306570
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78193}
2021-12-01 17:12:49 +00:00
Victor Gomes
4c48ca256c Reland "[baseline] Add max threads flags for CSP"
Moved DEFINE_UINT after the #ifdef block, so it is also defined
for Mac arm64.

This is a reland of 6aadf0e0ff

Original change's description:
> [baseline] Add max threads flags for CSP
>
> Bug: v8:12054
> Change-Id: I49238fe673858b60c2a2a935ed1f45f465269216
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308707
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78187}

Bug: v8:12054
Change-Id: Ica352b2f099fff875411c0e1915bcddb4ca48061
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310800
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78192}
2021-12-01 16:45:29 +00:00
Clemens Backes
8820094a56 [d8] Fix data race in counter creation, update, and disposal
This fixes data races when lazily creating counters (and populating the
{counter_map_}, and when concurrently adding samples to the counters.
It also ensures that the Wasm engine is stopped (via {V8::Dispose})
before printing and deleting counters, as background threads might still
try to update the counters otherwise.

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

Bug: v8:12453, chromium:1275117
Change-Id: Ie6beea6cc74eea52143d12f9921597da4a250f2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308710
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78191}
2021-12-01 16:41:09 +00:00
Leszek Swirski
550c29a35a [test] Disable failing MSVC test
Change-Id: I67b62ae71700fab3755f83634fa571b1cea3af4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308890
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78190}
2021-12-01 15:51:59 +00:00
Omer Katz
890da81827 cppgc: Fix GC flags for CppHeap.
The new flags enum had kReduceMemory as the first value, which means it
got the value 0 and thus was considered as never set.

Bug: v8:12407, chromium:1274954
Change-Id: Ifcce2316c1dcd09a12ad52ef391f513b014aea1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310609
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78189}
2021-12-01 15:46:59 +00:00
Leszek Swirski
309dac5f81 Revert "[baseline] Add max threads flags for CSP"
This reverts commit 6aadf0e0ff.

Reason for revert: Maybe add arm64 mac to the CQ next time :) https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20release%20builder/7729/overview

Original change's description:
> [baseline] Add max threads flags for CSP
>
> Bug: v8:12054
> Change-Id: I49238fe673858b60c2a2a935ed1f45f465269216
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308707
> Auto-Submit: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78187}

Bug: v8:12054
Change-Id: I1b53ea3eaaaa39cdb1b9a471aa716b5af7f5e3d6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310838
Auto-Submit: 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@{#78188}
2021-12-01 15:30:20 +00:00
Victor Gomes
6aadf0e0ff [baseline] Add max threads flags for CSP
Bug: v8:12054
Change-Id: I49238fe673858b60c2a2a935ed1f45f465269216
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308707
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78187}
2021-12-01 15:14:19 +00:00
Jakob Gruber
2e17aaca2a [regexp] Fix CharacterRange limits again again again
When emitting code, character ranges must only specify ranges which
the actual subject string (one- or two-byte) may contain.

This was not always the case, specifically for ranges with
`from <= kMaxUint8` and `to > kMaxUint8`.

The reason this is so tricky: 1. not all parts of the pipeline know
whether we are compiling for one- or two-byte subjects; 2. for
case-insensitive regexps, an out-of-bounds CharacterRange may have an
in-bounds case equivalent (e.g. /[Ÿ]/i also matches 'ÿ' == \u{ff}),
which only gets added somewhere in the middle of the pipeline.

Our current solution is to clamp immediately before code emission. We
also keep the existing handling/dchecks of the 0x10ffff marker value
which may occur in the two-byte subject case.

Bug: v8:11069
Change-Id: Ic7b34a13a900ea2aa3df032daac9236bf5682a42
Fixed: chromium:1275096
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306569
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78186}
2021-12-01 15:13:09 +00:00
Omer Katz
f19ea33e0f cppgc: Prefinalizers scopes
Enable the prefinalizers scope and add a top level AtomicSweep scope
so that prefinalizers are accounted as part of sweeping.

Change-Id: I9dade6a2367d30d20395de30c3db84922fee5a49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306567
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78185}
2021-12-01 14:57:22 +00:00
Tobias Tebbi
9e0439d1bd [torque] Only check ParseResultIterator after non-exceptional control flow
We sometimes use ReportError() inside of Torque parser actions.
The resulting exception prevented the ParseResultIterator from being
consumed completely, which in turn triggered a CHECK failure instead
of the correct error message.

Change-Id: Ie8dcdf67094e5ad5d68934e8a2921d5f52bd3092
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306973
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78184}
2021-12-01 13:22:01 +00:00