Commit Graph

74622 Commits

Author SHA1 Message Date
jameslahm
0dbe725713 [web-snapshot] Fix snapshot scope info in Context
- In DeserializeContext, scope info local values
snapshot is in order of `name,value,name,value`,
and we should ReadValue after ReadString.

- Support non-inlined ScopeInfo locals, use
NameToIndexHashTable to serialize and deserialize
scope info local values when its local count is
more than kScopeInfoMaxInlinedLocalNamesSize.

Bug: v8:11525, v8:12820
Change-Id: I6ea2c498b594bed7ba8ca5be6af2ab9f0d39aa2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600531
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80130}
2022-04-25 08:11:45 +00:00
v8-ci-autoroll-builder
d176d7244a Update V8 DEPS.
Rolling v8/build: 28bea73..c68def5

Rolling v8/buildtools/linux64: git_revision:1cdd270be9803dbfcdd0343f6104ad4dc30c38ce..git_revision:7c8e511229f0fc06f6250367d51156bb6f578258

Rolling v8/third_party/android_platform: 2760db4..36c1580

Rolling v8/third_party/android_sdk/public: ppQ4TnqDvBHQ3lXx5KPq97egzF5X2FFyOrVHkGmiTMQC..bY55nDqO6FAm6FkGIj09sh2KW9oqAkCGKjYok5nUvBMC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/960c656..88422dc

Rolling v8/third_party/depot_tools: 89ccf4a..dc8ca44

Rolling v8/third_party/zlib: a0906c7..32e65ef

Rolling v8/tools/clang: 4dd2e32..cd131c2

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I41663d5f20246e9b86ef73f0e264b67b390a4a83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599730
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80129}
2022-04-23 03:56:46 +00:00
jameslahm
f32335fea7 [test] Move cctest/test-concurrent-script-context-table to unittests
... /objects/concurrent-script-context-table-unittest.

Bug: v8:12781
Change-Id: I6576d5d4cf9c07c189cef9e70e8a6e6f377eb41a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600551
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80128}
2022-04-23 02:07:26 +00:00
Frank Tang
5c3627754e [Temporal] Add Calendar.prototype.fields
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields


Bug: v8:11544
Change-Id: I8df987ddbbf08372da637d7c4620c428fce97cae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534619
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80127}
2022-04-22 21:50:26 +00:00
Frank Tang
3ae42771de [intl] Fix arm64-N5X failure in NumberFormat v3 due to precision issue
Use the new ICU 71-1 API

Precision::incrementExact
https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/classicu_1_1number_1_1Precision.html#aedfb413e5a37c69868594c870a87134b

Change-Id: I6d8841e5a07972d1be36026ce150eb83dbf300e7
Cq-Include-Trybots: luci.v8.try:v8_android_arm64_n5x_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3430378
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80126}
2022-04-22 21:42:15 +00:00
Deepti Gandluri
b0819480b4 [wasm-simd] Remove F32x4RecipApprox and F32x4RecipSqrtApprox
These were originally proposed as a part of the fixed-width SIMD
proposal, and were then migrated to the relaxed-simd proposal
which also deems these operations out of scope.

Github issue: https://github.com/WebAssembly/relaxed-simd/issues/4

Bug: v8:12284
Change-Id: I65ceb6dfd25c43cf49bd7ec5b5ecd6b32cc3516a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595970
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80125}
2022-04-22 17:37:19 +00:00
Shu-yu Guo
88ead176a7 Revert "heap: Inline GCTracer::Scope::Name"
This reverts commit 370cae1d8f.

Reason for revert: Breaking gcc and bazel builds:
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20gcc%20-%20builder/1646/overview
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20bazel%20-%20builder/1714/overview

Original change's description:
> heap: Inline GCTracer::Scope::Name
>
> This is a follow-up to https://crrev.com/c/3581774.
> It inlines method GCTracer::Scope::Name so that the calculation of the
> name of the trace event can be performed at compile time and optimized
> away, at most call sites.
>
> Bug: chromium:1318062
> Change-Id: I483d8fdfcc2c82c2a88d245326f27e7e787979aa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602511
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80122}

