Commit Graph

67466 Commits

Author SHA1 Message Date
Deepti Gandluri
4b37f202f6 [wasm][fuzzer] Don't generate SIMD operations on unsupported arches
Bug: chromium:1177804
Change-Id: Ic8044fb4bfe414101edb923a9bb6e71282808e58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2706351
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72974}
2021-02-23 17:57:44 +00:00
Manos Koukoutos
c2e98b65da [wasm-gc] Fix/Clarify some TODOs
Functional change: Allow rtts as exception values.
Additional change: Remove liftoff subtyping TODO in anticipation of
removal of full ValueType usage in Liftoff.

Bug: v8:7748
Change-Id: I676a7fa6417d6e86bb148b4f5b9b086cc704928e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2714702
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72973}
2021-02-23 17:47:33 +00:00
Thibaud Michaud
55fe15dc17 [wasm] Fix thread_in_wasm_flag in exception handling
The flag should not be set after an exception is thrown in a runtime
function. The unwinder still runs after the destructor, and should take
care of setting the flag depending on the catching frame.

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

Bug: chromium:1180690
Change-Id: I0013c90f759a5145309f6e08d61ed36aeecbac63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713103
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72972}
2021-02-23 17:43:33 +00:00
Shu-yu Guo
13e28f62be [class] Stage class static blocks
Bug: v8:11375
Change-Id: I85503d4930a160026409761664e796c03de358d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707546
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72971}
2021-02-23 17:40:23 +00:00
Thibaud Michaud
4a5724d408 [wasm][interpreter][eh] Fix delegate end label offset
R=clemensb@chromium.org

Bug: chromium:1180457
Change-Id: I50b776af243fa17856945fecc018a87356694a97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712242
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72970}
2021-02-23 17:32:53 +00:00
Ng Zhi An
b8f9829afa [wasm] Convert float to int without using external calls
Follow-up from https://crrev.com/c/2649147/. There are still 2 usages of
_wrapper functions in the interpreter, these are slightly more annoying
to get rid of since the definitions have a ifdef for MSCV/OS_WIN.

Bug: v8:11384
Change-Id: Ic5ca860678f406e1c832c99398b235707da058f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713166
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72969}
2021-02-23 17:30:33 +00:00
Santiago Aboy Solanes
02cf734907 [compiler] Remove JSObjectField class from js heap broker
Its double methods were unused so we were using it as an ObjectData*
wrapper.

Bug: v8:7790
Change-Id: If6bd21fc23485f1e14aa3e71aea7c7821bd03315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715185
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72968}
2021-02-23 17:10:53 +00:00
Andreas Haas
2875a39276 [wasm][simd] Add crash for --correctness-fuzzer-suppressions
R=machenbach@chromium.org

Bug: chromium:1177804
Change-Id: I4d94f9eb2b06743d6cbb46757efa66d14e089502
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715186
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72967}
2021-02-23 17:07:33 +00:00
Leszek Swirski
d4cc38a40c [sparkplug] Extract optimization marker checks to helper
Bug: v8:11420,v8:11429
Change-Id: Id2680baf5d7db7eee342ca7b3c0cb636cacf1560
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715194
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72966}
2021-02-23 17:00:23 +00:00
Ross McIlroy
cd7f5afbc4 [Turboprop] Add some additional CHECKs to track down bug.
BUG=chromium:1180335

Change-Id: Idc2b59a4ae8298a2d8beb1dbcd3135214c6f7fdf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715191
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72965}
2021-02-23 16:55:23 +00:00
Seth Brenith
ede2740711 [torque] Add LazyNode support
This change adds a new abstract type Lazy<T> which can be used to
interoperate with CSA code that uses LazyNode. This new type has special
code-generation rules because its generated type is not TNode<...> but
std::function<TNode<...>()>. Torque code can do nothing with this type
except pass it around, but passing it to the CSA function RunLazy is an
easy way to execute the std::function and get back a normal value.
Torque code can also create Lazy<T> values using the intrinsic function
%MakeLazy, which takes the name of a macro as its first parameter,
followed by arguments to that macro which will be passed when the
LazyNode is evaluated. We use the macro's name because the language
doesn't support taking references to macros, and implementing such a
feature would be complicated.

