Commit Graph

61221 Commits

Author SHA1 Message Date
Clemens Backes
81d8e42f91 Revert "[heap] Introduce safepoint mechanism"
This reverts commit c84963eaa7.

Reason for revert: Fails on msan: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/31376

Original change's description:
> [heap] Introduce safepoint mechanism
> 
> Add safepoint mechanism to stop concurrent threads and bring them to a
> safepoint. Threads are stopped before the safepoint and after e.g. the
> GC resumed again. Each thread needs to be stopped in a safepoint, such
> that all roots can be iterated safely.
> 
> Running threads need to be cooperative and are required to perform
> regular safepoint polls.
> 
> Bug: v8:10315
> Change-Id: I47f07e7d2ef5bc5adbba6b9e8e79a1f0f45b97ad
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102578
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66727}

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

Change-Id: If11281b2b9fc622b91261417b202676f23f60b50
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2105634
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66729}
2020-03-16 15:25:03 +00:00
Andreas Haas
cc571fd7ac [wasm][liftoff] Implement data.drop
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: I34e6d1ec57d59e266d3182a3d3cc69d4cbb9d047
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2104889
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66728}
2020-03-16 15:10:03 +00:00
Dominik Inführ
c84963eaa7 [heap] Introduce safepoint mechanism
Add safepoint mechanism to stop concurrent threads and bring them to a
safepoint. Threads are stopped before the safepoint and after e.g. the
GC resumed again. Each thread needs to be stopped in a safepoint, such
that all roots can be iterated safely.

Running threads need to be cooperative and are required to perform
regular safepoint polls.

Bug: v8:10315
Change-Id: I47f07e7d2ef5bc5adbba6b9e8e79a1f0f45b97ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102578
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66727}
2020-03-16 14:59:33 +00:00
Camillo Bruni
92e3bcb1d9 [runtime] Use TLA in more tests
Enable more tests to use top level await modules.

Bug: v8:9344
Change-Id: I61c0c0205235969a43af602af327654b7e8a3dad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074402
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66726}
2020-03-16 14:43:53 +00:00
Clemens Backes
f2a0f53c8e [wasm] Fix Liftoff bailout
The bailout was guarded by the "if (counters)" condition, which does not
make sense.
If Liftoff compilation is executed for debugging, no counters will be
passed. On platforms that do not implement Liftoff, we still need to
bail out correctly.

R=ahaas@chromium.org

Bug: v8:10147
Change-Id: I188460183bb1c376d456e0d4e54e2338f4a66e23
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2105353
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66725}
2020-03-16 14:33:03 +00:00
Milad Farazmand
38fa16f89f PPC/s390: [liftoff] Add initial logic for stepping
Port 83ff405b1a

Original Commit Message:

    Flood functions with breakpoints to prepare them for stepping. With a
    small modification to the runtime function, this already implements a
    basic step over functionality.

    We still cannot resume, step in or step out (including stepping over a
    return instruction).

R=thibaudm@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Id153b2611c528e679e8d7722e3d209fb15bcf6d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2105055
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66724}
2020-03-16 14:23:23 +00:00
Victor Gomes
f7bcb2c5ee [test] Add receiver as argument in the interpreter tests
Fix the test-interpreter and test-interpreter-instrinsics by adding the receiver
as an argument instead of relying on an undefined receiver.

Change-Id: I7af3216b915581155bc320b27a5454c78d04f1f5
Bug: v8:10325
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102568
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66723}
2020-03-16 14:20:23 +00:00
Mythri A
b0bae6c736 [TurboFan] Redirect --trace-opt, --trace-deopt, --trace-osr to a file
With the current flow, it is difficult to easily get the output
of --trace-opt, --trace-deopt and --trace-osr from Android devices.
These flags log to stdout and on Android it is difficult to get this
output that preserves the formatting. This cl redirects them to a file
when --redirect-code-traces is specified.

Change-Id: I8ea1f083d0ee4577f9d70cfd2d7cb2823fd1a6c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089931
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66722}
2020-03-16 14:18:43 +00:00
Clemens Backes
a80071457d [wasm] Add a fast path to {FindJumpTablesForRegion}
This method is called in the critical section in {PublishCode}, hence
performance is important here. Since most modules will only have a
single code space anyway, we can use the main jump table in the vast
majority of cases, and avoid taking a lock and iterating another data
structure.

R=ahaas@chromium.org

Bug: v8:10330
Change-Id: I18cbd3b127172963ccc9ec576a0985e874da7865
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2104891
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66721}
2020-03-16 14:17:38 +00:00
Clemens Backes
f26c7b755a [wasm] Add a test to inspect a large number of registers
This tests inspecting a bigger number of registers (covers all registers
on many platforms). It also executes all four intrinsic types (i32, i64,
f32, f64).

