Commit Graph

67016 Commits

Author SHA1 Message Date
Georg Neis
98653d0277 [compiler] Drop a misleading type annotation
Boolean denotes the boolean JS values and doesn't make sense for the
result of a WordEqual.

Change-Id: Id504bbe1171c2603ed4070ed922fcafd94d846c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2666689
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72474}
2021-02-02 10:54:13 +00:00
Marja Hölttä
a850668ccf [d8] Fix a crash when getting the worker's onmessage handler
Bug: chromium:1162473
Change-Id: Ided2f52882aaf02e1dc9a8d0ba883fedf029464d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2663004
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72473}
2021-02-02 10:43:03 +00:00
Camillo Bruni
1c6e7920b5 [cctest] Simplify DynamicImport test
Add comments and simpify code a bit for less chance of cargo culting.

Change-Id: Ica3fc60b0b7c11cc99a4c9ba9e3255662bbbb6bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642459
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72472}
2021-02-02 10:05:44 +00:00
Liu Yu
38fb148730 [mips64] Push the full MSA register before lazy compile
Port: 3b302d5cfe

Port: 45b99aaa58

Besides, removed redundant DCHECK.

Change-Id: Ifac825ae7670b075750603b2c61a3d60a85cc373
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2662581
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72471}
2021-02-02 09:34:16 +00:00
LiuYu
bc70b6e475 [mips][wasm-simd] Merge all any_true to v128.any_true
Port: 6d3a53e7f2

Bug: v8:11331

Change-Id: I6aaba8e4d25e01121f0f7e01f67af3b5c7202ba6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2666712
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72470}
2021-02-02 07:13:43 +00:00
v8-ci-autoroll-builder
fb0f95bcbf Update V8 DEPS.
Rolling v8/build: dce1147..dc9dc45

Rolling v8/buildtools: 9904915..fc5af1a

Rolling v8/third_party/aemu-linux-x64: Y_rckHsnBv6dqNUbG4QoVkl3njqEx7ewCNGmqOE_h1MC.._nJMIPzu-ykpL-XPjf14IZ3CAFT3iQRtsbzyiSm9u7QC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/91735e2..4920147

Rolling v8/third_party/depot_tools: cb07c52..8c95595

Rolling v8/third_party/zlib: c876c8f..bf44340

Rolling v8/tools/clang: 9290907..ec98581

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

Change-Id: Ic364444072e5b2405dc05d3cce7133585cce84c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2666713
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@{#72469}
2021-02-02 03:49:53 +00:00
Michael Lippautz
7e9aa1bd8f cppgc: Add Persistent capabilitites
- Allow downcasting construciton and assignment;
- Add WeakCrossThreadPersistent::Lock() that safely retrieves a strong
  handle for a weak reference;

Bug: chromium:1056170
Change-Id: I5f8d85a87c9955506dd87723ffb4c80d66770c04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2663160
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72468}
2021-02-02 00:25:22 +00:00
Milad Fa
50fb3e0309 PPC/s390: Reland "[wasm-simd] Merge all any_true to v128.any_true"
Port 6d3a53e7f2

Original Commit Message:

    This is a reland of commit 9c09c227b0.

    The fix for gc stress failure is merged: https://crrev.com/c/2656857.

    Original change's description:

    > Bug: v8:11331
    > Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
    > Reviewed-by: Georg Neis <neis@chromium.org>
    > Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
    > Commit-Queue: Zhi An Ng <zhin@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#72304}

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

Change-Id: I68991b81c18e06714d272f019dab7994419692bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2665894
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72467}
2021-02-01 23:29:42 +00:00
Junliang Yan
9fd2c27f17 PPC/s390: [builtins] Clear c_entry_fp when entering JS and at exception path
Port 07b03b8353

Original Commit Message:

    c_entry_fp is normally cleared in `LeaveExitFrame`, but we adjust
    the frame without it in the exception path.

    This can cause the SafeStackFrameIterator to assume we have an exit
    frame and iterate over frames incorrectly, which for arm64 can
    cause pointer authentication failures with CFI enabled. Even without
    the pointer authentication failure, we iterate over frames
incorrectly,
    so make this change for other architectures too.

    Also clear c_entry_fp in the beginning of JSEntry, after pushing it
    on the stack. Not doing this doesn't cause pointer authentication
    failures, but it will make the SafeStackFrameIterator assume we
    are executing C++ and miss the JS frames on top.

