Commit Graph

67224 Commits

Author SHA1 Message Date
Victor Gomes
83867ef69e [cleanup] Rename DeoptimizeBaseline to DiscardBaselineCode
- Baseline is to be consider non-optimized code, so for consistency we rename these functions to DiscardBaselineCode.
- Move to debug/, since discarding baseline code is only used by the debugger.
- %DeoptimizeNow and %DeoptimizeFunction are not to be used to tier down from Sparkplug to Ignition

Change-Id: I050607d4d6978907c589e54c57e940979b0a9a15
Bug: v8:11429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692699
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72732}
2021-02-15 10:40:19 +00:00
Michael Lippautz
6b8ddeb96d Revert "[build] Remove V8_GN_HEADER hybrid mode"
This reverts commit 6beed8d544.

Reason for revert: Breaks some targets that lack a dependency onto v8-gn.h, see https://crbug.com/1178409.


Original change's description:
> [build] Remove V8_GN_HEADER hybrid mode
>
> v8_generate_external_defines_header has been enabled for a couple of
> weeks now with no problems, so this removes the hybrid state where
> V8_GN_HEADER was defined on the command line along with the other
> defines.
>
> Bug: v8:11292, v8:11341
> Change-Id: Ie78f00afe5d1cbca751101a7beb61a18c7d86d04
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2681947
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Auto-Submit: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72597}

TBR=mlippautz@chromium.org,delphick@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

No-try: true
Bug: v8:11292
Bug: v8:11341
Bug: chromium:1178409
Change-Id: Ic730ae1bdfe09b13cc0bec96a092822b1874fb0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692702
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72731}
2021-02-15 10:02:49 +00:00
Michael Achenbach
a7d7c3c37d Whitespace change to trigger bots
Change-Id: I72964af375a5dbaaa8a52df0c042422803aabf75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692700
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72730}
2021-02-15 09:15:36 +00:00
Michael Achenbach
91e1d6e159 Whitespace change to trigger bots
Change-Id: I0e17d34f7c1350291c40320a1a95ea140a7d937c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692698
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72729}
2021-02-15 08:46:41 +00:00
Andreas Haas
bd03a395a7 [cleanup] Rename Code::has_tagged_params to has_tagged_outgoing_params
This flag name caused misunderstanding in CLs, so it's better to
rename it. With the new name it's clear that this flag is talking about
the outgoing parameters and not about the incoming parameters.

R=jgruber@chromium.org

Bug: v8:11384
Change-Id: Ib371ce4e1eae9a20e61ac2cda67dff48a120144f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690596
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72728}
2021-02-15 07:16:43 +00:00
v8-ci-autoroll-builder
3146e7f739 Update V8 DEPS.
Rolling v8/build: 6071297..aca4b0d

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

