Commit Graph

70579 Commits

Author SHA1 Message Date
Camillo Bruni
e4dcbab5e1 [api][fastcall] Small TryCopyAndConvertArrayToCppBuffer fixes
- Add V8_WARN_UNUSED_RESULT to TryCopyAndConvertArrayToCppBuffer
  methods
- Remove --force-slow-path implications in
  Object::IterationHasObservableEffects

Bug: v8:11739
Change-Id: I20dcac1c460c6ee116ff372806cdf8764a99d9f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063504
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76037}
2021-08-02 12:01:46 +00:00
Victor Gomes
5f9e80eb43 [ic] Propagate array error in StoreInArrayLiteralIC
Instead of throwing a fatal error when setting a value in an array with
index larger than FixedArray:kMaxLength, we now throw an exception.

This CL propagates the exception in StoreInArrayLiteralIC.

Bug: chromium:1235093, chromium:1201626
Change-Id: Iaffd4eff47ad689fce2fd641ce1beaddd02d1a48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067220
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76036}
2021-08-02 11:51:16 +00:00
Clemens Backes
ea822809c7 [wasm] Make CodeSpaceWriteScope more narrow
This avoids having all code writable while compiling functions. We only
need it writable for copying the code to the NativeModule and for
updating the jump table(s).

R=jkummerow@chromium.org

Change-Id: Ifb212b1cd3f7702fac4b1eb9e7bc7d5b5bd5198a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063221
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76035}
2021-08-02 11:20:46 +00:00
Clemens Backes
f7de8c8062 [wasm] Use a consistent limit for large frames
For large frames we are executing a special stack check that checks the
remaining stack space before allocating the new frame. Different
platforms used different limits for the frame size so far. Liftoff
already uses 4KB everywhere, hence use the same limit also for TurboFan.

Drive-by: Remove an outdated and misleading comment, and other minor
simplification.

R=ahaas@chromium.org

Bug: v8:12017
Change-Id: I6548b2293ec255349bf4e08c26fd05b7e0df0497
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063501
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76034}
2021-08-02 11:01:26 +00:00
Jakob Kummerow
a876146449 [bigint] Fix accidental creation of "minus zero" BigInts
Regressed in crrev.com/152ecad8cd4d170e4091a79eaa8d70d10d94734d.

Fixed: chromium:1234931
Change-Id: I8f2b603a914fccaeaeb3dcffa63070cf8fb6f0e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064604
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76033}
2021-08-02 10:47:46 +00:00
Santiago Aboy Solanes
634a0fd641 [compiler] Make NeverEverSerialized the default for NeverSerialized
Also:
* Remove forward declare and As##Name for never serialized Data classes
* Remove the Data classes
* Refactor macro list to encode being background or never serialized

Bug: v8:7790
Change-Id: Ide29d89072b247311f29948f04c4147c5c1103cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056458
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76032}
2021-08-02 10:34:56 +00:00
Jakob Gruber
3a401f3b51 [compiler] Remove invalid CHECK in JSFunctionData::Cache
A JSFunction object may count as 'ObjectMayBeUninitialized', yet still
be safe to read for other reasons (e.g. because it has been loaded
through a chain of acquire-loads and immutable-after-initialization
guarantees).

Bug: chromium:1235071,v8:7790
Change-Id: I18c81695f001fd67e69d98dde641b71ed7b7e53d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064606
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76031}
2021-08-02 07:53:46 +00:00
Georg Neis
6ca335ef20 [compiler] Make field dependency code clearer
Lookup the corresponding details on the given map instead of the
owner map.

Change-Id: I2dcd0b24216c2bdc5860518d34d710b771f74973
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063234
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76030}
2021-08-02 07:05:36 +00:00
Leszek Swirski
07e636f522 [test] Lower the stack size & iterations on 1125145 test
Change-Id: I0ba9c4bf13ff13e69d960fba44f93124be5a31a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063499
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76029}
2021-08-02 06:57:17 +00:00
v8-ci-autoroll-builder
56aec51115 Update V8 DEPS.
Rolling v8/build: 3ab54c6..50fd66a

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