Bug: chromium:1318062
Change-Id: Ib33472a3a51fa3922a0af4d1c7dbac4b30b0098b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600682
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Owners-Override: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80124}
2022-04-22 17:27:46 +00:00
Seth Brenith
ee72b7a11f Categorize object shape info in heap snapshots
One of the biggest categories in heap snapshots is named “(system)”,
which gives developers no indication of why all that memory is used or
what they might do to reduce it. In this change, I propose that we
create a new category for Maps, DescriptorArrays, and related objects,
and call this new category “(object shape)” in the devtools. I think
that this category name would be more meaningful, while still grouping
those objects together so that they mostly stay out of the way.

Bug: v8:12769
Doc: https://docs.google.com/document/d/1a-6V_2LIJuRcsppwh6E18g8OSnC9j6gN4ao2gq--BiU
Change-Id: I282a7b87c34ca6ed371ff32f3c7332d794ae42ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3587974
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#80123}
2022-04-22 16:19:26 +00:00
Nikolaos Papaspyrou
370cae1d8f heap: Inline GCTracer::Scope::Name
This is a follow-up to https://crrev.com/c/3581774.
It inlines method GCTracer::Scope::Name so that the calculation of the
name of the trace event can be performed at compile time and optimized
away, at most call sites.

Bug: chromium:1318062
Change-Id: I483d8fdfcc2c82c2a88d245326f27e7e787979aa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602511
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80122}
2022-04-22 15:53:06 +00:00
Victor Gomes
28d526ec57 [maglev] Adds RegisterFrameState
RegisterFrameState is a container for free registers and values.
It abstracts operations for GeneralRegisters and DoubleRegisters.

It will be used later to call generic functions from the allocator,
depending on the register type needed.
See PrintLiveRegs as an example of function reuse.

Bug: v8:7700
Change-Id: If8e6cdb048c1782ca097d9bc2d810c66f680601a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596127
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80121}
2022-04-22 15:24:36 +00:00
Leszek Swirski
c774840edf [maglev] Simplify LoadField to just and offset
Removes the full Smi handler from LoadField, leaving just the offset.
All other handler-based decisions (inline vs out-of-line, tagged vs.
double) should be done at graph building time and as separate IR nodes.

Bug: v8:7700
Change-Id: I55ba49edba5ef5628d5f30fc6ba60c8774e2ef9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602510
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80120}
2022-04-22 15:17:56 +00:00
Michael Lippautz
015632a0a8 [handles] Simplify global handle state machine
Remove PENDING state as handles were always immediately transitioned
into FREE or NEAR_DEATH state.

Bug: v8:12672
Change-Id: I9a9d40b573e862282d41d7a4a3f9c8c8ed21b9e4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599473
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80119}
2022-04-22 15:14:46 +00:00
legendecas
9135859a91 [ShadowRealm] Implement ShadowRealm.prototype.importValue
As per https://tc39.es/ecma262/#sec-hostimportmoduledynamically defined,
referencingScriptOrModule in HostImportModuleDynamically can be a Script
Record, a Module Record, or null.
So to https://tc39.es/proposal-shadowrealm/#sec-shadowrealmimportvalue,
the HostImportModuleDynamicallyCallback is been invoked with a `null`
resource_name. This may not be considered a breaking change as the
parameter resource_name is defined as Local<Value>.

Updates d8's DoHostImportModuleDynamically to handle null resource_name,
and resolve the dynamically imported specifier relative to the executing
script's origin. In this way, we have to set ModuleEmbedderData.origin
even if the JavaScript source to be evaluated is Script. Also, a
ModuleEmbedderData is created for each ShadowRealm to separate their
module maps from the initiator context's.

Bug: v8:11989
Change-Id: If70fb140657da4f2dd92eedfcc4515211602aa46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522883
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Chengzhong Wu <legendecas@gmail.com>
Cr-Commit-Position: refs/heads/main@{#80118}
2022-04-22 15:04:26 +00:00
Leszek Swirski
9ad39743d0 [maglev] Fix VisitLdaImmutableContextSlot
It should delegate to VisitLdaContextSlot.

Bug: v8:7700
Change-Id: I1591594648cfb038abccabb46a20c1b0c23b07a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602512
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80117}
2022-04-22 15:03:06 +00:00
Victor Gomes
97e86869ba [maglev] Support double registers in MergePointRegisterState
- Introduces an array of RegisterStates for double registers
- Adds two functions to iterate over the arrays