Change-Id: I573fcc7b5ce0804592db9c887c9dba30e8239c9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2694956
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@{#72727}
2021-02-15 03:49:42 +00:00
v8-ci-autoroll-builder
2d052b01f2 Update V8 DEPS.
Rolling v8/build: f306685..6071297

Rolling v8/third_party/aemu-linux-x64: FC12QGMdCPb7lf3NBC6KhslYMLXQvJuO0VQnTiEAKxAC..AFb5I0J9LTvrxaixyFmiKgTuOLLQ3YJ_FAEwRZq1basC

Rolling v8/tools/clang: fea4246..dbe0d80

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

Change-Id: I3803cff0833ff1f71d06d2c2f8bb6315abd2cad1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2694112
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@{#72726}
2021-02-14 04:06:34 +00:00
v8-ci-autoroll-builder
07f385d1f2 Update V8 DEPS.
Rolling v8/build: d1fa78c..f306685

Rolling v8/buildtools: 7e85fef..228b1c1

Rolling v8/buildtools/linux64: git_revision:55ad154c961d8326315b1c8147f4e504cd95e9e6..git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3

Rolling v8/third_party/aemu-linux-x64: zN4Wm-IY1Nd2ZF2IFXt3kLaxI1cDiwANew4sQzpVRSgC..FC12QGMdCPb7lf3NBC6KhslYMLXQvJuO0VQnTiEAKxAC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d2aa569..e4328db

Rolling v8/third_party/depot_tools: 398091b..7386a1e

Rolling v8/tools/clang: 35e7868..fea4246

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

Change-Id: Id8600af539ce4eb95cc8da5da2ba39048c789d1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2694108
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@{#72725}
2021-02-13 03:51:15 +00:00
Ng Zhi An
5e80333806 [wasm-simd][ia32] Implement i64x2.abs
Same code sequence as x64.

Bug: v8:11416
Change-Id: Ibbd4cbf75e10b0ce876d42809d909868fdb86b87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2686309
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72724}
2021-02-12 23:03:30 +00:00
Omer Katz
b804a54bc0 cppgc: Fix ObjectSizeTrait
HeapObjectHeader::GetSize returns object size including
HeapObjectHeader. This is find for our internal usages since we want to
know the actual size consumed by the object.
ObjectSizeTrait should report object size for external users for which
the HeapObjectHeader should be invisible. The sizes returned by the
trait should exclude the header.

Bug: chromium:1056170
Change-Id: I75111b9a3d0d27d0a39df4abdacaa84f1cee3a5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692689
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72723}
2021-02-12 21:28:40 +00:00
Ross McIlroy
f5305393f0 [Turboprop] Ensure constant operands are only used when allowed.
Previously it was possible for a slot operand to be allocated a
constant operand which is not valid. This CL adds support to the
mid-tier register allocator to keep track of whether spilled operands
can support constant operands, and if not to instead move the constant
to a spill slot at it's definition point, and use that spill slot
instead.

In the process of doing this, we can cleanup the hack that
required constants to always be allocated to a register for
REGISTER_OR_SLOT operator policies.

BUG=chromium:10772,v8:10772,v8:9684

Change-Id: I975ea2c481b45fc0855e175bc6dc2bd0a83f509a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692569
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72722}
2021-02-12 20:40:36 +00:00
Ng Zhi An
c5fd776de5 Reland "[wasm-simd][ia32] Implement i64x2 signed compares"
This is a reland of a16add806d.

The fixes are adding disassembly for pcmpgtq and vpcmpgtq.
While fixing also noticed a mistake in assembler for pcmpgtq,
which flipped dst and src.
Also realized that we don't detect SSE4.2, so adding that in.

PS2 contains these changes.

Original change's description:
> [wasm-simd][ia32] Implement i64x2 signed compares
>
> The code sequence is exactly the same as x64.
>
> Bug: v8:11415
> Change-Id: I53ed2723eda29c0a250cff514372a3d45b203476
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2683495
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72637}

Bug: v8:11415
Change-Id: If6a18af2d7de20ac8ad38f94b6d0220769397194
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2688119
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72721}
2021-02-12 19:30:01 +00:00
Deepti Gandluri
9ac0fed424 Add zhin@ to src/codegen OWNERS
Change-Id: Ia8eed6717385c7f662677ff8a117b04bf64aa452
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2693287
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72720}
2021-02-12 19:28:58 +00:00
Ross McIlroy
d02223f111 [Turboprop] Ensure deopt return point is after branch poisoning
If we return to code after a dynamic map check bailout, ensure the
return point is after the branch poisoning logic, since we might
cause the speculation poisoning register to be cleared otherwise.

Change-Id: Ia003aac16196857218fdfcdc7c2a4c9e8f02b1c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692576
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72719}
2021-02-12 18:43:01 +00:00
Junliang Yan
28bda04617 s390: [wasm-gc] Implement optional-depth rtts
Port 3a2ae154f9

Original Commit Message:

    As per the latest wasm-gc spec, rtts now have optional depth, with
    (rtt n type) <: (rtt type) for every depth n. Liftoff compilation
for
    type checks without depth are not supported yet.

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

