Commit Graph

68749 Commits

Author SHA1 Message Date
Jakob Kummerow
0241041e19 [wasm-gc] Fix slow path of "FromJS" conversion
Since WasmToJSWrappers are on-heap Code objects, they should use
the "kCallBuiltinPointer" mechanism to call builtins.
AFAICT this only affected the call_ref instruction.

Bug: v8:9495
Change-Id: I2d55e8f2504787a8a92410868ced8d5ce63a5376
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846896
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74157}
2021-04-23 16:22:22 +00:00
Ulan Degenbaev
752c12399a [runtime] Remove dependency on the backing store age in DeleteCommon
Currently the function normalizes only old sparse backing stores.
This patch removed the age check to decouple the heuristic from GC.

Change-Id: I9b7f787315b2b8facfa35358143173f7d207c8da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846897
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74156}
2021-04-23 15:54:52 +00:00
Milad Fa
e1e1220a3c [mjsunit] only run tickprocessor on release mode or x64
Change-Id: Ia3d7933fc415d2756e1db1c1f96828d9e6f8c28e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848461
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74155}
2021-04-23 15:35:52 +00:00
Leszek Swirski
a8f45786e8 Reland "[arm] Make the constant pool check deadline smarter"
This is a reland of df4dae7765

Revert reason looks like an unrelated existing flake (https://crbug.com/v8/11634)

Original change's description:
> [arm] Make the constant pool check deadline smarter
>
> Rather than having periodic constant pool checks that almost always fail
> (because the constant pool deadline isn't close enough, or even because
> there's no constant pool to emit at all), set a single deadline on the
> first constant pool insertion which expires just before the maximum
> distance to the constant pool. Constant pool checks around unconditional
> jumps happen irrespective of this deadline.
>
> In particular, this is made possible by fixing the incorrect assumption
> that the constant pool can be emitted out of order. The new assumption
> (that the emission is in-order) is validated with a CHECK.
>
> Bug: v8:11420
> Change-Id: I061dd0b8c3476ba95ee1acfb3b485d8ba2adda91
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844665
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74141}

Bug: v8:11420
Change-Id: I1cc5ca9082da26ab225dee8d8ea22c385c6cc1d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848468
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/master@{#74154}
2021-04-23 15:18:52 +00:00
Patrick Thier
c560e1f9b8 [sparkplug][debugger] Fix deopt of inlined function in debugger
We could end up in a baseline entry trampoline without having
baseline code, because of an unhandled interaction in the debugger
(discarding baseline code) and the deoptimizer.

Bug: chromium:1199681
Change-Id: Ia33bb4d64903dd989728465b3d83a88b84597a8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843820
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74153}
2021-04-23 15:15:52 +00:00
Ulan Degenbaev
56d956aaed [base] Use std atomics on all platforms
This removes atomicops_internals_portable.h and inlines
atomicops_internals_std.h into atomicops.h.

Change-Id: Id06cae42a277fee9379590ca755571193f9e8bbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848462
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74152}
2021-04-23 15:06:12 +00:00
Leszek Swirski
b164fe240b [cleanup] Remove ToString intrinsic
The ToString intrinsic isn't used anymore, since there is now a ToString
bytecode, so we can remove it.

Change-Id: I5ed121ae4d117660e1ee8a64a2b30e1fb054a886
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848465
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74151}
2021-04-23 15:02:42 +00:00
Omer Katz
fbe432212a cppgc: One more unittest
Bug: chromium:1056170
Change-Id: Id3456a36e05379a517f5c49ea0252caa91221519
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848466
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74150}
2021-04-23 14:55:52 +00:00
Nico Weber
f0919fe686 [diagnostics] Fix os macros for mac as well
Bug: chromium:1196278
Change-Id: If80b1264f537e3828867831ac4d4dfc005a1ae8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2845243
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74149}
2021-04-23 14:16:37 +00:00
Mathias Bynens
87646f76ed [inspector] Add support for the RegExp d flag
Prior to this patch, the RemoteObject for e.g. `/x/d` got a
`description` that omitted the new `d` (`hasIndices`) flag.

Bug: v8:11684, v8:9548
Change-Id: I774fbd9620c6f3f2f19b819c9009fab7cc2e3229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848460
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74148}
2021-04-23 14:15:32 +00:00
Nico Hartmann
98300313b3 [TurboFan] Streamline BigInt.asUintN lowering
This CL applies the following changes:
- JSCallReducer no longer generates a CheckBigInt in front of the
  generated BigIntAsUintN.
