Commit Graph

66833 Commits

Author SHA1 Message Date
Clemens Backes
7aca4135fc [wasm][serialization] Avoid heap allocations
There is no reason to allocate the vectors on the heap. Their
content will be heap-allocated anyway, and they are cheap to move
around.

Drive-by: Remove an unused counter.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I5660ecf5db7e8915a27255bae0215d5368c7d10e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644937
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72291}
2021-01-25 14:47:23 +00:00
Santiago Aboy Solanes
5acef05006 [compiler] Move GetPropertyDetails to DescriptorArrayRef
Also access the DescriptorArray through GetPropertyDetails concurrently
if the FLAG_turbo_direct_heap_access is on.

Bug: v8:7790
Change-Id: I13d12786399443ca1590dd87da7f371720acaa18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640421
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72290}
2021-01-25 13:51:56 +00:00
Dan Elphick
29006bb3c7 Revert "Reland "[build] Enable external flag header by default""
This reverts commit df5854c914.

Reason for revert: The v8-gn.h header file seems to be inconsistently rebuilt sometimes causing build failures: https://bugs.chromium.org/p/v8/issues/detail?id=11341

Original change's description:
> Reland "[build] Enable external flag header by default"
>
> This is a reland of d1da9694d4
>
> Relanding now that fixes for perfetto and cppgc are in:
> https://chromium-review.googlesource.com/c/v8/v8/+/2640458
> https://chromium-review.googlesource.com/c/v8/v8/+/2640480
>
> Original change's description:
> > [build] Enable external flag header by default
> >
> > Turns on v8_generate_external_defines_header.
> >
> > Bug: v8:11292
> > Change-Id: I4b1d9b47390b560b7cbf677948310694d8b03367
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2610966
> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> > Commit-Queue: Dan Elphick <delphick@chromium.org>
> > Auto-Submit: Dan Elphick <delphick@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#72201}
>
> Bug: v8:11292
> Change-Id: Ia47eeb6c45f4cc3db72c10782d677b69506fa3d6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642249
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72226}

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

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

Bug: v8:11292, v8:11341
Change-Id: I00719689e7a184e74699d074a01c10b4f462e553
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647259
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72289}
2021-01-25 13:49:37 +00:00
Clemens Backes
902e181d37 [wasm][serialization] Use Jobs to avoid blocking
We did spawn exactly one task for each of copy&reloc and publishing.
Those tasks did block until work is available. This can block background
threads which could otherwise execute other component's work.
Switching to the Job API allows us to easily avoid that blocking, and
just respawning a task when more work is available.
Is always avoid code duplication for participating in the work in the
main thread. Instead we just {Join()} the existing job, which makes the
current thread participate in work.

For now, both Jobs set a maximum concurrency of one, so the main thread
will only do work if no background thread is currently running. This can
be lifted in a follow-up CL to see the performance impact of both
changes independently.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I032153eb933648a750b113f5d766feb85b87070a
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643393
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72288}
2021-01-25 13:12:36 +00:00
Manos Koukoutos
7ae8c713b8 [wasm-gc] Remove excess immediate from ref.cast/test
According to the latest wasm-gc spec, the type immediate for the
argument's heap type is no longer required. This CL also adds a missing
check that the rtt immediate is a subtype of the argument's type.

Bug: v8:7742
Change-Id: I627002d1c4bdb4ca3f2181d2f4b659ce3e95cb2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642246
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72287}
2021-01-25 12:42:36 +00:00
Igor Sheludko
c44d7ffb3f Reland "[classes] Make sure parent classes are never turned to setup mode"
This is a reland of 0ce0d9348d

This is a clean reland. The test failure on GC stress bot seems to be
related to GC timing and --stress-flush-bytecode.

Original change's description:
> [classes] Make sure parent classes are never turned to setup mode
>
> It doesn't make sense in general and moreover an attempt to do so might
> cause hard stack overflow.
>
> Bug: v8:11317
> Change-Id: I2a6bbadba1ebc5c1496660c734df76a13600edac
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643389
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72275}

