Commit Graph

61134 Commits

Author SHA1 Message Date
Manos Koukoutos
efbadd6096 Do not set protected memory for all atomics
Bug: v8:12946
Change-Id: If62b67a47f63832e6edca749ce1a45cf3a85316d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743384
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81521}
2022-07-05 10:44:47 +00:00
Maya Lekova
ec9fa4365d [megadom] Turn an expensive check only in DEBUG
This CL fixes a performance regression by conditionally compiling an
expensive instance check only in debug mode.

Bug: chromium:1329463
Change-Id: I2cceb7c06fa6db967923047a4dee63a93a0b72a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743385
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81519}
2022-07-05 08:36:19 +00:00
Manos Koukoutos
5e2174fbbc [wasm-gc] Allow array.new(_default) as constant expressions
Additional change: Allow regular expressions in assertTraps.

Bug: v8:7748
Change-Id: I3bf99faec3d4f25fcf3caa4ed310f02f03196d4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743483
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81518}
2022-07-05 06:20:51 +00:00
Jakob Kummerow
7f0c7fb074 [tools][wasm] Add "wami", the Wasm Module Inspector
Initial feature: list functions in a module, as follows:

$ gm x64.release wami
$ out/x64.release/wami --list-functions my_module.wasm

More to come.

Change-Id: I9580437d51153e1b5ccc291fdb6a6a67315be07d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742700
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81515}
2022-07-05 04:45:28 +00:00
Manos Koukoutos
d9b62c1686 Revert "[fastcall] Support EnforceRange annotation"
This reverts commit 84e078c6cf.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20UBSan/22000/overview

Original change's description:
> [fastcall] Support EnforceRange annotation
>
> This CL implements checks in case EnforceRange is requested for a
> given parameter by using TryTruncate* operators. It implements 2 such
> truncations on x64 and arm64 - TryTruncateFloat64ToInt32 and
> TryTruncateFloat64ToUint32.
>
> Bug: chromium:1052746
> Change-Id: I32f34d9dc1265af568cc576663620a8f7f8245f6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721618
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81512}

Bug: chromium:1052746
Change-Id: I2218681c7cb5d05dea6d8ac5347b19bc0070c1a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743514
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Owners-Override: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81513}
2022-07-05 04:43:23 +00:00
Maya Lekova
84e078c6cf [fastcall] Support EnforceRange annotation
This CL implements checks in case EnforceRange is requested for a
given parameter by using TryTruncate* operators. It implements 2 such
truncations on x64 and arm64 - TryTruncateFloat64ToInt32 and
TryTruncateFloat64ToUint32.

Bug: chromium:1052746
Change-Id: I32f34d9dc1265af568cc576663620a8f7f8245f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721618
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81512}
2022-07-04 14:34:10 +00:00
Milad Fa
93f5f1a7d8 S390 [simd][liftoff] Implement relaxed swizzle
Instruction selector is also modified to include a `relaxed`
boolean value to be used for future optimizations.

Change-Id: I1e314066655613846653cc0c3668167c4ef32648
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735106
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Farazmand <mfarazma@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#81511}
2022-07-04 14:31:49 +00:00
Liu Yu
979bd521e8 [loong64][mips64][wasm-gc][refactor] Rename optRef -> refNull
Port commit a0a786656f

