Commit Graph

69110 Commits

Author SHA1 Message Date
Sathya Gunasekaran
815bab9faa Revert "[compiler] Remove one ObjectRef constructor"
This reverts commit 59bb432572.

Reason for revert: 4683d6fe52 broke TSAN, reverting all its dependencies first (including this)
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/36744/overview


Original change's description:
> [compiler] Remove one ObjectRef constructor
>
> Remove the handle-taking ObjectRef constructor in favor of
> (Try)MakeRef as bottleneck.
>
> Bug: v8:7790
> Change-Id: I3cc3a1dcef4bac53a91c573d1a532332b88c6eb4
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2883664
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74593}

Bug: v8:7790
Change-Id: Ifdecf93a3a8c09a3da7118a269fc66c2ae0f1a09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2901988
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74618}
2021-05-18 06:17:55 +00:00
Sathya Gunasekaran
60652b98d7 Revert "[compiler] Replace EnsureElementsTenured by IsElementsTenured"
This reverts commit 6d99f9334b.

Reason for revert: 4683d6fe52 broke TSAN, reverting all its dependencies first (including this)
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/36744/overview

Original change's description:
> [compiler] Replace EnsureElementsTenured by IsElementsTenured
>
> We can't mutate heap state from the compiler thread; turn this into a
> predicate and emit generic code if it returns false.
>
> Bug: v8:7790
> Change-Id: I6186a87e178d0c0206b6e7659fa2a41bf65fd835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876845
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74596}

Bug: v8:7790
Change-Id: Ic32921a2f7d870560cd596933d6308a04d757e22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2901986
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74617}
2021-05-18 06:15:55 +00:00
Sathya Gunasekaran
3a854aa312 Revert "[compiler] Make NativeContextRef never-serialized"
This reverts commit 5258364e23.

Reason for revert: 4683d6fe52 broke TSAN, reverting all its dependencies first (including this)
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/36744/overview

Original change's description:
> [compiler] Make NativeContextRef never-serialized
>
> Most NativeContext elements are immutable after initialization;
> additionally, we now use acquire-release semantics to load/store
> elements when possible. Reading and constructing Refs for elements
> is thus possible from the background.
>
> A few notes:
>
> - A few elements are not immutable; if read from the background
> thread, these must use acquire-release semantics.
> - Elements can be stored from generated code; these are not compatible
> with bg-thread accesses.
> - While elements can be read safely from the native context, the
> elements themselves may still require serialization; this is done in
> NativeContextRef::Serialize.
>
> Bug: v8:7790
> Change-Id: I12e9611a292e7dd912438c712390731a5422407d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897254
> Auto-Submit: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74604}

Bug: v8:7790
Change-Id: I5c26b476a25a9af0ff4e56e51b5aa35d87cf35c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2901985
Auto-Submit: Sathya Gunasekaran  <gsathya@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@{#74616}
2021-05-18 06:04:06 +00:00
Sathya Gunasekaran
4b853c0e8c Revert "[compiler] Skip IsPendingAllocation check in Ref construction"
This reverts commit 03fcd89221.

Reason for revert: breaks linux64 https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64/42874/overview

Original change's description:
> [compiler] Skip IsPendingAllocation check in Ref construction
>
> This temporarily reverts the key part of
> https://chromium-review.googlesource.com/c/v8/v8/+/2886861
> in order to unblock the roll.
>
> Bug: v8:7790, chromium:1209798
> Change-Id: I10a02bdb2f1a0e0a2b1238481dc39a1d975ee5b2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2896983
> Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74611}

Bug: v8:7790
Bug: chromium:1209798
Change-Id: I79fae981acb3f2ddfc1d7d9a49a73d1741d19e71
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2901984
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@{#74615}
2021-05-18 05:36:07 +00:00
Shu-yu Guo
69a8284275 [class] Fix await-as-identifier cases in class static blocks
Bug: v8:11718
Change-Id: If903f5e336729fa55bec03acef40025ce20d6ce7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2898176
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74614}
2021-05-18 00:49:54 +00:00
Frank Tang
72b4ec49a2 [test262] Roll test262
https://chromium.googlesource.com/external/github.com/tc39/test262/+log/70bc32e..6d353a

Bug: v8:7834, v8:10958
Change-Id: Ifa497643d8de2f8dc0f01af2d14c79f5aa84d7d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900879
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74613}
2021-05-18 00:16:06 +00:00
Michael Achenbach
8590942c84 [foozzie] Prioritize reporting differences with x64 if present
tldr: This adds an on-demand comparison with x64 when a difference to
a non-x64 build is detected.