- This results in a slight change of the semantics of the latter, which
  now includes the necessary type check. Typer and Verifier are changed
  accordingly.
- The BigIntAsUintN operator is now effectful, since it can now deopt.
- IrOpcode::kBigIntAsUintN is now lowered in SimplifedLowering instead
  of EffectControlLinearizer, the necessary type check is introduced
  by the RepresentationChanger.
- Adds a small mjsunit test to check the correct deoptimization behavior
  of optimized BigInt.asUintN.
==> Remove UseInfo::TruncatingWord64()!

Drive-by: Fix an issue in ChangeUnaryToPureBinaryOp when the new_input
is at index 1.
Drive-by: Introduce an %Is64Bit() intrinsic to allow tests to
distinguish 32 and 64 bit architectures.

Bug: v8:11682
Change-Id: I448f892d3bd2280d731ae5b248c833de8faf1bd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843816
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74147}
2021-04-23 14:07:52 +00:00
Ulan Degenbaev
508248f745 [cleanup] Remove stale TODOs
Change-Id: Ibfbb306d52092bc9e9564d1e1b2d1cb7f7edfbb9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844662
Auto-Submit: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74146}
2021-04-23 13:36:32 +00:00
Georg Neis
01a93417e4 [compiler] Aggressively lower pure dead operations to DeadValue
Bug: chromium:1195650
Change-Id: Ia18c053d54aa62ecafc387688dfb57ee63d2a09c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831490
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74145}
2021-04-23 13:20:02 +00:00
Sathya Gunasekaran
01bbc53438 Revert "[arm] Make the constant pool check deadline smarter"
This reverts commit df4dae7765.

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

Original change's description:
> [arm] Make the constant pool check deadline smarter
>
> Rather than having periodic constant pool checks that almost always fail
> (because the constant pool deadline isn't close enough, or even because
> there's no constant pool to emit at all), set a single deadline on the
> first constant pool insertion which expires just before the maximum
> distance to the constant pool. Constant pool checks around unconditional
> jumps happen irrespective of this deadline.
>
> In particular, this is made possible by fixing the incorrect assumption
> that the constant pool can be emitted out of order. The new assumption
> (that the emission is in-order) is validated with a CHECK.
>
> Bug: v8:11420
> Change-Id: I061dd0b8c3476ba95ee1acfb3b485d8ba2adda91
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844665
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74141}

Bug: v8:11420
Change-Id: Ib822425749df33fb22a38d317c107a523b382e01
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846899
Auto-Submit: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74144}
2021-04-23 13:11:53 +00:00
Camillo Bruni
9c7aa9680c [mjsunit] Fix tickprocessor tests
Add missing resources to mjsunit/BUILD.gn and tickprocesser test.

Bug: v8:11681
Change-Id: I7ae8391f94913e376c93a40dd1f0ba16bff8dcc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844655
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74143}
2021-04-23 12:18:32 +00:00
Clemens Backes
8c3c89b0c0 [wasm] Abort wrapper compilation on isolate shutdown
JS-to-Wasm wrappers embed heap constants (like the undefined value), and
those heap values are being accessed during compilation for tracing.
This is not a data race, since those values are read-only. But if the
isolate dies while we are compiling those wrappers, we might read from
the heap after it has been free'd.

Ideally we would not access the isolate or the heap at all during
compilation, but delaying all tracing until the "finalization" phase is
not feasible, and removing the heap value printing from tracing would
significantly regress quality of this tracing.

Hence this CL only fixes the actual issue: That we keep compiling
wrappers when the isolate is already gone. It does so by introducing an
{OperationsBarrier} per isolate that is being taken by each thread that
executes wrapper compilation, and is used for waiting for background
threads to finish before the isolate shuts down.
Additionally, we actually cancel all compilation if a module dies (or
the isolate shuts down) before it finished baseline compilation. In this
state, the module cannot be shared between isolates yet, so it's safe to
fully cancel all compilation. This cancellation is not strictly
necessary, but it will reduce the time we are blocked while waiting for
wrapper compilation to finish (because no new compilation will start).

R=thibaudm@chromium.org
CC=manoskouk@chromium.org

