Commit Graph

71536 Commits

Author SHA1 Message Date
Thibaud Michaud
a0ace8a8a5 [wasm] Interpret table.grow result as 32 bit
In Liftoff, the result of table.grow was smi-untagged and sign-extended
to a ptr-sized value. However the result is typed as i32, so the upper
32 bits should be cleared on 64 bit platforms. In particular this is
observable when the value is used as an index for a memory operand,
which leads to the repro in the attached issue.

Match the TF behavior by untagging the value as a 32-bit int.

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

Bug: chromium:1251465
Change-Id: Ia57fd8a69ecb2787b42bbf8217e448976aa1dbd9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173680
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77044}
2021-09-24 13:44:55 +00:00
Milad Fa
4e769f0997 PPC/s390: [regexp] Remove the stack parameter from regexp matchers
Port 4bbfc4b7a6

Original Commit Message:

    The argument is no longer in use.

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

Change-Id: I06095fc237ae19ece4586d60b048785d7efa4ac3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3179268
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77043}
2021-09-24 13:26:58 +00:00
Omer Katz
df2dbecd0e cppgc: Fix -Wshadow warning in cppgc and related unittests
Bug: v8:12244,v8:12245
Change-Id: Ic2d324fa5a3bde18b4fdbe7d64e44c7fc9ccd4ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181534
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77042}
2021-09-24 13:16:04 +00:00
Samuel Groß
b101e0bbe9 Record caged memory allocation outcomes into UMA
Attempts to allocate memory pages inside the virtual memory cage are
currently allowed to fall back to allocating them outside of the cage if
necessary. When this will be forbidden in the future, these cases will
turn into allocation failures. To estimate the frequency of such events,
we now record the outcome of allocation attempts for memory inside the
cage into UMA.