R=thibaudm@chromium.org

Bug: v8:10222
Change-Id: I340696d525e4001f241bb22f62f0338018ad9804
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102575
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66720}
2020-03-16 14:16:33 +00:00
Clemens Backes
ae03752fd9 [wasm] Load register values from DebugBreak frame
This implements inspection of live registers on breakpoints in Liftoff.
To that end, the frame pointer of the WasmDebugBreak frame is remembered
when iterating the stack. Based on a platform-specific implementation of
{WasmDebugBreakFrameConstants}, the offset of the respective register
within that frame is computed, and the value is read from the frame.

As a drive-by, the wasm debug side table is storing register codes as
liftoff codes, which can also store register pairs (needed for i64 on
32-bit platforms, and for SIMD, which is not supported yet).

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

Bug: v8:10222
Change-Id: I01b669baf56430e100cd46cc46f210121ea679da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102574
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66719}
2020-03-16 13:29:03 +00:00
Dan Elphick
5c7e24d736 [snapshot] Fix mksnapshot with warmup script
This fixes an assertion failure in mksnapshot that when the read-only
space is created for a second time, that its checksum should match the
first time it was deserialized. However with warmup scripts in
mksnapshot, the first run through doesn't deserialize it, but creates it
from scratch.  Then the next time through it deserializes it which it
doesn't expect and so crashes as there is no checksum to compare it to.

This fixes it by only checking if is a last_checksum (e.g. that it was
deserialized). Additionally CHECK that we never attempt to create the
objects from scratch if previously deserialized from a snapshot.

Bug: v8:10320
Change-Id: I598e5298b68f45911e20533db91d7f24fea21045
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102579
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66718}
2020-03-16 13:12:33 +00:00
Georg Neis
0798746cb3 Revert "[turbofan] Clean up ConstantFoldingReducer"
This reverts commit 2c834c5364.

Reason for revert: several clusterfuzz issues, e.g. 1061805

Original change's description:
> [turbofan] Clean up ConstantFoldingReducer
> 
> Change-Id: Iaf7f83cc157a6f6680da8933560347f7f3503d56
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2098736
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#66706}

TBR=neis@chromium.org,tebbi@chromium.org

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

Change-Id: I6e5b655bb465087a50ebaa2088795c6f920c2e51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2104892
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66717}
2020-03-16 13:06:43 +00:00
Thibaud Michaud
dded093312 [liftoff] Skip unreachable breakpoints
Forward the breakpoint iterator to the current position, ignoring
unreachable breakpoints.

R=clemensb@chromium.org

Bug: v8:10147
Change-Id: Ic7e7fca4c69fdea68676ff75031bb5133bfc69d9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100993
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66716}
2020-03-16 13:02:23 +00:00
Clemens Backes
e47f9a9d50 [wasm] Fix registers spilled in DebugBreak frame
The set of registers to spill was wrong. Instead of spilling wasm
parameter registers (like the WasmCompileLazy builtin), we should spill
all registers that are being used as Liftoff cache registers.
This CL defines platform-specific WasmDebugBreakFrameConstants which
hold the set of registers to spill. This set is used in the builtin, and
will later be used for inspecting the spilled registers.

In order to iterate bit sets more easily in both direction (MSB to LSB
or LSB to MSB), we add a base::bits::IterateBits{,Backwards} method
which provides the respective iterators.

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

Bug: v8:10222
Change-Id: I73ecbdff9b29e244c478b404063c0c9ee25bc821
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102570
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66715}
2020-03-16 10:13:40 +00:00
Lutz Vahl
b1f0d7faeb Update v8 version to 8.3
TBR=hablich@chromium.org
NOTRY=true

Change-Id: I20d091dbceccc3d9780c1e6f803fb26998de4ea8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2104888
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66714}
2020-03-16 10:06:40 +00:00
Iain Ireland
e5fd9cba7b [regexp] Simplify allocation of RegExpMacroAssemblerTracer
This change is motivated by SpiderMonkey's policy against bare
new/delete. (I also think it's just a nicer way to write this.)

R=jgruber@chromium.org

here is the same as the change I made in the equivalent SM code.

Note: I'm not importing regexp.cc into SpiderMonkey, but the change
Bug: v8:10303
Change-Id: I3c81727eb7dea9c0ec78241e3c82ffc9e7007827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091858
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66713}
2020-03-16 07:23:00 +00:00
v8-ci-autoroll-builder
7695c860ab Update V8 DEPS.
Rolling v8/build: 4428a79..32206c0