Bug: v8:7748
Change-Id: I23e559917a76a01a7afb78403648372149a13c54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3743122
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/main@{#81510}
2022-07-04 10:31:49 +00:00
Benedikt Meurer
7f20cf56e6 [debug] Report optimized out and certain TDZ values as unavailable.
This adds a new --experimental-value-unavailable flag, which is disabled
for now. When enabled the debugger reports values that are optimized out
by TurboFan and values of certain variables in Temporal Dead Zones (TDZ)
as unavailable. Internally we use a special `value_unavailable` accessor
info to represent these values, and on the debugger boundary we report
these properties with `value`, `get`, or `set`.

Doc: https://goo.gle/devtools-value-unavailable
Bug: chromium:1328681
Demo: devtools-dbg-stories.netlify.app/crbug-1328681-value-unavailable
Change-Id: Idb09a4a148335a950deae60f7c07caecc48826ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627510
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81509}
2022-07-04 09:25:44 +00:00
Frank Tang
7a4a6cc6a8 [Temporal] Add toJSON, toString and non-intl version of toLocaleString to ZonedDateTime
Also add AOs: FormatISOTimeZoneOffsetString, TemporalZonedDateTimeToString, ToShowTimeZoneNameOption, ToShowOffsetOption,

Update FormatTimeZoneOffsetString to use ToZeroPaddedDecimalString

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.tojson
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.tolocalestring
https://tc39.es/proposal-temporal/#sec-temporal.zoneddatetime.prototype.tostring
https://tc39.es/proposal-temporal/#sec-temporal-formatisotimezoneoffsetstring
https://tc39.es/proposal-temporal/#sec-temporal-temporalzoneddatetimetostring
https://tc39.es/proposal-temporal/#sec-temporal-toshowtimezonenameoption
https://tc39.es/proposal-temporal/#sec-temporal-toshowoffsetoption

The intl version of toLocaleString is not implemented in this CL yet


Bug: v8:11544
Change-Id: Id7e4f72b63864857b0b3fa8dc8dfcba0b5949faa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688848
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81507}
2022-07-02 06:46:27 +00:00
Frank Tang
adb111b776 [Temporal] Fix PlainTime/PlainDateTime toString bugs
Bug: v8:11544
Change-Id: Iaf3d673c9746badadae082121402e723d3704189
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3719087
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81506}
2022-07-02 06:40:07 +00:00
Frank Tang
6b02aed32b [Temporal] Sync to PR2248 to use GetTemporalUnit
https://github.com/tc39/proposal-temporal/pull/2248

Bug: v8:11544
Change-Id: I02612030f626adf2b163dca96c7602efe6adef4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3712044
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81503}
2022-07-02 03:08:31 +00:00
Frank Tang
e61e019481 [Temporal] Add since/until to Instant
Also add AOs: GetTemporalUnit, NegateTemporalRoundingMode,
MaximumTemporalDurationRoundingIncrement, GetDifferenceSettings,
DifferenceInstant, DifferenceTemporalInstant

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.since
https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.until
https://tc39.es/proposal-temporal/#sec-temporal-gettemporalunit
https://tc39.es/proposal-temporal/#sec-temporal-negatetemporalroundingmode
https://tc39.es/proposal-temporal/#sec-temporal-maximumtemporaldurationroundingincrement
https://tc39.es/proposal-temporal/#sec-temporal-getdifferencesettings
https://tc39.es/proposal-temporal/#sec-temporal-differenceinstant
https://tc39.es/proposal-temporal/#sec-temporal-differencetemporalinstant

Bug: v8:11544
Change-Id: Iabcc452304366132b03bb82529159c7553c610b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3722456
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81502}
2022-07-02 02:13:02 +00:00
Frank Tang
a63e2ddfb4 [Temporal] Add toString to Duration
Add AOs: MoveRelativeZonedDateTime,  DaysUntil, MoveRelativeDate,
RoundDuration,

Also fix bugs in CalendarDateAdd, TemporalDurationToString, IsValidDuration

Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.tostring
https://tc39.es/proposal-temporal/#sec-temporal-moverelativezoneddatetime
https://tc39.es/proposal-temporal/#sec-temporal-daysuntil
https://tc39.es/proposal-temporal/#sec-temporal-moverelativedate
https://tc39.es/proposal-temporal/#sec-temporal-roundduration