Change-Id: Iba3d5184be1e69fae805873f832670ed33a41247
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2693326
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72718}
2021-02-12 18:05:06 +00:00
Junliang Yan
5ad83ebe23 s390x: [liftoff] implement rounding for liftoff
Change-Id: Id823d29cc0827ee3df5e3ae0c1bf5efdd3d405cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692847
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72717}
2021-02-12 17:08:54 +00:00
Milad Fa
02c80dbff9 PPC/s390: [debug] Fix extra arguments when restarting frame
Port 94b294b349

Original Commit Message:

    Before the removal of the arguments adaptor frame, we could set {actual arguments count} = {formal parameter count} before restarting a live frame to avoid re-entering in the adaptor frame trampoline.
    This does not work anymore, since we now need the correct value of the {actual argument count} to be pushed in the callee frame to be used in its epilogue.

    This CL calls InvokeCall with the correct argument count and the kDontAdaptArgumentsSentinel to skip arguments adaptation.

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

Change-Id: Idc7f712d1860192dc0306366ca77230ed8ad3455
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2693046
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72716}
2021-02-12 17:07:14 +00:00
Benedikt Meurer
a9b6f3f7e6 [inspector][stack-traces] Remove support for "displayName".
As outlined in the design document linked below, we're removing the
support for the non-standard Function.displayName property for the
purpose of Error.stack and DevTools Inspector stack traces. The
motivation here is that the negative lookup is costly, and we have
Function.name as a standard alternative (configurable since ES6 for
exactly this reason).

I dediced to go with JSFunction::GetDebugName(), since
JSFunction::GetName() was confusing in that it'd only get the "name"
property's value if it's a data property, but not with accessors.
JSFunction::GetDebugName() makes it clear that this is really a debug
helper function and might not give you the "name" property value.

Doc: https://bit.ly/devtools-function-displayName-removal
Bug: v8:8742, chromium:1177685, chromium:1077657, chromium:17356
Change-Id: I7717585cbace626174b2f2ed2a4f68f75429eca1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692189
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72715}
2021-02-12 16:56:23 +00:00
Michael Lippautz
695a449032 cppgc: Check ephemerons for unset key
Ephemerons are based around WeakMember which may just be null at the
time the pair is considered for liveness. Bail out of marking for null
keys, as they write barrier would anyways make the value strong when
marking the key.

Bug: chromium:1056170
Change-Id: If8775a370824b88fc67fa479a0c0893985fbf5f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692571
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72714}
2021-02-12 16:55:00 +00:00
Thibaud Michaud
0df0d7ab67 [wasm][interpreter][eh] Add implicit rethrow
If the exception tag does not match any of the catch blocks and there is
no catch_all block, it should be rethrown.

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: I8df80f51340fc6265f5ef4308ee3b0f892ee3a90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690599
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72713}
2021-02-12 16:22:45 +00:00
Victor Gomes
203a060501 [baseline] Baseline code does not need to be marked for deopt
Change-Id: Ib108067c78e3e47c1ac3738e8c4889fab486dbc9
Bug: v8:11429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692686
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72712}
2021-02-12 16:07:37 +00:00
Victor Gomes
02e477e341 [cleanup] Create Factory::NewBaselineData
Change-Id: Ia115a8dfd35c935fa4356dd32dcd2e035574f7d1
Bug: v8:11429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692566
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72711}
2021-02-12 16:02:03 +00:00
Benedikt Meurer
c5cf7db1f2 [api] Deprecate Function::GetDisplayName().
Mark Function::GetDisplayName() as deprecated, scheduled for removal
with M92.

Bug: chromium:1177685, chromium:17356
Change-Id: Iedb905d2d5ab6f8ec95f47bbc982e4f03891fd48
Doc: https://bit.ly/devtools-function-displayName-removal
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690601
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72710}
2021-02-12 16:00:40 +00:00
Leszek Swirski
cd139abbf8 [sparkplug] Change TODO into a comment
The TODO around range checks for LAST_JS_RECEIVER_TYPE is guarded
by a STATIC_ASSERT, so it can be a comment rather than a TODO.

