Commit Graph

62490 Commits

Author SHA1 Message Date
Arnaud Robin
5df2f65de7 [wasm] Implement tracing of function calls
Added --trace-wasm flag which prints function entry in wasm.

R=clemensb@chromium.org

Bug: v8:10559
Change-Id: I049efeadb0149f4f58ce34a29fd53fbf5688bd4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215052
Commit-Queue: Arnaud Robin <arobin@google.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67998}
2020-05-27 08:24:38 +00:00
Benedikt Meurer
03ba73e4a2 [inspector] Report length and endColumn correctly for Wasm.
Previously both the length and the endColumn for Wasm scripts were
reported as 0, and that was sort of okayish, since the front-end
was ignoring both of these fields in case of Wasm, and was applying
special cases. But these special casing lead to some subtle bugs,
and this is the first step towards a more uniform treatment.

Source positions for Wasm are in terms of the bytecode, and the
column field contains the bytecode offset here, while the line
number field is always 0. Hence we send 0 for both startLine and
endLine as before, but endColumn now corresponds to the bytecode
size.

Bug: chromium:1056632
Change-Id: Ia8a9cfe454ed250b87a524f5cbcbbbe242205db6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215817
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67997}
2020-05-27 08:05:08 +00:00
Manos Koukoutos
1646c9be8c [wasm-gc] Add mutability and packed types to arrays/structs
Bug: v8:7748
Change-Id: I4ae500548e7ab09f5bd037563af5c057751197bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215049
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67996}
2020-05-27 07:46:02 +00:00
Iain Ireland
5058c397e3 [regexp] Add syntax_only option to ParseRegExp
To ensure that regexp syntax errors are reported as early errors, SpiderMonkey calls ParseRegExp at parse time to validate that the regexp parses properly. This does not require the allocation of named capture information. We have a project underway to completely eliminate the allocation of GC things at parse time, which will require us to suppress the allocation of named capture information (or else jump through hoops to implement FixedArray as a non-GC thing).

We can work around this in our shim layer -- for example, by setting a flag on the Factory shim that causes us to allocate dummy objects -- but it's much simpler to add an option to ParseRegExp.

(Note: V8 currently does not treat regexp syntax errors as early errors. See https://bugs.chromium.org/p/v8/issues/detail?id=896.)

Bug: v8:10406
Change-Id: Ib5f0613a54509146e00f90cf61bda4bf03b03859
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207813
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67995}
2020-05-27 06:45:08 +00:00
Manos Koukoutos
782fa8d80f [wasm-gc] Add packed types to ValueType
Motivation:
In the wasm-gc proposal, structs and arrays are allowed to store
elements of packed types i8 and i16.

Changes:
- Add i8 and i16 to ValueType.
- Fix all case switches to handle the new cases.
- Add a couple helper methods to ValueType and improve the
  implementation/usage of a couple more.

Bug: v8:7748
Change-Id: I527cfe5acf5d877fc38e4212174ba9f9de5c40ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215046
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67994}
2020-05-27 05:19:58 +00:00
Ng Zhi An
dfbbb4a531 [wasm-simd] Add bitmask to SIMD MVP
This removes the post-mvp flag for bitmask, since it was accepted into
the proposal, see https://github.com/WebAssembly/simd/pull/201.

Bug: v8:10308
Change-Id: I4ced43a6484660125d773bc9de46bdea9f72b13b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216532
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67993}
2020-05-26 22:24:10 +00:00
Milad Farazmand
dd04f25b5b PPC: [wasm-simd] Moving simd opcodes to the assembler header
Change-Id: Ife10d7c8634cbd6b542dc522a49124f790f51921
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216434
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67992}
2020-05-26 21:36:09 +00:00
Seth Brenith
966692e595 [torque] Warn if bitfields are checked with && rather than &
We can do a good job of optimizing Torque expressions that load and
check multiple bitfields from a bitfield struct, but only if those
expressions are written using the binary `&` operator as opposed to the
logical `&&`. This change adds a lint rule to detect some simple cases
where we should clearly prefer `&` to `&&`.

