Commit Graph

61705 Commits

Author SHA1 Message Date
Clemens Backes
e04eb281a3 [base] Fix {StaticCharVector} and add {StaticOneByteVector}
{StaticCharVector}, according to its name, should return a
{Vector<const char>}. For getting a {Vector<const uint8_t>}, the method
should be called {StaticOneByteVector}, analog to the
{OneByteVector} methods that already exist.

Also, {StaticCharVector} is constexpr, but {StaticOneByteVector} cannot
be, since it contains a {reinterpret_cast}. The same holds for
{Vector::cast} in general.

This CL
- changes the return type of {StaticCharVector} to be
  {Vector<const char>},
- introduces a new {StaticOneByteVector} which returns
  {Vector<const uint8_t>},
- fixes constexpr annotations at various methods returning {Vector}s,
- refactors users of {StaticCharVector} to either use
  {StaticOneByteVector} instead, or work on {char} if that makes more
  sense.

R=leszeks@chromium.org

Bug: v8:10426
Change-Id: I71e336097e41ad30f982aa6344ca3d67b3a01fe3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154196
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67213}
2020-04-17 18:45:32 +00:00
Seth Brenith
412d56f81a [torque] Require "extends" clause for class declarations
Currently it's possible to hit an internal compiler error by declaring a
non-extern class that doesn't extend anything. It's not very meanigful
for a class to not extend from anything, so the parser should enforce
this requirement.

Change-Id: I38064f87345d28ce84521261bbfd33d9b1c71334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153847
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67212}
2020-04-17 17:56:12 +00:00
Milad Farazmand
1568a47c0f PPC: [wasm-simd] Implement Simd128 Load and Store
Change-Id: I436c779613e7ddf4b5c830807414dbc8787b89f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151103
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67211}
2020-04-17 16:14:32 +00:00
Clemens Backes
80e5e2b430 [base][vector] Test constexpr factories
Test some constexpr factories. StaticCharVector is not actually
constexpr, this will be fixed in a follow-up CL.

R=leszeks@chromium.org

Bug: v8:10426
Change-Id: I16fdf79cd7d4b3f54d7cf73e15bdff2306810f06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154192
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67210}
2020-04-17 16:04:52 +00:00
Milad Farazmand
f11fcde566 PPC/s390: [wasm-simd][liftoff] Implement integer narrowing on x64 and ia32
Port fc29c453c8
Port 8ef2f79968

R=zhiguo.zhou@intel.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: If84d63be9864ab2ff10b522018ecbac0c56b2bea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154765
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67209}
2020-04-17 15:49:12 +00:00
Jakob Kummerow
18929af9fc [wasm-gc] Add preliminary opcodes
These opcodes are not officially specified yet, they are defined
in the "prototype implementation spec" at https://bit.ly/3cWcm6Q.

Drive-by: drop a unit test whose entire coverage can be provided
by a compile-time check.

Bug: v8:7748
Change-Id: Icefa6dd321802c8a01c4561178b9d21eca1fbaa3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152841
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67208}
2020-04-17 15:42:05 +00:00
Clemens Backes
acc71c78b5 [heap] Fix {InternalizeString} for char vectors
Even though {Factory::InternalizeString} was declared as a template,
only two instantiations exists: uint8_t and uint16_t. Using any other
type leads to link-time errors, which is inconvenient.

This CL implements the two instantiations explicitly, and provides a
third implementation taking a {Vector<const char>}. This will be used
after the next CL, which changes {StaticCharVector} to actually return a
{Vector<const char>}.

This also avoid the cumbersome template exports.

R=leszeks@chromium.org

Bug: v8:10426
Change-Id: I3f669fae2c711ade6f5a087e59210ad457423a66
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152837
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67207}
2020-04-17 15:29:12 +00:00
Clemens Backes
f0b67de54d [test] Clean up vector unittest
Use proper gtest macros for testing expected values.

R=leszeks@chromium.org