R=georgia.kouveli@arm.com, joransiu@ca.ibm.com, junyan@redhat.com,
midawson@redhat.com, mfarazma@redhat.com
BUG=
LOG=N

Change-Id: Id12286a0f18fce928f9e44825fc13cd0338bac46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2665893
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72466}
2021-02-01 22:59:42 +00:00
Ng Zhi An
6d3a53e7f2 Reland "[wasm-simd] Merge all any_true to v128.any_true"
This is a reland of commit 9c09c227b0.

The fix for gc stress failure is merged: https://crrev.com/c/2656857.

Original change's description:

> Bug: v8:11331
> Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72304}

Bug: v8:11331
Change-Id: I82f57b3fe5f0c456472aa7ce404703f34b73d17e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659511
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72465}
2021-02-01 19:54:18 +00:00
Ng Zhi An
3ba83f2d43 [wasm-simd][fuzzer] Add load/store lane instructions to fuzzer
Bug: v8:10975
Change-Id: Icfc5982c96132ef3eaa4d8b9dc2b8229d87ab15e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659509
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72464}
2021-02-01 18:58:57 +00:00
Ng Zhi An
8665f09771 [cleanup] Fix invalid references to wasm-linkage.cc in comments
Change them to wasm-linkage.h.

Bug: v8:11074
Change-Id: Ic29cdd85b3d20cf384952aacc7ca82236e3bf276
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659502
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72463}
2021-02-01 18:54:18 +00:00
Daniel Clark
4ae35a7e84 Loosen DHCECK to allow for no HostImportModuleDynamically callback to be set
The DCHECK is firing because the fuzzer doesn't set any
HostImportModuleDynamically callback.  Previously
RunHostImportModuleDynamicallyCallback would not assert for this and
would just return a rejected promise.  After
https://chromium-review.googlesource.com/c/v8/v8/+/2620578, this results
in a failed DCHECK.

This change restores the old behavior by loosening the DCHECK such that
it only fails if both the deprecated and the new callback are set.

Bug: chromium:1172121
Change-Id: Ifda28eb28572a40d3752928997edf25d607b61c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659505
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72462}
2021-02-01 18:38:24 +00:00
Georg Neis
e12ffa65fa [compiler] Simplify JSHeapBroker::TryGetOrCreateData uses
Make the crash_on_error parameter false by default, so that the typical
use is easier to read:
Use GetOrCreateData(obj) if you expect the object to be known already.
Use TryGetOrCreateData(obj) if you don't.

Bug: v8:7790
Change-Id: I5732ad13ec582c2a1112032f88be54c833906a6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658327
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72461}
2021-02-01 17:55:24 +00:00
Clemens Backes
0215b57261 [wasm][debug] Remove dead parameter
Minor cleanup before starting to refactor the debug side table.

R=thibaudm@chromium.org

Bug: chromium:1172299
Change-Id: I507cb297e66954488194a346aac31664a34a20f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659260
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72460}
2021-02-01 16:57:44 +00:00
Liviu Rau
e76dc8c923 Whitespace to trigger builders
Used for testing infra change https://crrev.com/c/2650208

NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true

Bug: chromium:1144601
Change-Id: I93ea610c45d3cbc9557f9a13e2ccc74927720384
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659256
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72459}
2021-02-01 13:38:16 +00:00
Georgia Kouveli
07b03b8353 [builtins] Clear c_entry_fp when entering JS and at exception path
c_entry_fp is normally cleared in `LeaveExitFrame`, but we adjust
the frame without it in the exception path.

This can cause the SafeStackFrameIterator to assume we have an exit
frame and iterate over frames incorrectly, which for arm64 can
cause pointer authentication failures with CFI enabled. Even without
the pointer authentication failure, we iterate over frames incorrectly,
so make this change for other architectures too.

Also clear c_entry_fp in the beginning of JSEntry, after pushing it
on the stack. Not doing this doesn't cause pointer authentication
failures, but it will make the SafeStackFrameIterator assume we
are executing C++ and miss the JS frames on top.

Bug: v8:10026
Change-Id: Ie94834920f51e9f1cc5c1c775596726b61fc0507
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642256
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#72458}
2021-02-01 11:42:55 +00:00
Ulan Degenbaev
6df1aec62c [heap, infra] Remove --local-heaps and --concurrent-allocation flags
The flags are enabled by default and have stable coverage.
This also removes the corresponding bots.

