Commit Graph

68268 Commits

Author SHA1 Message Date
Igor Sheludko
be4c28ebed [sparkplug] Support shorter builtin calls, pt.2
This is a speed-for-memory tradeoff, which can be achieved by
re-mapping the builtins code blob into existing code range.

This CL handles cases where both embedded and un-embedded off-heap
builtins' PCs might appear on the call stack.

The v8_enable_short_builtin_calls build flag is still disabled.

Bug: v8:11527, v8:11421
Change-Id: Ie3db6eb8e264854df42b936a97d3e73d01de5dfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2749636
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73476}
2021-03-17 14:35:14 +00:00
Thibaud Michaud
c665440b7f [wasm][liftoff][eh] Decode fp values from exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I3aada28f3cb9839b2d5fc7e85f5fe87018d17d1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767022
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73475}
2021-03-17 14:30:04 +00:00
Victor Costan
644b730631 Add test coverage for x86 processors with SSE3 but not SSSE3 support.
One of the x86 ISA extensions is confusingly named SSSE3 (*Supplemental*
Streaming SIMD Extensions 3). SSSE3 supersedes SSE3, and is superseded
by SSE4.

This CL adds testing coverage for x86 CPUs that support SSE3
instructions, but do not support SSSE3 instructions. Chrome supports
these CPUs, and they are used by a non-trivial amount of Chrome's users
on Windows. This CL aims to cover all the spots missed by
https://crrev.com/c/2757893.

Change-Id: I83fc963b977b285898ffe12304443ad67db68d1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764820
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73474}
2021-03-17 14:10:34 +00:00
Manos Koukoutos
80d529664f [wasm][turbofan] Add properties to wasm builtin calls
This will enable more optimizations in later compilation stages.

Bug: v8:11510
Change-Id: Ia4125f564014432a356c7889c862f6cd767f9db5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764756
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73473}
2021-03-17 13:54:54 +00:00
Thibaud Michaud
2c4153b5b6 [wasm][liftoff][eh] Decode i64 values from exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: Ia8521b1707b083e3e674801481081bfc16a8b5c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764757
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73472}
2021-03-17 13:33:14 +00:00
Michael Lippautz
a03a868e39 Reland "cppgc: Rework GC info creation"
This is a reland of d76064df4f

Original change's description:
> cppgc: Rework GC info creation
>
> Previously, GCInfoTrait relied on the non-trivial constructor of a
> static object for registering a new GCInfo object. The generated code
> is required to be thread-safe which is achieved by introducing guard
> variables in the compiler.
>
> The new version is similar to Blink in that it relies on zero
> initialization of a trivially constructible atomic.
>
> Compared to guard variables that are created per GCInfo registration,
> the atomic creates less bloat (~20bytes/type) and also results in a
> better fast path.
>
> Minimum example: https://godbolt.org/z/qrdTf8
>
> Bug: chromium:1056170
> Change-Id: I95efbbf035b655d0440c9477f5391e310e2b71fa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764750
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73463}

Bug: chromium:1056170
Change-Id: I01e60beabc1d279d352361657f408f113aac768e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767021
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73471}
2021-03-17 13:27:24 +00:00
Santiago Aboy Solanes
d254ef2b1c [cleanup] Pass isolate down to JSFunction::SetInitialMap
We have it readily available at all call-sites. There is no need to
request it via GetIsolate on the function itself.

Change-Id: I4936177c47c8adf9dfeafe1e320f8411ae358a5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2761200
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73470}
2021-03-17 13:09:45 +00:00
Jakob Kummerow
c4568e43b9 [wasm][liftoff][eh] Fix locals in FinishTryCatch
When dropping the exception from the stack, we have to
take locals into account when computing the right stack
slot.

Fixed: chromium:1187836
Change-Id: I76acb1e4dc50992524123cc369dea8e51242164c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764749
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73469}
2021-03-17 12:51:54 +00:00
Manos Koukoutos
a3b1233e16 [turbofan] Optimize TrapIf/Unless in BranchElim. and CommonOp-Reducer
Bug: v8:11510
Change-Id: I1e8fcb54444e494c7d765ad556d09d954441361f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752876
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73468}
2021-03-17 12:39:54 +00:00
Igor Sheludko
a3a20bd9f3 [sparkplug][arm64] Remake a recent change in Regexp assembler
... introduced in https://chromium-review.googlesource.com/c/v8/v8/+/2727502