Bug: v8:10426
Change-Id: Ibdbbf4d05b0a8914f52a270d21a9087c019396b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152836
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67206}
2020-04-17 15:14:02 +00:00
Clemens Backes
fb403653bb [wasm][debug] Don't publish code compiled for stepping
This adds another enum value in the {ForDebugging} enum for stepping
code.
By not adding the code to the code table and jump table, we will never
execute this code via a wasm function call. The code will only be used
for the one frame where we want to step through.
This speeds up stepping over recursive calls enormously, since the
recursive calls don't run into the flooded breakpoints any more.
It also fixes issues with non-local control flow, i.e. catching a trap
and reentering the same wasm function.

R=thibaudm@chromium.org

Bug: v8:10235
Change-Id: Idb304dd465418f842016a20c21d68989bb78cf1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153205
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67205}
2020-04-17 13:54:42 +00:00
Yang Guo
3b60af8669 [inspector] guard against missing CommandLineAPIScope
Fixed: chromium:986051
Change-Id: I01ef94fe43ac5c8734890706a6dccd01e008bfec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153215
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67204}
2020-04-17 13:36:02 +00:00
Michael Lippautz
7d23e5abc0 cppgc: Remove conservative stack scan guard
Supported HW architectures:
ia32, x64, arm, arm64, ppc64, s390, mips, mips64

Compiler support:
- clang/gcc: all
- msvc tools: ia32, x64, arm64

Thanks all for porting!

Bug: chromium:1056170
Change-Id: I26ea7d727dc6d90929941668b8f115bdbaf226ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153210
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67203}
2020-04-17 12:37:16 +00:00
Clemens Backes
c66cd826c6 [wasm][debug] Only patch a single frame for stepping
Stepping only happens in one frame at a time, so we don't need to
rewrite the whole stack. This allows us to remove the
{flooded_function_index_}, since no function is globally flooded any
more.
A follow-up CL will ensure that the code will also not be installed in
the code table and jump table any more, to fix issues with non-local
control flow (i.e. catching a trap and reentering wasm), where we
could currently accidentally execute flooded code. It will also speed
up stepping over recursive calls enormously, since the recursive calls
don't run into the flooded breakpoints any more.

R=thibaudm@chromium.org

Bug: v8:10235
Change-Id: Ifae5e35c3242c95e1fe1a89a169ce874b818a288
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152646
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67202}
2020-04-17 11:50:46 +00:00
Adam Kallai
56e0a2ac82 Fix the substitution of neon arrangement specifiers
NEONFormatDecoder::Substitute function utilizes snprintf()
to substitute arrangement specifier into a format string.
Some instruction format strings (e.i. ld4r) are specified
with '%n$' positional parameter fields, but on Windows
snprintf function doesn't support these parameters.
NEONFormatDecoder logic is extended to handle four parameters
in order to avoid using positional parameters.

Bug: v8:10365
Change-Id: I79d4014c6b45d698ca47090a74c30e4eae856334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148776
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67201}
2020-04-17 10:17:56 +00:00
Paolo Severini
b47893fc14 Wasm debugging with LLDB: decode and execute GDB-remote commands
This changelist adds to the GDB stub (in class wasm::gdb_server::Target) the
logic to decode and execute GDB-remote commands and to format response packets
to be sent back to the debugger.
Here most of the commands still act as a NOOP; the actual implementation
requires interactions with the Wasm engine and will be implemented in the next
CL of this series.

Build with: v8_enable_wasm_gdb_remote_debugging = true
Run with: --wasm-gdb-remote

Bug: chromium:1010467
Change-Id: Icfa63be9e1eaa657c05876d0d4e86927e0885b90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1938466
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67200}
2020-04-17 09:57:46 +00:00
Zhao Jiazhong
fcf2ce3501 [mips][wasm-simd][liftoff] Implement not/and/or/xor/andnot
Port 8ef2f79968
https://crrev.com/c/2150157

Change-Id: I70ffb8e0c669398339eb6e794bef2b7920b58cd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153194
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67199}
2020-04-17 09:53:06 +00:00
Jiaxun Yang
72a6e594ce [builtins][MIPS]: Workaround gas auto-align issue
GAS have a auto-align function which will align all the directive
data into it's nature boundary. And we're using .octa to present
data in embedded.S, which will be auto-aligned into 128-bit boundary.
It can break relatve offset in generated binary.
So we workaround it by forcing generate .long DataDirective on MIPS.

Also I rewoked WriteByteChunk so it can accept any kind of directive
now. Further more, implementation of HexLiteral is indentical on
generic, aix and mac so I merged them into base.

