Commit Graph

61525 Commits

Author SHA1 Message Date
Clemens Backes
a1d2e34260 [wasm][debug] Fix printing of wasm opcodes
This is a minor cosmetic fix. Wasm opcodes are bytes, hence they should
always be printed as an even number of hexadecimal digits.
Note that currently we only print a single byte anyway, but in the
future we will want to extend this to correctly parse multi-byte
opcodes. Those will also be printed as an even number of characters
then.

R=thibaudm@chromium.org

Bug: v8:10351
Change-Id: I2423277b470d74c1c72cb619c2a43bb978423bc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122025
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66883}
2020-03-27 07:05:25 +00:00
Ng Zhi An
982c4abaed Speed up asm-wasm tests
The asm-wasm-f32 and asm-wasm-f64 tests run through a bunch of different
constants. For the binops, they run through a cross product of the
inputs. This patch trims down the number of constants used.

The selection of constants to remove is quite arbitrary - the intial
patch introduced a lot of magic constants that look random or has some
pattern. I don't think they mean anything special, especially for f64
form since those values all fit in a f64. For f32 we still have a bunch
of values to exceed the maximum integer representable in f32.

Bug: v8:7783
Change-Id: If34b084a11acdf21b1d2933fdd0cab65be1738c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116988
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@{#66882}
2020-03-26 19:31:47 +00:00
Michael Achenbach
b30618cebe [foozzie] Properly mock out Date
Yet another corner case how non-deterministic timestamps slipped into
the tests.

Bug: chromium:1064900
Change-Id: I33e8b4c8141b3854b7eca5d7ad9b45b6f5130d9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120584
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66881}
2020-03-26 18:48:37 +00:00
Richard Townsend
51a55a3b28 [arm64][msvc] Temporarily deinline LinkageLocation::IsRegister
MSVC versions 19.24 and onward generate invalid code for this
function. The workaround is to deinline it. This probably costs
some performance, but is not intended to be permanent.

Bug: v8:10352
Change-Id: I8a9b8f70c77f26c8af86c679aae8c9fb8ec28cd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2118530
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66880}
2020-03-26 18:17:43 +00:00
Ng Zhi An
efb1b5e430 [wasm] Speed up some tests in grow-memory
Rework testMemoryGrowPreservesDataMemOp tests so that they only test the
first and last 5 offsets within the page, instead of every offset.

Slight logic change: instead of storing the value C - offset (where C is
a constant that is different for 32 and 16 memops), we store just the
value offset. This allows us to combine the logic for all 3 memops (32,
16, and 8). But we need to add a modulo so that in the 8 bit case, we
don't store a value that exceeds the maximum (the other cases will never
hit a case that exceeds the max).

Bug: v8:7783
Change-Id: Ibfdc77555ba2ca26391eba303050a03538f6012d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117633
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66879}
2020-03-26 17:51:23 +00:00
Ng Zhi An
820a3bdadf [wasm] Add some more test cases to wasm-trace-memory
We were missing test cases for i16, i64, and f64. It's not super
critical, but it's also an easy addition, and helps bring coverage of
memory-tracing.cc up (close to 100% now).

Change-Id: Ib8433f8615c900d8665ccbc33e12d6fd05d51336
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2121168
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66878}
2020-03-26 17:44:53 +00:00
Z Nguyen-Huu
073c5d2dd6 [wasm] WAT-compatible naming for exported function
For exported functions that do not have a name yet, we use the field
name (see <name> of WasmExport) of the first export entry.

Doc: https://docs.google.com/document/d/1XoXWONLBgZWQ9dhtoMpQPvD0fnnWA50OorsuSXfME3g/edit#heading=h.6yuhg1v2w3q4
Bug: v8:10242
Change-Id: Icfa55fd50e5d1c4cf10581b7d322112e9f113388
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2112684
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66877}
2020-03-26 17:29:49 +00:00
Clemens Backes
dbda6c3d4f [wasm][debug] Make some control opcodes non-breakable
Most control structures in WebAssembly do not have a clear execution
semantics, they are more like markers. Hence the execute state, and the
change in the state, when breaking on them and stepping over them is
unclear.
Hence this CL just makes them non-breakable. If the user tries to set a
breakpoint on them, this breakpoint will automatically be propagated to
the first instruction after the respective control opcode (this is
tested for other cases in existing tests).