Bug: v8:11527, v8:11421
Change-Id: I97d8711ad946789f8a39de5fcca41e77f20cde79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767019
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73467}
2021-03-17 12:24:44 +00:00
Maya Lekova
8b9d0138b3 Revert "cppgc: Rework GC info creation"
This reverts commit d76064df4f.

Reason for revert: Breaking MSAN - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/37390/overview

Original change's description:
> cppgc: Rework GC info creation
>
> Previously, GCInfoTrait relied on the non-trivial constructor of a
> static object for registering a new GCInfo object. The generated code
> is required to be thread-safe which is achieved by introducing guard
> variables in the compiler.
>
> The new version is similar to Blink in that it relies on zero
> initialization of a trivially constructible atomic.
>
> Compared to guard variables that are created per GCInfo registration,
> the atomic creates less bloat (~20bytes/type) and also results in a
> better fast path.
>
> Minimum example: https://godbolt.org/z/qrdTf8
>
> Bug: chromium:1056170
> Change-Id: I95efbbf035b655d0440c9477f5391e310e2b71fa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764750
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73463}

Bug: chromium:1056170
Change-Id: I71960103513d6db7789d752b70727d014c2e6406
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767020
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73466}
2021-03-17 12:01:49 +00:00
Marja Hölttä
6d5e538d2b [web snapshots] d8 support for the initial version
Bug: v8:11525
Change-Id: I3ef480e34fa005add44c927e82b50ec31581e632
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759517
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73465}
2021-03-17 11:59:24 +00:00
Andreas Haas
1e606cb6e9 Reland "[wasm] Emit safepoint info for callee-saved registers in the deopt-index"
The original CL was reverted because PC authentication was missing for
the `caller_pc` in the stack walk. This caused a crash on the CFI bot.

PS1 is the original CL, later patch sets contain the fix.

Original Message:

[wasm] Emit safepoint info for callee-saved registers in the deopt-index

Encode safepoint info of callee-saved registers in the deopt index of
the normal safepoint.

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

Change-Id: I633cd715eccc697e888cd381e3bda1a47d0d0851
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759520
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73464}
2021-03-17 11:41:34 +00:00
Michael Lippautz
d76064df4f cppgc: Rework GC info creation
Previously, GCInfoTrait relied on the non-trivial constructor of a
static object for registering a new GCInfo object. The generated code
is required to be thread-safe which is achieved by introducing guard
variables in the compiler.

The new version is similar to Blink in that it relies on zero
initialization of a trivially constructible atomic.

Compared to guard variables that are created per GCInfo registration,
the atomic creates less bloat (~20bytes/type) and also results in a
better fast path.

Minimum example: https://godbolt.org/z/qrdTf8

Bug: chromium:1056170
Change-Id: I95efbbf035b655d0440c9477f5391e310e2b71fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764750
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73463}
2021-03-17 11:33:04 +00:00
Omer Katz
8ea1fd79b3 cppgc: Port MarkingVerifier tests from Blink
Copy over from Blink two tests that the library was missing.

Bug: chromium:1056170
Change-Id: If4349e8c4dc0036f4894d274e5d38e63b0390c4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764751
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73462}
2021-03-17 11:15:25 +00:00
Manos Koukoutos
103a42d31a [wasm-gc] Bring V8 up to date with latest spec updates
Changes:
- Remove the restriction that ref.test, ref.cast and br_on_cast may only
  cast to subtypes of the cast object's type. Optimize unrelated type
  casts in the decoder. Add tests.
- Generalize Unreachable() interface function to Trap(TrapReason).
- Fix rtt.sub to be able to accept an rtt without depth. Modify related
  test accordingly.
- Type local.tee according to the local's type as opposed to the value's
  type.