Tbr: verwaest@chromium.org
Bug: v8:11317
Change-Id: Ic73efff7d9690c0edf7fa07b8b90691e9775a748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642461
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72286}
2021-01-25 12:39:36 +00:00
Michael Lippautz
8cc2a64d95 cppgc: MakeGarbageCollected: Move static asserts to implementation
This allows embedders to specialize MakeGarbageCollectedTrait and
still get the static_asserts applied automatically, which avoids
bypassing the type constraints.

Bug: chromium:1056170
Change-Id: Ib24f8c6f5d8fb5ef1af4ca1af798f955fa253ba0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2647257
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@{#72285}
2021-01-25 12:17:46 +00:00
Clemens Backes
4002d142a6 [wasm] Snapshotting should add code refs
Since snapshotting returns a vector of code pointers, we should add them
so the surrounding {WasmCodeRefScope}, to make sure that they are not
being garbage-collected while the serializer reads them.
This is unlikely to happen, since serialization is only triggered once
top-tier compilation is finished, and we usually do not garbage-collect
top-tier code, but in rare circumstances (e.g. in debugging), it could
theoretically happen.

R=ahaas@chromium.org

Change-Id: Ie1a9654a8a1467c12e42181776cec1dad7366036
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644944
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72284}
2021-01-25 12:08:26 +00:00
Michael Lippautz
9515942d2c api: Fix constexpr construction of compaction space index
Bug: chromium:1056170
Change-Id: If639b12e1cceec2d27355bb4cbf8c1fefa8b5038
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642462
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@{#72283}
2021-01-25 12:03:26 +00:00
Camillo Bruni
b7b8c8aad6 [codegen] Use smaller instructions for smi loading on x64
- Use movl which clears the upper 32bits on x64
- Use xorl + movb for Smi.ptr values <= 0xFF, saving one byte over movl

Change-Id: Iacdacfbe397670667e71d1d12ef427a01994481d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642250
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72282}
2021-01-25 11:54:56 +00:00
Mythri A
502419a803 [turboprop] Delay optimizing functions that get hot slower
Functions that get hot quickly are more likely to stay hot and stable,
so optimize these functions earlier than the function that become
hot slower. To measure how "soon" the function gets hot this cl
introduces a global tick that is incremented whenever a function
registers a tick. We use the difference in the global tick between the
current tick and the last tick on that function to measure how soon
the function is becoming hot. We use the last tick to account for
functions that aren't used so much at the start but become hot
in a later phase. Currently we use this heuristic only for Turboprop
tierups. It is possible to extend this to extend this to Turbofan in
future.

Bug: v8:9684
Change-Id: I8ef265c03520274c68d56a9d35429531a3ba3d1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627850
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72281}
2021-01-25 10:26:05 +00:00
Igor Sheludko
27485b3535 Revert "[classes] Make sure parent classes are never turned to setup mode"
This reverts commit 0ce0d9348d.

Reason for revert: Causes failures on GC stress bots.

Original change's description:
> [classes] Make sure parent classes are never turned to setup mode
>
> It doesn't make sense in general and moreover an attempt to do so might
> cause hard stack overflow.
>
> Bug: v8:11317
> Change-Id: I2a6bbadba1ebc5c1496660c734df76a13600edac
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643389
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72275}

TBR=ishell@chromium.org,verwaest@chromium.org

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

No-Tree-Checks: true
Bug: v8:11317
Change-Id: I524ce6dfee219180f36302edc94b8935c91f21dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642458
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72280}
2021-01-25 08:09:44 +00:00
Shu-yu Guo
13005c319d Revert "Ship the relative indexing method .at"
This reverts commit 46628795f1.

Reason for revert: Compat breakage

Bug: chromium:1170196