Bug: v8:7793
Change-Id: Id996a7971cff8f7f83198075a172170d9c7d42e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207666
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67991}
2020-05-26 21:23:59 +00:00
Ng Zhi An
a7d281226a [clang-tidy] Make deleted constructor public
Making them private was a way to hide the constructor, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: Iddc00b86e5481b90c20d9c68f1261f853ac8d5dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210778
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67990}
2020-05-26 19:23:14 +00:00
Ng Zhi An
41f4fc6851 [clang-tidy] Add override to overridden functions
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: I904fa4fada2860938a32be9f0a84af091adc76ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211193
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67989}
2020-05-26 18:59:34 +00:00
Ng Zhi An
43d387d83b [clang-tidy] Make deleted constructor public
Making them private was a way to hide the constructor, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I9268f42b9367cc1af4d58e71e2033c254ed4cbf7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210777
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67988}
2020-05-26 18:56:04 +00:00
Ng Zhi An
6327599028 [clang-tidy] Add override to overridden destructors
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: I872782060c22812c93eadf4f77ba75c058283b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210779
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67987}
2020-05-26 18:43:14 +00:00
Ng Zhi An
e505ce959c [wasm-simd][liftoff][ia32][x64] Implement load splat
Bug: v8:9909
Change-Id: Ic3a13131e07487512161eec1bec0cdc33a0a3f63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207664
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67986}
2020-05-26 18:28:34 +00:00
Ng Zhi An
56fc97306b [clang-tidy] Add override to overridden destructors
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: I78fdfb904ea94d9ae034b41cd43be8689a0096ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211188
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67985}
2020-05-26 18:27:14 +00:00
Daniel Clifford
fbb8dc4211 Fix assert caused by SloppyArgumentsElements introduction
There was a legacy place in map code that wasn't fully ported to use
the strong, new SloppyArgumentsElements type because of code that used
hard-coded constants.

Bug: chromium:1086470
Change-Id: Ieba152e4bd92c89125f831949c2efb4f4219f95c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215059
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67984}
2020-05-26 18:01:44 +00:00
Ng Zhi An
7cd83ecb0d [clang-tidy] Add override to overridden destructors
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: Ia2bf5c1ec84dd4473d0e013ec3d22548b38a0578
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211190
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67983}
2020-05-26 17:53:49 +00:00
Ng Zhi An
c897ac3667 [clang-tidy] Make deleted member functions public
Making them private was a way to hide them, we can explicitly delete
them, which give a better compilation error message as well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: Ieffa05951aeefc0225f8fb84e756eb67353e57a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211184
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67982}
2020-05-26 17:39:19 +00:00
Seth Brenith
02acf4a005 [turbofan][x64][ptr-compr] Use root register for kHeapConstant equality
VisitWord32EqualImpl was checking for inputs of type
kCompressedHeapConstant, but it can also sometimes have inputs of type
kHeapConstant. In either case, we can check for whether to do a load
from the roots array. This improves Octane score by about 3% (or about
1.5% if --no-opt is specified).

Bug: v8:8948
Change-Id: Iab6c0b1dacd96c74e4cfb54c772aa92e5baf00ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2213081
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67981}
2020-05-26 17:22:08 +00:00
Ng Zhi An
2bf94b8699 [clang-tidy] Make deleted member functions public
Making them private was a way to hide them, we can explicitly delete
them, which give a better compilation error message as well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I3f2b6881ae2252809c84fbd32ce0687e8328506e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211182
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67980}
2020-05-26 17:08:28 +00:00
Ng Zhi An
dafba0d357 [clang-tidy] Use nullptr keyword
Recommended by clang-tidy's modernize-use-nullptr.

Bug: v8:10488
Change-Id: I7cf26f7bda69b9b1a6bdabe274399b494f6d49ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211155
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67979}
2020-05-26 17:01:58 +00:00
Ng Zhi An
f84b75d0be [clang-tidy] Add override to overridden destructors
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: I66efe295b8a3372bc2e99516447f70d258520090
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211185
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67978}
2020-05-26 16:56:18 +00:00
Anton Bikineev
09f082f233 Reland "cppgc: Port concurrent sweeper"
This reverts commit a35d0e8cb5.

The original CL is likely not a culprit for the infra failures.

Bug: chromium:1056170
Change-Id: I8fa85db8a737fb01328021782f0c43626fa52b0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215826
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67977}
2020-05-26 15:40:53 +00:00
Tobias Tebbi
d0a1c5b35c [torque] use :: to refer to global namespace
Bug: v8:7793
Change-Id: I5eac73a2b437e5e2d4005f79b7807ae7a9ed78e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2214829
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67976}
2020-05-26 15:37:57 +00:00
Milad Farazmand
a02038b3d5 PPC: [wasm-simd] Implement simd binary operations
Change-Id: I5a93231b16c8291c87fce57062837dce886bc2f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216231
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67975}
2020-05-26 15:36:52 +00:00
Santiago Aboy Solanes
be91c6c508 [compiler][cleanup] Move Make(String|Name) helper methods to cctest.h
Several tests were using them and we can dedup code.