Bug: chromium:1218005
Change-Id: I788fdd968eea10c887eaba1585cd7951823246e0
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3178520
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77041}
2021-09-24 13:14:44 +00:00
Michael Lippautz
ac663e2ea4 heap: Resolve -Wshadow warning in heap-unittest.cc
Bug: v8:12244,v8:12245
Change-Id: Ic73482248fdf36929f597626db13462401f098e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181530
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77040}
2021-09-24 12:55:24 +00:00
Andreas Haas
e1c3be0c9f [cleanup] Fix shadowed variables in wasm/*
R=thibaudm@chromium.org

Bug: v8:12244
Change-Id: I36a44660b8b41a4b9dc44a1143b2cc0c2f88a040
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181523
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77039}
2021-09-24 12:44:05 +00:00
Michael Lippautz
189bef0b3e heap: Fix variable shadowing when using TRACE_GC() macro
Introduce IDENTIFIER_WITH_LINE() that can be similarly used in other
scope-based macros throughout the codebase.

Bug: v8:12244,v8:12245
Change-Id: If9d45b7065d7eb3df0297f35eb9be777b497ea95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181524
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77038}
2021-09-24 12:33:48 +00:00
Toon Verwaest
3e3ecd9b8c [cleanup] Resolve -Wshadow warnings in code-stub-assembler.cc
Bug: v8:12244, v8:12245
Change-Id: Ia08a23fe8ff09e3b0da3ae549238f9b017c04219
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181526
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77037}
2021-09-24 12:17:14 +00:00
Marja Hölttä
bf4b542a1b [cleanup] Make builtins Wshadow compatible
Bug: v8:12244, v8:12245
Change-Id: Icd54ac767542ec2344c34b8dde674b41079180af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181525
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77036}
2021-09-24 12:05:54 +00:00
Toon Verwaest
c5c5b6cbf9 [cleanup] Resolve -Wshadow warnings in bytecode-offset-iterator.cc
Bug: v8:12244, v8:12245
Change-Id: I7d9e8c1a8eda63d1e6c66d92d4ed39daad02df44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181522
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77035}
2021-09-24 10:41:55 +00:00
Omer Katz
e46d1898b6 Revert "Reland "Reland "cppgc: Enable checks for assignments in prefinalizers"""
This reverts commit 2db5067031.

Reason for revert: pdfium crashes

Original change's description:
> Reland "Reland "cppgc: Enable checks for assignments in prefinalizers""
>
> This is a reland of adb6276f4a
>
> Causes for previous revert was addressed by crbug.com/3140387 and
> crbug.com/3163579.
>
> Original change's description:
> > Reland "cppgc: Enable checks for assignments in prefinalizers"
> >
> > This is a reland of edcc8ff5b5
> >
> > Cause for previous revert was addressed by crbug.com/1241773.
> >
> > Original change's description:
> > > cppgc: Enable checks for assignments in prefinalizers
> > >
> > > Bug: v8:11749
> > > Change-Id: Ic027f732030fb6a2befeffeca9db2eacfd0830a5
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099953
> > > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > > Commit-Queue: Omer Katz <omerkatz@chromium.org>
> > > Cr-Commit-Position: refs/heads/main@{#76370}
> >
> > Bug: v8:11749
> > Change-Id: I57fc138ace002d41e54f7f70250e4d19bc9262b0
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3122153
> > Auto-Submit: Omer Katz <omerkatz@chromium.org>
> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> > Commit-Queue: Omer Katz <omerkatz@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#76553}
>
> Bug: v8:11749
> Change-Id: I138ca374314108f0f23e234a8fd90d15d912120d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3168280
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Omer Katz <omerkatz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76971}

Bug: v8:11749
Change-Id: I01bb9166dbc6444456b44165f1b9f9d90575056a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181101
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77034}
2021-09-24 10:27:04 +00:00
Toon Verwaest
1a234ac6bb [cleanup] Resolve -Wshadow warnings in prettyprinter.cc
Bug: v8:12244, v8:12245
Change-Id: Ic6250a62baadfde87bcd05cfd6c891c91af73f87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181104
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77033}
2021-09-24 10:10:26 +00:00
Toon Verwaest
0dd591915c [cleanup] Resolve -Wshadow warnings in scopes.cc
Bug: v8:12244, v8:12245
Change-Id: I75d699f7b1707c610a5d335185192089e840e23b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3180824
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77032}
2021-09-24 09:58:45 +00:00
Georg Neis
e301d71ff5 [compiler] Teach InstructionScheduler about protected memory accesses
Because these instructions can trap, we don't want them to be reordered
as freely as unprotected accesses.

As part of this, make explicit which opcodes support a MemoryAccessMode.

Bug: v8:12018
Change-Id: I9db3053d7d62ffce6d3c95d62adce71ae40dae62
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3172770
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77031}
2021-09-24 09:29:24 +00:00
Marja Hölttä
bb5fa0391d [cleanup] Unify variable names "method" & "method_name"
Bug: v8:12244
Change-Id: I9ec30012f7238f53448b80cf9d657571a37502a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3180822
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77030}
2021-09-24 07:26:44 +00:00
Marja Hölttä
ed10210a2e [rab/gsab] Add GSAB tests for TA.p.copyWithin
The tests won't be very interesting, but we should still have basic
smoke tests.

Bug: v8:11111
Change-Id: I57eadfc090883bc9b84e5b2fb5984b5ed588a69b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3177223
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77029}
2021-09-24 06:24:34 +00:00
v8-ci-autoroll-builder
3c7680422a Update V8 DEPS.
Rolling v8/build: d7f25a4..c4acc0e

Rolling v8/buildtools: 7ea3a87..9d33a71

Rolling v8/third_party/abseil-cpp: ba539c1..4402489

Rolling v8/third_party/aemu-linux-x64: 93-xiCMBx8NRjVvu1v-vuwCsej5zB1Pj3FEUsphwCeUC..35rwW0ni0eziJ2doq4bSBym86edze8jHjf2fyZhjl8kC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/e155ea5..3d49e1c

Rolling v8/third_party/depot_tools: 04d9c83..a6baf70

Rolling v8/tools/clang: 948efd2..77d41f0

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

Change-Id: I038172041cffa59b18441fb946f6d02272bc9540
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3180522
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/main@{#77028}
2021-09-24 03:49:46 +00:00
Ng Zhi An
7537e36efa [x64] Verify disassembly of SSE2 instructions
Bug: v8:12207
Change-Id: Ia553891986f0ef3fe6fb1c4350c3accc0e7bfc84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3180243
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77027}
2021-09-24 01:37:03 +00:00
Ng Zhi An
8e18e2809f [cleanup] Rename/rescope some shadowed variables
Bug: v8:12244
Change-Id: I5a85e109316b349545d2699a59200c167d261842
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3180244
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77026}
2021-09-24 01:33:03 +00:00
Ng Zhi An
18f0a1e4fe Skip test if simd not supported
Change-Id: Iba7d3f528262b3979d3bfe83784c3cfe050cd6e6
No-Try: true
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3180241
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77025}
2021-09-23 22:15:49 +00:00
Junliang Yan
d3f1c799f1 ppc: [liftoff] fix nan rounding errors from frsp
Change-Id: I71505f29cd1dba04f0e8cc14d33067a766495921
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3179719
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77024}
2021-09-23 21:44:33 +00:00
Milad Fa
5d3f17f455 PPC/s390 [regexp]: Allow reentrant irregexp execution
Port: bba7c09aad

Original Commit Message:
 .. by reusing the regexp stack from potentially multiple nested
 irregexp activations.

 To do this, we now maintain a stack pointer in RegExpStack. This stack
 pointer is synchronized at all boundaries between generated irregexp
 code and the outside world, i.e. when entering or returning from
 irregexp code, and when calling into C functions such as GrowStack.

Fixed: v8:11382
Change-Id: I0f97363a069c65f4fbe081b2f9fa796f9d950f43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3179030
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77023}
2021-09-23 21:37:13 +00:00
Ng Zhi An
9936555492 [wasm-simd] Remove call descriptor lowering
Scalar lowering pass is removed, so if hardware does not support SIMD,
compilation should fail.

Bug: chromium:1202671,v8:11613
Change-Id: I4cafd244d066121dc716ea880529603d9013a05d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3179762
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77022}
2021-09-23 21:31:54 +00:00
Ng Zhi An
d90c9c1f65 [x64] Verify disassembly of SSE instructions
- create a helper class to set up Disassembler for testing
- add a helper macro to only compare disassembled instruction (ignore
the hex bytes), this is useful for comparing SSE instructions, whose
opcodes are defined in sse-instr.h, and use uppercase letters, but the
disassembly always uses lowercase
- emit and compare SSE instructions using macro list

Bug: v8:12207
Change-Id: I3580f5d756736cada4f7260efc4d90e2c894f43c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173906
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77021}
2021-09-23 18:51:03 +00:00
Shu-yu Guo
295f7133f6 [parser] Fix parsing '#x in expr' in binary expressions
'#x in expr' currently parses incorrectly and associates #x as an
operand of an existing binary expression continuation if the previous
operator was of higher precedence. For example, 0 << #x in foo gets
incorrectly parsed as (0 << #x) in foo.

Bug: v8:12259, v8:12086
Change-Id: Ie37ff49ff6e63b3ea91fd0fba6bc73ec839c580b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3176506
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77020}
2021-09-23 17:36:03 +00:00
Ng Zhi An
43bb214d65 [ia32] Optimize F64x2PromoteLowF32x4 with S128Load64Zero
Similar optimization to the one for x64 at https://crrev.com/c/3154347.

There is a change to VisitLoad, which should call
GetEffectiveAddressMemoryOperand on the value node. This allows us to
match the input operands to the value (S128Load64Zero node), while
emitting instructions for the node (F64x2PromoteLowF32x4 node).

Bug: v8:12189
Change-Id: I30ca09b567c12a43f7f3bbb4811bae53006bedaf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3171979
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77019}
2021-09-23 17:08:33 +00:00
Milad Fa
1f33a96261 PPC/S390 [liftoff]: check input type of i32_cond_jumpi
emitted comparison differs depending on the input type (signed
or unsigned).

This patch is needed to fix test failures after this CL:
https://crrev.com/c/3172765.

Change-Id: If709920d609c94dd3fa5abf14e509978bd7b40ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3178970
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77018}
2021-09-23 15:57:33 +00:00
Jakob Gruber
4bbfc4b7a6 [regexp] Remove the stack parameter from regexp matchers
The argument is no longer in use.

Bug: v8:11382
Change-Id: I7febc7fe7ef17ae462c700f0dba3ca1beade3021
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173681
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77017}
2021-09-23 15:47:53 +00:00
Jakob Gruber
a705e6551c [regexp] Remove partial property sequence support
The proposal has changed and we'll start on the new implementation
from scratch.

Bug: v8:11935, v8:7467
Change-Id: I29e39a414027d80fd91764ce02a05d7c032a41f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3178964
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77016}
2021-09-23 14:54:23 +00:00
Dominik Inführ
df91e1ed12 [heap] Rename PagedSpace::SetReadAndWritable
SetCodeModificationPermissions better reflects its current usage.

Change-Id: Ia9b42328a2d467613736878e2b560e0d5282ad3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173674
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77015}
2021-09-23 14:19:05 +00:00
Dan Elphick
88c43927a9 [include] Add TryCatch and Extension to v8-forward.h
Bug: v8:11965
Change-Id: Ifa8946b28aad681bf3a13861db8f02d8e1a51730
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3178960
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77014}
2021-09-23 13:15:10 +00:00
Jakob Gruber
bba7c09aad [regexp] Allow reentrant irregexp execution
.. by reusing the regexp stack from potentially multiple nested
irregexp activations.

To do this, we now maintain a stack pointer in RegExpStack. This stack
pointer is synchronized at all boundaries between generated irregexp
code and the outside world, i.e. when entering or returning from
irregexp code, and when calling into C functions such as GrowStack.

Fixed: v8:11382
Change-Id: I5ed27630c1a64ebf3afb9ddf80fb60ea067c0c40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162604
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77013}
2021-09-23 13:10:39 +00:00
Anton Bikineev
e262e1cb4a [zone] Provide a way to configure allocator for zone backings
The CL provides a way for the embedder to hook in a special malloc-like
allocator that will be used for zone allocations.

An alternative approach would be to use weak functions with branches,
checking whether the functions were available at link-time. Those
branches could be optimized away with LTOs, so they would essentially
be free. However, the weak function approach is not portable (e.g.
there is no easy way to emulate it with msvc). The approach can be
revisited if indirect call turns out to be expensive (e.g. on hardware
with weak branch target predictors).

The CL is a prerequisite for running PCScan in the renderer process.

Bug: chromium:1249550
Change-Id: I221dcb2486c13e8e6e6761839ba391978319bde4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3172760
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77012}
2021-09-23 12:45:52 +00:00
Milad Fa
74ca05b05f PPC/s390: Omit check against kDontAdaptArgumentsSentinel
Port aa259e30c3

Original Commit Message:

    When kDontAdaptArgumentsSentinel is 0 (the receiver is included in the
    argument count), we don't need a dedicated check against the sentinel
    before comparing the formal parameter count to the actual argument count
    when calling a JS function.

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

Change-Id: I055ce6d72da8140aa81acd41f917e1e9a7751f72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3175663
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77011}
2021-09-23 12:44:49 +00:00
Maria Tîmbur
e910fc7538 [fuzzer] Generate arbitrary struct and array types
Generate arbitrary struct and array types based on
the fuzzer random input stream.
They replace the hard-coded types.
Generated types include nested reference types and recursive types.

Bug: v8:11954
Change-Id: I2e40697f2ace3eb818360213e8a4dd40037e580e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173683
Commit-Queue: Maria Tîmbur <mtimbur@google.com>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77010}
2021-09-23 10:32:29 +00:00
Thibaud Michaud
750923bd78 [wasm][fuzzer] Fix fuzzer error message
R=clemensb@chromium.org

Bug: chromium:1251465
Change-Id: I09507f1f945252be54c916dcd7ac9e8b7c09643b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3177220
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77009}
2021-09-23 09:36:49 +00:00
Clemens Backes
c946ff8927 [liftoff] Optimize comparisons with constants
i32 comparisons often compare against constants, in order to implement
conditional branches. This CL optimizes such code by not loading the
constant into a register first, but directly emitting the comparison.
The code is shared for implementing {if} and {br_if} (and thereby makes
those two methods more readable).

R=thibaudm@chromium.org

Change-Id: I3f2f071a1c9e4b02c7368a2757bf4aae2920bd69
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3172765
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77008}
2021-09-23 08:59:29 +00:00
Camillo Bruni
41578273df [torque] Emit source position comments to generated files
Change-Id: I36d230fa3e51eb27109a8dd2adc0e7802fc77a7d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3177221
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77007}
2021-09-23 08:39:59 +00:00
Omer Katz
e5c2de4749 cppgc: Add early bailout to write barrier
This bailout applies only when young generation is disabled.
Otherwise, getting the caged heap is required and the global load
bailout becomes redundant.

Bug: chromium:1056170, chromium:1239030
Change-Id: I826b355f4356a5c20812d9c8bf6ebc7ea0997b8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173685
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77006}
2021-09-23 08:17:58 +00:00
Camillo Bruni
2974d1e705 [isolate] Set the stack trace limit to 0 for correctness fuzzing
Bug: chromium:1244626
Change-Id: I539a476bc683e3b40d85ee4c7579957bdf4fb5d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133145
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77005}
2021-09-23 07:18:39 +00:00
Jakob Gruber
b01bb10cb6 [regexp] Use appropriate fast path check in String.matchAll
This fast path check protects the IsRegExp() path (which checks
RegExp.prototype[Symbol.match]) and thus we must use the appropriate
ForMatch check instead of the default check.

Fixed: chromium:1238033
Change-Id: I0b7ce280f1fa9bfacf20381d80c84f9513f45163
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3177222
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77004}
2021-09-23 06:59:38 +00:00
Marja Hölttä
19efb9e3d3 [rab/gsab] TA.p.copywithin: Support RAB / GSAB
Bug: v8:11111
Change-Id: Id1e37770f0f196db0887fceb14f895e576b78b73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173673
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77003}
2021-09-23 06:14:33 +00:00
Camillo Bruni
ab836859d9 [api] Remove deprecated HostImportModuleDynamicallyCallback
Deprecation happend in v9.4

Bug: v8:11165
Change-Id: I7a28a9c50c25dbaad91cf254b9153154065108b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173678
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77002}
2021-09-23 05:13:43 +00:00
v8-ci-autoroll-builder
d5b48f165a Update V8 DEPS.
Rolling v8/build: 66bad00..d7f25a4

Rolling v8/third_party/abseil-cpp: 48418f3..ba539c1

Rolling v8/third_party/aemu-linux-x64: UnrNXrNKJtnUOqrH_BbjXgZ_Ns1v0PZ9WNtFgoHrQZwC..93-xiCMBx8NRjVvu1v-vuwCsej5zB1Pj3FEUsphwCeUC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/25814bb..e155ea5

Rolling v8/third_party/depot_tools: eff810e..04d9c83

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

Change-Id: I8de9a089cbc144a8c2bb12e1f32cf97daf089aa0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3176786
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/main@{#77001}
2021-09-23 03:50:23 +00:00
jing.bao
6dedc6e97d [x64] Implement 256-bit assembly for vpshufd/hw/lw
Bug: v8:12228
Change-Id: If771a7526f2567d68e676f069223ac16b7303884
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3167036
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/main@{#77000}
2021-09-23 02:21:48 +00:00
Peter Kasting
0a5a7af665 Fix an instance of -Wunused-but-set-variable.
Bug: chromium:1203071
Change-Id: Iab81add0c71c4a37b7aa8d9d6f1272781a6bae3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3152217
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76999}
2021-09-22 18:31:40 +00:00
Andreas Haas
9f725777b0 [wasm] Update spec tests
Some tests got fixed upstream.

Bug: v8:12227
Change-Id: I78108852ce4d10523edb3fd0dbb563852598394d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173679
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76998}
2021-09-22 17:12:37 +00:00
Victor Gomes
cf21eb36b9 [baseline] Skip deoptimization data size
Sparkplug code does not contain deoptimization data.

Bug: v8:12258
Change-Id: Ieb9f7f1469e00677d9533c6f05b17c80ef06b9d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3175820
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76997}
2021-09-22 16:42:37 +00:00
Peter Kasting
708802e3a2 Force -Wno-shadow to avoid variable shadowing warnings.
Long term, ideally, these would be fixed and this flag can be removed.
For now, this is an expedient way to allow enabling -Wshadow in
Chromium.

Bug: chromium:794619
Change-Id: I038e5fc758fbb8284bb28cb4f7f8a4c44da0db66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173891
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76996}
2021-09-22 16:33:37 +00:00
Andreas Haas
52ada04422 [wasm] minimum and inital parameter for table constructor are exclusive
See https://github.com/WebAssembly/js-types/blob/main/document/js-api/index.bs#L866

R=manoskouk@chromium.org

Bug: v8:12227
Change-Id: I384483a7568d37c40d077487165ff9b1761da342
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3172768
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76995}
2021-09-22 15:54:19 +00:00