R=thibaudm@chromium.org

Bug: v8:10326
Change-Id: Iaf540a94789c9cbc87d23ddfb794e4b01776b49f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122017
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66876}
2020-03-26 16:49:43 +00:00
Nate Chapin
115c79bde0 Don't call StoreContextElement for undefined continuation perserved embedder data
Bug: chromium:1060935
Change-Id: Ie2d92edbc9b83bf54f9009d610c13274aea32b93
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2119221
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66875}
2020-03-26 16:20:13 +00:00
Andreas Haas
47cdcc4aea [wasm] Passive data segments don't need a memory
This CL fixes a spec violation that new spec tests uncovered.

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

Change-Id: I1004eca9e4f98a0960795907fea0ab263c907938
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122022
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66874}
2020-03-26 16:07:43 +00:00
Andreas Haas
dbb9f5101f [wasm] Update wasm spec tests
R=thibaudm@chromium.org

Change-Id: Idb20e87e6a27a816ac1898b9e4345e5aaafaf334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122018
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66873}
2020-03-26 16:04:53 +00:00
Leszek Swirski
7f1282fb6e [parser] Process source ranges for background parses
Make sure to call MaybeProcessSourceRanges in ParseOnBackground so that
code coverage ranges match between main thread and background compiles.

Bug: chromium:1011762
Change-Id: Ic6194083e425f4160e34a34bceb6034624cf1b9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120540
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66872}
2020-03-26 14:43:26 +00:00
Thibaud Michaud
dd0d9c6194 [liftoff][debug] Fix source position after OSR
The top wasm frame position can be inaccurate after removing a
breakpoint and OSRing the new code. This is because we are missing the
source position which was associated with that breakpoint in the old
code. Fix this by explicitly introducing the missing source position.

R=clemensb@chromium.org

Change-Id: I0d18061c4c2411de8d2ccaaebbb4eb550a4c3160
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120591
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66871}
2020-03-26 12:45:16 +00:00
Dan Elphick
1cbb5f8d40 [tools] Fix retention of json files in RCS script
Now that the trace json file has changed name, update the extension
checked by the --retain=json flag in generate-runtime-callstats.py.

Bug: v8:10348
Change-Id: Ieb14b77d2d399a1246049170f289b4666658f376
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122015
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66870}
2020-03-26 12:07:56 +00:00
Clemens Backes
15bb248861 [liftoff][debug] Clear stepping in JS
We were sometimes stopping on a one-shot breakpoints in JS code even
though the last user action was actually a resume.
This CL fixes that clearing all stepping in JS whenever we hit a
breakpoint in wasm.

R=thibaudm@chromium.org

Bug: v8:10321
Change-Id: Ie5d12bb0c9e766bcbd5ad0aa225a8b14b4d608b1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120588
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66869}
2020-03-26 11:25:21 +00:00
Dan Elphick
f5fefba308 [tools] Update RCS script for new file layout
Fix generate-run-benchmark to pick the trace json file now that
run_benchmark generates a different directory structure due to the
protobuf change.

Bug: v8:10348
No-Try: true
Change-Id: I4d671071db68a7a82ec542bf41bf1d9afcdb3837
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120590
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66868}
2020-03-26 11:24:16 +00:00
Kim-Anh Tran
155d2bc4ae [wasm][debug] Add stack scope to CDP and V8
This change adds a stack scope for wasm debugging.
Currently the local scope contains both local variables as well as
the expression stack. For now, this change duplicates the information
available on stacks into the stack scope, until we have added
support for the stack scope in the DevTools front-end.