Original change's description:
> Ship the relative indexing method `.at`
>
> I2S with LGTMs:
> https://groups.google.com/a/chromium.org/g/blink-dev/c/I8S78w7aFmE/m/qLHAcjhRCQAJ
>
> v8: 10961
> Change-Id: If0440c0595823c61352f144c1fc29c54a1175623
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2574716
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71619}

TBR=marja@chromium.org,syg@chromium.org

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

Change-Id: I2384af84100dcf8cb27f10c5d055d7f864ebcbb9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2646139
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72279}
2021-01-25 07:47:39 +00:00
Jakob Gruber
957d872bf5 [deoptimizer] Refactor translation opcodes and array builder
The final CL of this chain, this extracts translation opcodes into the
TranslationOpcode class, and merges logic for TranslationArray
creation into TranslationArrayBuilder.

Drive-by: Pull TranslationArray printing logic into
translation-state.cc.

Bug: v8:11332
Change-Id: Ia4bbb6cdd15ea3318dfb9b7edb6eb881530dda54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642254
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72278}
2021-01-25 07:46:35 +00:00
Jakob Gruber
107629d1c7 [compiler] Silence NaNs in Float64Mod and Float64Atan2
Looks like these may have been missed; all other related operators
silence NaNs.

Bug: v8:7519
Change-Id: If6ee8d6e02d304ccbb4821c21386f93eab225434
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637853
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72277}
2021-01-25 07:45:30 +00:00
v8-ci-autoroll-builder
4777f17053 Update V8 DEPS.
Rolling v8/build: c6a6de1..710b42c

Rolling v8/third_party/aemu-linux-x64: 3BZ2tnIBSRNhCGGy-kjxHmfx7sU6OP0zvO9x3gtnnY8C..DUWCHyibCTWCe-ijlAKpinTlXaJQW2jg8hs7uRUfK0gC

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I0b8ab37f65b85d3c6df60e1da426774cca96222c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2646138
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@{#72276}
2021-01-25 07:44:25 +00:00
Igor Sheludko
0ce0d9348d [classes] Make sure parent classes are never turned to setup mode
It doesn't make sense in general and moreover an attempt to do so might
cause hard stack overflow.

Bug: v8:11317
Change-Id: I2a6bbadba1ebc5c1496660c734df76a13600edac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643389
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72275}
2021-01-23 12:03:12 +00:00
v8-ci-autoroll-builder
7792dfd6f7 Update V8 DEPS.
Rolling v8/build: 61eac11..c6a6de1

Rolling v8/third_party/aemu-linux-x64: xAHa1IXmKteChkPvba9ezjSnKL7IyDePQRzWVUEAx9UC..3BZ2tnIBSRNhCGGy-kjxHmfx7sU6OP0zvO9x3gtnnY8C

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/beb8370..957dfea

Rolling v8/third_party/depot_tools: 361ccce..07bd252

Rolling v8/tools/clang: 786cae1..94a96af

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ie8f52da5e468fd92309253f2e1a5a335bcd9b3f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645703
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@{#72274}
2021-01-23 03:54:20 +00:00
Maya Lekova
fd4813bb9d Refactor JavaScript execution scopes to not allocate
This CL introduces a new internal class PerIsolateAssertSwitch which
gives a static Allow/Disallow interface to be used from within classes
such as DisallowJavascriptExecutionScope without the need for slow heap
allocations.

Bug: chromium:1155348
Change-Id: I66cd8377b5d9c43510165cd7b9a7f5ccdaf45c18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2617086
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72273}
2021-01-22 23:30:20 +00:00
Milad Fa
19b7ff412d cppgc: Fix compilation error on older gcc compilers
Without the added header the following compilation
error might occur:

error: ‘size_t’ does not name a type

Change-Id: I021f6ce7b9691f76f0c439265850f1f4fc50685c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645160
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72272}
2021-01-22 23:13:30 +00:00
Jakob Kummerow
ec143a63cd [mac-arm] Fix typo in preprocessor check
Change-Id: Ic1130d1bba3f70906cd39685bfa45b214424c2e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644952
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72271}
2021-01-22 22:19:49 +00:00
Jakob Kummerow
ec5b796ffd [wasm-gc] Liftoff support part 6: funcrefs
This implements support for the following instructions:
ref.func, call_ref, return_call_ref