Bug: v8:11544
Change-Id: I351cdb88a930f3f7b48f351549d390e5bd02d91e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3715381
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81501}
2022-07-02 01:47:22 +00:00
Ilya Rezvov
fb8cd26f27 [wasm-atomics] Use traps for rest of atomic operations OOB handling
Bug: v8:12946
Change-Id: I2c17c3258123417d616e7fc8a1521e006b758e08
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3731149
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81500}
2022-07-01 19:51:50 +00:00
Leszek Swirski
900e1e5ffb [maglev] Split off CheckMapsWithMigration
Make the normal CheckMaps non-calling, and add a new
CheckMapsWithMigration which still does the deferred call. Eventually
we'll want to also not mark this as calling, but keeping the two
separate is cleaner anyway.

Bug: v8:7700
Change-Id: Ideb2fcef147ab45d4a10bbdde9a85a55fbd56947
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740725
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81499}
2022-07-01 16:50:20 +00:00
Toon Verwaest
078f3fb4d4 [api] Cached properties are read of the receiver
The optimization was initially designed to support only the case where
the receiver is the holder, so make this explicit:

Cached properties were implemented before super property access and
Reflect.get, or at least around the same time, not realising it
conflicted. Cached properties are optimizations for known accessors
globalThis.window and globalThis.document. They store the result of
calling those accessors. The result of calling those accessors depends
on the receiver passed to the call, so we shouldn't simply read the
cached property off of the _holder_ of the accessor, but only do so if
the holder is the same as the receiver.

Bug: chromium:1305302
Change-Id: Iea6f4437e09d5a293798041adcb310469589d00f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738744
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81498}
2022-07-01 16:27:31 +00:00
ishell@chromium.org
db3e14d3a2 [runtime] Fix serialization of EmbedderDataArray
Currently serialization of external pointers stored in EmbedderDataArray
is not supported but such a functionality was never needed before.

Bug: v8:13007, v8:12949
Change-Id: I56dc33592c1410ac9e234c60ef79db92a4e96a0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740724
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81497}
2022-07-01 15:53:29 +00:00
Manos Koukoutos
ccc74bc64e [wasm-gc] Remove 'let' opcode
This opcode is being removed in favor of pre-declared non-defaultable
locals (details are still TBD).

Bug: v8:9495
Change-Id: I96ac053a1b5a852310c5dc0bbaeab0cbf5384663
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738743
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81496}
2022-07-01 14:35:09 +00:00
Toon Verwaest
2650b3f7d6 [api] Don't unnecessary set up a fake api frame
Change-Id: I4fe880b8d0f3c6886b7bf2f0aa497068f4cfd9a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735134
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81495}
2022-07-01 14:09:50 +00:00
Manos Koukoutos
bcd8bf90ff [wasm-gc] Introduce separate constructors for ref and (ref null)
Most often, the {ValueType::Ref} constructor was called with a
constant nullability. To make things more convenient, this CL renames
{Ref} to {RefMaybeNull}, and introduces {Ref} and {RefNull}
constructors with fixed nullability.

Bug: v8:7748
Change-Id: I664ff184ca936cc752e152c3c67546d79aa24390
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732936
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81494}
2022-07-01 13:43:58 +00:00
Omer Katz
f6bf7cdb0f [heap] Deduplicate MarkingWorklist
MarkingWorklists and MinorMarkCompactCollector each had their own
definition of MarkingWorklist. Both definition are identical.
Drop MinorMarkCompactCollector's definition.

Bug: v8:12612
Change-Id: I890f263e4de702aa34f00626a3aaa3ffb29c1ff2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740723
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81493}
2022-07-01 13:29:58 +00:00
Michael Lippautz
a40a0850b6 [heap] Fix updating slots in global handles
Upon Scavenge, nodes may generally be reclaimed or updated. This logic
did not consider the fact that objects may be Smis and thus should be
ignored.

Bug: v8:1341111
Change-Id: I62f68e673377a895d3487ec9d372001342e77e8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740722
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81492}
2022-07-01 13:25:28 +00:00
Manos Koukoutos
a0a786656f [wasm-gc][refactor] Rename optRef -> refNull
This makes the internal V8 name consistent with the text-format name.