Bug: chromium:1043034
Change-Id: Ib0a07e07be7c53003526a7b1e1dbfaa1116b41ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2093510
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66867}
2020-03-26 07:54:15 +00:00
Michael Lippautz
d014e8f73c cppgc: Fix ConstructionBitProtectsNonAtomicWrites on MSVC
std::atomic loads are marked as nodiscard on MSVC. Fix the warning by
feeding the load into the USE() macro.

Bug: chromium:1056170
Change-Id: I72ca42d42d268c4b961d96618250229a53709472
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120543
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66866}
2020-03-25 22:46:24 +00:00
Ng Zhi An
2f83184db3 [wasm-simd][x64] Add AVX codegen
For a bunch of s8x16, s16x2 and s32x4 shuffle ops (generated by
s8x16shuffle).

Bug: v8:9561
Change-Id: I0e5cd8a90edba8bc15918c0ca1dc830475db2769
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110952
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66865}
2020-03-25 20:12:03 +00:00
Leszek Swirski
8e8d61b38b [offthread] Pin OffThreadIsolate to a given thread
Previously OffThreadIsolates set their thread-id on construction. This
thread-id could later be used in DCHECKs, comparing it against the
current thread's id.

However, OffThreadIsolates are created on the main thread (as they need
access to the Isolate and especially Heap for initialization). So, the
thread-id was actually not the background thread's id.

Now, OffThreadIsolate has a PinToCurrentThread method which should be
called on whichever thread wants to actually use it. This pinning can
only be done once, and the OffThreadIsolate is considered invalid before
this method is called.

Bug: chromium:1011762
Change-Id: Ie9d7838152683aea2a326a4e5d1dbd59a747131f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110016
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66864}
2020-03-25 17:38:42 +00:00
Clemens Backes
3ea7ecaf67 [wasm][debug] Improve printing of break locations
Using the "logSourceLocation" function from protocol-test.js prints
slightly better location information for wasm, and especially much
better information for JS breakpoints. This helps understanding and
debugging these tests.

R=thibaudm@chromium.org

Bug: v8:10351
Change-Id: I51c7d168d2cb19fb8469b4a2eb372c2b95650fcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120539
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66863}
2020-03-25 17:19:48 +00:00
Seth Brenith
252acd7ffc Revert "Move branch inversion on ==0 into platform-agnostic reducer"
This reverts commit 0c72c71900.

Reason for revert: Wasm code size increase because not all pipelines use CommonOperatorReducer

Original change's description:
> 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}

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

Bug: chromium:1061767
Change-Id: Id1fdfb38357eb514d92ed3be0a683f077202faa4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117789
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66862}
2020-03-25 16:47:48 +00:00
Michael Lippautz
0a64a52b34 cppgc: Add HeapObjectHeader
This adds HeapObjectHeader, a meta object that is put in front of
every managed object. HeapObjectHeader provides accessors for:
1. GCInfoIndex
2. In construction bit
3. size
4. Mark bit

Meta info is distributed among two uint16_t fields as (1.,2.) and
(3.,4.). This is convenient as the non-bit accessors (size,
GCInfoIndex) are constant during marking.

Object layout see heap-object-header.h.

Note: The current implementation does not bypass ASAN poisoning and
assumes an unpoisoned header whenever performing an access.

Bug: chromium:1056170
Change-Id: I753f15467ed5c2b22b47e64d3aa5a3c1baddf8e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116031
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66861}
2020-03-25 16:44:02 +00:00
Leszek Swirski
8d47a28bae [offthread] Release OffThreadParseInfoScope early
In off-thread compilation, the ParseInfo is released on the background
thread. We have to make sure to that the OffThreadParseInfoScope doesn't
try to reset its per-thread data in this case.

Bug: chromium:1011762
Change-Id: I6ddad6508cacc18f29e020e373783da64d3e4cb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115431
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66860}
2020-03-25 15:46:15 +00:00
Clemens Backes
d7d18f9e5e [liftoff][debug] Switch scope-info test over
This enables the --debug-in-liftoff flag in the wasm-scope-info test.
The expected output slightly differs, because we get another breakpoint
at the end of the function body, which was actually missing before.