Bug: v8:10315
Change-Id: Icce01383050dff758b6554db8e0c3589d6e5459c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658324
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72457}
2021-02-01 11:01:26 +00:00
Peter Wong
5a2c53f948 [torque] Port String.prototype.includes/indexOf and StringIndexOf
- Removed no longer used StringBuiltinAssembler methods (DispatchOnStringEncodings, PointerToStringDataAtIndex)
- Removed no longer used Runtime functions (StringIncludes, StringIndexOf, StringIndexOfUnchecked).
- Overall builtin code size is reduced (652 bytes on Mac x64.release build), builtin size breakdown:

BEFORE
======
TFS Builtin, StringIndexOf, 1092
TFJ Builtin, StringPrototypeIncludes, 1784
TFJ Builtin, StringPrototypeIndexOf, 1536
Total = 4412

AFTER
=====
TFC Builtin, StringIndexOf, 2036 (+944)
TFJ Builtin, StringPrototypeIncludes, 1072 (-712)
TFJ Builtin, StringPrototypeIndexOf, 652 (-884)
Total = 3760 (-652)


Bug: v8:8996
Change-Id: I9a88c095e2097f7d570e58e744d6692dc524ddf4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660995
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72456}
2021-02-01 08:29:15 +00:00
Manos Koukoutos
0461065ca9 [wasm][test] Various test cleanups
Changes:
- Remove an obsolete TODO from wasm-module-builder.
- Replace CHECK with gTest's EXPECT in unittests.
- Remove setting of --experimental-wasm-liftoff-extern-ref in wasm-gc.
- Test test-gc/JSAccess with Liftoff.
- Remove useless #undef's from module-decoder-unittest.

Change-Id: I11b4a3dde9683cc9c7d1eb89b1a63e1859505aad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659063
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72455}
2021-02-01 07:57:35 +00:00
Shu-yu Guo
0b8bfd8590 [regexp] Stage RegExp match indices
Bug: v8:9548
Change-Id: I92b8c3b305f0e18557fb6628c42c668faf694bd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659512
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72454}
2021-02-01 07:43:00 +00:00
Iain Ireland
2a6f7e2070 [regexp] Undo removal of ParseRegExpSyntax
RegExpParser::ParseRegExpSyntax was added to allow the SpiderMonkey
embedding of irregexp to report early errors. It was removed in
https://chromium-review.googlesource.com/c/v8/v8/+/2509596 because it
was unused. This patch restores it, with a comment to prevent future
deletion.

Bug: v8:11368
Change-Id: Iebec7e14b92e9a0fccc08f2f1c85d8ff4d6173f1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658037
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72453}
2021-02-01 07:41:55 +00:00
Manos Koukoutos
f128a1c55f [wasm-gc] Implement classification functions in liftoff
Bug: v8:7748
Change-Id: I56a5e0a3e3141ef781a816656dc50d0d0a1573cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659258
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72452}
2021-02-01 07:03:55 +00:00
v8-ci-autoroll-builder
d19dcaac47 Update V8 DEPS.
Rolling v8/build: 7a702b2..dce1147

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

Change-Id: Ia57ea2e2a6b9ad9e89136ac4b1509b45fb54a44d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2662502
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@{#72451}
2021-02-01 03:48:55 +00:00
Manos Koukoutos
2515c3daf5 [wasm-gc] Fix br_on_* branch-type requirements
br_on_* instructions need a precisely typed branch target, as opposed
to being treated like regular br instructions.

Bug: v8:7748
Change-Id: Iedace79faf59d61cf2ce5ac88e633e07b5a2a43f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2655507
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72450}
2021-01-31 21:59:04 +00:00
v8-ci-autoroll-builder
c791af1818 Update V8 DEPS.
Rolling v8/build: 568bd76..7a702b2

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