Bug: v8:7748
Change-Id: I44f7ac1eb5e634b4f829e596bf1f14caeb748d54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726291
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81491}
2022-07-01 12:33:23 +00:00
Jakob Kummerow
f76486e60a [wasm][refactor] Move ModuleDecoderImpl to -impl.h
Ctrl+X, Ctrl+V. No change in behavior.
This is a preparational step for templatizing the module decoder
for disassembler purposes.

Bug: v8:12917
Change-Id: I08a5d2e666cd16a207e9862b2691446c0473ddb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738221
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81489}
2022-07-01 11:43:09 +00:00
Samuel Groß
8893af7da6 [sandbox] Remove CagedMemoryAllocationOutcome histogram
This is no longer needed as all backing store allocations must now be
located inside the sandbox after sandboxed pointers were enabled by
default when the sandbox is enabled.

Bug: chromium:1218005
Change-Id: Id2d5feba878e1a6a5775ae3fef4012d0e7fe667a
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738742
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81488}
2022-07-01 11:41:08 +00:00
Liu Yu
2dc4329ff4 [loong64][mips64][wasm] Fix and harden all conditional tier-up checks
Port commit b9c4a84955

Change-Id: Ibf19d2988cacc67b6293a5ff348b878b27ed79e5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740491
Auto-Submit: Liu Yu <liuyu@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#81487}
2022-07-01 11:31:48 +00:00
Lu Yahan
34afea56b6 [riscv64] Fix wasm-spec-tests/tests/func
Change-Id: I2e217b5b403db9fb8504a9c81040d8fe893b37d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3740486
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81485}
2022-07-01 09:09:18 +00:00
Toon Verwaest
0a3dbeca99 [api] Drop target from FunctionCallbackArguments
This was already removed as part of the lazy api accessor work, but
was never cleaned up throughout v8.

Change-Id: I00621d0e0f33c58efaed0f6b55cd22f1f8803825
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735131
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81481}
2022-07-01 06:54:54 +00:00
Ilya Rezvov
40daf5b14b [wasm-atomics] Prevent atomic load operation to be optimized out
Bug: chromium:1339276
Change-Id: Ice60167660fa52e84c78bb0bd9d2a2c85e0c377a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733027
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Ilya Rezvov <irezvov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81478}
2022-07-01 03:21:45 +00:00
Shu-yu Guo
0d6e95b43e [change-array-by-copy] Implement TypedArray.prototype.toSpliced
Bug: v8:12764
Change-Id: I5f915d1c4dad22f1ce12423f6149a85ad32d6725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733043
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81477}
2022-06-30 21:47:38 +00:00
Jakob Kummerow
711b65f723 [wasm][simd][liftoff][arm] Fix f64x2.pmin/pmax
The previous combination of a conditional and an unconditional move
produced an incorrect value when dst == rhs and lhs contained the
expected result.

Fixed: chromium:1338980
Change-Id: If3f722999ed9c0ffd687736280d048d232d75736
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738219
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81475}
2022-06-30 18:25:08 +00:00
Jakob Kummerow
838a220cf8 [wasm] AdaptiveMap for DecodedNameSection
This is a performance improvement; no change in functional
behavior is intended.
AdaptiveMap is an abstraction over a std::map or a std::vector:
after being initialized iteratively with a set of entries, it
can switch to dense vector-based storage if that would be more
efficient.
The motivation is that we expect most name sections, if they
are present at all, to give fairly complete information, so the
dense mode will likely be the typical case. However, it's easy
enough to support sparse mode as well, and parsing the name
section into a std::map at first is particularly convenient for
cases where we can't guess the expected number of entries, such
as for function locals.