Bug: v8:11429
Change-Id: Id0d7fc9526448319d89cba43d793accf022a949b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692567
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72709}
2021-02-12 15:46:57 +00:00
Santiago Aboy Solanes
88de5b0f4f [objects] Remove RawFastPropertyAtPut
After after double field unboxing deletion, there was no need for this
method.

Bug: v8:11422
Change-Id: I540ffc80ad21c4cfec62fd8c80a343b8b8eed4bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691047
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72708}
2021-02-12 15:44:37 +00:00
Michael Achenbach
bc403dcb97 [test] Temporarily drop no-sse flags from differential fuzzing
No-Try: true
Bug: v8:11442
Change-Id: I13849c9fa90fa5a971c24694db56a07cc1cccc24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692570
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72707}
2021-02-12 15:29:46 +00:00
Michael Achenbach
76ce5bbb1d [test] Temporarily skip no-sse flags on flag fuzzer.
No-Try: true
Bug: v8:11442
Change-Id: I856470d95cf0b70e98e09a0ce4e8d80377e7a92a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691052
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72706}
2021-02-12 15:14:48 +00:00
Santiago Aboy Solanes
ee1b6415bb [csa][cleanup] Simplify StoreElementBigIntOrTypedArray
BigInts are considered in the typed array elements kind, there's no need
to special case them.

Bug: v8:6949, v8:11384
Change-Id: I0b231d3ba2ca53236b2005d200b8a208bc57ed0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690595
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72705}
2021-02-12 15:12:39 +00:00
Victor Gomes
94b294b349 [debug] Fix extra arguments when restarting frame
Before the removal of the arguments adaptor frame, we could set {actual arguments count} = {formal parameter count} before restarting a live frame to avoid re-entering in the adaptor frame trampoline.
This does not work anymore, since we now need the correct value of the {actual argument count} to be pushed in the callee frame to be used in its epilogue.

This CL calls InvokeCall with the correct argument count and the kDontAdaptArgumentsSentinel to skip arguments adaptation.

Bug: v8:11431, v8:11441
Change-Id: I3698891f07274e8ab95c82b9dd35f53bd78632d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2675927
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72704}
2021-02-12 15:08:18 +00:00
Santiago Aboy Solanes
b309b9ae7f [csa][cleanup] TNodify LoadElementAndPrepareForStore's return value
Bug: v8:6949, v8:11384
Change-Id: Ief5a14e5c4327adb8fe9c12fd4af72596a1ba20a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692209
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72703}
2021-02-12 15:03:08 +00:00
Mike Stanton
3393378b3b [compiler] Create canonical handles in JSTypedArrayRef::buffer()
Bug: chromium:1177368, chromium:1177369, v8:7790
Change-Id: Ice0b1b3fbc0b15d2b0b80255b7bb4a8c61f855e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692246
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72702}
2021-02-12 14:52:35 +00:00
Clemens Backes
15f3392a7e [wasm][debug] Implement instrumentation breakpoints
This CL adds support for instrumentation breakpoints in wasm. The
request for "break on entry" is set on the script, and we need to keep
it stored there because there might not be any instances of that wasm
module yet. Once instances get created, the flag value is transferred to
all instances. The flag stored there is then checked in the function
prologue in Liftoff debugging code. This ensures that we will stop at
the first valid break position in any function within that module.
Hitting that instrumentation breakpoint will then clear the flag from
the script and from all other live instances (in the same isolate).

A first basic test is contained in this CL. More tests will be added
later.

R=thibaudm@chromium.org, bmeurer@chromium.org

Bug: chromium:1151211
Change-Id: I5442d4044934988269becececc03699b850d51d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690588
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72701}
2021-02-12 14:37:16 +00:00
Thibaud Michaud
827411086b [wasm][interpreter][eh] Implement catch_all
R=clemensb@chromium.org