Change-Id: I4a6400cfa7e2b7ae8737fd263ed01b877d1ead45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2661901
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@{#72449}
2021-01-31 03:41:54 +00:00
v8-ci-autoroll-builder
f0396bdbc1 Update V8 DEPS.
Rolling v8/build: c083992..568bd76

Rolling v8/third_party/aemu-linux-x64: 2AjFHxe4t1iSrrSx8ayS9uaUpVgbf4uevQoAj-Pt5_0C..Y_rckHsnBv6dqNUbG4QoVkl3njqEx7ewCNGmqOE_h1MC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/9d5ec46..91735e2

Rolling v8/third_party/depot_tools: 558a304..cb07c52

Rolling v8/third_party/icu: f097906..f4147b2

Rolling v8/third_party/zlib: 2c183c9..c876c8f

Rolling v8/tools/clang: cc8d00a..9290907

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

Change-Id: I9be1ce5e4cd16c80304d60694429ad74cff0ddc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660942
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@{#72448}
2021-01-30 03:57:43 +00:00
Bill Budge
797c1e3bbd Revert "Reland "Reland "[compiler][wasm] Align Frame slots to value size"""
This reverts commit 352b9ecbdb.

Reason for revert: fuzzers turned up more problems:
https://bugs.chromium.org/p/chromium/issues/detail?id=1171759
https://bugs.chromium.org/p/chromium/issues/detail?id=1171846

tbr=ahaas@chromium.org,neis@chromium.org

Original change's description:
> Reland "Reland "[compiler][wasm] Align Frame slots to value size""
>
> This is a reland of 1694925c72
>
> Minor fix to linkage for constexpr.
>
> TBR=ahaas@chromium.org,neis@chromium.org
>
> Original change's description:
> > Reland "[compiler][wasm] Align Frame slots to value size"
> >
> > This is a reland of cddaf66c37
> >
> > Original change's description:
> > > [compiler][wasm] Align Frame slots to value size
> > >
> > > - Adds an AlignedSlotAllocator class and tests, to unify slot
> > >   allocation. This attempts to use alignment holes for smaller
> > >   values.
> > > - Reworks Frame to use the new allocator for stack slots.
> > > - Reworks LinkageAllocator to use the new allocator for stack
> > >   slots and for ARMv7 FP register aliasing.
> > > - Fixes the RegisterAllocator to align spill slots.
> > > - Fixes InstructionSelector to align spill slots.
> > >
> > > Bug: v8:9198
> > >
> > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
> > > Commit-Queue: Bill Budge <bbudge@chromium.org>
> > > Reviewed-by: Georg Neis <neis@chromium.org>
> > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#71644}
> >
> > Bug: v8:9198
> > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
> > Commit-Queue: Bill Budge <bbudge@chromium.org>
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Reviewed-by: Georg Neis <neis@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#72195}
>
> Bug: v8:9198
> Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72209}

TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org

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

Bug: v8:9198
Change-Id: Ifee566e3e82f2e774525996b038ce135190d0be1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660378
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72447}
2021-01-30 01:50:03 +00:00
Milad Fa
8348c1a375 PPC/S390: Fix the value of kNumberOfSavedGpParamRegs
kNumberOfSavedGpParamRegs is based on the number of registers
defined under Generate_WasmCompileLazy within the builtins and not
the list under wasm-linkage.h.

More information can be found within the comments of this CL:
https://crrev.com/c/2656857

Change-Id: I9d2122545120c95b7686c98eb838ab25ea376bf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659756
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72446}
2021-01-29 22:29:03 +00:00
Daniel Clark
dae07e7a34 [modules][api] Remove import assertions sorting for HostImportModuleDynamically callback
Hosts are not supposed to rely on the ordering of import assertions list
received from V8. Thus, as a simplification, remove the sorting of the
import assertions passed to the HostImportModuleDynamically callback.

Update the corresponding test so that it doesn't require any particular
ordering of assertions.

Import asssertions for static imports will continue to be sorted. These
need to have a consistent ordering for purposes of deduplication in
SourceTextModuleDescriptor::module_requests_, so removing sorting of
these wouldn't simplify much.

Bug: v8:10958
Change-Id: I2cb07c4e68f24fa45152bf3f4321938bf94d84ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653170
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72445}
2021-01-29 21:41:53 +00:00
Ng Zhi An
13a7cc1ec8 [x64] Disassemble using macro lists
We have macro lists defined for these SSE instructions, use them for
disassembly.

Bug: v8:11074
Change-Id: Ide714ba488913a95078573db70d34a4f5d61ef9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2648186
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72444}
2021-01-29 20:47:43 +00:00
Ng Zhi An
90d2d41e05 [wasm-simd][arm64] Consolidate v128.load_zero with LdrS and LdrD
We don't need separate Load32Zero and Load64Zero instructions, since the
implementation is LdrS and LdrD, which we already have.