Normally foozzie compares the baseline build (just ignition), with
two secondary builds. One, the default, always uses the shipping
configuration, the second passes additional flags. Both can use a
different architecture than the baseline build as well.

Differences between ignition and turbofan are then often detected
independent of the architectures used, but reported several times
(for each compared architecture).

This makes the reporting more specific, by running another build on
demand that uses the baseline architecture, but otherwise the same
configuration that showed a difference. If it shows the difference as
well, the baseline architecture is used for the report.

As a result only pure architecture differences will be reported with
an architecture other than x64.

This also adds some minor refactorings to reduce the code complexity
when looping over comparisons.

For testing this, the fake-d8s are extended with different behavior
for different flags passed. We add two test cases for testing:
x64 vs. ia32 with difference in x64 and ia32
x64 vs. ia32 with difference only in ia32

Bug: chromium:1196633
No-Try: true
Test: tools/clusterfuzz/v8_foozzie_test.py
Change-Id: Ic470ae8f0b37fb1628b32e4fafc0c39377e16f8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897099
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74612}
2021-05-17 17:57:03 +00:00
Georg Neis
03fcd89221 [compiler] Skip IsPendingAllocation check in Ref construction
This temporarily reverts the key part of
https://chromium-review.googlesource.com/c/v8/v8/+/2886861
in order to unblock the roll.

Bug: v8:7790, chromium:1209798
Change-Id: I10a02bdb2f1a0e0a2b1238481dc39a1d975ee5b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2896983
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74611}
2021-05-17 16:41:53 +00:00
Clemens Backes
aee11991d0 [nowasm] Add missing includes
This fixes a compile error after https://crrev.com/c/2891829 if
webassembly is disabled (v8_enable_webassembly = false).

R=pfaffe@chromium.org

Change-Id: Ia425a49d3de11e7c71bb65680ac6a94acd63599e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900231
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74610}
2021-05-17 16:13:43 +00:00
Santiago Aboy Solanes
f4d362b6fd [cleanup] Remove synchronized_ from map accessors
Continuing the cleanups and using the tags rather than synchronized_
in the name of the accessors.

Bug: v8:7790
Change-Id: I3c2d0ccf54fa6161dbd9d12b1b9743a046534521
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897095
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74609}
2021-05-17 15:07:46 +00:00
Junliang Yan
34ba5f0438 ppc: rename LoadWord/Arith to LoadU/S32
Change-Id: I916f7564cc519d05867a29a2168a45d930999212
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900229
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74608}
2021-05-17 14:22:16 +00:00
Michael Lippautz
f5b84bc48e cppgc: Improve Member checking
Create verification state on first assignment and check that
the reference slot is contained within the values heap if it
is an on-heap reference.

Bug: chromium:1056170
Change-Id: I0ce0e2bbd751186429950bb4f6bad97b273b3128
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2887509
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@{#74607}
2021-05-17 13:48:26 +00:00
Liu Yu
5b4e9103fa [mips] Fix debug build failure
Allow MultiPushMSA and MultiPushMSA to generate simd
instructions in builtins on mips which don't support SIMD;
And implement IsValidFloatParameterRegister on mips.

Change-Id: Iac41930ce4bf39a41dd157e22e4194752df35b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2882676
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74606}
2021-05-17 13:40:26 +00:00
Santiago Aboy Solanes
6fdc3fb0cc [cleanup] Remove synchronized_ from map_word accessors
Continuing the cleanups and using the tags rather than synchronized_
in the name of the accessors.

`map_word` (and its setter) can also be marked explicitly as relaxed to
show that they are atomic accessors.

Bug: v8:7790
Change-Id: I0725054ef37022c777f47660cb11cf839bb7f273
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897094
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74605}
2021-05-17 13:08:56 +00:00
Jakob Gruber
5258364e23 [compiler] Make NativeContextRef never-serialized
Most NativeContext elements are immutable after initialization;
additionally, we now use acquire-release semantics to load/store
elements when possible. Reading and constructing Refs for elements
is thus possible from the background.

A few notes:

- A few elements are not immutable; if read from the background
thread, these must use acquire-release semantics.
- Elements can be stored from generated code; these are not compatible
with bg-thread accesses.
- While elements can be read safely from the native context, the
elements themselves may still require serialization; this is done in
NativeContextRef::Serialize.

