Commit Graph

66280 Commits

Author SHA1 Message Date
Dominik Inführ
666418d54b [test] Disable test with stress_concurrent_allocation
Test creates out-of-memory condition. Running that test in the
stress_concurrent_allocation variant might lead to "ineffective GCs"
failure before going OOM. Simply do not run this test for that variant.


Bug: v8:11272
Change-Id: I114686ec345f7a38f871347b62983d7591dc6ba3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2594769
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71788}
2020-12-16 13:49:14 +00:00
Zhi An Ng
76f9ee6137 [wasm-simd][ia32] Fix DCHECK in f64x2.extract_lane
f64x2.extract_lane can only extract lane 0 or 1. Fix the DCHECK to check
for the appropriate lane values.

Change-Id: I62d5e34ce01e0fa66609fb1fed7979bf2782bb74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589057
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71787}
2020-12-16 13:27:34 +00:00
Andreas Haas
8656a594ab [wasm][liftoff] Fix stack check safepoints for arm, arm64, and ia32
Registers are spilled differently on arm and intel platforms.
Additionally, on arm64 registers are spilled with padding. Therefore
the code for safepoint information for spilled registers is platform-
dependent now.

Additionally the alignment of the frame size is done before the
out-of-line code now, so that the safepoint indices can be calculated
correctly for spilled registers in out-of-line code.

Finally, some code was unimplemented on ia32 and arm, which I added
now.

R=thibaudm@chromium.org

Bug: v8:7581, v8:10929
Change-Id: Ia9b824dfc74cafa9ec3cc0d308fb18b485afd715
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584952
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71786}
2020-12-16 13:21:29 +00:00
Thibaud Michaud
6b3994e850 [macro-assembler] Avoid using the isolate in CallRecordWriteStub
CallRecordWriteStub is used in a background compile thread for
JS-to-Wasm wrapper compilation, so it should avoid accessing the
isolate.
Call the builtin using CallBuiltin which does not require a Handle<Code>
object and instead gets the call target directly from the embedded data.

R=clemensb@chromium.org

Bug: chromium:1146813
Change-Id: I4ee59084e4184f2e9039208e4e6db43482cefde6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593333
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71785}
2020-12-16 13:20:24 +00:00
Clemens Backes
43d61196b0 [wasm] Remove unused parameter from Drop
Neither Liftoff nor the WasmGraphBuildingInterface use the parameter,
hence drop it.

R=jkummerow@chromium.org

Change-Id: Ia7f2b81dfc95f31c27e12d4ada07c5603a34abff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593335
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71784}
2020-12-16 13:17:44 +00:00
Almothana Athamneh
56354ab357 Add official builder for mac-arm64 release and debug
Bug: v8:11264
Change-Id: I9e1302a499ba6b32e9d93d81e922c9f318c2ba07
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593252
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71783}
2020-12-16 13:02:24 +00:00
Clemens Backes
8619422e2c [wasm][test] Remove an unneeded pointer
We were storing the pointer to the WasmModule both as a shared_ptr and
as a raw pointer. Maybe this had historical reasons, but now it's just
redundant.

R=thibaudm@chromium.org

Change-Id: Id72d102b6df804f93e3ab0235eeceef91a6dd8fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593334
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71782}
2020-12-16 12:43:04 +00:00
Clemens Backes
1f7e126fdd [wasm] Move members from WasmRunner to WasmRunnerBase
This moves some fields and methods from the WasmRunner template to the
WasmRunnerBase base class. This avoids repeated compilation for the
different instantiations of the WasmRunner template.

Additional changes:
- SetUpTrapCallback, SetThreadInWasmFlag, and ClearThreadInWasmFlag are
  static now.
- CheckUsedExecutionTier is unused, and did not even compile any more.
  In the template class this was OK, because it's only compiled on first
  use.

R=thibaudm@chromium.org

Change-Id: I485729cf4a1fd93fe6abb0be269694f0179fc4ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593331
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71781}
2020-12-16 10:44:39 +00:00
Jakob Kummerow
67f0733e32 [cleanup] Add .cache to .gitignore
Recent versions of clangd put lots of stuff into .cache,
cluttering `git status` output.

