Commit graph

75 commits

Author SHA1 Message Date
Basilisk-Dev
c69b41b80c MoonchildProductions/UXP#2897: Allow mfbt/double-conversion to compile on LA64 2026-04-23 06:18:23 +01:00
ownedbywuigi
32e0f7f621 Add infallibleInit method to ThreadLocal and AssertOwns methods to Mutex 2026-03-30 00:30:51 +01:00
Moonchild
fa51701e3c [MFBT] Reduce size() calls in subspan. 2026-03-06 16:00:04 +00:00
roytam1
ae1f9364cd Merge remote-tracking branch 'origin/tracking' into custom 2025-08-14 08:55:16 +08:00
Moonchild
7af71cb345 Issue #1843 - Clean up WindowsVersion.h
This gets rid of all the unnecessary named functions to be replaced with
a straightforward check `IsWindows10BuildOrLater(WinBuild::{build})`
Where `WinBuild` is an enum with common `{build}` names of Win 10+
versions: `Win10v1809`, `Win10v21H2`, `Win11RTM`, `Win11v24H2`, etc.

None of these named functions were actually in use, so no other changes
should be necessary in the platform.
2025-08-14 08:35:44 +08:00
roytam1
8501f786b0 mfbt: remove terse static asserts 2025-05-27 23:48:03 +08:00
roytam1
7f3ccb5dc3 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-27 23:22:51 +08:00
trav90
497b6d5854 Issue #2749 - Part 8 - Put mfbt/casting.h pragmas behind GCC conditional. 2025-05-27 23:21:47 +08:00
trav90
fc9643a1a7 Issue #2749 - Part 6 - Teach mfbt/casting.h to deal with floating point values
This now uses `if constexpr (...)` which is a lot more readable, and still compiles to almost no assembly instructions, as expected. Floating point casting assert when casting an integer that's too large to be represented exactly as a floating point (e.g. UINT64_MAX to double, since double have less than 64 bytes of mantissa), or when casting a double that's too large to be represented in a float.
2025-05-27 23:21:26 +08:00
roytam1
072f98c9ae Merge remote-tracking branch 'origin/tracking' into custom 2025-03-23 12:52:24 +08:00
Moonchild
f1c456c625 Issue #2713 - Check for NaN before std::min/max() in DOMQuad and DOMRect.
If there is a NaN involved we should not return 0 here.
2025-03-23 12:52:03 +08:00
roytam1
390799012c Merge remote-tracking branch 'origin/tracking' into custom 2024-05-08 10:05:44 +08:00
Moonchild
1f4152a5ac Issue #2472 - Part 2: Add FunctionRef callable type
Prerequisite for top layer refactor.

FunctionRef is a generic callable type that can be initialized from any
compatible callable, suitable for use as a function argument for the duration of
the function call (and no longer).
2024-05-08 09:53:29 +08:00
roytam1
d8ac621203 Merge remote-tracking branch 'origin/tracking' into custom 2024-03-21 15:25:04 +08:00
Moonchild
e6e8224040 [MFBT] Make move assignment of RefPtr have the same behavior as nsCOMPtr 2024-03-21 15:24:10 +08:00
roytam1
1977864a3a Merge remote-tracking branch 'origin/tracking' into custom 2023-07-25 09:16:25 +08:00
Brian Smith
d42d5ce138 Issue #1240 - Part 3b - Implement WrappingOperations.h for wraparound math operations & conversions. https://bugzilla.mozilla.org/show_bug.cgi?id=1441657 Implement mozilla::WrappingMultiply. Prerequisite for our V8 fast forward. 2023-07-25 09:08:56 +08:00
Brian Smith
ddd49121a6 Issue #1240 - Part 3a - Adjust mozilla::FloatingPoint<T>'s definition. So only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. https://bugzilla.mozilla.org/show_bug.cgi?id=1508725 Prerequisite for our V8 fast forward. 2023-07-25 09:08:39 +08:00
roytam1
56216e737f Merge remote-tracking branch 'origin/tracking' into custom 2023-07-14 10:22:44 +08:00
Brian Smith
323007ec3d Issue #2255 - Fix build bustage on Linux. Need #include <utility> to ensure std::forward is available. 2023-07-14 10:20:10 +08:00
Brian Smith
efde4d468e Issue #2255 - Add support for Maybe<T&> https://bugzilla.mozilla.org/show_bug.cgi?id=1620568 Make Maybe<T>::emplace() work when T is const https://bugzilla.mozilla.org/show_bug.cgi?id=1335780 2023-07-14 10:16:53 +08:00
roytam1
9f1550fb53 Merge remote-tracking branch 'origin/tracking' into custom 2023-07-06 10:39:29 +08:00
Brian Smith
2c0384c4a2 Issue #2255 & #1240 - Simplify and enhance Maybe and Some(). https://bugzilla.mozilla.org/show_bug.cgi?id=1325351 This is a prerequisite for our BigInt V8 fast forward and potential #2255 fix. 2023-07-06 10:24:34 +08:00
roytam1
522a2a6c64 Merge remote-tracking branch 'origin/tracking' into custom 2023-07-03 15:13:12 +08:00
Moonchild
f9c39acaa6 Issue #1656 - Follow-up: Re-nuke the vim lines introduced in #2265 2023-07-03 15:12:01 +08:00
Martok
4c2e378613 Issue #2259 - Add mozilla::Result<V, E> and JS::Result<> for fallible return values
Based-on: m-c 1283562, 1277368/1, 1324828
2023-07-03 15:03:29 +08:00
Martok
9914c06168 Issue #2259 - Add mozilla::Vector -> mozilla::Span implicit conversion
Based-on: part of m-c 1578339
2023-07-03 15:03:08 +08:00
Martok
7716602a20 Issue #2259 - Add missing IsAscii* helper functions in mozilla/TextUtils.h 2023-07-03 15:02:50 +08:00
roytam1
a7a525c65e Merge remote-tracking branch 'origin/tracking' into custom 2023-05-15 09:19:37 +08:00
Job Bautista
621868a340 Issue #2241 - Part 2: Add SameValueZero implementation to mfbt/FloatingPoint.h
Backported from Mozilla bug 1560658.