Bug: v8:7790
Change-Id: I12e9611a292e7dd912438c712390731a5422407d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897254
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74604}
2021-05-17 12:59:15 +00:00
Milad Fa
feee80b039 PPC/S390 [simd]: Optimize I8x16Shuffle on codegen
Change-Id: I264a06924d8ffcb8cce1febe9bde18280edeaea0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2896273
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74603}
2021-05-17 12:50:34 +00:00
Philip Pfaffe
b4942eb3a3 Reland "[ic] Fix handling of API properties with side effects"
This is a reland of 0ce36e7d0e

The reland includes two fixes:
- Move the EvaluateGlobalForTesting into libv8 to avoid linkage issues
  and to avoid having to export ThreadLocalTop symbols.
- Give the ExecutionMode enum a uint8_t backing type to avoid endianess
  issues.

Original change's description:
> [ic] Fix handling of API properties with side effects
>
> DebugEvaluate can evaluate expressions in side-effect-free mode, where
> any operation that would cause observable side effects throws an
> exception. Currently, when accessors are backed by callbacks, it's
> possible that ICs call those accessors directly, bypassing the
> side-effect checks. This CL introduces a bailouts to runtime in those
> cases.
>
> Fixed: chromium:1201781
> Also-By: ishell@chromium.org, pfaffe@chromium.org
> Change-Id: Ie53bfb2bff7b3420f2b27091e8df6723382cf53c
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2857634
> Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74507}

Fixes: v8:11761
Change-Id: I58cde8bd11ba0fc9d83adc19fa87733628ab6c13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2891829
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74602}
2021-05-17 12:47:24 +00:00
Omer Katz
6a5cb6891c Reland "cppgc-js: Add unittest for CollectCustomSpaceStatisticsAtLastGC"
This is a reland of 4f4b4f74dc

Original change's description:
> cppgc-js: Add unittest for CollectCustomSpaceStatisticsAtLastGC
>
> Drive-by: fix delayed task implementation in cpp-heap.cc.
>
> Bug: chromium:1056170
> Change-Id: Ie92d909056532047b378ebfafeb98273997e60e9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2883618
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74530}

Bug: chromium:1056170
Change-Id: Ic3a7bb269e23acf728af57a9733600567659e76b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897084
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74601}
2021-05-17 12:32:54 +00:00
Antonio Sartori
47db786ca6 [api] Deprecate v8::SetIsCrossOriginIsolated
The method changes a global flag, depending upon which v8 attaches or
not the SharedArrayBuffer constructor to global objects. Chrome ended
up calling it when some contexts had already been created, leading to
inconsistencies. (Also) because of that, we decided to change the
mechanism for enabling cross-origin isolation (cf.
https://crrev.com/c/2880215). I believe it is better not to expose
this method.

Bug: chromium:923807
Change-Id: I269cb1c5406f999a395bbb7657574c0f73b4ae99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900224
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74600}
2021-05-17 12:30:55 +00:00
Santiago Aboy Solanes
50cbeca9ac [codegen] Use builtin calls for TSANRelaxedStore
Instead of calling the C function directly from codegen, we call a
builtin that calls the C function. This is done to encapsulate the
push/pop registers in the code in the builtin.

Bug: v8:7790, v8:11600
Change-Id: I4c77a80803d4eb44526b716901afe0e8ccbe077d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2892663
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74599}
2021-05-17 12:21:14 +00:00
Jakob Kummerow
7e6bb868cc [test] Fix TypedArray::sort for multi-mapped mock allocator
Turns out std::sort() gets angry when various ranges of an array
alias each other in memory. We wouldn't like it when it's angry.

Fixed: chromium:1209152
Change-Id: Ic927b46c59d10f7d3856768628c773b344005979
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897098
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74598}
2021-05-17 12:01:40 +00:00
Ross McIlroy
243665c696 [compiler] Better packing of fields for RepresentationSelector::NodeInfo
Move a field and pack enums in Truncation to save 2 word for
each NodeInfo.

BUG=v8:9684

Change-Id: Ib470019b13a1cb8586c1bc585ff1aff6a88267ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2892664
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74597}
2021-05-17 11:57:10 +00:00
Jakob Gruber
6d99f9334b [compiler] Replace EnsureElementsTenured by IsElementsTenured
We can't mutate heap state from the compiler thread; turn this into a
predicate and emit generic code if it returns false.