Change-Id: Ia17f27576a3061eb05c912f7081411d6f38137e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726150
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81474}
2022-06-30 16:06:57 +00:00
JianxiaoLuIntel
c651551f26 [x64] Remove unnecessary WordAnd in WordCompare
If the WordAnd aims to take low 8/16/32 bits of an oprand for later cmp8/cmp16/cmp32, it can be removed.

Change-Id: I0040e596ab65a6a9255ddbdb4fca573fd765879e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3731488
Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81473}
2022-06-30 16:05:08 +00:00
Seth Brenith
1f97a2dfcb Reuse existing Scripts during synchronous parsing
This is a partial reland of https://crrev.com/c/3597106

With this change, an existing Script from the compilation cache can be
reused after its top-level SharedFunctionInfo was discarded, but only if
the new script is parsed on the main thread (not deserialized from code
cache data, and not parsed on a background thread).

Bug: v8:12808
Change-Id: I1edaee2095306a89e2c3b91f2fd01ac053f3c770
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3689348
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#81472}
2022-06-30 15:41:07 +00:00
Omer Katz
71e72ea770 [heap] Fix bazel build
Bug: v8:12612
Change-Id: Ifa85407c506bb3192dfe7446a01cd71a9e803462
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736448
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81471}
2022-06-30 15:19:18 +00:00
Omer Katz
7626202118 [heap] Merge marking states
MinorMC maintained a separate marking state to support interleaved GCs.
Since MinorMC now assumes that interleaving is not possible, MinorMC can
use the same marking state as the full GC.

Bug: v8:12612
Change-Id: Ibeb7df2eb24e448f811b497c9d16b3b132f87ec2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735163
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81468}
2022-06-30 14:16:48 +00:00
Leszek Swirski
b9af74c80a [codegen] Use ABI caller saved regs for Pop/PushCallerSaved
The set of registers used for Pop/PushCallerSaved is a superset of the
ABI caller-saved registers. In the past it may have been the case that
these extra registers had to be saved, but at this point
Pop/PushCallerSaved is only used for fast C calls from JS, so we can
rely on the C-compiled functions saving callee-saved registers
correctly, and only save ABI-required registers ourselves.

Change-Id: I2a172bdbb381a1485654e54e3561d695b6672ed0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735130
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81467}
2022-06-30 13:51:28 +00:00
Andreas Haas
d1d4c648e7 Disable cross-compilation of clobber-registers.cc
This file uses inline assembly, but inline assembly does not work
for cross-compilation. As this file only contains debug code, no-oping
this file for cross-compilation seems acceptable.

R=ishell@chromium.org

Bug: v8:12926
Change-Id: I01276cf019e8c31e4db6f7f61a3d91526f660578
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735165
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81466}
2022-06-30 13:42:19 +00:00
Omer Katz
82398cc65b [heap] MinorMC implies separate GC phases
This is a necessary assumption for concurrent marking in MinorMC and
will simplify the code as it allows MinorMC to reuse the same marking
bitmap as full GCs.

Bug: v8:12612
Change-Id: I5e9be45c7d84320721ce7f7578dee1eb972d6f6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732933
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81465}
2022-06-30 13:12:01 +00:00
Manos Koukoutos
9d642b11c2 [wasm] Simplify {Result}
Change-Id: I6e84533581917afe90796265c563868fa1ab4448
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734810
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81464}
2022-06-30 12:18:49 +00:00
Maya Lekova
8d496bed07 Revert "[turbofan] Add fast path for Math.pow with small positive integer exponent"
This reverts commit 83470dee90.