This is to prevent duplication of code while implementing DOMMatrix operations.
2023-05-15 09:09:58 +08:00
roytam1
85f6a49297 Merge remote-tracking branch 'origin/tracking' into custom 2023-03-15 22:52:23 +08:00
FranklinDM
481069044d Issue #2148 - Shrink Vector from (usually) four pointers in size to three when no inline storage is used.
See Bug 1338374
2023-03-15 22:50:56 +08:00
FranklinDM
0365f940fe Issue #2148 - Make Vector not use AlignedStorage for its inline element storage
See Bug 1338374 1/2
2023-03-15 22:50:40 +08:00
roytam1
6e56af69bb Merge remote-tracking branch 'origin/tracking' into custom 2022-05-04 11:44:06 +08:00
roytam1
cba4f41ffa mfbt: fixup after rev 13fcc4a0 2022-05-04 11:43:38 +08:00
roytam1
7f068ecce3 Merge remote-tracking branch 'origin/tracking' into custom 2022-05-04 10:14:24 +08:00
Brian Smith
13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +08:00
roytam1
059e35a463 Merge remote-tracking branch 'origin/tracking' into custom 2022-04-21 21:59:16 +08:00
Moonchild
d4eac725fd Issue #1877 - Resolve RELEASE_OR_BETA conditionals. 2022-04-21 21:46:47 +08:00
roytam1
220d2b4474 Merge remote-tracking branch 'origin/master' into custom 2021-08-12 23:51:42 +08:00
Moonchild
daa57bddf7 [MFBT] Convert debug asserts to early returns for situations that should
never occur.
2021-08-12 23:48:11 +08:00
roytam1
02a8a3cf55 Merge remote-tracking branch 'origin/master' into custom 2021-07-28 10:12:34 +08:00
Moonchild
6c30b33915 [no issue] Replace PurpleBlock with SegmentedVector to reduce indirect memory
accesses when calling suspect

Improves overall memory performance.
Also prerequisite for further work on #1677.
2021-07-28 10:10:07 +08:00
roytam1
75da290189 Merge remote-tracking branch 'origin/master' into custom 2021-02-25 09:43:06 +08:00
Moonchild
63637d3f81 [MFBT] Update lz4 to 1.9.3 2021-02-25 09:26:54 +08:00
roytam1
ee137dacc1 Merge remote-tracking branch 'origin/master' into custom 2020-11-13 09:15:56 +08:00
Matt A. Tobin
86402bf7e9 Bug 1466909 - Use AddLvalueReference for UniquePtr's operator*().
This is required for UniquePtr to accept <void>,
which is required for PseudoHandle = mozilla::UniquePtr<T, JS::FreePolicy>;
in turn for mozilla::SegmentedVector<PseudoHandle<void>> uniquePtrArena_;

Tag #1679
2020-11-13 09:15:18 +08:00
roytam1
56aaf6a15a Merge remote-tracking branch 'origin/master' into custom 2020-09-25 22:18:48 +08:00
Moonchild
d5919942ff Issue #1656 - Part 8: Devtools and misc. 2020-09-25 22:06:55 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00