Bug: v8:8091
Change-Id: I512db4c4a6dce56c06f6d222f75029eebeaa4f66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691046
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72700}
2021-02-12 14:26:38 +00:00
Santiago Aboy Solanes
e7b2d64ef1 [csa][cleanup] TNodify value of one of the two StoreElement methods
Having a separate method seems like the cleanest option. Node* is still
there in the RawPtrT version but that seems to require another solution.

Bug: v8:6949, v8:11384
Change-Id: I581b395aa0d0a8a3b2cfed3c6ffa0a0cfed7272f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690594
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72699}
2021-02-12 14:16:48 +00:00
Leszek Swirski
def5e9c364 [sparkplug] Disable baseline tests under CFI
Add a .status file variable for the "v8_control_flow_integrity" gn arg,
and disable baseline tests for now in that configuration.

No-Tree-Checks: true
No-Try: true
Bug: v8:11439
Change-Id: I7274a168893cfd6619ce98fdd14a692217fd56c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692206
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72698}
2021-02-12 13:57:39 +00:00
Georg Neis
cf7cba8d61 Reland "[compiler] Directly read PropertyCells"
This reverts commit 87df0b7ecc (thus
relands 42cd9eb78d), with fixes for
the discovered issues.

Original change's description:
> Revert "[compiler] Directly read PropertyCells"
>
> This reverts commit 42cd9eb78d.
>
> Reason for revert: Clusterfuzz issues, e.g.
> https://bugs.chromium.org/p/chromium/issues/detail?id=1176318
>
> Original change's description:
> > [compiler] Directly read PropertyCells
> >
> > Main changes:
> >
> > - Introduce a new broker data kind kBackgroundSerialized for objects
> >   that can be serialized in the background (when direct reads are on).
> >   (I'm planning to remove kPossiblyBackgroundSerialized in a followup,
> >   in favor of a dynamic choice of kSerialized or kBackgroundSerialized).
> > - Make PropertyCell use that new kind.
> > - Introduce a bottleneck in runtime code for changes to PropertyCells
> >   and make sure that a certain protocol is followed that allows
> >   concurrent reads from the background thread.
> > - Improve interface of PropertyCell in various ways.
> >
> > Bug: v8:7790
> > Change-Id: If3d7926c3b894808811348b4b2bed153f5c06897
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2661462
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#72586}
>
> TBR=ulan@chromium.org,neis@chromium.org,verwaest@chromium.org,nicohartmann@chromium.org
>
> Change-Id: Id04145760c49fa379bc5a3fc16eba664025a9180
> Bug: v8:7790
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2685125
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72619}

Bug: v8:7790, chromium:1176509, chromium:1176318, chromium:1176504
Change-Id: Icaf285912bb948432a4a2d599cd174f6a5aa296e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2685166
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72697}
2021-02-12 13:52:40 +00:00
Leszek Swirski
c913ef3a91 [sparkplug] Change Sparkplug to Baseline
Currently we sometimes refer to baseline code or the baseline compiler
by its codename (Sparkplug). The codename is fun, but we should be
consistent and call things by one name or the other. Following the
pattern of Ignition stuff being called "interpreter", we call Sparkplug
"baseline", and leave the codename only in flags and variants.

Bug: v8:11420
Change-Id: I432e5629518be7c7ad38b6acff024c91d4cfd6d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692186
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72696}
2021-02-12 13:51:35 +00:00
Sathya Gunasekaran
9129547bf5 [ic] Optimize CallOptimization
Instead of calling LookupHolderOfExpectedType twice, call it once
and pass the result to IsCompatibleReceiverMap.

Removes unnecessary IsCompatibleReceiver function.

Bug: v8:9805
Change-Id: I1333449d10702e824dddbdbca5c87e639a7d7118
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692187
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72695}
2021-02-12 13:50:31 +00:00
Benedikt Meurer
eed0d27c2f [stack-traces] Simplify and speedup stack trace collection.
Following up on https://crrev.com/c/2689185, this CL significantly
simplifies the whole implementation of the stack trace capturing.