Change-Id: Ia1870a3ee8532486f7205494fd10da872d6e51d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064460
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@{#76028}
2021-08-02 03:50:56 +00:00
v8-ci-autoroll-builder
2c1c143f91 Update V8 DEPS.
Rolling v8/build: fbcc5ac..3ab54c6

Rolling v8/buildtools/linux64: git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e..git_revision:eea3906f0e2a8d3622080127d2005ff214d51383

Rolling v8/third_party/aemu-linux-x64: lL9eGDPnjhLmu6ErFz6_fnCALFjGkGsl3IgkWQit-ugC..pmyID7CW-4NsGYefh7NnE4xj3AbHD5lu9r5GLO3rzMYC

Rolling v8/third_party/zlib: dfbc590..f7a5fc9

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

Change-Id: I25f0355a55daf4d9e2339120abd118e46ab16d9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3065570
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@{#76027}
2021-08-01 03:52:10 +00:00
v8-ci-autoroll-builder
185badc912 Update V8 DEPS.
Rolling v8/build: 8aa210e..fbcc5ac

Rolling v8/third_party/aemu-linux-x64: EfaAueisHmQB3i2Cqncpzj07xFoDNrwT09yreit16bgC..lL9eGDPnjhLmu6ErFz6_fnCALFjGkGsl3IgkWQit-ugC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/10f6e4b..4505381

Rolling v8/tools/luci-go: git_revision:59603935354589d60cd8374e75889932bf84c33f..git_revision:db421da12bad8e57f97ee45b24147e34ec882007

Rolling v8/tools/luci-go: git_revision:59603935354589d60cd8374e75889932bf84c33f..git_revision:db421da12bad8e57f97ee45b24147e34ec882007

Rolling v8/tools/luci-go: git_revision:59603935354589d60cd8374e75889932bf84c33f..git_revision:db421da12bad8e57f97ee45b24147e34ec882007

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

Change-Id: Ib619bcf5b931c491b7080bd1a92a5cbba3dee122
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3064304
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@{#76026}
2021-07-31 03:46:48 +00:00
Junliang Yan
121df413a3 ppc: [liftoff] implement fp copysign
Change-Id: Ic1fb152ced8535982f4e918df691e5c6e4cfaa68
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063506
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76025}
2021-07-30 17:09:07 +00:00
Ng Zhi An
74bdb34967 [wasm] Remove stale ifdef guard
wasm-code-manager.cc is no longer included if v8_enable_webassembly ==
false, so we can remove this guard.

Bug: v8:11879
Change-Id: Ide77e7e334d2711c1cbbbbedc34c2796ffaf793d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3061358
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76024}
2021-07-30 17:00:57 +00:00
Milad Fa
1c4ce244e2 [wasm] skip partial serialization test on platforms without liftoff
Bug: v8:11862
Change-Id: If40fea4c332374c4e245498f378dff7734a84e9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062239
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76023}
2021-07-30 14:35:38 +00:00
Jakob Kummerow
152ecad8cd [bigint] Move String-to-BigInt parsing to src/bigint/
No changes to the algorithm, approximately 4x performance
improvement thanks to reduced overhead.

Bug: v8:11515
Change-Id: Id3f6c91bd650f6ae47ac8f169dc780420091998e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3046185
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76022}
2021-07-30 14:19:48 +00:00
Andreas Haas
835a8b7de5 [wasm] Add instance to DebugBreak safepoint
Since recently, the WebAssembly instance gets cached in Liftoff code
to avoid reloading it from the stack whenever it is used. Typically the
cached instance gets invalidated at a function call and therefore does
not need to be recorded in safepoints.

However, when the DebugBreak builtin is called, the cached instance
was not invalidated. It is even incorrect to invalidate the cached
instance there because that would modify the CacheState of Liftoff.
Therefore this CL adds the register that caches the instance to the
safepoint of the call to the DebugBreak builtin.

R=clemensb@chromium.org

Bug: v8:11979
Change-Id: I7f9153e0c0e7e797b11b827111b4d61e29606071
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3063222
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76021}
2021-07-30 14:16:38 +00:00
Georg Neis
3129309fac [compiler] Remove invalid DCHECK in CompilationDependencies
With concurrent inlining, the TransitionDependency ctor can no
longer assume that the given map is not deprecated. This is not an
issue since IsValid will check it again.