Bug: v8:10420
Change-Id: I0ff791412360769510735659f909524c5f96d3e0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153187
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67198}
2020-04-17 09:36:25 +00:00
Liviu Rau
61129a663f Configure ARM builder for CFI protection testing
No-Tree-Checks: true
No-Try: true
Bug: v8:10302
Change-Id: Ic6cf0fdf2151e0ea3cb6d42789f5499b5b70bd4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150591
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67197}
2020-04-17 09:15:56 +00:00
Paolo Severini
e5e12a0598 Wasm debugging with LLDB: send and receive GDB-remote packets
This changelist adds the logic to format, decode, sends and receive packets in
the format specified by the GDB-remote protocol
(https://sourceware.org/gdb/onlinedocs/gdb/Overview.html#Overview).

Build with: v8_enable_wasm_gdb_remote_debugging = true
Run with: --wasm-gdb-remote

Bug: chromium:1010467
Change-Id: Ibc9c6713c561d06847b472fab591c208c193199f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1929409
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67196}
2020-04-17 09:08:45 +00:00
Mythri A
ca4b275ec4 [runtime-test] Check if argument passed to %OptimizeOsr is smi
Check that the argument passed to %OptimizeOsr is smi before accessing
it. If it isn't an Smi we crash unless we are fuzzing. When fuzzing,
this returns early (turns into a Nop) if the argument isn't an Smi.

Bug: chromium:1071045
Change-Id: Iff1ee3e368dfffdbbbab4107dc355d5460b996e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150602
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67195}
2020-04-17 09:00:35 +00:00
Liviu Rau
1d0ec7b1de Revert "Whitespace to trigger builders"
This reverts commit 128368c33f.

Reason for revert: Just to trigger builders

Original change's description:
> Whitespace to trigger builders
> 
> TBR: machecnbach@chromium.org
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I208d974b1da1983a8fa5996e6819779bd35d8710
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153216
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67193}

TBR=machenbach@chromium.org,liviurau@chromium.org

Change-Id: I87aa28cd4c50d2c63f17e7ccc50425bf05faa39f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153218
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67194}
2020-04-17 08:49:47 +00:00
Liviu Rau
128368c33f Whitespace to trigger builders
TBR: machecnbach@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I208d974b1da1983a8fa5996e6819779bd35d8710
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153216
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67193}
2020-04-17 08:16:46 +00:00
Zhao Jiazhong
343df3d3d4 [mips][wasm-simd][liftoff] Implement integer narrowing
Port fc29c453c8
https://crrev.com/c/2148640

Change-Id: I75092072ac6961c26559bd69d6a8413d2e9d2689
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153189
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67192}
2020-04-17 07:24:37 +00:00
Kong, Fanchen
8ef2f79968 [wasm-simd] [liftoff] Implement not/and/or/xor/andnot on x64 and ia32
Bug: v8:9909
Change-Id: Ic71a2a012cbd538d65afb047fe73e98be6454aed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150157
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67191}
2020-04-17 02:32:19 +00:00
Ng Zhi An
a8b789fc76 [wasm-simd] Improve codegen for S8x16Shuffle
Instead of putting the 16 immediate bytes on the stack,
we move them into a temporary register.

The instruction-selector then has to change, to ensure that
the operands are distinct from the temporary.

Tested on the two workloads given in
https://github.com/zeux/wasm-simd/issues/2#issuecomment-614399004

For slow, the row "filter:" oct12 goes from ~50ms to ~27ms,
the rest of the figures look about the same or slightly faster.
For optimal, the same figure goes from ~25ms to ~24ms,
the rest of the figures look slightly faster.

Raw outputs are uploaded to bug.