Change-Id: I4ef5ae5772856d1f36e965b6b62ff5895b4e04fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215173
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67974}
2020-05-26 15:26:28 +00:00
Maya Lekova
a79a918516 [test] Skip typedarray-copywithin on predictable
Bug: v8:9975
Change-Id: I51cbc83adecfa52959c991ed3c6f26cf4929c297
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215175
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67973}
2020-05-26 15:23:38 +00:00
Seth Brenith
16cb2d9412 Revert "[torque][cleanup] Use more precise field types in a few classes"
This reverts commit 4e5fabaedd.

Reason for revert: performance regressions chromium:1085305, chromium:1084978

Original change's description:
> [torque][cleanup] Use more precise field types in a few classes
> 
> This change updates some Torque-defined classes to include more precise
> field types where possible. It also updates those classes to use
> @generateCppClass. One field was removed because it's unused
> (PrototypeInfo::validity_cell), and two fields in StackFrameInfo
> actually became less precise because they're based on Script::name,
> which is an embedder-provided untyped Local<Value>. (Automatically
> generated accessors pointed out this bug easily.)
> 
> This change also includes a couple of minor fixes in Torque.
> 
> Change-Id: Ib2bc6c7165bb3612b6d344c0686a94165a568277
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2199640
> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67907}

TBR=ulan@chromium.org,tebbi@chromium.org,verwaest@chromium.org,seth.brenith@microsoft.com

Change-Id: I720821d8dc84ea0d79eb137f1c2507f75df9a107
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211322
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67972}
2020-05-26 15:14:10 +00:00
Victor Gomes
5337e2a92f [compiler] Add StackOrder to CallInterfaceDescriptor
This CL is a step towards reversing JS stack arguments for TurboFan.

It does the following:
1. Add StackOrder to CallInterfaceDescriptor
2. Reverse arguments in TF backend for JS calls.
3. Cleanup TFJ builtins interface descriptors, since calls for these builtins already reverse the arguments, we don't need to reverse the interface descriptor anymore.

Change-Id: Ie840b1757bf023aa381a7fa01cbe66e7cf90778f
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2213440
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67971}
2020-05-26 14:43:28 +00:00
Maya Lekova
a35d0e8cb5 Revert "cppgc: Port concurrent sweeper"
This reverts commit 9a0e6bd5c0.

Reason for revert: Speculative revert for https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20builder/47777

Original change's description:
> cppgc: Port concurrent sweeper
> 
> This moves concurrent and incremental sweeping from Blink. This also
> adds TestPlatform that makes it easier to test concurrent and
> incremental sweeping.
> 
> Drive-by: fix unmarking of large pages.
> 
> Bug: chromium:1056170
> Change-Id: Ifd50ff67b9df17ff117a5f4d4eb5a2937d3023be
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207132
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67969}

TBR=ulan@chromium.org,mlippautz@chromium.org,bikineev@chromium.org,omerkatz@chromium.org

Change-Id: I5530f11f7b8560116324bb156ba98e426c0feb35
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215057
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67970}
2020-05-26 14:27:40 +00:00
Anton Bikineev
9a0e6bd5c0 cppgc: Port concurrent sweeper
This moves concurrent and incremental sweeping from Blink. This also
adds TestPlatform that makes it easier to test concurrent and
incremental sweeping.

Drive-by: fix unmarking of large pages.

Bug: chromium:1056170
Change-Id: Ifd50ff67b9df17ff117a5f4d4eb5a2937d3023be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207132
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67969}
2020-05-26 14:14:38 +00:00
Dominik Inführ
008c5a6a79 [heap] Support concurrent sweepers from main thread
With --stress-incremental-marking we want to start concurrent marking
faster by also sweeping pages on incremental marking steps.

Bug: v8:10315
Change-Id: Ie3fa04acc5e59a4b81c3351f4b522c78368bb1a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210247
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67968}
2020-05-26 14:11:48 +00:00
Dominik Inführ
cf19f5f4e1 [heap] Allocate black on background threads during marking
Objects allocated on the background thread during incremental marking, need to be allocated black. This prevents concurrent marking to observe uninitialized objects.

Bug: v8:10315
Change-Id: Ia4b05a2a72e4142c79b31a01cbf162a6599a18c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2196347
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67967}
2020-05-26 13:09:48 +00:00
Clemens Backes
a7a201b260 [wasm][debug][cleanup] Remove redundant Isolate parameter
The Isolate is only used to access the wasm engine, and the accounting
allocating. The latter is also linked directly from the wasm engine, and
the engine is linked from the native module, to which the DebugInfoImpl
already has access.
Hence, this CL removes the redundant Isolate pointers, and just accesses
the engine and the allocator via the NativeModule.