Bug: v8:7790
Change-Id: I6186a87e178d0c0206b6e7659fa2a41bf65fd835
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2876845
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74596}
2021-05-17 11:35:40 +00:00
Jakob Gruber
0b507c5eb0 [compiler] Disable tracing flags when fuzzing
When fuzzing and concurrent compilation is enabled, disable Turbofan
tracing flags since reading/printing heap state is not thread-safe and
leads to false positives on TSAN bots.

For future work: consider teaching fuzzers to avoid these flags
instead of forcing implications in V8.

Bug: chromium:1205289
Change-Id: Icc26abd7c628cbcdd3671a27f955fb9fe7207172
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897102
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74595}
2021-05-17 11:27:40 +00:00
Michael Lippautz
78313016a9 cppgc: Introduce ObjectView
ObjectView abstracts Start/End/Size of an object over the different
internal representations (HeapObjectHeader and LargePage).

Bug: chromium:1056170
Change-Id: I4e888f907fff94c1b02d5e21b4ec3f4a78a471f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2892081
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74594}
2021-05-17 11:12:40 +00:00
Georg Neis
59bb432572 [compiler] Remove one ObjectRef constructor
Remove the handle-taking ObjectRef constructor in favor of
(Try)MakeRef as bottleneck.

Bug: v8:7790
Change-Id: I3cc3a1dcef4bac53a91c573d1a532332b88c6eb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2883664
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74593}
2021-05-17 10:54:10 +00:00
Santiago Aboy Solanes
9d6b5456ef [compiler] Move ShrinkInstanceSize to MapUpdater and acquire its lock
The instance_size of a live map can change via ShrinkInstanceSize. This
change was outside of the scope of the MapUpdater. In order to have a
consistent view of the data, the concurrent reader will access the map
updater lock if needed.

Also refactor MapUpdaterMutexDepthScope (now named
`MapUpdaterGuardIfNeeded`) so that A) it's not possible to forget to
lock it, and B) add V8_NODISCARD to the class.

As a second refactor use std::function in TraverseCallback.

Bug: v8:7790
Change-Id: I57dd00699ccb1c9f132a950db93704b07ca115ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2862765
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74592}
2021-05-17 10:41:10 +00:00
Georg Neis
0a661a9aad Revert "[compiler] Temporarily change ContextRef back to kSerialized"
This reverts commit 445f0f743e.

Reason for revert: TryMakeRef is again ready for this.

Original change's description:
> [compiler] Temporarily change ContextRef back to kSerialized
>
> This can be reverted once TryMakeRef checks the heap predicate.
> I'm not reverting the previous CL because newer changes already depend
> on it.
>
> Tbr: jgruber@chromium.org
> Bug: v8:11765, v8:7790
> Change-Id: Iacc6a78a70fe6f40c9421258889c2175fb400b04
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2891579
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Auto-Submit: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74531}

Bug: v8:11765
Bug: v8:7790
Change-Id: I0b38791255182f1f8d0a5cf79f18d86568172487
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897101
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74591}
2021-05-17 10:34:00 +00:00
Jakob Gruber
52c25e25a5 [compiler] Add a HandleScope in OptimizingCompileDispatcher::Flush
Bug: chromium:1209774
Change-Id: Ie4d9a673a1c9d91d47cfb75682ff381a4c3075ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897100
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74590}
2021-05-17 10:04:20 +00:00
Santiago Aboy Solanes
8256254513 [object] Remove synchronized_ from smi accessors
This ends up cleaning up the last of the macros in object-macros which
were using `synchronized_`. There are still a few methods which use
`synchronized_` but those were defined ad-hoc (i.e. w/o macros).

Bug: v8:7790
Change-Id: Ib2d35030fd032293e746c09e10156e526af8d032
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897085
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74589}
2021-05-17 09:38:30 +00:00
Clemens Backes
3974115a00 [trap-handler] Remove dependencies on macros, globals, flags
This will allow us to refactor those V8 files without being concerned
about potential interference with the security of the trap handler.

This requires the duplication of V8_EXPORT_PRIVATE, the CHECK/DCHECK
macros, and V8_DISABLE_ASAN. The trap-handler specific definitions
are prefixed with "TH_".

R=ahaas@chromium.org

Bug: v8:11755
Change-Id: Iac39b553704ef50e51937375c8db805d57ce2625
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2880218
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74588}
2021-05-17 09:32:40 +00:00
Jakob Gruber
4683d6fe52 Reland "[compiler] Consider IsPendingAllocation in Ref construction"
This is a reland of 5f0ac36cc6