Bug: v8:11626, chromium:1200231
Change-Id: I5b19141d22bd0cb00ba84ffa53fb07cf001e13cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846881
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74142}
2021-04-23 12:08:12 +00:00
Leszek Swirski
df4dae7765 [arm] Make the constant pool check deadline smarter
Rather than having periodic constant pool checks that almost always fail
(because the constant pool deadline isn't close enough, or even because
there's no constant pool to emit at all), set a single deadline on the
first constant pool insertion which expires just before the maximum
distance to the constant pool. Constant pool checks around unconditional
jumps happen irrespective of this deadline.

In particular, this is made possible by fixing the incorrect assumption
that the constant pool can be emitted out of order. The new assumption
(that the emission is in-order) is validated with a CHECK.

Bug: v8:11420
Change-Id: I061dd0b8c3476ba95ee1acfb3b485d8ba2adda91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844665
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74141}
2021-04-23 11:25:09 +00:00
Michael Achenbach
e837c8e7e2 [test] Upgrade fyi builders to Bionic
No-Try: true
Bug: chromium:1199430
Change-Id: I2a2b04fae6c647602a1471a0c9959324e15ad37e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846890
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74140}
2021-04-23 11:11:59 +00:00
Ross McIlroy
7d1959a1b8 [Turboprop] Avoid some repeated reducers in Inlining/TypedLowering phases.
BUG=v8:9684

Change-Id: Ia63928e67dd714690b4f54c14361c6ee5e81f604
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843809
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74139}
2021-04-23 10:05:19 +00:00
Omer Katz
4d0446f6c9 cppgc: Last batch of unittests from heap_tests.cc
Bug: chromium:1056170
Change-Id: I64d817f9c5f56c0d7ae5a68ef3f00d3149548259
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846882
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74138}
2021-04-23 09:25:48 +00:00
Alex Rudenko
0115a7e0f7 Deprecate executionContextId in Runtime.addBinding
`exectionContextId` parameter in Runtime.addBinding is not working
correctly and does not have a practical use case. Therefore,
deprecating it in favour of the `executionContextName` parameter that
better serves the purpose of exposing bindings to isolated worlds. We
expect most users to be able to migrate to `executionContextName`.

Bug: chromium:1169639
Change-Id: Ic37cefa6a62501c7e903923f1f9c0da7e51326c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844652
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74137}
2021-04-23 09:22:18 +00:00
Michael Achenbach
2fa284628b Whitespace change to trigger builders
Bug: chromium:1154223
Change-Id: I022818764091bbc0d3b03cfd11b58f40fe8091ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846889
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74136}
2021-04-23 08:49:46 +00:00
Michael Lippautz
f5371cef82 cppgc,heap: Refactor non-tracing GC handler
Untangles the non-tracing GC optimization (Scavenger) that allows for
dropping objects that are only reachable from certain API references
from EmbedderHeapTracer. Instead, allow setting it on Isolate.

This allows for using the optimization when using cppgc.

Chromium-side: https://crrev.com/c/2844587

Bug: chromium:1056170
Change-Id: I20f28dd84c808872c7f9559c8c168e828794dd1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844657
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74135}
2021-04-23 08:03:18 +00:00
Manos Koukoutos
302ed166bc [wasm] Remove duplicate checks of current_code_reachable_and_ok_
Changes:
- Reintroduce CALL_INTERFACE() and use it over
  CALL_INTERFACE_IF_REACHABLE_AND_OK() in contexts where
  current_code_reachable_and_ok_ is known to hold.
- Add V8_LIKELY annotations.

Bug: chromium:1201718
Change-Id: I6a448a8955ecec20fdddef636d563cb1b5a93679
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846886
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74134}
2021-04-23 07:52:29 +00:00
Deepti Gandluri
89af05e756 [wasm-simd] Rename no_simd_sse to no_simd_hardware to be generic
Change-Id: Id1581981ac54c74216e5a7887b7972254237f319
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2847581
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74133}
2021-04-23 00:25:29 +00:00
Liu Yu
02a51e6bdc [mips] Skip some tests on MIPS which don't support SIMD
Change-Id: I8301678b03439ce4d900c173c48d0373f44dbd4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2841887
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74132}
2021-04-22 23:48:28 +00:00
Deepti Gandluri
c4468c39f0 [wasm-simd] Remove simd lowering compilation env variable
Bug: v8:11613
Change-Id: I25bf720164129c3d95ebc07d0c2a0f6e6b8ee9af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2847473
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74131}
2021-04-22 23:40:58 +00:00
Milad Fa
7961ab1b5a PPC [simd]: optimize vector load/store on power 9
Using the added lxvx and stxvx instructions, we can load and
store vector register values in a single instruction.
MRR encoding does not have a 16 byte alignment requirement.