Bug: v8:7748,v8:9495
Change-Id: If5bdc2b9bc2347de056de2917430b8d9dc901c53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632591
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72270}
2021-01-22 21:38:55 +00:00
Michael Lippautz
6d11bcda29 cppgc: Introduce ObjectSizeTrait
Users of padded objects must know the actual object size for
implementing custom finalizers.

Bug: chromium:1056170
Change-Id: I0ddf9066cfece0a8d18a9e6fd985d09449eea92a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644941
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72269}
2021-01-22 20:53:55 +00:00
Michael Lippautz
03cea71144 cppgc: Fix GC traits and add documentation
- Adds IsGarbageCollectedWithMixin<T> to check for mixin applications.
- Add documentation to all trait values.

Bug: chromium:1056170
Change-Id: I22c255c36c791a5ff9b38d034f205f1e23c968ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644951
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72268}
2021-01-22 20:27:09 +00:00
Ng Zhi An
b7a30f18de [wasm-simd][fuzzer] Add i64x2.widen_i32x4_{s,u}
Bug: v8:10972
Change-Id: I00651064c1c17ce4ddc8669f00f904257387d613
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644068
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72267}
2021-01-22 19:52:05 +00:00
Omer Katz
ae8930002e cppgc: Add object/memory size histograms for UMA
Bug: chromium:1056170
Change-Id: I3d6cbff3e37bb541481a014056e539bd4824c37c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642259
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72266}
2021-01-22 17:25:42 +00:00
Omer Katz
0ac80246a5 cppgc: Fix missing scope in CppHeap
CppHeap was missing a scope for incremental marking.

This CL also introduces NestedEmbedderStepScope which is used for
identifying nested samples to avoid double accounting in UMA.

Bug: chromium:1056170
Change-Id: I8bba3fbfe6d098fe6861d1cfe5df8b88b4ac0fea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642260
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72265}
2021-01-22 17:20:33 +00:00
Victor Gomes
f5eae65a30 [cleanup] Remove IrOpcode::kArgumentsFrame
After removing the arguments adaptor frame, this should not be needed anymore.

Removes ArgumentFrame from the following nodes:
- ArgumentsLength
- RestLength
- NewArgumentsElements

Also removes 'formal parameter count' as input of ArgumentsLength.

Adapt the escape analysis to use the frame pointer directly instead of the ArgumentsFrame node.

Change-Id: I0ead48a6ee05a10d05d6cfa2e46906ad69930986
Bug: v8:11306
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639765
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72264}
2021-01-22 17:01:23 +00:00
Victor Gomes
41c3140b16 [cleanup] Simplify CallOrConstructForwardVarargs
Removes unnecessary move after the removal of the arguments adaptor frame

Change-Id: If92b9505ca23bb06a01bd25ba8e9664697d381f8
Bug: v8:11307
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639759
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72263}
2021-01-22 16:51:03 +00:00
Michael Lippautz
373803c959 cppgc: Fix IsGarabgeCollected trait and friends
The TraceTrait<T> checks whether T is a mixin to decide whether we can
use the fast (arithmetic) or slow (bitmap) method to look up the HoH.
Before this CL, the mixin application would also be considered as a
mixin because the marker is present, resulting in all cases going
through the object start bitmap.

The initial intention was to use the arithmetic for the mixin
applications as those inherit from GCed.

Bug: chromium:1056170
Change-Id: Ib0ba82a8f98e0481d2879ebacc1ca9bd9e675858
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643395
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72262}
2021-01-22 16:20:46 +00:00
Junliang Yan
7938d3a6ca s390x: fix compilation error due to typo
Change-Id: I048f1f1ba6018681370681d5fca33bc09cfca47e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643135
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72261}
2021-01-22 15:56:56 +00:00
Mike Stanton
3fb206764d [TurboFan] Never serialize FeedbackCells
The compiler is only interested in the contents if it contains a
FeedbackVector. If one is discovered, it is serialized, and we
ensure we'll either return it or nothing if the contents of
the cell changed on the main thread.