Bug: v8:7793
Change-Id: I09120960e3492dd51be0d4c57e14ff3826b99262
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2701752
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72964}
2021-02-23 16:51:53 +00:00
Victor Gomes
ef1ae61976 [baseline] Add kJavaScriptCallNewTarget in BaselineOutOfLinePrologue descriptor
Change-Id: Iefbc2fe993ca7bed385624ecc6818c94b87f3915
Bug: v8:11429
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715189
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72963}
2021-02-23 16:48:23 +00:00
Milad Fa
29b863829e PPC/s390: [wasm-simd] Move extadd pairwise out of post-mvp
Port 1bd29073a4

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

Bug: v8:11086
Change-Id: I777874397514a4cbde6b6630aff9f6804568ea95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715184
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72962}
2021-02-23 16:39:23 +00:00
Seth Brenith
133c1fca88 [torque] Make AllocatedSize const
This is a partial reland of https://crrev.com/c/v8/v8/+/2601880 .

Change-Id: I7ad9ca42201c49df7037e65671a50caabc1fdf98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2705256
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72961}
2021-02-23 16:22:23 +00:00
Mike Stanton
d2cb2ae6be [TurboFan] Check deoptimized status on CodeRef
When making inlining decisions, we are interested in
CodeRef::inlined_bytecode_size(). Previously, we gated a check of this
value on predicate JSFunctionRef::HasAttachedOptimizedCode(), but we
removed this predicate because it only recorded a value seen at
serialization time.

Now, we look at attached CodeRefs "live," which means we might discover
that the code is now optimized, where it wasn't at serialization time.
This affects the inlining decision. This CL adds an additional check
before returning a non-zero inlined_bytecode_size that the code object
hasn't (already) been deoptimized. It's logical to do this, because the
inlined_bytecode_size is actually a stale value at this point.

Bug: chromium:1180749
Change-Id: I4d55132c5b47083413d3c6b1d934bfce6b550709
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712565
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72960}
2021-02-23 15:48:53 +00:00
Leszek Swirski
9070b2cb86 [sparkplug] Clean up CodeKind predicates
Baseline code is, like baseline frames, now considered unoptimized,
sharing this name with interpreted code.

Bug: v8:11420,v8:11429
Change-Id: If1f4a41725dd0d809a4412f5d2f827d19f9628fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713102
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72959}
2021-02-23 15:42:14 +00:00
Clemens Backes
9cdff48c4b [wasm] Fix instance caching with dynamic tiering
After the runtime call for dynamic tiering, the instance cache is
invalidated. This was assumed to be done in {SpillAllRegisters}, but the
instance is still being accessed after that call, so the instance cache
register might still be set after the runtime call.

R=ahaas@chromium.org

Bug: chromium:1179065
Change-Id: I375e7c388e5a74789050e374db50d21c2efe27e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2714544
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72958}
2021-02-23 15:01:38 +00:00
Clemens Backes
b411a66486 [build] Assert that webassembly is disabled on lite mode
This avoids having to check both flags in two places, and prevents
people from trying to enable WebAssembly in lite mode (which would
currently build, but you still would not get Wasm support).

The downside is that the default value shown by `gn args --list` now
sais `""` instead of `true`.

R=machenbach@chromium.org, rmcilroy@chromium.org
CC=ecmziegler@chromium.org

Bug: v8:11238
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Change-Id: Ib2fe6c32cbdeb89895265bb898abf7284c560cc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712783
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72957}
2021-02-23 15:00:33 +00:00
Santiago Aboy Solanes
9c6d177a45 Reland "[objects] Cache the ExternalString's data in its resource"
This is a reland of ed225df70c

Reland changes: removed #if DEBUG from v8.h since it had compile errors
in chromium + windows. Also wasn't needed anyway since the method it was
calling was just a DCHECK.

Original change's description:
> [objects] Cache the ExternalString's data in its resource
>
> For external uncached strings (also called "Small External Strings")
> with cacheable resources, we can cache its resource's data at the
> string's creation time. This allows us to safely read the data from the
> background as we wouldn't trigger a data() callback.
>
> For more information regarding the investigation and possible proposals
> see
> https://docs.google.com/document/d/101eAQqFpBPWFGNJicxtdlwYShJkTOUsEuxkVVeu5Hrk/edit?usp=sharing
>
> Bug: v8:7790, v8:11463
> Change-Id: I6164092b01a6ccb525a9516f476e066b35fb1f96
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2685177
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72862}