Before this CL, capturing any stack trace (for the purpose of the API or
Error.stack) would roughly work like this:

  1. The CaptureStackTrace() function uses the StackFrameIterator to
     walk the system stack. For each native frame it uses the
     FrameSummary abstraction to get all (including potentially inlined)
     frames. For each of those it appends a record consisting of six
     elements to a FrameArray (this holds pointers to the actual
     closures and receivers).
  2. Afterwards the FrameArray is shrinked to the required size, and a
     new FixedArray is allocated, and initialized with new
     StackTraceFrame objects where each holds a reference to the
     FrameArray, the index of the frame, and an initially uninitialized
     StackFrameInfo reference. This new FixedArray is then returned from
     CaptureStackTrace() and either stored on a message object or
     provided to the API as v8::StackTrace.

The new approach removes a lot of the machinery in between and directly
creates a FixedArray of StackFrameInfo objects in CaptureStackTrace().
These StackFrameInfo objects are directly exposed as v8::StackFrame on
the public API, and they hold the six fields that were previously stored
flat in the FrameArray. This not only avoids a lot of copying around of
data and creation of temporary objects and handles, but most importantly
unifies and simplifies the stack frame function inside StackFrameInfo,
so you no longer need to wonder which function / object might be
responsible for a certain API.

There's still a lot of room for improvement. In particular we currently
don't cache the source position for a given StackFrameInfo (or
globally), but rather recompute it every time. This is still very fast,
significantly faster than the previous approach.

There are some notable (potentially user visible) changes:

  - The CallSite#GetPosition() method now consistently returns the
    Wasm module relative bytecode offset for all Wasm frames (previously
    it'd return the function relative bytecode offset for non-asm.js
    Wasm frames).
  - The column and line numbers returned from StackFrameInfo methods are
    consistently 1-based now, instead of sometimes being 0-based (Wasm)
    and sometimes being 1-based (JS and asm.js Wasm). The only
    potentially noticable difference is that for
    CallSite#GetLineNumber() no longer returns 0 for Wasm frames, but
    that was wrong and useless anyways.
  - CallSite#GetThis() would sometimes return the_hole, another bug
    flushed out by this CL.

The CL also contains some other not noteworthy drive-by-cleanups.

Fixed: chromium:1057211
Bug: chromium:1077657, chromium:1069425, v8:8742
Bug: chromium:1127391, chromium:1098530, chromium:981541
Change-Id: Iff12f6838a4d99080db8dd96bccc14440affc5a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2689183
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72694}
2021-02-12 13:49:27 +00:00
Marja Hölttä
06c94c3803 [cleanup] Update comments to match the current spec
Bug: v8:11384
Change-Id: I6c4410530811df62d57b93e8b7e34c29d928bcb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2689188
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72693}
2021-02-12 13:48:21 +00:00
Santiago Aboy Solanes
189257447f [heap] Simplify mark-compact after double field unboxing deletion
Bug: v8:11422
Change-Id: I106b2226d531d7a868ac9344cce8c965250316e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690589
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72692}
2021-02-12 12:02:40 +00:00
Nico Hartmann
57ae048bd2 [test] Disable tests failing with new msan roll
Temporarily disable these tests failing on msan builds after latest
roll:
- test262/intl402/DateTimeFormat/timezone-invalid
- intl/regress-364374
- mjsunit/regress/regress-crbug-627935

No-Try: true
No-Tree-Checks: true
Bug: v8:11438
Change-Id: I4a7755f9f65b2e9a12463c9e12fbbe39d3f5efb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692188
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72691}
2021-02-12 11:53:48 +00:00
Clemens Backes
587e7163cd [test] Fix UBSan failure
UBSan starts complaining about a nullptr destination in memcpy after
https://crrev.com/c/2691828.
This CL fixes the error by not copying if there is nothing to copy.

R=nicohartmann@chromium.org