We will be able to call the ForEach functions using a templated lambda
for RegisterBase<T>.

Bug: v8:7700
Change-Id: I7ef86917d9377933a4bc3456e30de3e4ec547f65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596122
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80116}
2022-04-22 14:16:56 +00:00
jameslahm
3508f70cb7 [test] Move cctest/test-concurrent-js-array to unittests
... /objects/concurrent-js-array-unittest.

Bug: v8:12781
Change-Id: Ie23432df7ffa785f96684060f5f2df3716713fd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600549
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80115}
2022-04-22 13:59:26 +00:00
Michael Achenbach
2056305c75 [foozzie] Drop unsuitable flag from correctness fuzzing
Using this flag has led to several duplicate issues. We need to stop
using the flag for a while until the issues are investigated.
Potentially these are all false positives.

No-Try: true
Bug: chromium:1317880
Change-Id: I09f4e1c642befc3a8f5b88c2eb003931dc112826
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602508
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80114}
2022-04-22 13:48:26 +00:00
Milad Fa
042ae2ca3c PPC: Use cr0 to check for optimized code
Result of `and` is stored in cr0.

Change-Id: I113ff7ceb9412d2f1f8ffdd58397123603b5818a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600550
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80113}
2022-04-22 13:17:46 +00:00
jameslahm
4a285a2549 [iterator] Extend GetIterator to Check iterator type
This CL extends GetIterator to check whether the result of
calling @@iterator is JSReceiver and throw SymbolIteratorInvalid
if it's not JSReceiver.

GetIterator bytecode involves 3 steps now:
- method = GetMethod(obj, @@iterator)
- iterator = Call(method, obj)
- if(!IsJSReceiver(iterator)) throw SymbolIteratorInvalid [Added]

New Builtin: CallIteratorWithFeedbackLazyDeoptContinuation, which
is used when lazy deopt is triggered by call @@iterator.

Related spec: https://tc39.es/ecma262/#sec-getiterator.
Related doc: https://docs.google.com/document/d/1s67HC2f-4zxA_s1Bmm7dfwMFv_KDUfMiWIKkNSeQNKw/edit#heading=h.kdzv8mq4g4ks.

Bug: v8:9489
Change-Id: I17952c0f3e24e1e600ee1348809fb188c2c70f8e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563447
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80112}
2022-04-22 12:58:56 +00:00
Milad Fa
0603f8a953 PPC/S390: Disable builtin remap on P/Z linux
There is currently a bug in docker where fstat may not
return the correct device id and as a result a check under
`OS::RemapPages, stat_buf.st_dev != enclosing_region.dev`
fails, details on the bug:
https://github.com/moby/moby/issues/43512

Platform specific page sizes are also defined for kMaxPageSize
to fix compilation errors.

Change-Id: I026609329aa6432eda4f1880a0f586c0c2162461
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3601211
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80111}
2022-04-22 12:46:46 +00:00
Tobias Tebbi
1ebb9786d6 Reland "[base/platform] Simplify fast TLS on macOS"
This reverts commit 267b962d23.

Reason for revert: Flake turned out to not be reproducible: https://ci.chromium.org/ui/p/v8/builders/try.triggered/v8_flako/b8816185753319345009/overview

Original change's description:
> Revert "[base/platform] Simplify fast TLS on macOS"
>
> This reverts commit 9cdee4f418.
>
> Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64%20-%20debug/38658/overview
>
> Original change's description:
> > [base/platform] Simplify fast TLS on macOS
> >
> > Since the TLS offset is constant across all supported OS releases, we
> > no longer need to adjust it, nor to read it at runtime. This also aligns
> > the code in V8 with what is done in Chromium.
> >
> > Change-Id: I0f3c54da39a776406083c897de888f06c61852b8
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599481
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Commit-Queue: Benoit Lize <lizeb@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#80106}
>
> Change-Id: Ie6371c2ad12ed6f63be51b819083a7c0c4e22751
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602502
> Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Owners-Override: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80108}

Change-Id: I6c50a568751a3892b82fe2dce6fe940fce293b3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602503
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80110}
2022-04-22 12:43:16 +00:00
Victor Gomes
0fd7d1525d [maglev] Set properties as constexpr
Fixes https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20gcov%20coverage/29098/overview
and https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20gcc%20-%20debug%20builder/1389/overview