Fixes Ref construction failures in:
- MapRef::instance_descriptors
- NativeContext reads (see also crrev.com/c/2891575)

Original change's description:
> [compiler] Consider IsPendingAllocation in Ref construction
>
> The logic in JSHeapBroker::TryGetOrCreateData assumes that parts
> of the object are safe to read. In particular, the instance type
> must be readable for the chain of `Is##Name()` type checks.
>
> This is guaranteed if
>
>  - a global memory fence happened after object initialization and
>    prior to the read by the compiler; or
>  - the object was published through a release store and read through
>    an acquire read.
>
> The former is protected by the new call to ObjectMayBeUninitialized
> (which internally calls IsPendingAllocation) in TryGetOrCreateData.
>
> The latter must be marked explicitly by calling the new
> MakeRefAssumeMemoryFence variant.
>
> Note that support in this CL is expected to be incomplete and will
> have to be extended in the future as more cases show up in which
> MakeRef calls must be converted to MakeRefAssumeMemoryFence or to
> TryMakeRef.
>
> Bug: v8:7790,v8:11711
> Change-Id: Ic2f7d9fc46e4bfc3f6bbe42816f73fc5ec174337
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2874663
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74474}

Bug: v8:7790,v8:11711,chromium:1207680,chromium:1207679
Change-Id: Ib3dbf59909e6982a3230dd6a67c9fb7d6ffb9ab4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2886861
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74587}
2021-05-17 08:53:20 +00:00
Lu Yahan
97788f034d [riscv64] Skip incompatible inspector test
Bug: v8:11767

Change-Id: I8ddd578bbc60c72c8d8e269da5492e6fce68482d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2894025
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#74586}
2021-05-17 08:43:50 +00:00
Clemens Backes
7243654958 [wasm][traphandler] Use C++11 thread_local keyword
V8 uses "thread_local" since several years now, so we can assume it to
be available on all platforms. This avoids a cumbersome macro
definition.

R=ahaas@chromium.org

Bug: v8:11755
Change-Id: I64826188a15a22238ffbcb3215a5b5d66470d573
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2885038
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74585}
2021-05-17 08:31:00 +00:00
Omer Katz
9a3a73c193 cppgc: Remove redundant TODOs
Bug: chromium:1056170
Change-Id: Ia5a507b462498b4e10722a7052a19a41ad7e41ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897088
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74584}
2021-05-17 08:04:50 +00:00
Wenyu Zhao
0518000439 [heap] Fix TPH heap capacity checks and skip three more tests
This CL fixes a failed DCHECK due to incorrect heap capacity.

Also skips three new tests that create multiple isolates.

Bug: v8:11641
Change-Id: I1061b3370efbe2b272bd490705fc728d6bb26910
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2896644
Auto-Submit: Wenyu Zhao <wenyu.zhao@anu.edu.au>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74583}
2021-05-17 07:33:50 +00:00
Michael Achenbach
b67f228206 [test] Mark slow test
Led to time-outs and tree closure:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/36738

No-Try: true
Change-Id: Ia1e5294cf823429d4917b30b6478231a64c81b7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897252
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74582}
2021-05-17 06:36:40 +00:00
v8-ci-autoroll-builder
fae30902e4 Update V8 DEPS.
Rolling v8/build: 9be9e38..c81ea93

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