Bug: v8:7790
Bug: v8:11463
Change-Id: I7c8a54c814b92c8632fb0bcf5a33f57fec159443
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2710440
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72956}
2021-02-23 14:56:43 +00:00
Georg Neis
736d3448a3 Eliminate AbstractBytecodeArray and its concrete subclasses
AbstractBytecodeArray was introduced in order to let the bytecode
array accessor work on either a Handle<BytecodeArray> or a serialized
BytecodeArrayRef. We have since implemented direct heap access for
bytecode arrays, so we can now remove the abstraction again.

Note that this means that as far as bytecode iteration is concerned
we no longer access the bytecode array through the BytecodeArrayRef.
I will remove the obsolete methods from that class in a follow-up CL.
The downside is the loss of this explicit interface. The upside is
simplicity and less code. We can justify the downside with the fact
that the bytecode array data is immutable and thus the Ref indirection
less meaningful than in other cases.

Bug: v8:7790
Change-Id: I0fe87b4efd0f77785f5a0917ab213c6031d9cc74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707166
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72955}
2021-02-23 14:04:43 +00:00
Frank Emrich
b0230ead9d [dict-proto] C++ implementation of SwissNameDictionary, pt. 5
This CL is part of a series that adds the C++ implementation of
SwissNameDictionary, a deterministic property backing store based on
Swiss Tables.

This CL adds printing and verification functions.

Bug: v8:11388
Change-Id: I6af8672f19589f5693ebafbcafb8d59b26749eef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704669
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72954}
2021-02-23 13:31:23 +00:00
Michael Achenbach
2a8514b65a [test] Skip flaky tests
No-Try: true
Bug: v8:11338, v8:11413
Change-Id: I5a3365e557bc3727071d8d73e9b3f9da1ae6d011
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2714704
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72953}
2021-02-23 13:16:53 +00:00
Jakob Gruber
f8083d1425 [compiler] Fix return type of GetCharAsString
.. which can return Undefined if reading out of bounds, so the return
type is ObjectRef and not StringRef (if we had torque-like union types
it'd be StringRef|OddballRef). Also change the function name to
GetCharAsStringOrUndefined.

Bug: v8:7790,chromium:1181246
Change-Id: Icf9e8fd03d11c3936e87a509b9117e547972d283
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712965
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72952}
2021-02-23 13:02:11 +00:00
Clemens Backes
5c237388f0 [backend] Fix source position annotations
If two call instructions were generated right after each other, the
source position table could get populated with two entries for the same
PC (triggered by the follow-up CL: https://crrev.com/c/2697359).
This CL fixes that by slightly changing the carry-over of source
positions from nodes to instructions.

The call node which has a source position attached generates two
instructions:
      18: gap () ([rax|R|tp] = v16(-); [rbx|R|t] = v17(-);)
          [rax|R|t] = ArchCallWasmFunction [immediate:4] #-1 [rax|R|tp] [rbx|R|t] [immediate:5]
      19: gap () ()
          ArchJmp [immediate:6]

Those are then reversed, and the source position is attached to the first
one (the ArchJmp). After reversing it again later, the source position
will be set to the pc *after* the call instruction, which in the example
happened to be just another call instruction which already had a source
position, resulting in this code:

[...]
0x388ee467d426    66  e875feffff     call 0x388ee467d2a0     ;; wasm stub: WasmThrow
0x388ee467d42b    6b  e850feffff     call 0x388ee467d280     ;; wasm stub: WasmStackGuard
[...]
Source positions:
 pc offset  position
        6b         5
        6b         0

By attaching the source position to the *last* instruction (after
reversing), we ensure that it will be generated for an instruction
*before* the call, or the call itself if this is the first instruction
emitted for that node.

R=jgruber@chromium.org

Bug: v8:11490, v8:11496
Change-Id: Ie95c87d0d9daea56ca14a811abcd02ac07a4cf84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2697358
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72951}
2021-02-23 12:49:11 +00:00
Leszek Swirski
163a241a49 [sparkplug] Sparkplug is the future
Bug: v8:11420
Change-Id: I9f6b60381c08697d753758a9c667e588dd0599bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704677
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72950}
2021-02-23 12:41:01 +00:00
Leszek Swirski
ffa4d2b785 [profiler] Don't include tag in CodeEntry hash
maintain hash table invariants (that equality implies matching hashes),
the CodeEntry hash shouldn't include the tag either.