Bug: v8:7700
Change-Id: I90717b9644b75cef28656893d37aa57e5f03e2fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599478
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80109}
2022-04-22 11:54:16 +00:00
Tobias Tebbi
267b962d23 Revert "[base/platform] Simplify fast TLS on macOS"
This reverts commit 9cdee4f418.

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

Original change's description:
> [base/platform] Simplify fast TLS on macOS
>
> Since the TLS offset is constant across all supported OS releases, we
> no longer need to adjust it, nor to read it at runtime. This also aligns
> the code in V8 with what is done in Chromium.
>
> Change-Id: I0f3c54da39a776406083c897de888f06c61852b8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599481
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Benoit Lize <lizeb@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#80106}

Change-Id: Ie6371c2ad12ed6f63be51b819083a7c0c4e22751
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602502
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80108}
2022-04-22 11:11:26 +00:00
Tobias Tebbi
e16af48cdd Revert "Update V8 DEPS."
This reverts commit 6e6c1bf63b.

Reason for revert: breaks Chromium roll: https://ci.chromium.org/ui/p/chromium/builders/try/linux-lacros-rel/515150/overview

Original change's description:
> Update V8 DEPS.
>
> Rolling v8/build: 28bea73..7ee892a
>
> Rolling v8/buildtools/linux64: git_revision:1cdd270be9803dbfcdd0343f6104ad4dc30c38ce..git_revision:0d6d1310d005cb9bace909cb8352e83113c6fc51
>
> Rolling v8/third_party/android_platform: 2760db4..36c1580
>
> Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/960c656..43f0426
>
> Rolling v8/third_party/depot_tools: 89ccf4a..5e49eda
>
> Rolling v8/third_party/zlib: a0906c7..563043f
>
> Rolling v8/tools/clang: 4dd2e32..ea2f00c
>
> R=​v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com
>
> Change-Id: I6295d2ca2cc0f8a738a3ade212da52d74d203c67
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600836
> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#80097}

Change-Id: I4cd78dddbb477773ea80f16c4bfa0e0ecabff7e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598888
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Owners-Override: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80107}
2022-04-22 10:47:46 +00:00
Benoît Lizé
9cdee4f418 [base/platform] Simplify fast TLS on macOS
Since the TLS offset is constant across all supported OS releases, we
no longer need to adjust it, nor to read it at runtime. This also aligns
the code in V8 with what is done in Chromium.

Change-Id: I0f3c54da39a776406083c897de888f06c61852b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599481
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80106}
2022-04-22 09:52:56 +00:00
Victor Gomes
4680c2df37 [bazel] Remove ICU in CI
Bazel bot is red due to ICU problem.
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20bazel%20-%20builder

Temporarily compiling V8 without ICU until the problem is solved.

Change-Id: I98b9ce9ca445d100896c43ae24d5fa73463cdfbc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598884
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80105}
2022-04-22 09:36:16 +00:00
jameslahm
b7f551cb94 [test] Move cctest/test-concurrent-feedback-vector to unittests
... /objects/concurrent-feedback-vector-unittest.

Bug: v8:12781
Change-Id: Ib294adbf57d77fd6fff2801b35fd53cffd0d46c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600509
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80104}
2022-04-22 09:27:56 +00:00
Lu Yahan
7a7cfa6263 [riscv64] Fix codegen error of Simd128_AndNot
should using scratch register to hold intermediate result.

Change-Id: I08e2236fd0a491398ffaa15c4fd9ae3d0e9ef535
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596441
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#80103}
2022-04-22 09:08:16 +00:00
Liu Yu
827e523702 [loong64][mips] Remove the Dummy interface descriptor
Port commit 4ae5a813c7

Change-Id: I194b424996d9f2427272fdd0510b6a464c4e07d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602233
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80102}
2022-04-22 09:07:06 +00:00
jameslahm
62130792d1 [test] Move cctest/test-concurrent-string to unittests
... /objects/concurrent-string-unittest.

- Add AsciiToTwoByteString to convert ascii string to
two byte string.

Bug: v8:12781
Change-Id: Icc2f745846fa10ec940085eab0ef022d7c277e0a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600552
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80101}
2022-04-22 08:22:57 +00:00
Liu Yu
130a3099f2 [loong64][mips][osr] Extract extended OSR checks to BaselineOnStackReplacement builtin
Port f8fddd6b13