R=thibaudm@chromium.org

Bug: v8:10351
Change-Id: Ic2628b26591763cea17403f74fe0f6d935633e6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120535
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66859}
2020-03-25 14:46:43 +00:00
Johannes Henkel
844fe8f7d9 Make StringBuffer::string return a StringView instead of a reference.
A StringView is pretty light, so this should be similar to
how absl::string_view is typically used, e.g. see the guidance here:
https://github.com/abseil/abseil-cpp/blob/master/absl/strings/string_view.h
I suspect this reasoning holds even though StringView (defined
just above StringBuffer in v8-inspector.h) carries an additional bool.
This yields a small simplification of the StringBuffer implementations.

Change-Id: I03f850049afe2327913070838f39649fcdfa6fa8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2045110
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66858}
2020-03-25 14:25:53 +00:00
Ng Zhi An
7a3c7b155a [wasm-simd] Add Wasm types to protocol
Bug: v8:10347
Bug: chromium:1043034
Change-Id: I804ea511e3ed7c866e0202c97a22dcac007243e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117325
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66857}
2020-03-25 13:35:48 +00:00
Richard Townsend
0b99ede976 [arm64][msvc] remove signbit ambiguity
MSVC 19.25 complains about signbit being ambiguous between
signbit(float) and signbit(double) overloads when called with an int8_t.
To remove the ambiguity, cast to a double.

Change-Id: I698f05eed9248eef493bbe46b75fcd07e37e2a05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2118510
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66856}
2020-03-25 13:34:43 +00:00
Thibaud Michaud
28d2cb1fa5 [liftoff][debug] Implement StepOut
R=clemensb@chromium.org

Bug: v8:10321
Change-Id: I318d46fa638c1d6f4d5d347e5aa0ad1faf02d5e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120532
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66855}
2020-03-25 11:38:03 +00:00
Georg Neis
33306c4ee7 [turbofan] Fix NumberMin and NumberMax typings
For some input types containing -0 but not +0, the result type of
NumberMin and NumberMax would unnecessarily include +0. However, for
some larger inputs, the result type would not include the spurious +0,
thus breaking monotonicity.

The CL fixes this and addresses a TODO as well.

Bug: chromium:1063661
Change-Id: Icd56d6102fbea12a2d96aa063a803b1052c714b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116199
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66854}
2020-03-25 11:19:13 +00:00
Dominik Inführ
12597a8ae9 [heap] Introduce LocalHandleScope for background threads
Add LocalHandleScope to allow for local handles in LocalHeaps
(background threads). This class is similar to HandleScope which still
needs to be used on the main thread. When performing a GC, the main
thread halts all background threads at a safepoint such that it can
safely iterate their roots.

Bug: v8:10315
Change-Id: Id8f5d54cc2535e004081ccdef15dc03a39b2d0f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111218
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66853}
2020-03-25 10:23:33 +00:00
Clemens Backes
04774ffaaa [liftoff][debug] Implement StepOver at return locations
A StepOver at a return (either explicit return instruction, or implicit
return at the end of the function) should stop again in the caller
frame.

R=thibaudm@chromium.org

Bug: v8:10321
Change-Id: I313e6b612ac52e73b33ef07c6da1ced2aa0db600
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110250
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66852}
2020-03-25 07:23:54 +00:00
v8-ci-autoroll-builder
8f68e39214 Update V8 DEPS.
Rolling v8/build: 26e9d48..de373bb

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/032c783..054d61d

Rolling v8/third_party/depot_tools: 2b2aec6..e3a49aa

Rolling v8/tools/clang: 105a846..a560ab4

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