Bug: v8:7748, v8:11541
Change-Id: I4d1846a2cfda891d32a9c1ed26781e4518d4cdf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756210
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73461}
2021-03-17 11:07:44 +00:00
Santiago Aboy Solanes
e090f83549 [compiler] Perform Map::GetConstructor concurrently
We can ensure that the constructor is set before the map is set on the
JSObject. Setting the constructor remains non-atomic.

Bug: v8:7790
Change-Id: Ie65519f61e29c9bed89bf09f582aa8bd39de1b03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2761199
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73460}
2021-03-17 11:00:14 +00:00
Camillo Bruni
08b7427e29 [tools] callstats improvements
- Sort by labels if no category is selected
- Support page separators in simple txt files.
- Fix un-toggling subcategories
- Prompt for labels when loading multiple files
- Improve parsing performance by using raw for-loops and fixing regexps

Change-Id: Ibd388e4134b4c0722a7f44d7eb4c5c56748e5175
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759511
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73459}
2021-03-17 10:56:34 +00:00
Igor Sheludko
5618ef1fdc [sparkplug][x64][arm64] Support shorter builtin calls, pt.1
This is a speed-for-memory tradeoff, which can be achieved by
re-mapping the builtins code blob into existing code range.

The feature can be enabled by v8_enable_short_builtin_calls flag and
it's off by default.

This CL adds GN flag and updates code generator to emit shorter
pc-relative calls/jumps to builtins. However, the runtime doesn't
support appearance of the off-heap builtins' PCs that point to the
embedded code blob on the stack yet.

Bug: v8:11527, v8:11421
Change-Id: Iaba384c549675852beae70739175976ee193ffef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2727502
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73458}
2021-03-17 10:33:04 +00:00
Liu Yu
2c9ea6d1c9 [mips][no-wasm] Exclude src/wasm from compilation
Port: 3f9ff062b0

Bug: v8:11238
Change-Id: I3ac454b7ea1addbbf41407c7acd6a18da7b35d10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763965
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73457}
2021-03-17 10:07:13 +00:00
Dominik Inführ
20a2551728 [objects] MigrateFastToSlow doesn't need RegisterInvalidatedObject
Since unboxed doubles are removed already, MigrateFastToSlow doesn't
need to invalidate old-to-old-slots anymore.

Bug: chromium:1188483
Change-Id: I0875fc0c8bcf8086f22678ffbbef000fd94ea7ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764745
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73456}
2021-03-17 08:34:13 +00:00
Jakob Gruber
4c62ed1059 [regexp] Fix --trace-regexp-macro-assembler
.. which was previously broken due to 1. a hardcoded impl names list
and 2. the addition of a new impl (riscv).

The new solution prevents this in the future by basing both enum and
name generation on a macro list.

Bug: v8:11572
Change-Id: Ieb2134c9ecf3729633b76e4a30e7ddceba396328
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764752
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73455}
2021-03-17 07:55:23 +00:00
Nico Hartmann
c85b7a449d Revert "[TurboFan] Move FunctionTemplateInfo to never serialized"
This reverts commit 220e68c0fb.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1188563

Original change's description:
> [TurboFan] Move FunctionTemplateInfo to never serialized
>
> This CL moves FunctionTemplateInfo to the list of never serialized
> objects, allowing direct heap reads. To make this threadsafe, the CL:
> - adds necessary atomic (relaxed/acquire-release) operations to the
>   accessors of FunctionTemplateInfo.
> - changes FunctionTemplateInfoRef::LookupHolderOfExpectedType to be
>   usable from the background thread (e.g. no handle construction) with
>   the caveat of skipping optimization in some cases where necessary
>   JSObjects are not serialized.
>
> Drive-by: Add missing serialization of objects possibly reachable
> through CallHandlerInfo::data.
>
> Bug: v8:7790
> Change-Id: I49cf4f328ecfab368dff9076fde8f5783ead3246
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679687
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73364}

TBR=neis@chromium.org