v8: 12161
Change-Id: Ied27490a457ff1e4fcc9e80057c5d39c4c5c08cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3601876
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Yu Liu <liuyu@loongson.cn>
Auto-Submit: Yu Liu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#80100}
2022-04-22 07:49:56 +00:00
Leszek Swirski
098f722d90 [maglev] Tag merges to loop phis and call inputs
Bug: v8:7700
Change-Id: I61246df3a13f8beb91979591455b3d63357ed220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599477
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80099}
2022-04-22 07:29:17 +00:00
v8-ci-autoroll-builder
8c17b6fe0c Update ICU
Rolling v8/third_party/icu: d2858cb..e5b846b

Cherrypick PR 2060 to fix DateIntervalFormat (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/e5b846b

Enable WASM cross-compilation by using current_cpu correctly (Harry Terkelsen)
https://chromium.googlesource.com/chromium/deps/icu/+/f43d565

Remove obsoleted android_(small|extra) build script (Frank Tang)
https://chromium.googlesource.com/chromium/deps/icu/+/0a50280

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,ftang@chromium.org

Change-Id: I5b19727b85316c56e7b19d6b73c4206642de56af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600838
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80098}
2022-04-22 05:58:56 +00:00
v8-ci-autoroll-builder
6e6c1bf63b Update V8 DEPS.
Rolling v8/build: 28bea73..7ee892a

Rolling v8/buildtools/linux64: git_revision:1cdd270be9803dbfcdd0343f6104ad4dc30c38ce..git_revision:0d6d1310d005cb9bace909cb8352e83113c6fc51

Rolling v8/third_party/android_platform: 2760db4..36c1580

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/960c656..43f0426

Rolling v8/third_party/depot_tools: 89ccf4a..5e49eda

Rolling v8/third_party/zlib: a0906c7..563043f

Rolling v8/tools/clang: 4dd2e32..ea2f00c

R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com

Change-Id: I6295d2ca2cc0f8a738a3ade212da52d74d203c67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600836
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#80097}
2022-04-22 03:52:35 +00:00
Frank Tang
7a919fe25f [Temporal] Add ZoneDateTime.prototype.offset*
Spec Text:
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.offset
https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.offsetnanoseconds

Bug: v8:11544
Change-Id: Ia88d96b038117a8e528ff9d0cdb9a07fb7cbcda5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3385606
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80096}
2022-04-21 20:24:35 +00:00
Camillo Bruni
dd835c01b8 [tools] Move more profiling scripts to tools/profiling
Change-Id: I1ad5d4796168115fe2dc88d073a663c87cab73cb
No-try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596171
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80095}
2022-04-21 20:00:05 +00:00
Joyee Cheung
e9ad915a65 Fix the NearHeapLimitCallback test when single genration is enabled
Normally, taking a heap snapshot in the near heap limit would
result in a full GC, then the overhead of the promotions would
cause another invocation of the heap limit callback and it can
raise the limit in the second call to avoid an OOM, so we test
that the callback can indeed raise the limit this way in this
case. When there is only one generation, however, there would
not be the overhead of promotions so the callback may not be
triggered again during the generation of the heap snapshot.
In that case we only need to check that the callback is called
and it can perform GC-triggering operations jsut fine there.

Bug: v8:12815
Change-Id: If244417624b56bc068aed480fb3391d26c19005a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600357
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#80094}
2022-04-21 18:50:15 +00:00
Junliang Yan
9016f05939 ppc64/s390x: fix endianess issue on feedback vector flags
Bug: v8:12161
Change-Id: I65029217e99dd2c59af295b2f02c697415151a59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3600376
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80093}
2022-04-21 16:49:56 +00:00
Tobias Tebbi
4e9cb635b5 [test] skip regress/regress-crbug-1239907 on TSAN
Bug: v8:12822
Change-Id: Idc8225640e132d175d2c06b530d77fcda7362b55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599486
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80092}
2022-04-21 16:35:35 +00:00
jameslahm
ea9870747d [test] Move cctest/concurrent-descriptor-array-unittest to
... unittests/objects/concurrent-descriptor-array-unittest.