Also remove some other outdated DCHECKs and turn a few DCHECKs into
CHECKs since the properties they check are not so obvious anymore with
concurrency.

Bug: v8:12033, v8:7790
Change-Id: I932f7f6440697d693b0c0e6472406329af29b46b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062576
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76020}
2021-07-30 13:50:28 +00:00
Benedikt Meurer
f9ebad0119 [inspector] Use side-effect free debug evaluate for inherited accessors.
Replace the hard-coded blocklist ("Response.body" and "Request.body") in
the V8 inspector with proper side-effect free debug evaluate. This is
otherwise a non-functional change and in particular preserves the
behavior of reporting accessors as (own) data properties. That will be
tackled in a follow-up CL.

This CL is possible because with https://crrev.com/c/3056879 Blink now
properly marks accessors as side-effect free consistently with what the
V8 inspector had done before.

Doc: http://doc/1gLyyOlssS5zyCSEyybVC-5sp0UnNJj2hBoFyf6ryrTc
Bug: chromium:829571, chromium:1076820, chromium:1119900
Change-Id: Idb256accaf4cfb5db5982b3eb06ddcef588be635
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062573
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76019}
2021-07-30 12:24:28 +00:00
Marja Hölttä
6ca9684f5b [rab/gsab] Fix: handle the case where parameter processing resizes the rab
See https://github.com/tc39/proposal-resizablearraybuffer/issues/67

Bug: v8:11111
Change-Id: I43cc61797387a021e9bf752284b917f77662354d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062559
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76018}
2021-07-30 11:41:38 +00:00
Andreas Haas
cace2f533e Reland "[wasm] Support partial serialization of modules"
The original CL was flaky because deserialization did not wait correctly
for the compilation of missing functions to finish. The baseline-finished
event was set even when there were still some functions missing. The
combination of deserialization and lazy compilation was also not handled
correctly.

Original change's description:
> [wasm] Support partial serialization of modules
>
> At the moment a WebAssembly module can be serialized successfully when
> all functions were compiled with TurboFan. However, for some functions
> it may not be necessary to be compiled with TurboFan, e.g. for functions
> where Liftoff code is as good as TurboFan code.
>
> With this CL we allow WebAssembly modules to get serialized even when
> not all functions are compiled with TurboFan. Missing functions are
> marked as missing in the serlialization. Upon deserialization, missing
> functions either get compiled by Liftoff, or initialized with a
> lazy-compilation stub, depending on the V8 configuration.
>
> Bug: v8:11862

Change-Id: I79a9e8e14199cff87fce6ae41a87087e047bbc65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060485
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76017}
2021-07-30 11:18:38 +00:00
Paolo Severini
530fd795a9 [fastcall] Type-specialize CopyAndConvertArrayToCppBuffer
Rename CopyAndConvertArrayToCppBuffer as
TryCopyAndConvertArrayToCppBuffer and implement type specialization for
int32_t and double in order to speed up V8 bindings with sequences.

This API is used by Blink code, for example see
https://chromium-review.googlesource.com/c/chromium/src/+/3027405.

Bug: v8:11739
Change-Id: I026a7f5e7833fb1afcc2ea9c296b66c7f733cbb1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3036407
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76016}
2021-07-30 10:52:12 +00:00
Clemens Backes
3a44f269c5 [base] Avoid pthread_rwlock_t on Mac
pthread_rwlock_t can deadlock on Mac if signals are sent to the process
in the wrong moment. Since we use processes e.g. for sampling profiling
(in both d8 and in Chrome), we hence cannot safely use pthread_rwlock_t
on Mac. Instead, fall back to a non-shared pthread_mutex_t.

Interestingly, this shows no measurable performance impact in Wasm
compilation on my MBP.

R=mlippautz@chromium.org

Bug: v8:11399
Change-Id: Ie8bfd5288bba8c4f3315ee4502b39b59d39c9bbd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060480
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76015}
2021-07-30 10:51:09 +00:00
Lu Yahan
e82b368b67 [riscv64][baseline] Add func FixOnHeapReferences
-- 3059689: [baseline] Fallback to handle references on heap compilation | https://chromium-review.googlesource.com/c/v8/v8/+/3059689