No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Bug: v8:7790
Change-Id: I66fd8d915e2434e3f78103b9e11dce01eb356675
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764753
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73454}
2021-03-17 07:50:55 +00:00
v8-ci-autoroll-builder
ea950a0f0b Update V8 DEPS.
Rolling v8/build: 5081eef..37b76d6

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/6d5a4e5..b965b65

Rolling v8/third_party/depot_tools: 593a6b5..36de4be

Rolling v8/tools/clang: 91db20b..752611e

Rolling v8/tools/luci-go: git_revision:fd10124659e991321df2f8a5d3749687b54ceb0a..git_revision:19175e196dd495f6e092845f7d777cb5bf157b3e

Rolling v8/tools/luci-go: git_revision:fd10124659e991321df2f8a5d3749687b54ceb0a..git_revision:19175e196dd495f6e092845f7d777cb5bf157b3e

Rolling v8/tools/luci-go: git_revision:fd10124659e991321df2f8a5d3749687b54ceb0a..git_revision:19175e196dd495f6e092845f7d777cb5bf157b3e

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

Change-Id: Ieface3d42f19f682162a61ba7e7cc9570da61401
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764818
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@{#73453}
2021-03-17 04:01:22 +00:00
Omer Katz
c764215ebc cppgc: Fix allocated_memory_size()
Bug: chromium:1056170
Change-Id: I4b43b78be23b8220b89f1ee5177f6b9b3c18146d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764748
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73452}
2021-03-16 20:47:02 +00:00
Sara Tang
0b56c19165 [diagnostics] ETW should emit interpreted functions on the callstack
This is a small change to the ETW instrumentation to enable
--interpreted-frames-native-stack so that we can see intepreted
functions on the JS call stack (in addition to jit-ted ones).

Bug: v8:11043
Change-Id: I17870bda6bc5291d6fe429770a015dd803fe446b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2757888
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Sara Tang <sartang@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#73451}
2021-03-16 19:36:51 +00:00
Milad Fa
63572683a5 PPC: Add VC form opcodes to the disassembler
Change-Id: I06633381ad6bfd84090e7553404425d28a90f47a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2765443
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73450}
2021-03-16 19:10:31 +00:00
Michael Achenbach
7073b1a635 [release] Make auto-roller use bot-commit label
No-try: true
Bug: chromium:1176141
Change-Id: I6caa0f9ce530ca3fcc6aa715326727f68aa5c240
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690586
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73449}
2021-03-16 18:55:21 +00:00
Omer Katz
2d13cc9076 cppgc: Fix compaction cancellation
Bug: chromium:1056170
Change-Id: I6b77c06b8c787a00be00b84490155588608c75da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764464
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73448}
2021-03-16 18:31:41 +00:00
Milad Fa
e7dc77203e PPC: Implement mtcr on disassembler and the simulator
Change-Id: I575dffb8810ccc9e73cae2413c7993e0f4fdbbdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764623
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73447}
2021-03-16 18:09:21 +00:00
Milad Fa
88ff558ae2 PPC [simd]: Implement unary ops and rounding average on Sim
Change-Id: I6dd7a99d464940304cfced8ab301e23e7b658762
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764782
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73446}
2021-03-16 17:20:36 +00:00
Thibaud Michaud
7b326b5329 [wasm][liftoff][eh] Encode f64 values in exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I9775032093ac1a0883339cb32bb30b7710f08491
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763877
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73445}
2021-03-16 17:07:16 +00:00
Manos Koukoutos
06212c9ade [wasm] Introduce dependency of JS/Wasm frame in wasm-compiler
In wasm-compiler, nodes that reference the Isolate and Instance should
depend on whether the current frame JS or Wasm. This was implemented
with mutable fields caching nodes in WasmGraphBuilder and its
subclasses, but was not done consistently.
This CL removes all mutability and replaces it with an additional field
isolate_ in WasmGraphBuilder, which is only set in the constructor of
the child class WasmWrapperGraphBuilder.

Additional changes:
- Remove three almost-unused utilities from WasmGraphAssembler.
- Reduce duplicate BuildImportCall with int index argument to the one
  with Node* index argument (the additional operations should be
  optimized away).