CodeEntry: :IsSameFunctionAs does not consider the CodeEntry's tag, so to
Change-Id: I1e06707b72d49ad9e88368ae68e7ccb16c2483ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712786
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72949}
2021-02-23 12:29:31 +00:00
Marja Hölttä
655ae222dd [map transitions] Fix setting writable=false for sealed objects
Also fixes existing tests which were asserting the wrong behavior (that
setting writable=false won't have an effect).

The bug was introduced by https://chromium-review.googlesource.com/c/v8/v8/+/1442640 .

Bug: chromium:1158138
Change-Id: I2d85721848eb4e7d530a980a9ecef7f8693bb9a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691050
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72948}
2021-02-23 10:43:20 +00:00
Thibaud Michaud
301b056079 [wasm] Sample EH event count at each event
The main thread isolate may live until the end of the process, in which
case we would not record the counts. Sample at each event instead.

R=ahaas@chromium.org

Bug: v8:8091
Change-Id: I5b1eb023e4ca5410c7d8f4212ff20410044bf4f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2710433
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72947}
2021-02-23 10:22:30 +00:00
Santiago Aboy Solanes
7705ab1fbb [csa][cleanup] Remove Sloppy from TNodes in more methods
Remove from:
 * Smi
 * RawPtrT
 * Oddball
 * Float32T
 * Float64T
 * IntPtrT
 * WordT
 * Word32T

Bug: v8:6949, v8:11384
Change-Id: Ia79fdedd23cd09c49ada05d031a04a1a48c2d9c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712784
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72946}
2021-02-23 10:01:10 +00:00
Clemens Backes
ca89bf259f [no-wasm] Exclude asm->wasm translation code
The v8_enable_webassembly=false configuration will not be a able to run
any wasm code, hence remove the whole asm to wasm translation from the
binary.

In order to skip specific unit tests in that configuration, we move the
definition of the v8_enable_webassembly gn argument from BUILD.gn to
v8.gni, such that it is available in all gn files.

R=ecmziegler@chromium.org, machenbach@chromium.org

Bug: v8:11238
Change-Id: Id4e290df3e42ffd2f05c377bdd3a368871815daf
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712562
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72945}
2021-02-23 09:51:40 +00:00
Ross McIlroy
0c5a0a7205 [Turboprop] Add some CHECKS to diagnose bug.
BUG=chromium:1180335

Change-Id: If734282bb58b4c2f5832082319f9f58962552049
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712746
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72944}
2021-02-23 09:49:10 +00:00
Dan Elphick
c7fe4ac9e2 [build] Add nogncheck to includes of gtest_prod.h
Since gtest_prod.h is in a test-only build target, that target cannot be
a dependency of non-test build targets. To prevent gn check errors
warning about, this add "// nogncheck" to any includes.

Bug: v8:7330
Change-Id: I40de6983e30234de2a778780a9ca839aee0bc8ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712747
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72943}
2021-02-23 09:37:30 +00:00
Clemens Backes
2dd28df97a [wasm] Move regression tests to wasm directory
This moves all tests that construct a wasm module (and load
wasm-module-builder.js) from test/regress to the test/regress/wasm
directory. This will make it easier to skip them all in the
v8_enable_webassembly=false configuration.

R=ahaas@chromium.org

Bug: v8:11238
Change-Id: Ib22b0fb40a58f213182e68b78b34041651c436d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712243
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72942}
2021-02-23 09:32:34 +00:00
Jakob Gruber
4f75235da5 Skip slow test regress-779407 in experimental_regexp variant
The experimental engine struggles to compile this large pattern.

Change-Id: I0abd5c7ed9f6f62b1c18b5c3dc1cb6a25e130c53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712754
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72941}
2021-02-23 09:07:50 +00:00
Frank Emrich
d5cb250f3d [dict-proto] C++ implementation of SwissNameDictionary, pt. 4
This CL is part of a series that adds the C++ implementation of
SwissNameDictionary, a deterministic property backing store based on
Swiss Tables.

This CL add the lookup and iteration functions as well as the helpers
needed for that.

Bug: v8:11388
Change-Id: Ib684f32d1623868f9caf79c48fc61478d6f6ee4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695391
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#72940}
2021-02-23 08:47:01 +00:00
v8-ci-autoroll-builder
a9cf712a09 Update V8 DEPS.
Rolling v8/build: d6803e2..ac7b73c

Rolling v8/buildtools: fe293b0..80d14c9

Rolling v8/buildtools/third_party/libunwind/trunk: d999d54..a2cc4f8