Change-Id: Ie055e181e5081d7acb2195ae41abaecdd0f68989
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062030
Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Auto-Submit: Yahan Lu <yahan@iscas.ac.cn>
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#76014}
2021-07-30 09:48:56 +00:00
Santiago Aboy Solanes
767101e7cd [compiler] Mark DescriptorArray as NeverEverSerialized
Bug: v8:7790
Change-Id: Id06775f9f3c7f1a505a736fcc4b992feb0d09308
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056454
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76013}
2021-07-30 09:36:06 +00:00
Georg Neis
6af89d92e5 [heap] Add --trace-pending-allocations
Traces calls to Heap::IsAllocationPending that return true. This is
useful when debugging concurrent Turbofan.

Bug: v8:7790
Change-Id: If10e6f40c3bf03c768ad8b74403007fe86f860fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060488
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76012}
2021-07-30 08:03:26 +00:00
v8-ci-autoroll-builder
fdabdb04bf Update google_benchmark
Rolling v8/third_party/google_benchmark/src: ab74ae5..1067dfc

Remove dead code from PredictNumItersNeeded (#1206) (Braedy)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/1067dfc

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,mlippautz@chromium.org

Change-Id: I4c52fee681f648ea2f1fbfc253e276a824de7011
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062205
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@{#76011}
2021-07-30 05:45:56 +00:00
v8-ci-autoroll-builder
5adac68ddb Update V8 DEPS.
Rolling v8/build: 82f37a4..8aa210e

Rolling v8/third_party/googletest/src: 4ec4cd2..2d924d7

Rolling v8/tools/clang: 30a89ee..d0097bc

Rolling v8/tools/luci-go: git_revision:2c98a90e4f4daa808cb69d51e71eee9289bd5422..git_revision:59603935354589d60cd8374e75889932bf84c33f

Rolling v8/tools/luci-go: git_revision:2c98a90e4f4daa808cb69d51e71eee9289bd5422..git_revision:59603935354589d60cd8374e75889932bf84c33f

Rolling v8/tools/luci-go: git_revision:2c98a90e4f4daa808cb69d51e71eee9289bd5422..git_revision:59603935354589d60cd8374e75889932bf84c33f

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

Change-Id: I1f2a40e39fdfc524bb0bd0ad4d007b564944286a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062202
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@{#76010}
2021-07-30 03:51:56 +00:00
Milad Fa
cd17e16f52 PPC [disas]: fix mtvsrdd on disassembler
mtvsrdd uses 2 gprs as input.

Change-Id: I4446a51bda1196ce262e3a90ed7c840da89c9d16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3061478
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76009}
2021-07-29 21:15:25 +00:00
Milad Fa
b67dd4294f PPC [simd]: optimize I64x2Mul on Power10
Cl also optimizes the usage on Power9 by using
mtvsrdd.

Change-Id: Ibd6b227111adc0c262c621be6ce4068d3de2e659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060493
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76008}
2021-07-29 21:13:45 +00:00
legendecas
d63ca69c22 [builtins] Implement Array#findFromLast and friends
This proposal reached Stage 3 at the July 2021 TC39.

https://github.com/tc39/proposal-array-find-from-last

Bug: v8:11990
Change-Id: I1364b46b7ed4bc56e4b3024d14bde799f9878b5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3037160
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76007}
2021-07-29 19:37:15 +00:00
Junliang Yan
5e4e0126f1 ppc: [liftoff] implement FP rounding ops
Change-Id: I8d33239180b04afd322c99988dcf6aea0c928797
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060495
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76006}
2021-07-29 19:05:15 +00:00
Junliang Yan
867562a32d ppc: [liftoff] implement floating point abs/neg/sqrt
Change-Id: I4a11a5409922550119a3d8cafd254c4f8dd798e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060494
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76005}
2021-07-29 18:25:15 +00:00
Milad Fa
5020d83e05 PPC/s390: [baseline] Fallback to handle references on heap compilation
Port 642a467338

Original Commit Message:

    If a GC happens between Code object allocation and Code finalization,
    we might have invalid embedded object references. We fallback and patch
    the refernces back to handles, then unbox the handles and relocate.

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

