Граф коммитов

2350 Коммитов

Автор SHA1 Сообщение Дата
Ryan VanderMeulen 0a7a824985 Bug 1749348 - Update double-conversion to version 3.2.1. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D153810
2022-08-09 13:47:44 +00:00
Steve Fink bd14b2f73a Bug 1782562 - be more conservative in max Vector size r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D153682
2022-08-08 22:59:15 +00:00
Cristian Tuns d5fa74099d Backed out changeset 939dbca534a5 (bug 1782562) for causing SM bustages CLOSED TREE 2022-08-08 18:55:29 -04:00
Steve Fink f444f5dc7c Bug 1782562 - be more conservative in max Vector size r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D153682
2022-08-08 21:41:06 +00:00
Cristian Tuns 9b82462b70 Backed out changeset 7519215902c9 (bug 1782562) for causing spidermonkey bustages on bug1782468-ptrdiff-veclen.js CLOSED TREE 2022-08-08 13:05:40 -04:00
Steve Fink 002a3bad41 Bug 1782562 - be more conservative in max Vector size r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D153682
2022-08-08 16:38:52 +00:00
Emily McDonough 4bf16448f0 Bug 1782604 - Make UniquePtr(nullptr) constexpr r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D153405
2022-08-03 21:21:09 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Doug Thayer a104274600 Bug 1782141 - Move SIMD/SSE files to mozglue r=iain
Differential Revision: https://phabricator.services.mozilla.com/D153264
2022-08-01 16:40:57 +00:00
Cristian Tuns c555cec677 Backed out 2 changesets (bug 1782141) for causing spidermonkey bustages on dependent.js CLOSED TREE
Backed out changeset 81b72f893608 (bug 1782141)
Backed out changeset bd07c6d3d9fe (bug 1782141)
2022-07-29 23:52:46 -04:00
Doug Thayer 2f04b79528 Bug 1782141 - Move SIMD/SSE files to mozglue r=iain
Differential Revision: https://phabricator.services.mozilla.com/D153264
2022-07-30 03:26:44 +00:00
Nika Layzell 997047e2a4 Bug 1772006 - Part 4: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
This patch moves EqualsIgnoreCase to ns[T]StringObsolete, and removes
the aCount argument, instead migrating callers to use `StringBeginsWith`
with a case-insensitive comparator.

In addition, nsTStringRepr::Compare was removed and replaced with either
calls to methods like `StringBeginsWith` or the global `Compare` method.

These changes required some modifications at call-sites but should make
the behaviour less surprising and more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-07-30 00:12:48 +00:00
Doug Thayer 7768043bd0 Bug 1779807 - Split AVX2 code into its own compilation unit r=iain
I split this out into its own commit because it's a bit awkward to go back and
shuffle the old code around. If you'd like me to apply it to the history
though, just let me know.

This patch just moves all of the AVX2 code out from SIMD.cpp into SIMD_avx2.cpp
and removes the -mavx2 flag when compiling SIMD.cpp. On try this removes the
failure on M1 hardware when running the x64 binary.

Differential Revision: https://phabricator.services.mozilla.com/D152920
2022-07-29 03:26:07 +00:00
Doug Thayer c2cde6897f Bug 1779807 - Implement memchr64 in AVX2 r=iain
This only makes sense for AVX2, because widening it from a 64-bit comparison
to a 128-bit comparison is hardly worth it, and there are gaps in the SSE2
instruction set (missing _mm_cmpeq_epi64, which is introduced in SSE4.1) that
would require us to compensate and probably take a sizeable perf hit.

Differential Revision: https://phabricator.services.mozilla.com/D152297
2022-07-29 03:26:06 +00:00
Doug Thayer 1f10d44d74 Bug 1779807 - Support AVX2 for SIMD memchr r=iain
This showed a modest improvement in the geomean of my benchmarking, but
importantly it showed a consistent and relatively strong improvement across
all of the cases which I would guess are more realistic. Notably this change
makes it perform better at iteratively searching for the next occurrence of X
in the HTML of a large web page.