Change-Id: I9c1d80fd867a0e79d3390e4a05e08cdf2a2e4835
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2845734
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74130}
2021-04-22 23:27:58 +00:00
Junliang Yan
e866b7ab51 ppc: [liftoff] implement cond branch
Change-Id: I0277bd7de282449fde232777b0482cc52a2d0ef6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844995
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74129}
2021-04-22 23:12:28 +00:00
Omer Katz
73607264f8 cppgc: Another batch of tests
Bug: chromium:1056170
Change-Id: I0ccb8d3a67a21467e9145ddbff8514a6054d57fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843821
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74128}
2021-04-22 22:46:58 +00:00
Ng Zhi An
01c670e416 [message] Have message testcfg extend ExpectedOutProc
This will make --regenerate_expected_files flag work for message tests.

Bug: v8:10773
Change-Id: Ica87bd69bd0a41e2a3c168d2200d0cd0c7f094da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2842387
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74127}
2021-04-22 18:43:28 +00:00
Ng Zhi An
9fb6983ed5 [wasm-simd][x64][ia32] Factor v128.not into shared code
Bug: v8:11589
Change-Id: If92ef6d8ce49831818c797909a7655db8101d154
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2842263
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74126}
2021-04-22 18:01:28 +00:00
Milad Fa
5d9b6b30af PPC/S390 [simd]: optimize GeS ops on ppc and s390
Doing a `!(B > A)` which is equal to `A >= B`. This way
we use one less instruction.

Change-Id: I49d50f11096e2d542eaabab82c17225c83e89b63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2846980
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74125}
2021-04-22 17:31:39 +00:00
Yahan Lu
e5e5932390 [riscv64]Clean call/jump register
Change-Id: I33d7bdfc14af9ad169c79a3efd6af6ba2f2362c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814726
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Cr-Commit-Position: refs/heads/master@{#74124}
2021-04-22 13:18:41 +00:00
Leszek Swirski
7c5e99c021 [arm/sim] Add 'sim' gdb command and backtrace command
Port the recent arm64 simulator debugger improvements to arm:

  * [arm64/sim] Add a 'sim' gdb command
    https://crrev.com/c/2664448
  * [arm64/sim] Add a simple backtrace debug command
    https://crrev.com/c/2666688

Change-Id: Id58a49cfe8e643be0fb6718a0a149e2c7ea0bcaa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844659
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74123}
2021-04-22 12:58:27 +00:00
Thibaud Michaud
fb51aa40a4 [wasm][x64] Fix unordered floating-point select
Unordered floating-point (non-)equality is implemented using two flags
on x64: kUnorderedNotEqual as "not_equal OR parity_even" and
kUnorderedEqual as "equal AND parity_odd". Only the first flag was
checked.

This change fixes the kUnorderedNotEqual case by emitting a second
cmov to also move the "true" value if the parity_even flag is set. The
kUnorderedEqual case is covered by inverting the condition in the
instruction selector.

This should also be optimal according to the code emitted by clang -O3
for equivalent C++ code.

Drive-by: remove unused overload of EmitWithContinuation.

R=neis@chromium.org
CC=ahaas@chromium.org

Bug: chromium:1200184
Change-Id: Iae438d29fb5897ca910a154f140a5a6a904490ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844651
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74122}
2021-04-22 12:53:52 +00:00
Wenyu Zhao
0f683da350 [heap] Enable inline_new for single generation heap
Currently the --single-generation flags disables inline allocations
and forces all allocations to go via runtime where they are redirected
to the old generation.

This patch implements the young to old redirection in CSA and TF.

Bug: v8:11644
Change-Id: Ie945ba684fb0f41d5414a05be2f25245d4869d6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2839010
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74121}
2021-04-22 11:57:41 +00:00
Jakob Gruber
1277bb5c55 [compiler] Support GetPropertyAccessInfo in a concurrent setting
Until this CL, the JSHeapBroker::GetPropertyAccessInfo (GPAI) process
was as follows:

 1. GPAI is called on the main thread (MT) during the serialization
    phase to create and cache PAIs.
 2. GPAI is called again from the background thread (BT); only cached
    PAIs from step 1 are usable.

As part of concurrent inlining, the goal is to move GPAI fully to the
background thread. This CL takes a major step in that direction by
making GPAI itself callable from the BT without resorting solely to PAIs
that were previously cached on the MT.

There are two main reasons why GPAI previously had to run on the MT:

 a) Concurrent access to Maps and other heap objects.
 b) Serialization and creation of ObjectRefs for objects discovered
    during GPAI.