Change-Id: I04a2522f65cecb00308bdc0a8f7ed780fe4f3961
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2119950
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@{#66851}
2020-03-25 04:04:40 +00:00
Clemens Backes
851a395fb5 [wasm] Fix OSR on wasm calls
This fixes issues with replacing the return address of deeper (non-top)
wasm frames, i.e. frames which are at a call position. The replaced
address should also point after the call in the new code, so we don't
execute the same call again.

This is achieved by using slightly different encodings for breakpoint
positions and other (wasm instruction) positions. Breakpoints set
{is_instruction} to {false} in the source position table entry, whereas
usual wasm instruction set it to {true}.
Also, during stack walking for OSR, we remember whether we want to OSR
to the position before the instruction (if it's the top frame), or after
the call instruction (if it's deeper in the stack). We then use the
{is_instruction} predicate to find the right location.

R=thibaudm@chromium.org

Bug: v8:10321
Change-Id: I73212a7532c6ecf4c82bde76fe4059c8203e422c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116206
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66850}
2020-03-24 17:44:25 +00:00
Michael Lippautz
19de495c3f api: Add myself to OWNERS
As discussed offline, adding myself to OWNERS for the C++ GC, handles,
and Blink embedding issues in general.

Bug: chromium:1056170
Change-Id: Iff6a9f119000c04b40fb12b70f56d9bab7e32b43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116204
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66849}
2020-03-24 17:33:19 +00:00
Ng Zhi An
30c3ea667e [wasm] Speed up some tests in grow-memory
Rework the testMemoryGrowReadWrite and testMemoryGrowZeroInitialSize
tests. Combine the different sized tests (32, 16, 8 bit integers) into a
single base tests, taking in function arguments to specify which
load/store function to call from the module exports.

Also reduced the number of checks made in each test. Previously the test
was asserting on every single valid offset. Now it checks the first 5
and the last 5 of each page of memory. From a quick local test using
`time`, it speeds up this test on x64 from ~40s to ~20s.

There is more work to be done: there are other tests below that also
assert on each offset, we can change those in a future patch.

The goal is to be able to run this on arm simulators
sufficiently quickly, and not require to mark this test as slow.

Bug: v8:7783
Change-Id: I2b17cf1811de6c26332d7e8f91efbbac3e89f6e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116601
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66848}
2020-03-24 17:00:00 +00:00
Michael Lippautz
4132d7255c cppgc: Add GCInfo machinery
GCInfo and its related infrastructure is used to record information
about types. Currently, we store finalization and vtable information.
Future changes will introduce naming and tracing, similar to Oilpan in
Blink.

Information is stored in a process-wide global table that is
maintained at runtime. For static builds such information can be
recorded in the binary without the runtime overhead which is future
work.

This ports `third_party/blink/renderer/platform/heap/gc_info.{h,cc}`
on a semantic level. In addition to adjusting to V8's needs, we also
re-commit the already filled parts of the info table as read-only when
possible, making it harder to override type information.

Bug: chromium:1056170
Change-Id: Ib01eb24e6f8a94a4a647efde7af37689f8c20ba2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111214
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66847}
2020-03-24 16:48:57 +00:00
Georg Neis
499dcead06 [turbofan] Remove a DCHECK
This DCHECK can fail because we currently pass arbitrary types
in the typer unittests. Changing the tests is complicated by the
fact that the compiler makes heavy use of type Any and we don't want
to lose test coverage for that. Hence for now I just remove the DCHECK.

I'm working on a follow-up CL but that one will not be able to land any
time soon due to the current restrictions.

Bug: v8:10338
Change-Id: Ibb3bb44e41b76cd91b190af184f6345cdf97d49d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116203
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66846}
2020-03-24 15:46:36 +00:00
Michael Lippautz
280bbb3081 heap: Add Oilpan folks to OWNERS
Bug: chromium:1056170
Change-Id: Id7859be3e28331a78dd548b445272cc645ce50d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116202
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66845}
2020-03-24 15:12:46 +00:00
Milad Farazmand
c785c4fc4f PPC/s390: [wasm-simd] [liftoff] Implement replace_lane on x64 and ia32
Port e5b4cb4567

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