No-Try: true
No-Tree-Checks: true
Change-Id: I2c941b37d26931d6c2253bc3bb2c0aa659d4cb71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690605
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72690}
2021-02-12 11:24:53 +00:00
v8-ci-autoroll-builder
e5cf754b67 Update V8 DEPS.
Rolling v8/base/trace_event/common: 71cb2ac..7af6071

Rolling v8/build: 6408b07..d1fa78c

Rolling v8/buildtools: fc5af1a..7e85fef

Rolling v8/buildtools/third_party/libc++/trunk: d9040c7..8fa8794

Rolling v8/third_party/aemu-linux-x64: BJKsuvEy1d1R4k1qe_4WGn47cAA9BDUVDaMnfbyiH-cC..zN4Wm-IY1Nd2ZF2IFXt3kLaxI1cDiwANew4sQzpVRSgC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e6e7c93..d2aa569

Rolling v8/third_party/depot_tools: 79f916a..398091b

Rolling v8/tools/clang: 5798a76..35e7868

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

Change-Id: Ia25c05ee0cda2c20bcf26e1d309894340d2018d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691828
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72689}
2021-02-12 10:26:04 +00:00
Dominik Inführ
27fca37d15 [heap] Fix flaky test for GC epilogues
Ensure that epilogues are added to the LocalHeap before starting the GC.
Adding the epilogue after invoking NotifyStarted() might mean that the
epilogue is only added after the GC is already done and the epilogue
isn't run at all. The test flakily fails because the epilogue didn't
execute then.

Bug: v8:11434
Change-Id: I60723a99cd9224307f48acd0c0e8af3f93dd3eb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690600
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72688}
2021-02-12 10:08:51 +00:00
Ng Zhi An
3e6fe261f9 Bump expected static initializers count from 2 to 3
This should also unblock V8 DEPS roll:
https://chromium-review.googlesource.com/c/v8/v8/+/2689808

Bug: chromium:1177324
Change-Id: Iede2ba9c2257a2996715bcb7821ce14baa9ae9a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2689089
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72687}
2021-02-12 09:47:44 +00:00
Leszek Swirski
c053419e8c [sparkplug] Upstream Sparkplug
Sparkplug is a new baseline, non-optimising second-tier compiler,
designed to fit in the compiler trade-off space between Ignition and
TurboProp/TurboFan.

Design doc:
https://docs.google.com/document/d/13c-xXmFOMcpUQNqo66XWQt3u46TsBjXrHrh4c045l-A/edit?usp=sharing

Bug: v8:11420
Change-Id: Ideb7270db3d6548eedd8337a3f596eb6f8fea6b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2667514
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72686}
2021-02-12 09:31:06 +00:00
Thibaud Michaud
27b8ad2077 [wasm][eh] Add metrics for exception events
Sample elapsed time between two consecutive exception events of the same
type (throw/rethrow/catch). This will give us an idea of how frequently
exception handling features are used at runtime during the origin trial.

R=ahaas@chromium.org

Bug: v8:8091
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Change-Id: Ic3095eeeca08d2e079a507a492f10d2efb5ecfd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2684367
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72685}
2021-02-12 09:24:38 +00:00
Andrew Comminos
17a5a3b788 [cpu-profiler] Clear code entries from BytecodeFlushEvents
When the CPU profiler receives a bytecode flush event, ensure that we
clear the appropriate CodeEntry.

Bug: v8:11054
Change-Id: I94e771e42192b75ea6d317738e4f2d5b76533dc8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691826
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#72684}
2021-02-12 09:08:29 +00:00
Ng Zhi An
ec6df835f1 [wasm-simd][liftoff][arm] Implement v64x2.alltrue and i64x2.ne
Extract v64x2.alltrue code sequence into macro-assembler for sharing
between TurboFan and Liftoff.

Bug: v8:11347,v8:11348
Change-Id: Ica436178b4f92ea0ed574010cd74f1babf66680f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2686013
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72683}
2021-02-12 02:19:01 +00:00