Change-Id: I680cc33fa9d06d7a00cc52c142599bb5536a9b88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060487
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76004}
2021-07-29 15:42:33 +00:00
Mythri A
64556d13a4 [sparkplug] Introduce flush_baseline_code flag
Introduce a flush_baseline_code flag to control if baseline code is
flushed or not. Currently flush_baseline_code implies flush_bytecode
as well. So if flush_baseline_code is enabled both bytecode and baseline
code are flushed. If the flag is disabled we only flush bytecode and
not baseline code.

In a follow-up CL we will add support to control baseline and bytecode
flushing independently i.e. we can flush only bytecode / only baseline
code / both.

Bug: v8:11947
Change-Id: I5a90ed38469de64ed1d736d1eaaeabc2985f0783
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059684
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76003}
2021-07-29 15:04:32 +00:00
legendecas
8db991a042 [runtime] throw a realm type error when constructors are called
Each time a constructor is being called without new operator, a TypeError
is thrown. The TypeError should be the realm's one according to 10.2.1.5.b.

Refs: https://tc39.es/ecma262/#sec-ecmascript-function-objects-call-thisargument-argumentslist
Refs: https://github.com/tc39/ecma262/pull/2216
Bug: v8:11530
Change-Id: Iff10a78e96fb547fe2062c86b9f93a30d2a8be20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056830
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76002}
2021-07-29 14:34:22 +00:00
Marja Hölttä
140cd812a2 [rab/gsab] Update TypedArrayPrototypeByteOffset
This CL assumes https://github.com/tc39/proposal-resizablearraybuffer/issues/68
is indeed a spec bug.

Bug: v8:11111
Change-Id: I8d24f0d07f7ab40ba01b8c422868ad189d6f7e5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060478
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76001}
2021-07-29 14:30:12 +00:00
Marja Hölttä
faf85529f9 [rab/gsab] Add tests for destructuring
Bug: v8:11111
Change-Id: I52eb7e458fc614e3f5e936fb1761680a5cdeadb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056983
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76000}
2021-07-29 14:17:02 +00:00
Junliang Yan
dce2353991 ppc: [liftoff] implement sign extend ops
Change-Id: I0420b3cd9c940dbf684c0aa1478172921423c724
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060483
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75999}
2021-07-29 13:33:42 +00:00
Clemens Backes
af6a35c860 [runtime] Check for proper stack checks
When calling the {Isolate::StackOverflow} method, we should not have
overflown the stack limit by too much. Otherwise there might not be
enough space on the stack for handling the stack overflow exception.

This DCHECK would have failed before landing https://crrev.com/c/3059074
and https://crrev.com/c/3059075. If it fails, we might need to add more
special stack checks also in other places. Such failures should not be
considered security issues per se, but we should try to fix them to
avoid potential issues.

R=jkummerow@chromium.org
CC=ahaas@chromium.org

Bug: v8:12017
Change-Id: I25e42a20d3fcc981c266ae998f52b3f090237297
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059076
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75998}
2021-07-29 13:16:12 +00:00
Leszek Swirski
580508f868 Revert "[wasm] Support partial serialization of modules"
This reverts commit bce81d6be0.

Reason for revert: Newly introduced test is flaking, e.g. https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20ASAN/41030/overview or https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/43171/overview

Original change's description:
> [wasm] Support partial serialization of modules
>
> At the moment a WebAssembly module can be serialized successfully when
> all functions were compiled with TurboFan. However, for some functions
> it may not be necessary to be compiled with TurboFan, e.g. for functions
> where Liftoff code is as good as TurboFan code.
>
> With this CL we allow WebAssembly modules to get serialized even when
> not all functions are compiled with TurboFan. Missing functions are
> marked as missing in the serlialization. Upon deserialization, missing
> functions either get compiled by Liftoff, or initialized with a
> lazy-compilation stub, depending on the V8 configuration.
>
> Bug: v8:11862
> Change-Id: Ic833a17639bf841c5def6fe3c35173fe0376c246
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960209
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75987}