Change-Id: I2198b423aa22b41b1b55f4ba733d2c2c5c3fe1ba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117781
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66844}
2020-03-24 14:21:06 +00:00
Zhao Jiazhong
bfdccd7edf [mips32] Change architecture judgement functions to constexpr.
Architecture judgement functions like ‘IsMipsArchVariant’, ‘IsFpxxMode’
used to be macro functions, which may cause ‘unreachable-code’ error if
they are used as condition expressions for ‘if’ statements.
This CL change them to constexpr functions to avoid it.

Change-Id: Id3d8473920711a05abc39265c88e91cc1cb7d5e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115833
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66843}
2020-03-24 10:31:56 +00:00
Clemens Backes
48c38718e8 [wasm] Stop correctness fuzzing if growing memory fails
We have similar logic in place when allocating wasm memory fails. For
growing, we also need to hard-abort the program, because it would cause
observable differences in program behaviour otherwise.

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

Bug: chromium:1063951
Change-Id: I98f3b5364100900fce0e6553a347155a39923ca6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116036
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66842}
2020-03-24 09:51:56 +00:00
Hannes Payer
13925319af [heap] Trigger scavenge jobs when new space is 80% full.
Bug: chromium:1056872
Change-Id: I68341f0320663796cd8487b66bb38d87c7ad8bd3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115435
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66841}
2020-03-24 09:48:16 +00:00
Zhao Jiazhong
15348f1a1c [mips][wasm-simd][liftoff] Implement replace_lane.
Port e5b4cb4567
https://crrev.com/c/2108299

Change-Id: Iac7e70aaa13cd46be4aaec1bf52388071ce17ae9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2115835
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66840}
2020-03-24 08:24:16 +00:00
Andreas Haas
612e8dbaf7 [wasm][liftoff] Implement table.copy
R=clemensb@chromium.org

Bug: v8:10281
Change-Id: Id6c004c60e3bf142c603d9e37f730348f89cd89d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111221
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66839}
2020-03-24 07:19:16 +00:00
v8-ci-autoroll-builder
e7a618d2cc Update V8 DEPS.
Rolling v8/build: bf3f9ee..26e9d48

Rolling v8/buildtools: 4164a30..7977eb1

Rolling v8/buildtools/linux64: git_revision:9499562d94bf142f43d03622492e67b217461f67..git_revision:5ed3c9cc67b090d5e311e4bd2aba072173e82db9

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/bf306f5..032c783

Rolling v8/third_party/depot_tools: befc299..2b2aec6

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

Change-Id: I1a1926717ab4fa2f358220270ff8623695baed67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117391
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@{#66838}
2020-03-24 03:47:06 +00:00
Kong, Fanchen
e5b4cb4567 [wasm-simd] [liftoff] Implement replace_lane on x64 and ia32
Bug: v8:9909
Change-Id: Ia830b2fc00751abfb4dadb61651a252f1da48a1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108299
Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66837}
2020-03-24 02:49:36 +00:00
Camillo Bruni
855b4945d3 [mjsunit] Use smaller test array
This might help reduce flaky test results caused by too high memory
consumption due to the large Float32Array in regress-crbug-1057653.js.

Bug: v8:10333
Change-Id: Id99ebb67ebe5a7a730e44cd8967ebbea905ccdc5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108547
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66836}
2020-03-23 23:06:06 +00:00
Igor Sheludko
4789958d97 [tools] Make paths in v8-heap-stats relative
... to make it work from any location.

Bug: v8:10155
Change-Id: I4b949ed6fde0b38a92c1c1ab57eba0cf0f007b6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2116034
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66835}
2020-03-23 23:00:06 +00:00
Michael Lippautz
9d75253764 cppgc: Hello world
"By my deeds I honor him. V8."

- Add basic build files for library and unittests.
- Integrate unittests also in existing V8 unittests for simplicity.

The CL also adds FinalizerTrait and unittests to allow building a
testing target that executes code.

FinalizerTrait is used to determine how managed C++ types are
finalized. The trait should not be overridable by users but needs to
be exposed on API-level to avoid including library-internal headers.

Bug: chromium:1056170
Change-Id: I64d91053410a17a7835e50547f58990625d2da28
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2108549
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66834}
2020-03-23 21:42:56 +00:00