FeedbackCells can be reset if the bytecode for the associated
function is flushed. We have guarantees only for functions we
choose to inline that this doesn't happen (by holding a strong
handle to the SharedFunctionInfo).

Bug: v8:7790
Change-Id: I9ecff3f4aef39169d84501feae9e47f2d118054e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2434324
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72260}
2021-01-22 15:45:16 +00:00
Andreas Haas
5654bf0de9 [wasm][liftoff] Add support for mutable imported externref globals
R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: Iacc453588e93ad7afb46e388cdd3b763781b0485
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637860
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72259}
2021-01-22 15:37:51 +00:00
Santiago Aboy Solanes
aa0b5a42de [compiler] Better encapsulation of MapData and DescriptorArrayData
Maps and DescriptorArrays are intertwined, but we can separate the
DescriptorArray's information inside DescriptorArrayData. Also,
encapsulate DescriptorArrayData's content and don't return the ZoneMap
as a value.

Bug: v8:7790
Change-Id: Icc29737e4dd9dd33b887e93d4ecd1e3f5aac1153
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2624613
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72258}
2021-01-22 15:36:46 +00:00
Milad Fa
494a38006e PPC/s390: [wasm-simd] Move i64x2.widen_i32x4_{s,u} to mvp and remove ifdefs
Port ec8fbed745

Original Commit Message:

    These instructions were accepted into the proposal:
    https://github.com/WebAssembly/simd/pull/290

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

Change-Id: I69bbe90ab3af30d7748332a7e99b7812c95f96b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644939
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72257}
2021-01-22 15:31:06 +00:00
Omer Katz
adda4c5f98 cppgc: Add UMA support
This CL introduces cppgc::HistogramRecorder api which is similar to the
v8::metrics::Recorder api and is used by cppgc to report histogram
samples to embedders. Embedders should implement the api if they want to
collect histograms and provide an instance of it on heap creation.

CppHeap uses an adaptor class that implements the HistogramRecorder api
and is used to forward the relevant info to the relevant
v8::metrics::Recorder.

The api used 3 data structures: 2 for incremental steps that need to be
reported as they come (marking and sweeping) and 1 for the end of a GC
cycle that aggregates statistics over the entire cycle.
The data structure only provide the "raw" samples (e.g. atomic mark
time, incremental mark time, etc...). The embedder is expected to
compute aggregate histogram on its own (e.g. overall marking time).

Bug: chromium:1056170
Change-Id: If63ef50a29a21594f654edb83084598980d221ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642258
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72256}
2021-01-22 15:04:35 +00:00
Jan Wilken Dörrie
987f0b75bb [C++17] Apply consistent use of noexcept
In C++17 noexcept becomes part of the type system and thus needs to be
consistently applied between function declarations and definitions.

Change-Id: Ia34faa9d9d1f18916655fd5a1a8ec9f6b414f1e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643391
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72255}
2021-01-22 14:27:49 +00:00
Peter Marshall
93f8a86766 Reland "[cpu-profiler] Use base::LeakyObject for static CodeEntry objects"
This is a reland of c594a20ed3

Moved the getters to the .cc file to avoid link problems as they
are not performance critical anyway.

Moved ProfileNode::source_type to cc as it uses the _entry() functions
which are no longer inline.

Original change's description:
> [cpu-profiler] Use base::LeakyObject for static CodeEntry objects
>
> This is preferred over the older LazyInstance based stuff, and has
> a lot less boilerplate and is easier to follow.
>
> Bug: v8:8600
> Change-Id: I7c5c5ae04c064b0fc598dc01f1ed5442dc21a17b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640475
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72224}