Bug: v8:11510
Change-Id: I2bb44a617210916edf671c238402727e04bdc38f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739976
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73444}
2021-03-16 16:54:56 +00:00
Thibaud Michaud
839f5a6444 [wasm][liftoff][eh] Encode f32 values in exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I8a29f1359b9f77401bba1f6abb8d11221b742176
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763876
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73443}
2021-03-16 15:37:25 +00:00
Jakob Gruber
21a23587de [compiler] Concurrent JSObjectRef::GetOwnConstantElement
This CL implements the above in a concurrent setting without relying
on serialization (except existing serialization to read a consistent
JSObject state, which should be addressed in future work).

There are three main cases in which GetOwnConstantElement can succeed:

- Frozen elements are always constant. The backing store is immutable
after initialization and can be accessed through relaxed reads.
- String wrapper elements are always constant. The JSPrimitiveWrapper
is immutable after initialization, and internalized Strings are
protected by a mutex (other string kinds are currently not handled).
- Dictionary elements may be constant. Since this case is not
particularly important for the optimization, we leave it unimplemented
for now.

Bug: v8:7790
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_no_cm_rel_ng
Change-Id: If2fbced50218ebd3930da8157cd2ae5eb83a8e02
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2717308
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73442}
2021-03-16 15:00:45 +00:00
Marja Hölttä
f3fe92e954 [diagnostics] Fix printing empty ScopeInfos
(See bug for repro.)

Bug: v8:11571
Change-Id: I7cf7ddad1c031c476d29edf5a3922c64079c186b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764462
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73441}
2021-03-16 14:59:35 +00:00
Clemens Backes
49c331001c [wasm][debug] Test instrumentation breakpoints w/o start function
Add a test for a module without a start function; in that case, we want
to break when first calling into the module (via an exported function).

R=bmeurer@chromium.org

Bug: chromium:1151211
Change-Id: Id14978b5feff4dcd64cff828951f2a00b73c9736
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763880
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73440}
2021-03-16 14:47:05 +00:00
Thibaud Michaud
6dc2dbbb34 [wasm][liftoff][eh] Encode i64 values in exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I6e73f68f842e9f5de95bed1233bfcc08ab600b43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763873
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73439}
2021-03-16 14:34:35 +00:00
Mathias Bynens
cab07dfbca [bash-completion] Support macOS + jsvu binaries
macOS’s `readlink` doesn’t support the `-f` flag. By using `realpath`
we get the same functionality with added support for macOS.

Finally, this patch adds `v8` and `v8-debug` to the completion
command. These are the binary names used by jsvu [1].

[1]: https://github.com/GoogleChromeLabs/jsvu

Bug: v8:11567
Change-Id: I1ec47752e50bce4bfb97a7ce23571d0a6e55dbc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2762147
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73438}
2021-03-16 14:06:45 +00:00
Ulan Degenbaev
6ff9f24be7 [heap] Disable GC during isolate initialization
Bug: chromium:1188212
Change-Id: I2c01544e5ff114d4fbdb853a344eb2b6250ee7ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763881
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73437}
2021-03-16 13:50:55 +00:00
Jakob Kummerow
ab22d98c6c [wasm] Ensure stack space in PushReturns
Bonus: this contains small regression tests for the issues fixed in
https://chromium-review.googlesource.com/c/v8/v8/+/2739586.

Fixed: chromium:1186603
Change-Id: I6eca2ef41936555e6fe81555805a659b30023952
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2761201
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73436}
2021-03-16 13:47:25 +00:00
Jakob Kummerow
26d153d640 [bash-completion] Support cctest/unittests, and GDB
Because why not.

No-Try: true
Bug: v8:11567
Change-Id: I763d9d0c6704f3f8c5e8336e2157336e159648fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2762139
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73435}
2021-03-16 12:51:46 +00:00
Ross McIlroy
4c17394d67 Reland: [compiler] Cache StateValue processing in InstructionSelector.
Processing StateValues into operands is one of the most costly
parts of instruction selection. As it happens, StateValues are
shared by many nodes, and so we are unecessarily reprocessing
the same StateValues multiple times. This CL introduces caching
for the processed StateValues enabling very fast emitting of
operands for subsiquent instructions with the same StateValue.
The hitrate for the cache is higher than 90% on most optimizations.