No-Try: true
Change-Id: I0b5d78a8b2813bd11ad1f0d32bc8ea314103fe19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593255
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71780}
2020-12-16 10:37:28 +00:00
Michael Achenbach
84f9ef3c07 Whitespace change to trigger builders
Change-Id: Ib4d7e86ab38669443f52c02e6e7c16ab28496238
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593343
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71779}
2020-12-16 10:08:26 +00:00
Michael Achenbach
24f1e251ca Whitespace change to trigger builders
Change-Id: I97405198ab40fe15dc6989707ca3a774edd3e838
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593342
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71778}
2020-12-16 09:42:23 +00:00
Dominik Inführ
893f32fe9e Reland^3 [heap] Add epoch to GC tracing events
This is a reland of b614cd78c3

Original change's description:
> Reland "Reland "[heap] Add epoch to GC tracing events""
>
> This is a reland of 3238162da7
>
> No changes since the last reland.
>
> Original change's description:
> > Reland "[heap] Add epoch to GC tracing events"
> >
> > This is a reland of be52501d52
> >
> > Fix data race by not emitting the epoch for sweeper background jobs
> > at them moment.
> >
> > Original change's description:
> > > [heap] Add epoch to GC tracing events
> > >
> > > This CL adds the TRACE_GC_EPOCH macro, which adds the epoch as attribute
> > > to the trace event. Use TRACE_GC_EPOCH for top-level events, nested
> > > events can get the information from its parent.
> > >
> > > V8's GC needs an epoch for young and full collections, since scavenges
> > > also occur during incremental marking. The epoch is also process-wide,
> > > so different isolates do not reuse the same id.
> > >
> > > Change-Id: I8889bccce51e008374b4796445a50062bd87a45d
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2565247
> > > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#71521}
> >
> > Change-Id: Ib8f4bfdc01c459955eb6db63bb6e24a8aa068f09
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2567702
> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#71567}
>
> TBR=ulan@chromium.org,dinfuehr@chromium.org
>
> Change-Id: I09dcfabbad4ef1ad50e02a227282982cd7d87997
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2571122
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71609}

Change-Id: I89dfa5c7658197348a39be51b75dba77bfd4a70b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2577470
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71777}
2020-12-16 06:46:46 +00:00
Daniel Clark
8ae4dc4088 [modules][api] Implement HostGetSupportedImportAssertions
Implement the HostGetSupportedImportAssertions, whose purpose
is to filter the list of import assertions exposed to the embedder to
only those assertion with keys that the embedder recognizes. See
https://tc39.es/proposal-import-assertions/#sec-hostgetsupportedimportassertions.

This change doesn't actually implement it as a callback, but instead
passes the supported assertions during creation of the Isolate via
CreateParams. This expresses clearly the requirement that the supported
assertions must never change for the lifetime of the Isolate.

Note that we still need to maintain all assertions in a map
while parsing the import assertions clause, because duplicate keys for
an unsupported assertion still needs to be detected as a parse error. So,
the filtering is done later during
SourceTextModuleDescriptor::AstModuleRequest::Serialize.

The actual filtering algorithm simply iterates the assertions and the
supported assertion keys in a nested loop. There's currently only one
assertion in use ("type"), so there should be no reason to get too
clever here unless at least several more assertions are generally
supported.

Bug: v8:10958
Change-Id: I9a2d965e9d452718d0ddfe9dca55b7b4ed963019
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2572173
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71776}
2020-12-16 03:48:45 +00:00
Zhi An Ng
5f4b0e47a9 [wasm-simd][x64] Fix definition of Shufps
The definition of Shufps is wrong, we are incorrectly passing 0 as the
immediate in all cases. No tests broke because we only used Shufps for
splats, which has imm8 == 0 anyway.

Also, it was using movss, which only moves a single 32-bit. Because we
were using it only for f32x4 splat, this ended up being enough (imm8 ==
0 meant that we only shuffled the low 32-bit). This is fixed to use
movaps, which moves the entire 128-bit register.

Also tweak the definition of Shufps to take 4 arguments. `vshufps dst,
src1, src2, imm8` shuffles src1 and src2 into dst. `shufps dst, src,
imm8`, shuffles dst and src into dst.

So `Shufps(dst, src, imm8)` is ambiguous in the AVX case, it could be:
1. vshufps(dst, src, src, imm8), or
2. vshufps(dst, dst, src, imm8)

2. is more likely to be the intended behavior, but it introduces a false
dependency on the value of dst.

With `Shufps(dst, src1, src2, imm8)`, it is clearer what the behavior
should be:
1. shufps(dst, src2, imm8) matches the AVX behavior IFF dst == src1.