This CL addresses only reason a) and leaves b) for future work. This
is done by keeping the two-pass approach, s.t. the initial call of
GPAI on the MT discovers and serializes objects. We then clear all
cached PAIs. The second call of GPAI on the BT thus runs full logic in a
concurrent setting.

Once all relevant objects (= maps and prototypes) no longer require
MT-serialization, reason b) is also addressed and the first pass can be
removed.

The new logic is implemented behind the runtime flag
--turbo-concurrent-get-property-access-info (default true), intended
to be removed in the future.

Bug: v8:7790
Change-Id: Idbdbfe091d7316529246a686bb6d71c2a0f06f8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2817793
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74120}
2021-04-22 10:59:01 +00:00
Liu Yu
0499aa54d7 [mips64][turbofan] LoadImmutable should be eligible as memory operand
Port: cc0d6a85d5

Bug: v8:11510
Change-Id: I4b2c0fa90e14609bb22de36b71e37eddc6f46af5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2845085
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#74119}
2021-04-22 10:48:01 +00:00
Nico Hartmann
9ce403dba2 Make DebugInfo::flags access relaxed atomic
Bug: v8:11576
Change-Id: I3e15a3311eae44b0d70bcc8dc536eb777d92151f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2835730
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74118}
2021-04-22 09:24:41 +00:00
Camillo Bruni
272445f109 [runtime] Fix promise hooks
promiseCapability can be undefined.

Bug: v8:11025
Bug: chromium:1201113
Change-Id: I9da8764820cee0db1f0c38ed2fff0e3afeb9a80e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844649
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74117}
2021-04-22 09:02:11 +00:00
Yahan Lu
4504fbe235 [riscv64] Re enable constant pool
Change-Id: Ic84fbda771a89ee20c43795dd5c1ab4a91057862
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814724
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#74116}
2021-04-22 08:36:41 +00:00
Camillo Bruni
c98b4f4c9a [mjsunit] Skip slow tickprocessor test
Change-Id: I84af3c563faf5207cf0f33f9a97de5f95aada917
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844489
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74115}
2021-04-22 08:09:11 +00:00
Junliang Yan
784c5702d2 [runtime] fix gcc complain on Werror=parentheses
Bug: v8:11675
Change-Id: I8046e61d92b502a8c96f11e3ecfc528544c6ba97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843953
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74114}
2021-04-22 06:08:51 +00:00
Lu Yahan
b30fa8a77e [riscv64][codegen] Add static interface descriptors
Port 2871e05cc3

Bug: v8:11420
Change-Id: Iaf7a4bc64cecdfc11decefd19c7e741a90003c6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2834632
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#74113}
2021-04-22 01:04:10 +00:00
Andrew Comminos
0aacfb2a6e [cpu-profiler] Reintroduce support for context filtering
As we can still intend to run the web-exposed profiler outside of an
origin-isolated environment, add support back for filtering by
v8::Context.

This reverts commit 05af368100.

Bug: chromium:956688
Change-Id: Idd98bea3213b5963f689a04de6c3743073efc587
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2785806
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#74112}
2021-04-21 22:00:30 +00:00
Junliang Yan
32d3c92d8e s390x: [liftoff] cleanup floating point functions
Change-Id: I0ef9381fd2c68414c10cb14eb678507b7f12673b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2844074
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74111}
2021-04-21 21:21:40 +00:00
Ng Zhi An
c8f1b36d2b [wasm] Change trace memory instr offset to be relative to module
Instead of {func-index}+{pc of instruction relative to function}, make
it {func-index}:{pc of instruction in module}. This is more consistent
with existing conventions
(https://webassembly.github.io/spec/web-api/index.html#conventions) and
other tools (like output of wasm-objdump).

Bug: v8:10773
Change-Id: I7ceecafd984e2d1adbb57266e1f7448762e23ac9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2842267
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74110}
2021-04-21 20:01:50 +00:00
Ng Zhi An
02820f3a08 [wasm-simd] Use no_simd_sse to skip test instead of forcing flags
Bug: v8:10773
Change-Id: I2f2a828bea66c7547d988c6f4c36cbd48c7f85b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2842384
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74109}
2021-04-21 19:36:10 +00:00
Clemens Backes
af6ac58d30 [disassembler] Fix unimplemented instruction
After appending 'unimplemented instruction' we need to increase the data
pointer to avoid an endless loop and to fulfill a later DCHECK.

R=jkummerow@chromium.org

Bug: chromium:1201114
Change-Id: I707809f81a4d9a6b3653b94b4836482c006b76ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843819
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74108}
2021-04-21 17:53:20 +00:00