BUG=v8:9684

Change-Id: I7edcfa1b0d7add16e509f0e2abeda0a8873f5a95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756535
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73434}
2021-03-16 12:26:25 +00:00
Santiago Aboy Solanes
f193662295 [compiler] Refactor HasOnlyStablePrototypesWithFastElements
We had two similar methods (HasOnlyStablePrototypesWithFastElements and
HasOnlyStablePrototypesWithFastElementsHelper) which seemed to have been
defined to be used in different places, but they were used in only one
place each. We can specialize those methods based on their uses and not
worry about the other cases.

Bug: v8:7790
Change-Id: I2341ce4849d421afd960cb199908f9c98511999e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759523
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73433}
2021-03-16 11:39:55 +00:00
Santiago Aboy Solanes
12bb6c21f2 [compiler] Mark Map's bit_field set/get as non-atomic or relaxed
Most of Map's bit_field (as in not 2 or 3) accessors are not set after
construction e.g. is_callable. They are also not used as a
synchronization point. From the compiler's point of view, they can be
set as non-atomic. There are two accessors (`prototype_slot` and
`non_instance_prototype`) that have to be atomic for concurrent marker
reasons (relaxed is fine for them).

Bug: v8:7790, chromium:1150811
Change-Id: Ic3c81a59e7895ee9c35a128bb10656040b19dd42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752154
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73432}
2021-03-16 11:35:19 +00:00
Thibaud Michaud
b9ccf865f2 [wasm][liftoff][eh] Fix try info cache state leak
Allocate the TryInfo in a unique_ptr to ensure that its destructor is
called when the corresponding control block is popped from the control
stack.
In particular, the cache state allocates memory on the heap which is
otherwise never freed.

R=clemensb@chromium.org

Bug: chromium:1185127
Change-Id: I3aee5573f99ef94c13d0649413a4e647a32bc555
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2739649
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73431}
2021-03-16 11:18:50 +00:00
Ross McIlroy
26d85acee2 [base] Use IMMEDIATE_CRASH on official build FATAL errors.
Release-official builds strip error messages from CHECK messages.
This can make it difficult to distinguish a CHECK crash location in
crash reports. As such, instead of using V8_FatalNoContext, import the
IMMEDIATE_CRASH macro from chromium and use that instead, which should
cause a crash directly in the instruction stream so that the top
stackframe on the crash report directly identifies the CHECK location
that failed.

More details here:
https://docs.google.com/document/d/1tyMwzxUNH8BctM_urSQIYdcbwmzP4kTnwEjnFamBpKY

Change-Id: I5b8175f19571834f790060d641db08d0b9c2c17b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756223
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73430}
2021-03-16 11:05:45 +00:00
Pierre Langlois
de51603597 [disassembler] Do not search for literal loads inside constant pools
We try and match literal load instructions in order to print a
relocation info comment. However, we could be doing it while we're
decoding a constant pool. This would cause a DCHECK to fire on Arm64
with full pointers.

Change-Id: I82a523dc5c033f86f41467db75e43419ab87d5ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756532
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#73429}
2021-03-16 10:52:35 +00:00
Frank Emrich
96217d357f [compiler] Emit vpbroadcastb for I8x16Splat on x64 if supported
Change-Id: Iec90b4821f41838eb4c2bae26035af4e30082ef9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2762140
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73428}
2021-03-16 10:46:35 +00:00
Manos Koukoutos
93c2406502 [wasm][turbofan] Impose single appearance of each parameter
The register allocator sometimes fails if a parameter node appears
twice. This seems to be an issue in the register allocator rather than
a global assumption of Turbofan. This CL ensures duplication does not
happen in wasm code until the issue is resolved.

Changes:
- Cache parameter nodes in wasm-compiler.
- Use Dead() over Parameter() as placeholder in lowering stages.

Change-Id: I7afb5de45dd169819309fea3d3c1a7cfe68af62c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756529
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73427}
2021-03-16 10:02:15 +00:00