Change-Id: I60dc4ec868023d28d00f2b09d2c53b82a729bc4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2591849
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71775}
2020-12-16 01:43:55 +00:00
Milad Fa
28740a36dc PPC/s390: [wasm-gc] Liftoff support part 2
Port 5e18ab5019

Original Commit Message:

    This adds support for the following instructions:
    br_on_null, ref.as_non_null, br_on_cast, i31.new

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

Change-Id: Ia234f2749e401feeaf68e6b7f0b1ba2403eaa77d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593648
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71774}
2020-12-15 22:08:05 +00:00
Jakob Kummerow
5e18ab5019 [wasm-gc] Liftoff support part 2
This adds support for the following instructions:
br_on_null, ref.as_non_null, br_on_cast, i31.new

Bug: v8:7748
Change-Id: I210b8979327ea0031f89748b71b51abbac10bb8b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2590041
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71773}
2020-12-15 20:38:24 +00:00
Ross McIlroy
4faf8b52bf [TurboFan][TurboProp] Optimize bytecode iterator.
Optimize BytecodeArrayRandomIterator to reserve roughly the right
size index array based on bytecode array length. Also save the
bytecode length in BytecodeArrayAccessor to avoid a more expensive
heap read accessor on BytecodeArray.

BUG=v8:9684

Change-Id: I7f85439877dbfc5ccf5aacc9d4006bd285f1c891
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593330
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71772}
2020-12-15 18:11:34 +00:00
Mike Stanton
13921eb704 [turbofan] Update Node type in JSTypedLowering::ReduceJSToNumeric
ReduceJSToNumeric() can fail to update the node type after changing
it's operator to JSToNumeric.

BUG=chromium:1158049

Change-Id: Iaabb3676f8ad9563903b81de2e7eecdcc92cbc0b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593336
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71771}
2020-12-15 17:25:34 +00:00
Pierre Langlois
b68466f4c9 [perf-prof] Re-enable line information for JS jitted code.
This fixes a typo that meant we stopped generating debugging information
in the JIT dump for perf to consume.

Change-Id: I75c8905617ac6e03fb522639f36a8137f3f124e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593253
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#71770}
2020-12-15 17:20:14 +00:00
Dominik Inführ
f03196baa6 [test] Test for maximum capacity before growing
NewSpace::Grow shouldn't be invoked when the maximum semi space size
was already reached.

Bug: v8:11199
Change-Id: I78ba71b7a043f0a515be188f2023e301d6bc6eed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584864
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71769}
2020-12-15 16:37:34 +00:00
Dominik Inführ
f6ae3c477b [heap] Ensure GetMaxConcurrency() > 0 when there is still work left
GetMaxConcurrency() needs to return a value greater than 0 when there
is work left. When the return value is 0, no more items are processed.

With Minor MC it could happen that GetMaxConcurrency() returned 0 when
there were no old-to-new-slots even though there were still items left
to process. This CL fixes this and adds a DCHECK to ensure this doesn't
happen again.

Change-Id: Ia971c232564bcb0b0d305e76371a3a8e82f46229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593247
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71768}
2020-12-15 15:53:24 +00:00
Ross McIlroy
6544a1e40b [TurboFan] Avoid serializing BytecodeAnalysis
The SerializerForBackgroundCompilation needs bytecode analysis for loop
target analysis, but doesn't require the much more expensive liveness
analysis. In order to move more work off the main thread, perform fast
bytecode analysis without liveness analysis in
SerializerForBackgroundCompilation, and then move the full bytecode
analysis to the background thread in BytecodeGraphBuilder.

BUG=v8:7790,v8:9684

Change-Id: I63ef80ecab8ad0c56953c72be31abc8f5a74b9c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593329
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71767}
2020-12-15 15:51:05 +00:00
Thibaud Michaud
8eb97f5a4b [wasm][eh] Add delegate instruction to the EH prototype
Drive-by: remove reference to BrOnExnNull in wasm-module-builder.js.

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

Bug: v8:8091
Change-Id: I42821b21c32fe8bf3410e75cf81bbff9678d3fa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575059
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71766}
2020-12-15 14:34:44 +00:00
bcoe
dfcdf7837e [coverage] fix greedy nullish coalescing
The SourceRangeScope helper was consuming too many characters, instead
explicitly create SourceRange, based on scanner position.

Bug: v8:11231
Change-Id: I852d211227abacf867e8f1ab3e3ab06dbdba2a9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2576006
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71765}
2020-12-15 14:28:44 +00:00
Frank Tang
434d5125de Remove temp hack which remove true
The fix is already in ICU-20310