Rolling v8/third_party/depot_tools: 011cc41..e71d028

Rolling v8/third_party/googletest/src: 5e0cf72..1e315c5

Rolling v8/third_party/icu: dc4ceac..e05b663

Rolling v8/third_party/zlib: bf44340..348acca

Rolling v8/tools/clang: 6cf138c..bf8c8f3

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I9450ca401a16b96ffbeac0e08e39eeacd72d6f36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713575
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@{#72939}
2021-02-23 03:59:20 +00:00
LiuYu
91c08eb424 [mips][wasm-simd] Implement i64x2.abs
Port: fd244de243

Bug: v8:11416
Change-Id: I8f2840337d77ddfa430f57737360fb0b679f2f33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713574
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@{#72938}
2021-02-23 03:08:50 +00:00
Bill Budge
942af6c77d Revert "Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size""""
This reverts commit 9da4e36390.

Reason for revert: Fuzzers revealed that Liftoff doesn't use the CallDescriptor when pushing arguments, breaking linkage.

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

Original change's description:
> Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size"""
>
> This is a reland of 352b9ecbdb
>
> The test/fix CL has been merged in, as the fixes to return slot
> accounting are needed to fix Arm64 issues turned up by the fuzzers:
>
> https://chromium-review.googlesource.com/c/v8/v8/+/2644139
>
> 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}
>
> Bug: v8:9198
> Change-Id: I8258f87463f66417c7028b9a1fed4b9b6d82a3be
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2669892
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72506}

Bug: v8:9198
Change-Id: I7f344e4d018ce3c02333b0b08efeecdd8cddf082
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713207
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72937}
2021-02-23 00:25:23 +00:00
Ng Zhi An
4c92f23cc1 [wasm-simd][ia32] Fix load lane and run spec tests
Load lanes require that dst == src1 when AVX is not supported, add that
constraint to the instruction selector. For Liftoff, we change the macro
defintions of Movlps and Movhps to do the move if dst != src1.

Bug: v8:10975
Change-Id: Ic4f499845f0728db250ea23b1b053e0a9fbe99b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2708825
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72936}
2021-02-23 00:24:19 +00:00
Ng Zhi An
1bd29073a4 [wasm-simd] Move extadd pairwise out of post-mvp
Bug: v8:11086
Change-Id: Id7ec472d5311c3a1e4e54d9df65fee9c87ae6ec7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2707777
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72935}
2021-02-22 23:48:29 +00:00
Bill Budge
9a540436e4 Revert "[compiler][wasm] Fix Wasm linkage"
This reverts commit 0818d13807.

Reason for revert: Rolling back to previous greedy slot allocator.

tbr=ahaas@chromium.org

Original change's description:
> [compiler][wasm] Fix Wasm linkage
>
> - Fixes a problem when constructing Wasm CallDescriptors, where the
>   allocation tries to treat parameters and returns as if they are in the
>   same frame. This doesn't work when slots may be aligned in their
>   frame. Instead, allocate parameters and returns separately and offset
>   return slots by the number of parameter slots.
> - Adds argument slot padding in the CallDescriptor lowering case, to
>   prepare for when 32 bit targets align stack frames and require
>   padding.
> - Adds a regression test.
>
> Bug: chromium:1174500
> Change-Id: I60d96a94b171a0d27ff61cbab35623976b0c6da8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2683024
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72588}

Bug: chromium:1174500
Change-Id: I1d1c389acde43bd56e6d2a27e1a3eb8ea4d6073c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713206
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72934}
2021-02-22 23:01:48 +00:00
Ng Zhi An
93bcd62e4f [wasm-simd][x64][arm64] Remove i32x4.widen_i8x16_{s,u}
This is essentially a revert of 3 commits:

- a1d39bbaed
- 5a0938e593
- 74362ae3e2

with merge conflicts fixed.

These instructions were not merged into the SIMD proposal.

Bug: v8:11297
Change-Id: Ifffe7c61cae10fadc345d0faa1b0ba45ce74e946
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704950
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72933}
2021-02-22 22:41:26 +00:00
Ng Zhi An
1b9cab30f5 [wasm-simd][x64] Optimize v128.not
Bug: v8:11471
Change-Id: Ie09f1f8e7b52b22e232bf382381c40037cf00986
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2708755
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72932}
2021-02-22 22:28:17 +00:00
Bill Budge
396c2635cb Revert "[codegen][frames] Generalize argument padding slot code"
This reverts commit 8cf4eec7d8.