Rolling v8/tools/clang: 531ae60..d60a6a8

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

Change-Id: Idac33929a24cb0bda2c5aba907b4052eac5173bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2104270
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@{#66712}
2020-03-15 03:47:39 +00:00
v8-ci-autoroll-builder
5c0a3c4a2b Update V8 DEPS.
Rolling v8/build: cdcb92e..4428a79

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/40469eb..3ef483f

Rolling v8/third_party/depot_tools: 595eb19..c48fb84

Rolling v8/tools/clang: 8bf2cd1..531ae60

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

Change-Id: I26ce6391daaeda5f4e7b9f979a8977533561b999
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2103460
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@{#66711}
2020-03-14 03:59:47 +00:00
Ng Zhi An
603ade1433 [wasm-simd] Improve codegen for all_true and any_true
Based on feedback in https://github.com/WebAssembly/simd/issues/189 and
inspired by cranelift's codegen, we reduce instruction count by 1 for
both types of operations - all_true goes from 6 -> 5, any_true from 4 ->
3. The main transformation is to change a sequence of movq + ptest +
cmovq to ptest + setcc. We unfortunately cannot cut down the instruction
counts further, since we need to zero the destination register.

Change-Id: Idc2540dbec755c7a7ff5069955f74e978190161d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100994
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66710}
2020-03-13 18:00:02 +00:00
Ng Zhi An
b53bf811d6 [wasm-simd][fuzzer] Add more simd operations
Add a bunch of i8x16, i16x8, i32x4 binops.

Bug: v8:10180
Change-Id: I576dbb605f1769ace2c832988c5205eaefc4476a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101937
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66709}
2020-03-13 17:58:57 +00:00
Andreas Haas
3556facb7c [wasm][liftoff] Implement memory.fill
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: I33ca74a1536f4a99478aa1ee42dd7c7a46980f6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100999
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66708}
2020-03-13 17:24:07 +00:00
Andreas Haas
4613f3a2c6 [wasm][cleanup] Cleanup reading from buffer in simple runtime functions
This CL extracts a function which reads from a buffer and additionally
increments an offset for the next read.

R=clemensb@chromium.org

Bug: v8:10281, v8:10155
Change-Id: Id8d79130cde17053d701d2508e40cba993471e55
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101001
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66707}
2020-03-13 17:20:17 +00:00
Georg Neis
2c834c5364 [turbofan] Clean up ConstantFoldingReducer
Change-Id: Iaf7f83cc157a6f6680da8933560347f7f3503d56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2098736
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66706}
2020-03-13 16:32:57 +00:00
Milad Farazmand
7eeb53807c PPC/s390: [wasm-simd] [liftoff] Implement extract_lane on x64 and ia32
Port 11da29a745

R=fanchen.kong@intel.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I5ea7bc62dcbd2411b84c5b9bfbe1fb6cdf0ee592
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102769
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66705}
2020-03-13 15:48:07 +00:00
Thibaud Michaud
9009939437 [liftoff] Allow resuming execution after stepping
R=clemensb@chromium.org

Bug: v8:10321
Change-Id: Ia082b842de8947ead3931943b3bc05903a0f9e29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101002
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66704}
2020-03-13 14:49:47 +00:00
Andreas Haas
a0913c9dea [wasm] Refactor memory.fill to do the bounds check in C++
Doing the bounds check in C++ has the advantage that we generate less
code, and that TurboFan graphs get smaller. Additionally it will make
code generation from Liftoff easier. There is not really a downside:
We already called C++ anyways to do the actual memory.fill operation.

R=clemensb@chromium.org

Bug: v8:10281
Change-Id: If4e36d45a3fd1c4c0fef9137d37097a012e7a409
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100991
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66703}
2020-03-13 14:20:27 +00:00
Jakob Kummerow
ea468d5318 Fix one more LookupIterator
to properly choose named or indexed mode

Bug: chromium:1059738
Change-Id: Icd086fee31079f52770742afa54fc946acb1fd81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101005
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66702}
2020-03-13 13:39:54 +00:00
Jakob Kummerow
a44c71e7b9 [wasm-c-api] Fix component builds of wasm_api_tests
SignatureHelper::kMarker needs an explicit instantiation after
f3b4167f8b.

Change-Id: Ia5a0696a576a2c59bea262359058bd63eb3c8426
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101004
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66701}
2020-03-13 13:18:14 +00:00
Andreas Haas
bb637954c8 [wasm] Add memory masking to memory.copy and memory.init
This CL adds memory masking to our implementation of memory.copy and
memory.init when spectre mitigations are enabled.