Bug: v8:8600
Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng
Change-Id: I0ad9118e6d3bd087707609714b20aee1cbc4f459
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642252
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72254}
2021-01-22 13:59:53 +00:00
Paolo Severini
51ecfaec3a Revert "Reland "Faster JS-to-Wasm calls""
This reverts commit 6ada6a90ee.

Reason for revert: Revert for link issue:
https://bugs.chromium.org/p/v8/issues/detail?id=11335

Original change's description:
> Reland "Faster JS-to-Wasm calls"
>
> This is a reland of 860fcb1bd2
>
> - Disabled the tests for this feature in V8-lite mode (the original
> change broke V8-lite tests)
> - Also modified test console-profile-wasm.js that was brittle with this
> change because it assumed that there was always a JS-to-Wasm wrapper
> but this is not the case when the TurboFan compilation completes before
> the Liftoff-compiled code starts to run.
>
> More changes in Patchset 8:
>
> - Moved inlining of the "JSToWasm Wrapper" away from simplified-lowering,
> into a new phase, wasm-inlining that reuses the JSInliner reducer.
> The doc
> https://docs.google.com/document/d/1mXxYnYN77tK-R1JOVo6tFG3jNpMzfueQN1Zp5h3r9aM/edit#
> describes the new logic.
>
> - Fixed a couple of small issues in wasm_compiler.cc to make sure that
> the graph "JSToWasm Wrapper" subgraph has a valid Control chain;
> this should solve the problem we had inlining the calls in functions
> that can throw exception.
>
>
> Original change's description:
> > Faster JS-to-Wasm calls
> >
> > This replaces https://chromium-review.googlesource.com/c/v8/v8/+/2376165/.
> >
> > Currently JS-to-Wasm calls go through a wrapper/trampoline, built on
> > the basis of the signature of a Wasm function to call, and whose task
> > is to:
> > - set "thread_in_wasm_flag" to true
> > - convert the arguments from tagged types into Wasm native types
> > - calculate the address of the Wasm function to call and call it
> > - convert back the result from Wasm native types into tagged types
> > - reset "thread_in_wasm_flag" to false.
> >
> > This CL tries to improve the performance of JS-to-Wasm calls by
> > inlining the code of the JS-to-Wasm wrappers in the call site.
> >
> > It introduces a new IR operand, JSWasmCall, which replaces JSCall for
> > this kind of calls. A 'JSWasmCall' node is associated to
> > WasmCallParameters, which contain information about the signature of
> > the Wasm function to call.
> >
> > WasmWrapperGraphBuilder::BuildJSToWasmWrapper is modified to avoid generating code to convert the types for the arguments
> > of the Wasm function, when the conversion is not necessary.
> > The actual inlining of the graph generated for this wrapper happens in
> > the simplified-lowering phase.
> >
> > A new builtin, JSToWasmLazyDeoptContinuation, is introduced to manage
> > lazy deoptimizations that can happen if the Wasm function callee calls
> > back some JS code that invalidates the compiled JS caller function.
> >
> > Bug: v8:11092
> > Change-Id: I3174c1c1f59b39107b333d1929ecc0584486b8ad
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2557538
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> > Reviewed-by: Georg Neis (ooo until January 5) <neis@chromium.org>
> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> > Cr-Commit-Position: refs/heads/master@{#71824}
>
> Bug: v8:11092
> Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
> Change-Id: I7d8523fa916bf4029a31f8c7a72bbd93336dc0b9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596784
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#72147}

Tbr: ahaas@chromium.org, jgruber@chromium.org
Bug: v8:11092, v8:11335
Change-Id: Iab2908928dfe7ea353f70cb5d3bf2de4d3074db6
Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644758
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72253}
2021-01-22 13:16:21 +00:00
Andreas Haas
3a8a7e6184 [wasm] Implement pushing of externref parameters on the stack
On x64, reference types where not handled yet in LiftoffAssembler::push.
Note that the values pushed on the stack there do not have to be
handled by a safepoint. The reason is that stack parameters in general
are handled separately from safepoints.