Bug: v8:8565
Change-Id: Ifcef1c643ec5ea0cc95f29ee5a3a1962cb5e6b17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2591883
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71764}
2020-12-15 13:39:09 +00:00
Marja Hölttä
6f290ef767 [parser] Fix parsing "new super.x"
It's not "(new super).x" but "new (super.x)".

Bug: v8:11261
Change-Id: Ifc9cae038c1dc8fcdb096e213b4ac79ea20e9238
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593248
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71763}
2020-12-15 13:38:04 +00:00
Jakob Kummerow
c2e9357c36 Reland "[wasm-gc] Initial Liftoff support"
This is a reland of bee5992a6d.
Fixes a TSan race report by replacing a FlagScope in tests with
direct assignment to the flag in question.

Original change's description:
> [wasm-gc] Initial Liftoff support
>
> This CL implements Liftoff support for struct.get/set,
> struct.new_with_rtt, rtt.canon, and ref.is_null, which
> is enough to make the first testcase pass.
>
> Bug: v8:7748
> Change-Id: Id09e9872d2126127192c852b3cb6d57ff9417582
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584951
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71744}

Bug: v8:7748
Change-Id: I17de6803c23a88209102385010dfdf9b88e25ace
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593254
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71762}
2020-12-15 13:33:54 +00:00
Sigurd Schneider
4df69aca81 Expose scriptId as integer
Embedders often use integers for representing scriptIds, but the
stack trace interface only exposes scriptIds as strings, which
introduces the need for parsing the scriptId string to an int in
the embedder.

This CL also exposes the scriptId as an integer.

Bug: chromium:1158782
Change-Id: I7d85ad1497f2eff17f5cd8f9c87f0c72696c1ecf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589973
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71761}
2020-12-15 12:11:13 +00:00
Dominik Inführ
ef059df6a1 [handles] Check whether main thread local heap is parked on dereference
When dereferencing handles check whether the main thread is parked
similar to background threads.

Bug: chromium:1152995
Change-Id: Ic79680f1b1c49f5f0ad872d6377ca45920a18b98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2575061
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Georg Neis (ooo until January 5) <neis@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71760}
2020-12-15 11:31:54 +00:00
Clemens Backes
c170e0cf39 [wasm][memory64] Use i64 offset in init expressions
If memory64 is used, the offset expression in data segments needs to
have type i64 too.
This CL extends the implementation to enforce that, and adds a unittest.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I849483fc96849e83950f09637e62d427a19094f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589733
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71759}
2020-12-15 10:59:34 +00:00
Peter Marshall
a7b73fceb4 [cpu-profiler] Disable another test for windows
https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win32%20-%20debug/28831/overview

Bug: v8:10107
Change-Id: I73367ce82af37bde55ea5b6943d76c5ae3440b79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593327
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71758}
2020-12-15 10:29:14 +00:00
Clemens Backes
f368298445 [wasm] Initialize compile job early
Since the compile job can always be reused after creation (even if it
runs out of work), we do not need the logic to (re-)initialize it. In
fact, it will always only be initialized once already.
This allows us to initialize it once during construction of the
compilation state (or right after the initialization), and then access
it without locks later.

In addition, this CL
1) renames "current_compile_job_" to "compile_job_", since there will
   always only be one now;
2) removes the {ScheduleCompileJobForNewUnits} method, and just does a
   {compile_job_->NotifyConcurrencyIncrease()} instead;
3) removes the {has_priority_} field and just directly does a
   {compile_job_->UpdatePriority} call.

The streaming test platform needed to be fixed to avoid calling {Join}
on the job handle, which would invalidate the handle afterwards.
Instead, we just run all tasks as long as there are any.

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

Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Change-Id: I7094231e86d5f54cfca5e971b96fd81e994c874a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584946
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71757}
2020-12-15 09:43:14 +00:00
Zhi An Ng
d7de8fa4cb [wasm-simd][ia32] Prototype extended pairwise addition
Codegen is identical to x64.

Tweaked a macro definition to do a dst == src1 check when AVX is not
supported, and updated a single caller in LiftOff.

Bug: v8:11086
Change-Id: Ic9645f3d1bf1c26a1aa6db6bc2fa67fc991f8bbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2579928
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71756}
2020-12-15 04:10:03 +00:00
v8-ci-autoroll-builder
bc4308f37b Update V8 DEPS.
Rolling v8/build: b0341eb..bd6da36

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/0991ca1..f22b977