Reason for revert: Rolling back to previous greedy slot allocator.

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

Original change's description:
> [codegen][frames] Generalize argument padding slot code
>
> - Removes kPadArguments boolean.
> - Changes ShouldPadArguments to ArgumentPaddingSlots to reflect
>   that on some architectures more than 1 padding slot may be needed.
> - Adds AddArgumentPaddingSlots and ShouldPadArguments convenience
>   functions.
>
> Bug: v8:9198
>
> Change-Id: Iba87518e071a75fb951b490d3f75a87ca715cc23
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679109
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72605}

Bug: v8:9198
Change-Id: Ie93d32d4b93c67840e4792acb017f28a826bd030
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713205
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72931}
2021-02-22 22:02:36 +00:00
Bill Budge
e6bc2e5de7 Revert "[compiler][linkage] No allocation of slots after aligning a frame"
This reverts commit b18bc2217b.

Reason for revert: Rolling back to previous greedy slot allocator.

tbr=jgruber@chromium.org

Original change's description:
> [compiler][linkage] No allocation of slots after aligning a frame
>
> - Adds DCHECKs to make sure no stack slots are allocated after
>   aligning a frame.
> - Changes Arm64 CodeGenerator::FinishFrame to align the frame after
>   allocating callee-saved registers, and relaxes the constraints on
>   the number of callee-saved registers.
>
> Bug: v8:9198
> Change-Id: Iacb0518b57fa3ea2ff801eda69719f4c32733850
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2694104
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72781}

Bug: v8:9198
Change-Id: I53f415b7b0f73b57db24859d1199c6a44f911035
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713204
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72930}
2021-02-22 21:57:26 +00:00
Zhi An Ng
4f38417d72 Revert "[wasm-simd][ia32] Optimize some signed integer widening sequences"
This reverts commit 0ef2eea74c.

Reason for revert: broke noavx https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20debug/34035/overview

Original change's description:
> [wasm-simd][ia32] Optimize some signed integer widening sequences
>
> Optimize ia32 code sequences. This is the same sequences as x64, which
> have been optimized based on supported extensions.
>
> Bug: v8:11464
> Change-Id: I10396a928a431cdd2de9b22bb8a395bc0adb4694
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704897
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72926}

Bug: v8:11464
Change-Id: Ibeaf35b5f6aa75d10e24f1fb57843dbc0791d37a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713208
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72929}
2021-02-22 21:14:37 +00:00
Milad Fa
4cd74d7de0 PPC/s390: [wasm-simd][x64][liftoff] Implement extended add pairwise
Port 8136e39997

Original Commit Message:

    Extract code sequence into macro-assembler for reuse between Liftoff and
    TurboFan.

    Small tweaks to macro-assembler functions  Pmaddwd and Pmaddubsw to move
    src1 to dst on SSE when src != dst. TurboFan codegen won't be affected
    by this since it sets the right restrictions in instruction-selector.

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

Change-Id: Idaff4944dbb1ec5e6d7e798b6255a90744155006
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713842
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72928}
2021-02-22 20:31:36 +00:00
Milad Fa
019310adf6 PPC/S390: Fix FrameScope when calling kThrowStackOverflow
Original change on arm: https://crrev.com/c/2463222

Change-Id: Ifb99b4dd1825814865ef2647ba3df3b3ab343cc4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712394
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72927}
2021-02-22 19:53:36 +00:00
Ng Zhi An
0ef2eea74c [wasm-simd][ia32] Optimize some signed integer widening sequences
Optimize ia32 code sequences. This is the same sequences as x64, which
have been optimized based on supported extensions.

Bug: v8:11464
Change-Id: I10396a928a431cdd2de9b22bb8a395bc0adb4694
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704897
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72926}
2021-02-22 19:21:36 +00:00
Ng Zhi An
50292697a8 [wasm-simd][ia32][liftoff] Implement i64x2 signed compares
Extract code sequence into macro-assembler for reuse between Liftoff and
TurboFan.

Similar to x64, there is a bit of register-aliasing checking due to the
rather strict requirements for the code sequence depending on the
CpuFetures that are supported.

Bug: v8:11415
Change-Id: I3f855da25493941d158383020fbcafee8d18095f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2698066
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72925}
2021-02-22 19:10:16 +00:00