Bug: v8:10117
Change-Id: I7f77a3066b5e24584f1c01574aa9311f56bd7fb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152853
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67190}
2020-04-17 00:18:59 +00:00
Zhou, Zhiguo
fc29c453c8 [wasm-simd][liftoff] Implement integer narrowing on x64 and ia32
Bug: v8:9909
Change-Id: I1ec888ce0b3389afcb0edd1033bef179327e140c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148640
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhiguo Zhou <zhiguo.zhou@intel.com>
Cr-Commit-Position: refs/heads/master@{#67189}
2020-04-17 00:16:29 +00:00
Michael Lippautz
3c809e0dc7 cppgc: Add .type directive to inline asm
.type directive is required on arm to enable ARM/Thumb interworking.

Bug: chromium:1071168
Change-Id: I2ff5046719b9c8f611e81970bfa61c68ed850362
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153207
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67188}
2020-04-16 18:49:08 +00:00
Michael Achenbach
afc72ec498 [foozzie] Mock out Realm.eval
A new realm doesn't contain the mocks and suppressions on the global
object for correctness fuzzing. We replace Realm.eval with eval to
keep exercising the code.

Bug: chromium:1071133
Change-Id: Iffe82d37bf08829fc5937c17c2089277403e71dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153206
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67187}
2020-04-16 18:33:28 +00:00
Ng Zhi An
b48b82e779 [wasm] Fix wasm decoder for multi-byte opcodes
SIMD opcodes consist of the prefix byte, then an LEB128 encoded int. We
were decoding this incorrectly as a fixed uint8. This fixes the decoder
to properly handle multi bytes.

In some cases, the multi byte logic is applied to all prefixed opcodes.
This is not a problem, since for values < 0x80, the LEB encoding is a
single byte, and decodes to the same int. If the prefix opcode has
instructions with index >= 0x80, it would be required to be LEB128
encoded anyway.

There are a bunch of trivial changes to test-run-wasm-simd, to change
the macro from BUILD to BUILD_V, the former only works for single byte
opcodes, the latter is a new template-based macro that correct handles
multi-byte opcodes. The only unchanged test is the shuffle fuzzer test,
which builds its own sequence of bytes without using the BUILD macro.

Bug: v8:10258
Change-Id: Ie7377e899a7eab97ecf28176fd908babc08d0f19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2118476
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67186}
2020-04-16 18:12:48 +00:00
Ng Zhi An
70b4f28bec [wasm-simd][liftoff][arm][arm64] Implement div and sqrt
Bug: v8:9909
Change-Id: Ia5038fccb756d79b08b10a5fd0664b0da8b6a8ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151172
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67185}
2020-04-16 16:53:32 +00:00
Yury Semikhatsky
7bf5c54f6f Clear cached ICU objects when default locale changes
This is a follow-up fix for https://crrev.com/c/v8/v8/+/1491608

Bug: chromium:1051186
Change-Id: Ia76ad0e7665fe17013b45816350238c35e7199f6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2049899
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Yury Semikhatsky <yurys@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67184}
2020-04-16 16:52:27 +00:00
Bill Budge
ab5470212e [codegen] Add FP returns to code stub linkage
- Adds kFPReturnRegister0 for all platforms.
- Reworks linkage.cc to assign return registers to the proper
  register type, using the new FP return register.

Bug: v8:10070

Change-Id: I5c876d248de9b825a1c80847ab134881dcda6f04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2107510
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67183}
2020-04-16 16:45:37 +00:00
Clemens Backes
9825b45d8b [debug] Reenable tests in stress_incremental_marking
These tests were skipped three years ago because of flakes. I cannot
reproduce the flakes any more, so reenabling the tests.

R=petermarshall@chromium.org

Bug: chromium:772010
Change-Id: I4dc2d890b20e642f8d9351676aecab965d2b4b63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151357
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67182}
2020-04-16 16:31:27 +00:00
Ng Zhi An
c490c73d83 [wasm-simd][liftoff][arm][arm64] Implement eq
Bug: v8:9909
Change-Id: Ib94db390f70ddaa7eafb5af77023b1024c2b96b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151168
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67181}
2020-04-16 16:27:07 +00:00
Mythri A
a46d8d1a1b [builtins] When creating new elements array initialize with holes
When we create a new elements array we should initialize it with holes.
The capacity of the newly created elements array could be greater than
the actual length of the array and we expect the unused slots to be
filled with holes.