Bug: v8:12781
Change-Id: Iad4e99e256745d2874e6b03c2fe1c91b5599ab30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596443
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80091}
2022-04-21 16:26:18 +00:00
Andreas Haas
d86ef6a309 [bazel] Add missing file
Change-Id: I4ffcf9792501928e9e59d702c5855b288470cff4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599485
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80090}
2022-04-21 16:25:15 +00:00
Leszek Swirski
88976125a6 [maglev] Implement LdaContextSlot
In the simplest way possible.

Bug: v8:7700
Change-Id: I155aaf85192b75c89617820d6f127a2ae04c7d9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599484
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80089}
2022-04-21 16:06:15 +00:00
Leszek Swirski
3623415eda [maglev] Canonicalise function handle created for compilation unit
Additionally, pass the JSFunctionRef directly for inlined functions'
compilation units.

Bug: v8:7700
Change-Id: Ibdc738c8a9790f8ac45e6a0fd55facdf638562f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599480
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80088}
2022-04-21 15:53:55 +00:00
Leszek Swirski
da1408abf9 [maglev] Print function name on bailout
Bug: v8:7700
Change-Id: I5155fc665f1214dda390fc6d1476ecf1f137166e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599483
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80087}
2022-04-21 15:51:25 +00:00
jameslahm
058e5fa6a8 [test] Move cctest/test-bit-vector to unittests
... /utils/bit-vector-unittest.

Bug: v8:12781
Change-Id: I26b9c2b8a911b513d65d54476b78a0bbac7aa78f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596445
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80086}
2022-04-21 15:27:09 +00:00
Michael Lippautz
e774f8a110 [heap] Properly publish global handle flags
This reverts commit 2d394acac4.

Concurrrent marking for v8::TracedReference requires a single bit in
global handles to be written concurrently. While no other bits require
concurrent access, initialization still needs to properly publish the
the bitfield. Publishing generally allows all bits to be read on any
thread which is already used for some.

The CL introduces acq/rel semantics on the actual object pointer for
publishing the state.

Bug: chromium:1315498, v8:12600
Change-Id: Ic50c7c0b647b8b609bcd899f6c9f73bee80303da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596125
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80085}
2022-04-21 14:40:55 +00:00
jameslahm
b8a01ce09f [test] Move cctest/test-compiler to unittests
... /compiler/compiler-unittest.

- Add PrintExtension for adding print function.
- Add WithPrintExtensionMixin to register
PrintExtension.
- Add StreamerThread to run a ScriptStreamingTask
in a separate thread.

Bug: v8:12781
Change-Id: I9d3324f3a8dcf00b5b121db6007c9a3cb2972313
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596442
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80084}
2022-04-21 14:35:16 +00:00
Leszek Swirski
f7cc70de2b [maglev] Fix dead predecessors after EmitUnconditionalDeopt
Fixes the iteration after emitting an unconditional deopt to kill all
Jumps along the way, not just ones preceeding a merge point. This fixes
several issues:

  a) That Jump may be to a not yet created merge point, in which case we
     were getting a nullptr deref.
  b) Not-yet created merge points would not be detected as merge points,
     so we'd skip over them and miss killing the control node before
     them.
  c) We weren't reducing predecessor counts, so even after fixing the
     nullptr deref above, merge states created later would have the wrong
     predecessor count.

Now, we check bytecode targets (including fallthrough for non-returning
bytecodes) on for every bytecode, and skip over both not-yet created
merges, and loop merges that have no predecessors other than the loop
jump itself.

As part of this, the dead predecessor merging is changed; instead of
setting the predecessor to nullptr, we drop the predecessor count by
one, and trim any Phis' input counts.

Bug: v8:7700
Change-Id: I904c82df7c5dd44d7637e07f6750b35e7e219284
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599470
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80083}
2022-04-21 13:02:35 +00:00
Michael Lippautz
91badec697 [api] Deprecate unused GlobalHandles APIs that peek into internals
When moving forward and optimizing internals, these APIs cannot be
trusted anymore as their semantics are tangled to the current
implementation.

Bug: v8:12819
Change-Id: I0e3370724307a420ee42fed8070b55542be9400d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599475
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80082}
2022-04-21 12:55:15 +00:00
Junliang Yan
ea2f804ed4 ppc64: [baseline] implement Prologue
Change-Id: I1ceb1038c91e43299f4f4b35da684566ecbbef7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596911
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#80081}
2022-04-21 12:51:28 +00:00