Bug: v8:11038
Change-Id: I784ec8dc419c0d59de97eb2bb0b464c176dacae1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2501969
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72443}
2021-01-29 20:44:12 +00:00
Zhi An Ng
0dd0aa7926 [x64] Remove extra SSSE3 scope
Bug: v8:11074
Change-Id: I343ad420a2fcbabf6493d657cd93c1b40d76fd3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644547
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72442}
2021-01-29 20:11:12 +00:00
Adam Klein
230e980348 Skip flaky mjsunit/function-without-prototype under TSAN
Bug: v8:11353
Change-Id: Iba5b6a2740a5fca55c5f4cee53367fb6413ba3d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659635
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72441}
2021-01-29 19:52:00 +00:00
Deepti Gandluri
4e56a93d2d [x64] Minor cleanup to use register variables when declared
Bug:V8:11074

Change-Id: I843fcc2b48aa9303396c8d192d15c75e2f763d2d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2657971
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72440}
2021-01-29 19:48:50 +00:00
Ng Zhi An
45b99aaa58 [arm64] Fix frame size to account for q registers
In https://crrev.com/c/2645694 we push the full q registers before lazy
compile, but we did not change the fixed frame size to account for the
wider registers being pushed.

This manifested in the frame having data like:

(gdb) x/10xg start.ptr_
0x7f5576ff3eb0: 0x0000000000000000      0x0000336b08202759
0x7f5576ff3ec0: 0x7ff000007f801000      0x0000000000000000
0x7f5576ff3ed0: 0x7ff000007f801001      0x0000000000000000
0x7f5576ff3ee0: 0x7ff000007f801002      0x0000000000000000
0x7f5576ff3ef0: 0x7ff000007f801003      0x0000000000000000

The GC then walks part of this frame, thinking that 0x7ff000007f801003
is a heap object, and then crashes.

Add some static_asserts (similar to builtins-x64) to remind ourselves
that the pushed registers have to match the size in frame constants.

Bug: chromium:1161555,v8:11358
Change-Id: Ic5138cc17ad44ccab9121ca226f9f812afef72c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2656857
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72439}
2021-01-29 18:33:45 +00:00
Ng Zhi An
5a4394ac9d [wasm-simd] Use saturated_cast and remove Saturate helper
Bug: v8:11074
Change-Id: I21926f3c8f640d26b9e067569455b49211321148
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658075
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72438}
2021-01-29 18:32:41 +00:00
Clemens Backes
3b4a80cf16 [wasm] Skip slow test on tsan
Even though we sped up the test since the first landing of the CL, it
still sometimes times out on TSan. Since TSan coverage is not needed for
this test, just skip it.

R=adamk@chromium.org

Bug: v8:11369
Change-Id: I7825d1824ad34fccc313459a115b38eae1d5b553
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659262
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72437}
2021-01-29 17:51:40 +00:00
Daniel Clark
412203f203 [api] Advance supported_import_assertions to V8_DEPRECATED.
Advance v8::Isolate::CreateParams::supported_import_assertions from
V8_DEPRECATE_SOON to V8_DEPRECATED now that Blink has stopped
setting it.

Bug: v8:10958
Change-Id: I502f08c0c2e424f3afae3a6cb11835376a847bcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2656936
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72436}
2021-01-29 17:36:30 +00:00
Clemens Backes
f18ced0fac [wasm][debug] Add test for code garbage-collection
This adds a regression test for https://crrev.com/c/2652488. The test
reduces the available code space such that it would trigger an OOM
condition if code is not garbage-collected.
In order to guarantee garbage-collection in all configurations, an
explicit interrupt check is added to the WasmDebugBreak runtime
function.

R=thibaudm@chromium.org

Bug: chromium:1168564
Change-Id: I8fce7aa5128c9e3c9a7e2d2e7397c394fec7de85
Cq-Include-Trybots: luci.v8.try:v8_linux64_asan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac64_asan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652490
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72435}
2021-01-29 16:51:40 +00:00
Manos Koukoutos
074cfd613b [wasm-gc] Classification functions
The latest wasm-gc spec introduces classification functions
{ref.as, ref.is, br_on}_{func, data, i31}, to cast values typed as
anyref and eqref.