Differential Revision: https://phabricator.services.mozilla.com/D152296
2022-07-29 03:26:06 +00:00
Gerald Squelart d4726a9eca Bug 1774329 - If SingleLineStyle is set at construction, also remove spaces after colons and commas - r=florian
These were the last remaining JSON whitespace characters, so we can now our
regression tests can check that there are non of these left.

Differential Revision: https://phabricator.services.mozilla.com/D152607
2022-07-28 12:41:56 +00:00
Gerald Squelart a05b4ea2c2 Bug 1774329 - JSONWriter() can be single-line from the top, removing the final newline - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D152602
2022-07-28 12:41:54 +00:00
Steve Fink 07e0016fe5 Bug 1774733 - Allow AllocPolicy to determine Vector growth policy, and be aggressive about StringBuilder allocation strategy to reduce memcpy'ing. r=jandem
Condition computeGrowth behavior on existence of AP::computeGrowth<S> method

Differential Revision: https://phabricator.services.mozilla.com/D151674
2022-07-27 22:59:51 +00:00
smolnar af5711925c Backed out 3 changesets (bug 1779807) for causing SM build failures. CLOSED TREE
Backed out changeset 68e92976dc0f (bug 1779807)
Backed out changeset f11ef6602f59 (bug 1779807)
Backed out changeset faa38e8360b1 (bug 1779807)
2022-07-26 00:44:58 +03:00
Doug Thayer 92a5c81749 Bug 1779807 - Implement memchr64 in AVX2 r=iain
This only makes sense for AVX2, because widening it from a 64-bit comparison
to a 128-bit comparison is hardly worth it, and there are gaps in the SSE2
instruction set (missing _mm_cmpeq_epi64, which is introduced in SSE4.1) that
would require us to compensate and probably take a sizeable perf hit.

Differential Revision: https://phabricator.services.mozilla.com/D152297
2022-07-25 21:21:37 +00:00
Doug Thayer 2a9b76d986 Bug 1779807 - Support AVX2 for SIMD memchr r=iain
This showed a modest improvement in the geomean of my benchmarking, but
importantly it showed a consistent and relatively strong improvement across
all of the cases which I would guess are more realistic. Notably this change
makes it perform better at iteratively searching for the next occurrence of X
in the HTML of a large web page.

Differential Revision: https://phabricator.services.mozilla.com/D152296
2022-07-25 21:21:37 +00:00
jake a61c54713b Bug 1780215 - Use arc4random_buf within GenerateRandomBytesFromOS when compiling to wasi r=jandem
wasi-libc provides arc4random methods - 7a21011e98/libc-top-half/musl/include/stdlib.h (L205-L213)