R=clemensb@chromium.org

Bug: v8:10281
Change-Id: I8722fa7ab244f339d859d5479eceede85dbbd08c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100990
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66700}
2020-03-13 11:40:22 +00:00
Zhao Jiazhong
fe424b3b8f [mips][wasm] Turn ValueType from an enum to a class.
Port f3b4167f8b
https://crrev.com/c/2091471

Original Commit Message:

  In preparation for adding reference types, which need an additional
  parameter to indicate the referenced type.

Change-Id: I1b66bffea3ac2637886673476c8f7d62150b33a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100695
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66699}
2020-03-13 10:52:12 +00:00
Zhao Jiazhong
1c565fdccf [mips][wasm-simd][liftoff] Implement extract_lane.
Port 11da29a745
https://crrev.com/c/2086706

Change-Id: I1f9227bfc12a0d1a60aa6d34f41a3a3903a5a24f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100703
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#66698}
2020-03-13 10:44:52 +00:00
Thibaud Michaud
83ff405b1a [liftoff] Add initial logic for stepping
Flood functions with breakpoints to prepare them for stepping. With a
small modification to the runtime function, this already implements a
basic step over functionality.

We still cannot resume, step in or step out (including stepping over a
return instruction).

R=clemensb@chromium.org

Bug: v8:10321
Change-Id: Ia4a6335d24c1a511c2f1fc9b48d728f327b3df56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2098732
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66697}
2020-03-13 10:25:13 +00:00
Andreas Haas
cfb157a0b1 [wasm] Add bounds check in debug opcode printing
In debug builds of Liftoff, the opcode of the next instruction is
printed as a code comment. For multi-byte opcodes, all but the first
byte have to be extracted explicitly from the wasm code in the
{NextInstruction} function. The bounds check for this extraction was
missing.

R=clemensb@chromium.org

Bug: chromium:1061304
Change-Id: I16a05d54e50506c1387970ad84082d7e76108fc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100996
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66696}
2020-03-13 10:17:05 +00:00
Clemens Backes
42f2e1fcc0 [API] Use proper C++ methods to implement type checks
The {TYPE_CHECK} macro used an ancient pattern to check for
assignability, by assigning to a static_casted nullptrs of the
respective types.
C++11 introduced standard library helpers to express this more
naturally. The most direct translation would have been to use
{std::is_assignable} or {std::is_convertible} on the pointer types, but
in most cases we can be even more strict and force one type to be a
proper subtype of the other.
The only exception is {ReturnValue}, which allows to assign anything if
it's void.

R=ulan@chromium.org

Bug: v8:10155
Change-Id: I41c1103e0206514c8700c47a0bf107ad704cfc47
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2093497
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66695}
2020-03-13 09:50:42 +00:00
Kong, Fanchen
11da29a745 [wasm-simd] [liftoff] Implement extract_lane on x64 and ia32
Bug: v8:9909
Change-Id: If1293fd4ec36f56e459c79ee6ed4fdc466bbded1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2086706
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Cr-Commit-Position: refs/heads/master@{#66694}
2020-03-13 09:11:12 +00:00
Joyee Cheung
3bcba63b17 [class] test extending class expression without private methods
Address a TODO in tests

Bug: v8:8330
Change-Id: I2b8d5cef488ca56331448dcb11fad7a00f19d501
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2095638
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/master@{#66693}
2020-03-13 01:42:32 +00:00
Ng Zhi An
aa001dce0a [wasm-simd] Fix generation of s128.store
s128.store should be in the list for generating kStmt, not kWasmS128.
No regression test added because the generated JS file is not helpful
for this bug - the failed assertion is in the fuzzer, not the engine.

Bug: chromium:1061049
Change-Id: I44092fa10c57aeeb34f1c6c5a7d655def31a7363
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101927
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66692}
2020-03-13 01:08:31 +00:00
Deepti Gandluri
37ef629a87 [wasm-simd] Add regression test to validate results on Arm64 HW
Bug: v8:10309
Change-Id: Ib0ad8f936d0229129315e8e48e54fa500fd40cd5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101701
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66691}
2020-03-13 00:58:01 +00:00
v8-ci-autoroll-builder
e4eb62d15b Update V8 DEPS.
Rolling v8/build: 8a766f0..cdcb92e

Rolling v8/buildtools: 1a8a3a7..4164a30

Rolling v8/buildtools/linux64: git_revision:fd3d768bcfd44a8d9639fe278581bd9851d0ce3a..git_revision:9499562d94bf142f43d03622492e67b217461f67

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/786ed18..40469eb