R=thibaudm@chromium.org

Change-Id: Ib51cee2d166443a34e22fa02e8ad1549328aaa7f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2214827
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67966}
2020-05-26 12:55:40 +00:00
Clemens Backes
cfeb66d2db [wasm][debug] Fix deadlock in recompilation
Triggering recompilation can reduce the number of outstanding
recompilation functions. If it gets reduced to zero, we also need to
trigger other callbacks waiting for recompilation to finish.
This situation can happen if all recompiled code was already
installed in the native module, but the compilation state was not
updated yet via {OnFinishedUnits}.

R=thibaudm@chromium.org

Bug: v8:10557, chromium:1084369, v8:10359
Change-Id: Ib80ff110776cf284632303b0b23e4c6e63426411
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2214828
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67965}
2020-05-26 08:48:26 +00:00
Clemens Backes
5c05acf729 [wasm][debug] Remove interpreter frame inspection
The interpreter is still used for testing, but frame inspection is not
wired any more. Hence this CL removes it.

R=thibaudm@chromium.org

Bug: v8:10389
Change-Id: If93928dd3996a19c1251a93d843034574d4c43ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215165
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67964}
2020-05-26 06:38:35 +00:00
Jakob Gruber
458c07a755 [compiler] Clarify ConstructParameters::arity()
... and CallParameters::arity().

The construct arity contains the actual argument count, plus 2 for the
target  (the first input) and new target (the last input). This CL adds
a named constant and a helper method for accessing arity without extra
args. In the future we may want to remove the extra args from arity()
altogether.

Call arity is similar but includes the target and receiver.

Bug: v8:10542,v8:8888
Change-Id: I850fa314f88c2bee9d4dcd87eac9295b2bf88281
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208850
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67963}
2020-05-26 06:18:35 +00:00
Jakob Gruber
d91e8d8fca [compiler] Hook in unary op builtins with feedback in generic lowering
If --turbo-nci is enabled, use unary op builtins with feedback
collection during generic lowering.

Bug: v8:8888
Change-Id: Ie32cfe1558a7fbada2ac69a99ef969097558bc89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209067
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67962}
2020-05-26 04:50:55 +00:00
Kim-Anh Tran
c8e3cbbe13 [wasm][debugging] Add wasm instance to module scope
This adds the wasm instance to the module scope. The instance
contains the exported entities that can now be inspected.

Bug: chromium:1043034
Change-Id: I9236ac9c126f3bc4b1e056990fe34956bbe8ed6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2213433
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67961}
2020-05-26 04:03:15 +00:00
Manos Koukoutos
4c256166a8 [wasm-gc] Check if ref. indices in struct/array defs are legal
After all struct/array definitions are parsed, we need to check if all
reference type indices are legal. We need to do it at the end because
types can be mutually recursive.

Bug: v8:7748
Change-Id: I5e6b5185e7d0c5e8d905b6833a2b9026ab630c01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2214821
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67960}
2020-05-26 03:21:45 +00:00
Shu-yu Guo
2685658cc0 [class] Fix parenthesized calls of optional chains containing private fields
Bug: v8:10552
Change-Id: I1160ff0f9d2c91bb3c2ad3e0d5e1f36953538420
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2211402
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67959}
2020-05-25 19:04:54 +00:00
Clemens Backes
843a1f45a1 [wasm][interpreter] Remove breakpoint support
The interpreter is not used for debugging any more. Hence any breakpoint
support and related functionality is dead code.

This CL removes
- the {SetBreakpoint} and {GetBreakpoint} methods,
- the {break_pc_} field which holds the current pause position,
- the {break_flags_} field which is used to break at function entry and
  after calls,
- functions to modify {break_flags_},
- the dead {kInternalBreakpoint} and {kInvalidPc} constants (plus
  respective macros and enums),
- the {orig_start} and {orig_end} fields (code is not being modified any
  more, so we just use {start} and {end} now),
- the {PrepareStepIn} method,
- the unimplemented {SetTracing} method, and
- two tests that test breakpoints in the interpreter.

R=thibaudm@chromium.org

Bug: v8:10389
Change-Id: I52103c37516446e40d3dfa365d6b480a7c623577
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215163
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67958}
2020-05-25 16:27:05 +00:00
Clemens Backes
447d7d6784 [wasm][debug] Avoid repeated recompilation
If multiple isolates share the same module, and the debugger gets
enabled, then we trigger tier down in each isolate separately. To avoid
generating too much code, we only recompile functions that are not
already in the right tier.