Bug: chromium:1070560
Change-Id: Ia365eed59859e36a9c8b9e27be34f93ab88942bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150599
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67180}
2020-04-16 15:59:37 +00:00
Liviu Rau
4993d18ed3 Set up builders for mac full debug
No-Try: true
Bug: v8:10423
Change-Id: Ic75147496bb544871b8add5034409b8c7acfbcfc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151364
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67179}
2020-04-16 15:24:47 +00:00
Philip Pfaffe
f47009a8f5 [wasm-debug-eval] Reland: Implement additional evaluator API
This CL relands the implementation of the __getLocal and __sbrk APIs of
the evaluator interface reverted in efea740. Update the original
commit to account for a changes to the import function name tracking and
defaulting to debugging with liftoff.

Change-Id: I9674aad419fb1dab0a9ecbb5d3fd4c33186b127a
Bug: chromium:1020120
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151353
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67178}
2020-04-16 15:10:07 +00:00
Richard Townsend
d6b8f0b399 cppgc: Implement PushAllRegistersAndIterateStack for MSVC
Adds an pure (not inline) assembly version of
PushAllRegistersAndIterateStack for the Microsoft Arm Assembler, which
uses slightly different syntax.

Bug: v8:10407
Change-Id: I539e2021bd86e17a2d023c061c9753b4bd96ce2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150600
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67177}
2020-04-16 14:49:17 +00:00
Clemens Backes
b71e714e20 [wasm] Reenable step-into-wasm test in one more config
The failure was probably the same as in https://crbug.com/v8/10410. Thus
reenable the test also in the stress_incremental_marking variant on
windows.

R=thibaudm@chromium.org

Bug: chromium:772010, v8:10410
Change-Id: Iad0b9b60408e08c5f2202462f6eeba3067525ae5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151356
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67176}
2020-04-16 14:04:27 +00:00
Clemens Backes
a776ccaa69 [wasm] Clean up tiering logic
This cleans up several parts of the tiering logic.
1) Instead of using the {ExecutionTier} to specify whether we do tier up
   or down, we introduce a new {TieringState} enum and use that
   consistently (also where a {bool} was used before).
2) When tiering up or tiering down, always recompile all functions. It's
   very unlikely that we can reuse previous code anyway (tiering down is
   cheap enough to just always do it, and when tiering up we need to
   recompile everything anyway).
3) Remove the {WasmEngine::RecompileAllFunctions} method and inline the
   implementation into callers.
4) Drive-by: Remove some obsolete comments and fix or extend others.

R=thibaudm@chromium.org

Bug: v8:10410
Change-Id: Ic765c6760dd97473ccfd469f22a2514695075587
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151355
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67175}
2020-04-16 14:03:17 +00:00
Ulan Degenbaev
5ee9cf874f [inspector] Fix handling of on-heap TypedArrays in queryObjects()
On-heap TypedArrays have empty ArrayBuffers that are not supposed to be
accessed directly. Such ArrayBuffers materialize properly when accessed
via their TypedArrays.

The queryObjects() sidesteps the bottleneck and finds empty ArrayBuffers
by iterating the heap. When preview TypedArrays are constructed for the
found ArrayBuffers, they get nullptr data pointers.

This CL converts all on-heap TypedArrays into off-heap TypedArrays in
queryObjects to make sure that all found ArrayBuffers are valid.

Bug: chromium:992442
Change-Id: Ie77d1e75aa2007b4a976c72206b9a4e215c9ef53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150601
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67174}
2020-04-16 13:34:57 +00:00
Andreas Haas
6210bc8254 [wasm] Change liftoff assembler interface for atomic binops
The existing interface assumed that for atomic binop instructions, the
value register and the result register are the same. However, for x64,
this assumption is not always useful, and for platforms like arm, this
assumption is even negative.

The existing interface was originally introduced because ia32 lacks
registers, and we wanted to avoid platform-specific code in
liftoff-compiler.cc. However, by now the lack of registers on ia32
required us to use platform-specific code also in other places, so
we can also use it for atomic binops and thereby enable a better code
generation.

R=clemensb@chromium.org