Change-Id: I636ba44c19f6b96fb1039fa3d3cbc7c92bbaa940
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2899839
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@{#74581}
2021-05-17 06:33:40 +00:00
Fanchen Kong
ed73693de8 Change CollectCallFeedback to take the receiver as LazyNode
This CL makes a call to CollectCallFeedback from Ignition load the receiver lazily, which may improve the performance of Octane/{Richards, Delta-Blue} with --no-opt for 1-3%.

Bug: chromium:1207349
Change-Id: I5fb09d5c5662ef8714acf71dd7341d3164b44f93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2895358
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/master@{#74580}
2021-05-17 02:23:19 +00:00
v8-ci-autoroll-builder
c1ea685ef3 Update V8 DEPS.
Rolling v8/build: 2123428..9be9e38

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

Change-Id: Ic52ed6354cfe84f4e91198522898159fd8a2dd4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2899337
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@{#74579}
2021-05-16 04:01:39 +00:00
Junliang Yan
89e3b1ee3c ppc/s390: replace LoadP with LoadU64
Change-Id: I636b9e8ab8ac89cbdf9814bc1bce2eaad2bcf030
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2892606
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74578}
2021-05-15 13:35:08 +00:00
Frank Tang
59b43b1fc3 Add feature flag mapping for 'Intl.Locale-info' tests
Map 'Intl.Locale-info' to '--harmony_intl_locale_info',
To be ready for https://github.com/tc39/test262/pull/2987

Bug: v8:11638
Change-Id: I119068612867648de30f63aa64c3c2bc5d63e50b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2893824
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74577}
2021-05-15 04:12:08 +00:00
v8-ci-autoroll-builder
647bbf631a Update V8 DEPS.
Rolling v8/build: 00d8280..2123428

Rolling v8/buildtools: b0912f9..20b1d0f

Rolling v8/third_party/aemu-linux-x64: JANUSSL6vlpZwl7eeXT1Jv3TTKfhHXjW18WlDQyun4kC..WNXEl7yxDUmMN9Rkovz3EfBwNd26BEXmanIIz_jO2DgC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/affd272..a532699

Rolling v8/third_party/depot_tools: 5974ca0..cd15203

Rolling v8/third_party/instrumented_libraries: 084aee0..4ae2535

Rolling v8/third_party/zlib: 3e6d345..5ce08a7

Rolling v8/tools/luci-go: git_revision:d7393d163ecb11c44626b3b221f86efdd2861565..git_revision:bbac8f199026d706b08e53ca46d1a9560ae580d2

Rolling v8/tools/luci-go: git_revision:d7393d163ecb11c44626b3b221f86efdd2861565..git_revision:bbac8f199026d706b08e53ca46d1a9560ae580d2

Rolling v8/tools/luci-go: git_revision:d7393d163ecb11c44626b3b221f86efdd2861565..git_revision:bbac8f199026d706b08e53ca46d1a9560ae580d2

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

Change-Id: I4c2ade9ac20eb15d20bd469b888d67a4c3a67430
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2898781
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@{#74576}
2021-05-15 04:00:17 +00:00
Andrey Kosyakov
1dd758e33b Roll inspector_protocol to 35e8d2d89cb017d72cf905362672de77c978e1e
Change-Id: I81ff7fca841015ebc8cee66546ab40efb3065731
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2892842
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74575}
2021-05-15 01:24:37 +00:00
Shu-yu Guo
aebe382ab7 [snapshot] Add serializer option to reconstruct the RO object cache
This option is used for --stress-snapshot when sharing the RO heap. The
RO heap is shared, so deserializing non-startup snapshots need to ensure
they use the same RO object cache mapping as the startup snapshot.

Cq-Include-Trybots: luci.v8.try:v8_linux64_gc_stress_custom_snapshot_dbg_ng
Bug: v8:11750
Change-Id: Ia2baa24d5b7d494ef5b7ff3c9cbcee846881182e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897945
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74574}
2021-05-14 19:52:57 +00:00
Ng Zhi An
34dc2607db [wasm-simd][inspector] Use no_simd_sse to skip test
wasm-scope-info requires SIMD, since it prints the value of the SIMD
value in scope. We skip it using statusfile when SIMD is not supported.

Change-Id: Id64e130a1c497bae95ec5e794ad05816f8c908e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2893568
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74573}
2021-05-14 18:23:57 +00:00
Mike Stanton
7235ebc542 [compiler] Remove kPossiblyBackgroundSerialized
This allows us to eliminate some boilerplate.

Bug: v8:7790
Change-Id: Id3a14f27621435ea4e7cbf8daf68b71da62e3f1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2875209
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74572}
2021-05-14 16:04:17 +00:00
Manos Koukoutos
0e1cf1fa05 [wasm-gc] Implement br_on_non_null
Bug: v8:7748
Change-Id: I9a4dad42f433ce0adf928461cf0db589df3d69e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897087
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74571}
2021-05-14 15:27:29 +00:00
Manos Koukoutos
c8743be4bf [wasm] Move asmjs opcodes to the end of unused range
This is to make space for new instructions, such as br_on_non_null.

Change-Id: Id631478a1c0da2c20efe81aabe755d5fda841dba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897086
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74570}
2021-05-14 13:58:47 +00:00
Yuri Iozzelli
50d725f1e5 Implementation of the branch hinting proposal for WebAssembly.
See https://github.com/WebAssembly/branch-hinting for a description of
the proposal.

Change-Id: Ib6e980fc20aa750decabdeb9e281f502c9fe84ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2784696
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74569}
2021-05-14 13:40:57 +00:00