Rolling v8/third_party/depot_tools: 1ee78cd..595eb19

Rolling v8/tools/clang: ca7cd9b..8bf2cd1

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

Change-Id: I5764ccc04cbd265b76935062b1f67730fa6bf29c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2100533
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@{#66690}
2020-03-13 00:43:22 +00:00
Milad Farazmand
e97b7b0e26 PPC/s390: [wasm] Turn ValueType from an enum to a class
Port f3b4167f8b

Original Commit Message:

    In preparation for adding reference types, which need an additional
    parameter to indicate the referenced type.

R=jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ia6d933611440096247dda159846f6c119f5167d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101607
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66689}
2020-03-12 20:39:06 +00:00
Seth Brenith
0c72c71900 Move branch inversion on ==0 into platform-agnostic reducer
This change is based on a discussion from
https://crrev.com/c/v8/v8/+/2053769/4/src/compiler/machine-operator-reducer.cc#1696
wherein Tobias suggested moving the folding away of ==0 operations out
of the platform-specific instruction selectors and into the
MachineOperatorReducer. I noticed that CommonOperatorReducer already
handles some very similar cases, so I have tried putting the ==0 folding
into CommonOperatorReducer instead. I'm happy to move it into
MachineOperatorReducer if that's better; I still don't have a very good
understanding of how roles are separated among reducers.

Change-Id: Ia0285bd9fafeef29d87cc88654bd6d355d467e8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2076498
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66688}
2020-03-12 17:56:56 +00:00
Jakob Kummerow
f3b4167f8b [wasm] Turn ValueType from an enum to a class
In preparation for adding reference types, which need an additional
parameter to indicate the referenced type.

Bug: v8:7748
Change-Id: If4023f3d9c7f42ed603b69c43356d2e8b81a0daa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091471
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66687}
2020-03-12 17:03:16 +00:00
Andreas Haas
4253a00ec8 [wasm] Reset thread-in-wasm flag in C functions
On Windows in an asan build we have to reset the thread-in-wasm flag in
the memory_init_wrapper, memory_copy_wrapper, and memory_fill_wrapper.
Accidentally I removed this code for the memory_init_wrapper and the
memory_copy_wrapper recently. This CL introduces the code again.

R=clemensb@chromium.org

Bug: v8:10281
Change-Id: If46def5cd64ac8cbff9b86108189462717961edd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2098737
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66686}
2020-03-12 14:49:12 +00:00
Andreas Haas
402b7f15a4 [wasm] Add zero-extension for I64AtomicCompareExchange32U
x64's cmpxchgl instruction does not zero-extend the register. The stale
high word caused the difference in the results of the interpreter and
Liftoff/TurboFan.

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

Bug: chromium:1059529
Change-Id: I0fd440bee26e25b90b29533cfa9151e4d87754e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2098726
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66685}
2020-03-12 14:35:42 +00:00
Georg Neis
8372a7c52f [turbofan] Normalize types for Oddball constants
... such that we have only a single representation for special
constants such as undefined, namely the corresponding bitset.
With this CL the following property holds:
    t1.IsSingleton() /\ t2.Is(t1) => t1.Is(t2)

Also clean up the Type interface and improve test coverage a little.

Change-Id: I074e20047c92e2c8215c2d438f2627f4ffdbc409
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096631
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66684}
2020-03-12 14:28:52 +00:00
Mike Stanton
72c6a832b5 [TurboFan] Peek into CheckClosure/CreateClosure nodes for better calls
In typed lowering, if our target is a CheckClosure or a CreateClosure
node, we can extract a SharedFunctionInfo from the opcodes
parameters in order to make calls a bit more efficient.

Change-Id: Ib06dea2e8505bfeb984c4cefd5ad1bed0defa5f7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087402
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66683}
2020-03-12 13:41:12 +00:00
Andreas Haas
41a75e88c0 [wasm][liftoff] Implement memory.init
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: I321e65f42fd68a3451b49881b04bfb38dd7ff8ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091469
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66682}
2020-03-12 11:41:52 +00:00
Steve Blackburn
9cad613161 Respect custom chunk size in RO serializer
Bug: v8:9533
Change-Id: Ida93a4a6dd5d25e78bb2bc113b869bc01cd7a650
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2043808
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66681}
2020-03-12 10:38:51 +00:00
Georg Neis
236bf2dc97 [assembler] Remove some dead code
Change-Id: I0dc2a198c412723933cb1bc259423ff241612fcc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2098731
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66680}
2020-03-12 10:37:42 +00:00