R=thibaudm@chromium.org

Bug: chromium:1168116
Change-Id: Ie62479c13839f0ba240d0e41fa76d07a2cc48881
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642263
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72252}
2021-01-22 13:12:09 +00:00
Ulan Degenbaev
7d3f3d7fbb [heap] Fix alignment of large fixed double array.
This ensures that large objects have alignment suitable for a fixed
double arrays.

Bug: chromium:1161759
Change-Id: I64fe88d641fedbb5e27c2b38c1b9a4e75cab535a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639959
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72251}
2021-01-22 12:49:48 +00:00
Michael Lippautz
ee89feb102 cppgc: Allow tracing using raw pointers
There are several use cases related to collections that require
tracing a raw pointer.

Bug: chromium:1056170
Change-Id: I162b5380e7bddd7be62cbc74aa0031c8695220a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643385
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72250}
2021-01-22 12:28:58 +00:00
Mythri A
7ea641455a [turboprop] Add a new test variant for turboprop-as-toptier
Bug: v8:9684
Change-Id: Ie8c684998b9811c85ab385037d13604ac838b962
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637225
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72249}
2021-01-22 11:19:59 +00:00
Camillo Bruni
9e3822d0ac [codegen] Prevent duplicate register parameters
Prevent duplicate registers in interface descriptor parameter lists.

Change-Id: I160ada37f0d8308dd42a37b68fbf7c2d71ed8c8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642255
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72248}
2021-01-22 10:46:29 +00:00
Clemens Backes
82c3254de0 [wasm] Guard against huge code allocations
If a single background thread generates more code than
{kMaxCodeSpaceSize}, we cannot add them as one chunk. This CL adds a
CHECK to guard against that. If we find that this CHECK is hit in the
wild, we need to fix this for real.

R=ahaas@chromium.org

Bug: v8:11339
Change-Id: I549ecd79747bdf14a65b297c01779953e053abf2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643382
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72247}
2021-01-22 10:38:08 +00:00
Marja Hölttä
2ac866d9e1 [super speed] Ship --super-ic
Bug: v8:9237
Change-Id: I60b016617d468e6a04ef48998e59c80f58d16863
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642245
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72246}
2021-01-22 09:38:09 +00:00
Liu Yu
3f1177c5a0 [mips] Change kSpeculationPoisonRegister from a7 to t3
When kSpeculationPoisonRegister is a7, the test
TestFastJSWasmCall_MultipleArgs failed.

Besides, delete an unuse member named table_entry_size_.

Change-Id: Ic2c8b68d50c02dca7c41520ceb217fec33fe8cc4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644539
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72245}
2021-01-22 09:05:08 +00:00
v8-ci-autoroll-builder
f94b8d46fc Update V8 DEPS.
Rolling v8/build: 2f05905..61eac11

Rolling v8/buildtools: 0c30db8..13547b9

Rolling v8/third_party/depot_tools: af0dca3..361ccce

Rolling v8/tools/clang: 3c71637..786cae1

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: Ibfde76d5ee8a85f0bb1f8cd39538f3edc7d589a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644142
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@{#72244}
2021-01-22 03:53:03 +00:00
Zhi An Ng
ec8fbed745 [wasm-simd] Move i64x2.widen_i32x4_{s,u} to mvp and remove ifdefs
These instructions were accepted into the proposal:
https://github.com/WebAssembly/simd/pull/290

Bug: v8:10972
Change-Id: Ia2cce2df575786babe770b043b1e90bf953c5f9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643658
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72243}
2021-01-22 00:16:21 +00:00
Ng Zhi An
67ff779e97 [wasm-simd][x64] Optimize i8x16.popcnt
Instead of loading the same mask twice, we load from an external
reference twice. This saves some some binary size and a bunch of
instructions.

Bug: v8:11002
Change-Id: Ice80bd10694dcca920e18b8043390d7631c65805
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2643404
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72242}
2021-01-21 22:03:52 +00:00