Reason for revert: Introduced inconsistencies with the runtime (https://crbug.com/chromium/1339320) and increased inaccuracy
(https://crbug.com/v8/12996). Even though this is currently not specified, the speed improvement doesn't seem to be worth the
lower precision.

Bug: chromium:1339320, v8:12996

Original change's description:
> [turbofan] Add fast path for Math.pow with small positive integer exponent
>
> For small positive integer exponents, calculate the result with an inlined loop.
>
> This change may improve the average runtime of JetStream2/raytrace for ~8%.
>
> Change-Id: I0e3939dc9c21b0c392c04d61fd197bf618004ab4
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3708024
> Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81341}

Change-Id: Idfaa229b3d37a1831f016453c6091d2498cb6bcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735129
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#81463}
2022-06-30 11:08:41 +00:00
Andreas Haas
0271db6013 [cpu] Do not set jscvt on iOS
On old iPhones, jscvt is not availale. This CL diables jscvt on iOS in
general.

R=tebbi@chromium.org

Bug: v8:13004
Change-Id: Ib2651d7fa43892c06dc8c36e497a8c76344b5051
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726297
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81462}
2022-06-30 11:07:37 +00:00
Leszek Swirski
2caac217f1 [maglev] Expand bitfield to 64-bit
We need this to expand the max input count to be big enough for our
biggest calls (and to add more bits to the op properties).

Bug: v8:7700
Change-Id: I6d63cf39b3079c3c85a32f208ce925ae795ef5a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734811
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81461}
2022-06-30 09:51:17 +00:00
Michael Lippautz
1a82b90e47 [heap] Fix stack scan to include client Isolates
Stack scan during marking for shared heap broke in
  https://crrev.com/c/3703837

This CL re-adds the client Isolate handling which is necessary as
those client Isolates may refer to the shared Isolate from stack.

Bug: v8:13019
Change-Id: I1ee27fb8bab173087a98a0b79f4126612427b016
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736444
Reviewed-by: Nikolaos Papaspyrou <nikolaos@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81460}
2022-06-30 08:02:08 +00:00
Benedikt Meurer
0de01928b7 [debug] Always return a valid PropertyDescriptor.
In DebugPropertyIterator::iterator() we were assuming that the call to
JSReceiver::GetOwnPropertyDescriptor() would always yield either an
exception or a valid property descriptor. But that's not guaranteed to
be the case (anymore), because JSReceiver::GetOwnPropertyDescriptor()
nowadays can chicken out with `false` for many different reasons.

Coincidentally the callsites to DebugPropertyIterator::iterator() are
already equipped to handle the case where of an empty property
descriptor, which is basically what we get out here. So this CL adjusts
the DebugPropertyIterator to return an empty descriptor in this case.

Fixed: chromium:1291240
Change-Id: I22a9d0cde2b2c6d3966a85478ed0b87fb4c5d232
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736445
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81458}
2022-06-30 07:02:58 +00:00
Jakob Kummerow
c63092b7ae [wasm][arm][liftoff] Fix another GetUnusedRegister
Fixed: chromium:1340488
Change-Id: Id3da10dd13256dfc15a6fef4dc412b5d30ccc8cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735126
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81455}
2022-06-30 03:48:27 +00:00
Lu Yahan
74955ee1c7 [riscv64][wasm] Fix and harden all conditional tier-up checks
port commit b9c4a84955

Change-Id: Id2764f7b37b287a76bd9b22e55f4153b9b619bd6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736554
Commit-Queue: ji qiu <qiuji@iscas.ac.cn>
Reviewed-by: ji qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#81454}
2022-06-30 03:37:51 +00:00
Frank Tang
8a14d953e2 [Temporal] Sync to PR1953 and PR1917 to fix bugs.
https://github.com/tc39/proposal-temporal/pull/1917
https://github.com/tc39/proposal-temporal/pull/1953

Bug: v8:11544
Change-Id: I667980e312248ccbaf826d4e3104fb1ddabef890
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721464
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81453}
2022-06-30 02:36:57 +00:00
Shu-yu Guo
c00444b927 [rab/gsab] Fix toStringTag for RAB/GSAB-backed TypedArrays
Bug: v8:11111
Change-Id: I4846910d05bb5d83c964b2279efdb7cf2a4545b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3733028
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81451}
2022-06-29 19:33:57 +00:00