Bug: v8:10108
Change-Id: If39cc5f49934422b632bb2a5793c7f5d5d2b65c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150585
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67173}
2020-04-16 13:20:57 +00:00
Georg Neis
038e72ea24 [test] Skip tests using %UnblockConcurrentRecompilation if --predictable
Change-Id: Ic5dbf4c3330c71cbae73aa07b2adb1c8ac087182
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151348
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67172}
2020-04-16 11:51:57 +00:00
Yuki Shiino
6c815975b1 Remove a wrong DCHECK from JSObject::SetImmutableProto
JSObject::SetImmutableProto is called from InstantiateObject
in api/api-natives.cc:
https://source.chromium.org/chromium/chromium/src/+/master:v8/src/api/api-natives.cc;drc=98497572964c764de5dc32a54a62c66943ed8499;l=369
https://source.chromium.org/chromium/chromium/src/+/master:v8/src/api/api-natives.cc;drc=98497572964c764de5dc32a54a62c66943ed8499;l=423
So, non JS code will hit the DCHECK being removed in this patch.

Actually, Blink hits this DCHECK when implementing Location
object's [[SetPrototypeOf]] as SetImmutablePrototype.
c.f. https://crrev.com/c/2145516

Change-Id: I88b2715d645f5ea792ef33cb67a6990c762ad338
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2143982
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67171}
2020-04-16 11:43:57 +00:00
Jakob Gruber
daf59562c4 Revert "[protectors] Add use counters to track invalidations"
This reverts commit 5241205835.

Reason for revert: Use counters are not the right approach, we
need histograms instead.

Original change's description:
> [protectors] Add use counters to track invalidations
> 
> ... to make real world protector invalidations measurable.
> 
> Chromium CL: https://crrev.com/c/2149324
> 
> Drive-by: Add missing newline in protector tracing.
> Drive-by: Consistent naming for the regexp species protector.
> 
> Bug: v8:9496
> Change-Id: I3c7238aa8024e03ea9e89daf83345b8ec4f0d768
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2149428
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67149}

TBR=ulan@chromium.org,jgruber@chromium.org

Change-Id: Ia36b598844fbad2166772298c2e2ec8f6b4f92b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9496
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151358
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67170}
2020-04-16 11:36:10 +00:00
Yang Guo
fa3e37e511 [api] remove deprecated snapshot APIs
R=verwaest@chromium.org

Fixed: v8:7463
Change-Id: I3d0127865ad0430d38124c3ad8ed3bc63ba4e6d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2149421
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67169}
2020-04-16 11:23:30 +00:00
Philip Pfaffe
8d368f09ac [wasm] ZoneBuffer: Avoid memcpy of Empty Byte Arrays
Trying to write an empty byte array currently invokes undefined behavior
if the byte array is null. That's the case when trying to write an empty
vector for example. Copying zero bytes from nullptr is defined as UB for
memcpy.

Change-Id: I6f7e920c1e19e8b2e3779bbc1c0ad79fc8bd6e98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148789
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67168}
2020-04-16 10:55:24 +00:00
Michael Lippautz
b7981e3bd3 cppgc: Visitor: Add custom weak callback support
This adds support for custom weak callbacks through static callbacks and
instance methods.

Bug: chromium:1056170
Change-Id: Ie4bd32539e0d933b192f07edb2d45e0070c2128d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148784
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67167}
2020-04-16 10:32:24 +00:00
Clemens Backes
0b392da22d [wasm] Re-enable native module cache
This reverts commit https://crrev.com/c/2144966, which was merged to
v8.1 in https://crrev.com/c/2151345.

R=thibaudm@chromium.org

Bug: chromium:1070199
Change-Id: Idb25cfaa52f7f7aa07353cf0372e6758adb58d78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2151346
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67166}
2020-04-16 09:35:54 +00:00
Zhao Jiazhong
5ad6adc3ad [mips][wasm-simd][liftoff] Implement div/sqrt
Port ad55fa63d3
https://crrev.com/c/2147148

Change-Id: I5375ae4bddb2221c6f7860e55111c95beeed757d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2152069
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#67165}
2020-04-16 09:30:44 +00:00
Marja Hölttä
5bf5b79f84 [cleanup] Remove unnecessary MakeFooError builtins
They were installed as builtins for historical reasons (see
https://codereview.chromium.org/2222893002 ).

But they're pretty much unnecessary, as they were mostly dead code,
except MakeTypeError - but that work can be delegated to Runtime_NewTypeError.

Change-Id: I0c3b361accf9a96da5cd00cc62b7f018186dad17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150597
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67164}
2020-04-16 08:41:24 +00:00