Rolling v8/third_party/depot_tools: 99399ca..867d99d

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I708c6e8a9bcf2c5025864a67d30d762e667d7abe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2591878
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@{#71755}
2020-12-15 03:47:33 +00:00
Zhi An Ng
7c98abdb78 [x64][wasm-simd] Pattern match 32x4 rotate
Code like:

  x = wasm_v32x4_shuffle(x, x, 1, 2, 3, 0);

is currently matched by S8x16Concat, which lowers to two instructions:

  movapd xmm_dst, xmm_src
  palignr xmm_dst, xmm_src, 0x4

There is a special case after a S8x16Concat is matched:.

- is_swizzle, the inputs are the same
- it is a 32x4 shuffle (offset % 4 == 0)

Which can have a better codegen:

- (dst == src) shufps dst, src, 0b00111001
- (dst != src) pshufd dst, src, 0b00111001

Add a new simd shuffle matcher which will match 32x4 rotate, and
construct the appropriate indices referring to the 32x4 elements.

pshufd for the given example. However, this matching happens after
S8x16Concat, so we get the palignr first. We could move the pattern
matching cases around, but it will lead to some cases where
where it would have matched a S8x16Concat, but now matches a
S32x4shuffle instead, leading to worse codegen.

Note: we also pattern match on 32x4Swizzle, which correctly generates
Change-Id: Ie3aca53bbc06826be2cf49632de4c24ec73d0a9a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589062
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71754}
2020-12-15 02:17:10 +00:00
Frank Tang
e327fe6944 Roll test262
36d2d2d34..51666c531

Bug: v8:7834, v8:5327, v8:10961
Change-Id: Ia589407e4c9e8be8732ce4940c2e3c578584cebb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2590518
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71753}
2020-12-15 01:37:24 +00:00
Frank Tang
a6b39287c5 Fix locale -t- extension with duplicate variant in tlang
cl to land chrome/src/DEPS in https://chromium-review.googlesource.com/c/chromium/src/+/2591229

Bug: v8:11039
Change-Id: If2a8256011865a1d8cca700fd803905d6e63afde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2590516
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71752}
2020-12-15 01:36:20 +00:00
Zhi An Ng
6cb61e63bb [wasm-simd][x64] Optimize f64x2.extract_lane
pextrq + movq crosses register files twice, which is not efficient.

Optimize this by:
- checking if lane 0, do nothing if dst == src (macro-assembler helper)
- use vmovhlps on AVX, with src as the operands to avoid false
dependency on dst
- use movhlps otherwise, this is shorter than shufpd, and faster on
older system

Change-Id: I3486d87224c048b3229c2f92359b8b8e6d5fd025
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589056
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71751}
2020-12-14 23:53:19 +00:00
Zhi An Ng
3bc06ed3e1 [ia32] Merge f32x4 add sub mul div SSE and AVX opcodes
Drive-by fix IWYU for instruction-scheduler-ia32.cc.

Bug: v8:11217,v8:7490
Change-Id: I7ae4fdaf3c48274e9421e6b31897ad0ea1464876
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2585254
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71750}
2020-12-14 23:40:00 +00:00
Shu-yu Guo
84d05c6ed3 Revert "[wasm-gc] Initial Liftoff support"
This reverts commit bee5992a6d.

Reason for revert: TSAN unhappiness https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/34656/overview

Original change's description:
> [wasm-gc] Initial Liftoff support
>
> This CL implements Liftoff support for struct.get/set,
> struct.new_with_rtt, rtt.canon, and ref.is_null, which
> is enough to make the first testcase pass.
>
> Bug: v8:7748
> Change-Id: Id09e9872d2126127192c852b3cb6d57ff9417582
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584951
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71744}

TBR=jkummerow@chromium.org,clemensb@chromium.org

Change-Id: I1801c50861d74b7733ed828d6874f874fe8ba670
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2590674
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71749}
2020-12-14 22:43:12 +00:00
Zhi An Ng
754cb03cee [ia32][wasm-simd] Optimize and unify f32x4.extract_lane SSE and AVX ops
Change the codegen for f32x4.extract_lane from shufps to insertps. They
have the same performance, but shufps has a false dependency on dst (it
shuffles dst and src, but we don't care about dst at all).

We then merge the SSE and AVX opcode.

Bug: v8:11217
Change-Id: I7cdbf486573ce3a19881df84400a9c7e09c3ee48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2585259
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71748}
2020-12-14 22:30:04 +00:00
Zhi An Ng
3ea458bea2 [x64][wasm-simd] Optimize f32x4.extract_lane
Change the codegen for f32x4.extract_lane from shufps to insertps when
AVX is supported. They have the same performance, but shufps has a false
dependency on dst (it shuffles dst and src, but we don't care about dst
at all).