Bug: v8:11862
Change-Id: I5445c097ec47f407e5f951d4cf6d2168113f80e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060484
Auto-Submit: Leszek Swirski <leszeks@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@{#75997}
2021-07-29 13:05:14 +00:00
Victor Gomes
642a467338 [baseline] Fallback to handle references on heap compilation
If a GC happens between Code object allocation and Code finalization,
we might have invalid embedded object references. We fallback and patch
the refernces back to handles, then unbox the handles and relocate.

Bug: v8:11872
Change-Id: I3a7b050c20179c1708eef343ec8266441ab5dca1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059689
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75996}
2021-07-29 12:28:42 +00:00
Clemens Backes
9e0e2c150c [liftoff] Add code comments for large stack checks
This adds a code comment before the OOL code for the special stack check
for a large frame. Otherwise it is hard to see where it begins in the
code, and it might be unexpected to see that block of code at the end of
a Liftoff function.

Drive-by: Replace another "out of line: " comment by "OOL: ", which is
typically understood equally well.

R=ahaas@chromium.org

Bug: v8:12017
Change-Id: Ie8b243cedebe979ca46e0515a9fdd0695ab58304
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059081
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75995}
2021-07-29 12:17:02 +00:00
Thibaud Michaud
d66cc11c2f [wasm][eh] Rename exception to tag
The JS API constructor was renamed to "WebAssembly.Tag" to match the
spec:
https://github.com/WebAssembly/exception-handling/issues/159

Rename "exception" to "tag" throughout the codebase for consistency with
the JS API, and to match the spec terminology (e.g. "tag section").

R=clemensb@chromium.org,nicohartmann@chromium.org

Bug: v8:11992
Change-Id: I63f9f3101abfeefd49117461bd59c594ca5dab70
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3053583
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75994}
2021-07-29 12:09:02 +00:00
Marja Hölttä
ce1a9ab683 [rab/gsab] Enable code paths needed for BigInt TypedArrays
Bug: v8:11111
Change-Id: Ib3ae55349024ebeab9ceaf9472a6de2b4d86ce55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056975
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75993}
2021-07-29 11:30:42 +00:00
Jakob Gruber
2442ea5e80 [compiler] Only clear cached PAIs in stress modes
Clearing cached PropertyAccessInfos is used for stress-testing. Note
all this will soon be removed.

Bug: v8:7790,chromium:1234288
Change-Id: I4576563375b65830296cad295342823700d13b3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059696
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75992}
2021-07-29 11:28:22 +00:00
Clemens Backes
72b0756ea1 [liftoff][ia32] Add explicit stack check for large frames
Add an explicit check for the available stack space before allocating a
large frame. Even though this typically does not cause problems on ia32,
we should do it to be consistent with other platforms and with TurboFan
code.

This follows the same structure as on x64: https://crrev.com/c/3059074

A follow-up CL will add a DCHECK to verify that we never overflow the
stack space by more than 4KB (https://crrev.com/c/3059076).

R=ahaas@chromium.org

Bug: v8:12017
Change-Id: Ifffe56f29feae14545e6f70e30a1c94c5eabad6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059075
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75991}
2021-07-29 11:11:42 +00:00
Clemens Backes
bbeccc35e4 [liftoff][x64] Add explicit stack check for large frames
Add an explicit check for the available stack space before allocating a
large frame. Even though this typically does not cause problems on x64,
we should do it to be consistent with other platforms and with TurboFan
code.

After also fixing ia32 (https://crrev.com/c/3059075), we can add a
DCHECK to verify that we never overflow the stack space by more than
4KB (https://crrev.com/c/3059076).

R=ahaas@chromium.org

Bug: v8:12017
Change-Id: I4f407dc6a83d4a71636066777706f23d05002111
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059074
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75990}
2021-07-29 10:43:25 +00:00
Clemens Backes
43580d8274 [liftoff][arm64] Remove outdated comment
The comment is a left-over of the state before
https://crrev.com/c/3055302. It should have been removed as part of that
CL.

R=ahaas@chromium.org

Bug: v8:12017
Change-Id: Ic5234b230b3eda30e9a4a346e8c3b83c813a5dbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3059078
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75989}
2021-07-29 10:42:22 +00:00
Marja Hölttä
df45384de4 [rab/gsab] Fix JSTypedArray::Validate to throw for oob rab/gsab
This will change the behavior of %TypedArray%.prototype.fill.

Bug: v8:11111
Change-Id: I66e7d3decf07663a6497c3c86374b3c77ab6a682
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056977
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75988}
2021-07-29 10:41:17 +00:00