Bug: v8:7748
Change-Id: I39c288e4a4c96466e64e490f164ccc76b00011ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2655506
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72434}
2021-01-29 14:49:03 +00:00
Andreas Haas
0cca09ac6a [wasm][liftoff][arm] Add missing handling of reference types to ...
... LiftoffStackSlots::Construct

R=thibaudm@chromium.org

Bug: chromium:1171788
Change-Id: Ifb8e20f4e81fe2c698fe1f51c0b833a6049f7558
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659255
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72433}
2021-01-29 14:10:43 +00:00
Mike Stanton
d2f198f817 [TurboFan] Move FeedbackVectorRef to the never serialized list
Actual FeedbackVector IC slots don't participate in the Ref class, since
they are read during serialization as we process bytecode. So
FeedbackVectorRef really only deals with the FeedbackCell array and
the SharedFunctionInfo. These two types are already in the no serialized
list, so it's pretty easy to move this class over there too.

Bug: v8:7790
Change-Id: I51b7bf4c3404ae5bcfb16d29b5e719787ddd6b17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2656317
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72432}
2021-01-29 13:59:23 +00:00
Clemens Backes
0444497c9a [wasm][serialization] Use unique wire bytes pointers
We were doing the cache lookup using the original {wire_bytes_vec}, but
then inserting the module with another copy stored in the
{NativeModule}. This causes {NativeModuleCache::Key::operator<} to do a
full {memcmp} on the two wire bytes copies.
By using the same pointer consistently, we can avoid that costly
{memcmp}.

R=thibaudm@chromium.org

Bug: v8:11164
Change-Id: I19ba1022f700d8da40671818ee2e2ebdbbddd5c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658329
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72431}
2021-01-29 13:58:03 +00:00
Michael Lippautz
732e22e088 cppgc: Add getters internal heap state
Adds getters for GC phases to be used by advanced embedders to ensure
and check consistency conditions as needed.

Bug: chromium:1056170
Change-Id: Ia0b219f838bf31f0edbfe40585b95bb5eafa734d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2658328
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72430}
2021-01-29 13:19:23 +00:00
Ulan Degenbaev
a3be3e83c1 [compiler, infra] Add a --stress-concurrent-inlining flag and a bot
The new flag:
- enables --concurrent-inlining,
- disables --lazy-feedback-allocation,
- sets the interrupt budget to 15K.

Bug:v8:7790

Change-Id: Id236763f987a6b1309f0c43a2acd150c6e3723bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2652492
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72429}
2021-01-29 12:05:03 +00:00
Thibaud Michaud
c518fd8fa5 [wasm][eh] Update delegate validation rules
The delegate instruction is invalid in the following cases:
- When the target is not a try block or the function block,
- When the instruction is inside a catch handler of the target.

R=clemensb@chromium.org

Bug: v8:8091
Change-Id: Ic59e8314982166863ba2078e2b3b39e3ba488a74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2656318
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72428}
2021-01-29 11:29:43 +00:00
Clemens Backes
d7b316061a [frame] Simplify WasmFrame::function_index()
Avoid constructing the frame summary (and a std::vector) just for
getting the function index. Just get it from the code instead (where
also the frame summary would get it from).

R=jkummerow@chromium.org

Bug: v8:11074
Change-Id: Ie9957e145d6b641fb211b03ef593d57afd310c91
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653230
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72427}
2021-01-29 11:23:33 +00:00
Omer Katz
e6e9721b55 cppgc: Increase tolerance in MetricRecorder unittests
Tolerance was set to 50 microseconds. This is not enough and causes
flaky failures. Tolerance is needed because we record milliseconds and
an empty scope can still take a few milliseconds to create and destroy.

Increasing the tolerance to 500 microseconds should suffice and makes
sense for the test. All expected values are in 10s of milliseconds, so
half a millisecond tolerance should be reasonable.

Bug: v8:11367
Change-Id: I2d284efe5176ec9938b6a378f4b5f1bda0e58781
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659058
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72426}
2021-01-29 11:21:23 +00:00
Mythri A
7cadd21e30 [turboprop] Don't tier up small functions early from Turboprop
We use a heuristic that tiers up small functions at the first tick to
optimize the small functions early. When tiering up from Turboprop it
isn't important to tier up these functions quite early since they are
already executing optimized code.

Bug: v8:9684
Change-Id: Iaa647e0e03f0b4bf9cd0da7feb1e2d0e36004bc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2656258
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72425}
2021-01-29 11:19:33 +00:00