Also for SSE, extractps + movd crosses register files, so change it to
use insertps as well.

Change-Id: Idf45849d37ac3499bf3371ba2fa6ae05829aa8a7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589048
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71747}
2020-12-14 22:28:59 +00:00
Zhi An Ng
231bc86cc5 [wasm-simd][arm] Prototype i8x16.popcnt
This is the same as the original implementation in https://crrev.com/c/2567534
which was speculatively reverted due to flaky tests. Since then, there have
been some changes to fix those tests, so trying to get this in again.

Bug: v8:11002
Change-Id: I5bd0f63d3aec4cf6db403b35737f8b695b0f4e37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2589063
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71746}
2020-12-14 22:22:19 +00:00
Milad Fa
fd45d38aa8 PPC: Use FormatVectorRegister for VMX and VSX disassembly
Change-Id: I669eaed12f352398b8e34b1f74262f46562745cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2591047
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71745}
2020-12-14 22:20:29 +00:00
Jakob Kummerow
bee5992a6d [wasm-gc] Initial Liftoff support
This CL implements Liftoff support for struct.get/set,
struct.new_with_rtt, rtt.canon, and ref.is_null, which
is enough to make the first testcase pass.

Bug: v8:7748
Change-Id: Id09e9872d2126127192c852b3cb6d57ff9417582
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584951
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71744}
2020-12-14 20:02:40 +00:00
Shu-yu Guo
1156c90f30 [api] Make v8::Promise::Catch call the built-in Promise#then
Bug: chromium:1157692
Bug: chromium:1157386
Change-Id: I3525c5ea648bca6c2fb03bb910dbe9d673996da7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2587603
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71743}
2020-12-14 19:53:39 +00:00
Jan Krems
a73550bd89 Allow quotes inside of embedded sourceMappingURLs
The original implementation of matching was a RegExp on the source
which wasn't able to reliably distinguish between comments inside
of string literals and actual comments. For that reason, it had
a special rule to disallow quotes to remove false positives.

Original comment:
> Also, ['"] are excluded from allowed URLs to  avoid matches
> against sources that invoke evals with sourceURL.

After the code was moved into the scanner, that shouldn't be an
issue anymore - the scanner knows that this is a real comment and
isn't part of a string literal.

Allowing quotes enables a slightly smaller encoding of source maps,
specifically in the case where there are no sourceContents:
Non-base64 source maps can get away with effectively no encoding
overhead (they typically don't contain whitespace).

Change-Id: Iffa5df28d80656fa56e603e7c0e57aa1f44d0014
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2576801
Reviewed-by: Marja Hölttä <marja@chromium.org>
Auto-Submit: Jan Krems <jankrems@google.com>
Commit-Queue: Jan Krems <jankrems@google.com>
Cr-Commit-Position: refs/heads/master@{#71742}
2020-12-14 17:47:29 +00:00
Thibaud Michaud
4c220552f7 [regalloc] Fix perf bug in LiveRangeBundle
Only process each LiveRangeBundle once in AssignSpillSlots().

Previously we would try to merge a LiveRangeBundle as many times as
there are LiveRanges inside it. Even though the merge would only happen
once, we would still iterate over all LiveRanges and do expensive checks
for each iteration.

R=sigurds@chromium.org

Bug: v8:11237
Change-Id: I9e613aaf5e571d4c28486dd2c20154336c533563
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584956
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71741}
2020-12-14 16:01:39 +00:00
Michael Lippautz
366d2286b8 cppgc: Forward enum deprecation
Change-Id: Id6975d47665832feee23c528f457092385a5ec3e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584958
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71740}
2020-12-14 15:22:09 +00:00
Camillo Bruni
5cf194d10d [tools] Hide System-analyzer timeline-tracks
- Allow hiding individual timeline-tracks to clear up screen space.
- Auto-hide timeline-tracks when there are no entries

Bug: v8:10644
Change-Id: Ibde37242fa1fcb827ca176ee7576a23715c45bda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584954
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71739}
2020-12-14 15:10:09 +00:00