Without this change, js::GenerateRandomSeed will fallback to using a timestamp for the random seed (https://searchfox.org/mozilla-central/rev/3e1a721bce1da3ae04675539b39a4e95b25a046d/js/src/jsmath.cpp#491-494) which is used as both seed values within the PRNG(https://searchfox.org/mozilla-central/rev/3e1a721bce1da3ae04675539b39a4e95b25a046d/js/src/jsmath.cpp#501-502) - having the same value for both seeds seems to cause the first two PRNG calls to produce the same first 4 decimal places.

This change stops the timestamp fallback from being used when compiling to wasm/wasi which avoids this issue.

Differential Revision: https://phabricator.services.mozilla.com/D152180
2022-07-20 13:17:54 +00:00
Doug Thayer 67331b011d Bug 1776013 - Add SIMD memchr-like implementations to MFBT r=iain
Differential Revision: https://phabricator.services.mozilla.com/D150067
2022-07-14 18:30:27 +00:00
Norisz Fay 9112cf321e Backed out 2 changesets (bug 1776013) for causing spidermonkey bustages on SIMD.cpp CLOSED TREE
Backed out changeset bb467568da37 (bug 1776013)
Backed out changeset 9669cd465518 (bug 1776013)
2022-07-14 03:53:22 +03:00
Doug Thayer 2778034398 Bug 1776013 - Add SIMD memchr-like implementations to MFBT r=iain
Differential Revision: https://phabricator.services.mozilla.com/D150067
2022-07-14 00:39:22 +00:00
serge-sans-paille a909699ad6 Bug 1774863 - Cleanup mfbt includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D149669
2022-06-22 09:47:14 +00:00
Sylvestre Ledru 42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
Nika Layzell 0e6bc87c63 Bug 1743020 - Part 3: Export mozilla::MoveOnlyFunction based on function2, r=glandium
A custom defintion wrapping fu2::function_base is used to customize the
inline buffer's size and alignment to make it compatible with nsTArray.
Without the custom wrapper, `alignof(max_align_t)` is used, which is
larger than nsTArray's max alignment on some platforms.

Differential Revision: https://phabricator.services.mozilla.com/D145691
2022-06-02 13:24:10 +00:00
Jan de Mooij 69dd9e0ace Bug 1770158 part 1 - Add MFBT_API to StringToDouble. r=glandium
The update script successfully applies this diff to the upstream code.

Differential Revision: https://phabricator.services.mozilla.com/D146878
2022-05-31 07:48:15 +00:00
Steve Fink 952b6a3854 Bug 1769518 - Support Rooted<Result<V,E>> as long as V and E have GCPolicy<> defined for them. (Use IgnoreGCPolicy for whichever of them does not need tracing.) r=emilio,nbp,jonco
Differential Revision: https://phabricator.services.mozilla.com/D146468
2022-05-26 17:22:35 +00:00
Chris Peterson af64df99e7 Bug 1769778 - Replace deprecated std::result_of_t with std::invoke_result_t. r=janv
std::result_of_t was deprecated in C++17 and removed in C++20.

https://en.cppreference.com/w/cpp/types/result_of

The pattern to replace std::result_of_t with std::invoke_result_t is:

-std::result_of_t<Func(ArgTypes)>
+std::invoke_result_t<Func, ArgTypes>

Differential Revision: https://phabricator.services.mozilla.com/D146593
2022-05-25 06:07:32 +00:00
Chris Peterson cc0d5b9c63 Bug 1769484 - Replace std::memory_order::memory_order_XYZ with std::memory_order_XYZ. r=padenot
C++20 renamed the `std::memory_order` enum's enumerators from `std::memory_order::memory_order_XYZ` to `std::memory_order::XYZ`. To maintain source compatibility with both C++17 and C++20, use `std::memory_order_XYZ`.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0439r0.html

https://en.cppreference.com/w/cpp/atomic/memory_order

Differential Revision: https://phabricator.services.mozilla.com/D146395
2022-05-17 03:24:09 +00:00
Nika Layzell ae118208e9 Bug 1767517 - Part 1: Fix incorrect annotation for GUARDED_VAR and PT_GUARDED_VAR, r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D145393
2022-05-16 20:40:49 +00:00
Molnar Sandor 74e42d0f2f Backed out 5 changesets (bug 1743020) for causing linux build bustages in function2.hpp CLOSED TREE
Backed out changeset cf237471cf75 (bug 1743020)
Backed out changeset 78eb51447ce5 (bug 1743020)
Backed out changeset c486f95d55ec (bug 1743020)
Backed out changeset c0abfda55404 (bug 1743020)
Backed out changeset 16be18ca73fb (bug 1743020)
2022-05-14 10:31:12 +03:00
Nika Layzell 85884b7fca Bug 1743020 - Part 3: Export mozilla::MoveOnlyFunction based on function2, r=glandium
A custom defintion wrapping fu2::function_base is used to customize the
inline buffer's size and alignment to make it compatible with nsTArray.
Without the custom wrapper, `alignof(max_align_t)` is used, which is
larger than nsTArray's max alignment on some platforms.

Differential Revision: https://phabricator.services.mozilla.com/D145691
2022-05-13 23:43:52 +00:00
Paul Adenot 4815882f91 Bug 1768616 - TSAN suppression list update for Ubuntu 22.04 LTS. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D145953
2022-05-10 11:54:55 +00:00
Jesse Schwartzentruber 57e1160210 Bug 1765543 - Add snapshot fuzzing build using Nyx r=decoder,taskgraph-reviewers,ahal
Depends on D144208

Differential Revision: https://phabricator.services.mozilla.com/D144209
2022-05-04 19:24:58 +00:00
Mike Hommey d067ffd623 Bug 1766561 - Enable MOZ_FORMAT_PRINTF on all clang builds. r=nika
clang-cl doesn't define __GNUC__. Also for some reason, clang-cl doesn't
like the use of MOZ_FORMAT_PRINTF on a function definition (while clang
is apparently happy with it).

Differential Revision: https://phabricator.services.mozilla.com/D144922
2022-05-03 20:49:10 +00:00
Nika Layzell 18f7866fc2 Bug 1738106 - Part 2: Allow XPCOM classes to use SupportsThreadSafeWeakPtr, r=glandium,xpcom-reviewers
Due to how this type of threadsafe refcounting is implemented, it needs to be
implemented using a MFBT-style refcounting base class, somewhat similar to
`SupportsWeakPtr`.

This patch makes NS_IMPL_{ADDREF,RELEASE}_INHERITED intelligently not add
refcount logging for types inheriting from SupportsThreadSafeWeakPtr, as the
default behaviour would break due to weak pointer upgrades not calling through
`AddRef` or `Release`.

In MFBT, the return value of `AddRef` and `Release` on
SupportsThreadSafeWeakPtr is changed to be compatible with nsISupports, so that
this type can be used to implement nsISupports refcounting.

Differential Revision: https://phabricator.services.mozilla.com/D142603
2022-05-02 20:37:34 +00:00
Mike Hommey c5fea3fa51 Bug 1766549 - Remove some char16ptr_t operators that allow implicit const-casting. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D144777
2022-04-27 22:28:24 +00:00
Lee Salzman ca716f7083 Bug 1765911 - Support cloning Patterns with internal weak references. r=aosmond
Currently calling Pattern::Clone() produces a heap-allocated Pattern with RefPtrs
to any internal resources such as SourceSurfaces or GradientStops. While this is
okay if the Pattern is transient, this causes problems if the clone is long-lived
and causes via the RefPtr the stored resource to stay alive, even when there are
no other external references to the resource.

In the case of DrawTargetWebgl's PathCache, we need to be able to create Pattern
clones that have internal weak references, while also still supporting the original
use-case of strong references. To this end we template-ize some of the Pattern
derivatives so that we can make either strong or weak versions according to use-case.
This case way we store a weak clone of a Pattern in the PathCache key, the reference
will automatically invalidate itself when all other external strong references to it
go away, without having to do external crawling of the PathCache to constantly prune
the last reference manually.

Differential Revision: https://phabricator.services.mozilla.com/D144381
2022-04-27 18:48:59 +00:00
Jon Coppeard 1aeb55dd59 Bug 1766276 - Give MaybeOneOf a map method r=jandem
There are a few places where we call one of two overloads of a fuction based on
the contents of a MaybeOneOf. We can simplify this code by giving the class a
map method.

Differential Revision: https://phabricator.services.mozilla.com/D144595
2022-04-26 12:29:24 +00:00
Steve Fink 4531b772d7 Bug 1440727 - Disallow extra data at the end of serialized data buffer r=decoder,jonco
Differential Revision: https://phabricator.services.mozilla.com/D141391
2022-04-22 03:08:47 +00:00
Chun-Min Chang 61d788c585 Bug 1238038 - Create an input-only audio source r=padenot
This patch creates an class managing an input-only audio stream within a
task thread. This class will be used as a source generating the audio
data to a NonNativeInputTrack in the following patch.

Depends on D116535

Differential Revision: https://phabricator.services.mozilla.com/D137911
2022-04-18 18:45:35 +00:00
Steve Fink e4b6669027 Bug 1762537 - Omit some annotations when compiling under sixgill to avoid incompatibilities between what clang and gcc allow for lambda annotations r=firefox-static-analysis-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D142714
2022-04-15 15:43:10 +00:00
Christian Holler 8e5b003502 Bug 1764259 - [Fuzzing] Nyx replay mode. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D143458
2022-04-14 12:10:14 +00:00