This CL is only the first step towards an actual fix. Since we only
check already installed code (and ignore compilations that are already
scheduled), we might still compile the same functions multiple times. A
second CL will make sure that only one recompilation is running at the
same time.

R=thibaudm@chromium.org

Bug: chromium:1084369, v8:10359
Change-Id: Ic4f9afac1add0fe8ad9e5d68f22d3d41ba2e52be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2213438
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67957}
2020-05-25 13:42:32 +00:00
Jakob Gruber
a0e7456d38 [nci] Add Unary/Binary/Compare builtins with feedback
This CL adds the new _WithFeedback variant of unary, binary, and
compare operation builtins. Existing logic to do these operations is
refactored s.t. it can be used by both ignition bytecode handlers and
the new builtins.

Note that the new builtins are not yet used. Follow-up CLs will hook
them into generic lowering.

Bug: v8:8888
Change-Id: Id77dbe74bdf3b3806b2aefdf1abe52c3d165a3a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208862
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67956}
2020-05-25 13:31:12 +00:00
Andreas Haas
d4bb820827 [wasm] Introduce the SyncStreamingDecoder
This CL introduces the SyncStreamingDecoder to support
streaming compilation when --single-threaded is set. The
SyncStreamingDecoder buffers all bytes it receives over
{OnBytesReceived}, and compiles them synchronously upon {Finish}.

In addition to introducing SyncStreamingDecoder, this CL does
the following changes:
* Redirect streaming compilation to the new streaming decoder if
  --no-wasm-async-compilation is set. This flag is set if
  --single-threaded is set.
* Extend the test-streaming-compilation.cc tests to test also the new
  streaming decoder.

R=thibaudm@chromium.org

Bug: v8:10548
Change-Id: I807e291a6060067c9835de4adf82bcb00321d995
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209053
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67955}
2020-05-25 11:02:42 +00:00
Daniel Clifford
e7e77bb279 Port SloppyArgumentsElements to Torque
Change-Id: I092c0d70bf517b4c714f5958b188d54030dd9774
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1932838
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67954}
2020-05-25 10:50:03 +00:00
Ross McIlroy
f34771f79a [TurboProp] Don't try to rewire unreachable blocks to end.
We can't consistently rewire the successor blocks of an unreachable node to
disconnect them from the graph when we are trying to maintain the schedule.
Instead simply leave the code there. As a future optimization we could add a
proper scheduled dead code elimination phase which can deal with this.

As a side-effect, one of the tests sees a int64 DeadValue, so add support for that
in the instruction selector.

BUG=chromium:1083272,chromium:1083763,chromium:1084953,v8:9684

Change-Id: I69a6feaeef4eae62110392e27ea848b28bccf787
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209061
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67953}
2020-05-25 10:42:52 +00:00
Manos Koukoutos
be6c7f4aa3 [wasm][bug] Check that type indexes are within limits in read_value_type
Failing to do so results in an error when generating the respective
ValueType, since the index has to be encoded in 24 bits.

Bug: v8:7748, chromium:1080444
Change-Id: Ifd1ce9744388b65f91dbd9eaeb497726c6cd207e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2214823
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67952}
2020-05-25 10:30:02 +00:00
Junha Park
c3112fc2ff Added API to verify version match on snapshot blob
This patch added an IsValid method to StartupData which returns a
boolean upon verifying a given snapshot matches the v8 version.
Embedders can use this API now to check snapshots' versions.

This was originally done by Snapshot::CheckVersion, which now simply
runs Startup::IsValid.

Bug: v8:8104
Change-Id: If555bcc55de4a05adf61798cd58d9ea8c8a71302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2178091
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Junha Park <jpark3@scu.edu>
Cr-Commit-Position: refs/heads/master@{#67951}
2020-05-25 08:52:48 +00:00
Camillo Bruni
dcc92be7ad [tools] Improve heap-stats
- Add button to select top-10 instance types per category
- Right align category selection buttons
- Lazily draw the graph for snappier UI
- Pre-init instance variables in details-selection

Change-Id: I61ea80d523c49215b9d418e66698a12cbc050316
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210681
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67950}
2020-05-25 08:40:51 +00:00
Andreas Haas
f6ec77c29e [wasm] Update wasm spec tests
This CL also fixes a small bug in the update-wasm-spec-tests.sh script,
as it was not able to handle proposals without additional core spec
tests. It also disables a lot of tests.

R=jkummerow@chromium.org
bug:v8:10556

Change-Id: Ibd885350478de935dc67edb664715cfa64f1d8e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210248
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67949}
2020-05-25 07:59:57 +00:00