Commit graph

41 commits

Author SHA1 Message Date
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
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
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
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
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
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
cba4f41ffa mfbt: fixup after rev 13fcc4a0 2022-05-04 11:43:38 +08:00
Brian Smith
13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +08:00
Moonchild
d4eac725fd Issue #1877 - Resolve RELEASE_OR_BETA conditionals. 2022-04-21 21:46:47 +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
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
Moonchild
63637d3f81 [MFBT] Update lz4 to 1.9.3 2021-02-25 09:26:54 +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
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
Moonchild
538b420319 Issue #1656 - Part 4: Manual cleanup 2020-09-25 22:04:20 +08:00
Moonchild
ed7e49eda6 Issue #1656 - Part 2: Unmangle some unfortunate UTF-8 victims.
The poor fellows got lost in an ASCII-interpretation of the world.
2020-09-25 22:04:14 +08:00
Moonchild
8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
Matt A. Tobin
bf056898b5 Issue #1053 - Remove android support from mfbt 2020-02-27 07:31:22 +08:00
wolfbeast
da2e08390c Issue #1288 - Part 2: Add a partial LZ4 decompression routine.
This function never writes beyond `aDest` + `aMaxOutputSize`, and is
therefore protexted against malicious datapackets.
It also ignores unconsumed input upon reaching `aMaxOutputSize` and can
therefore be used for parial decompression of LZ4 input up to a desired
resulting size of decompressed data.
2019-11-15 14:23:57 +08:00
athenian200
b652dd59ae MoonchildProductions#1251 - Part 7: All the posix_m* memory-related stuff, gathered together.
https://bugzilla.mozilla.org/show_bug.cgi?id=1158445
https://bugzilla.mozilla.org/show_bug.cgi?id=963983
https://bugzilla.mozilla.org/show_bug.cgi?id=1542758

Solaris madvise and malign don't perfectly map to their POSIX counterparts, and some Linux versions (especially Android) don't define the POSIX counterparts at all, so options are limited. Ideally posix_madvise and posix_malign should be the safer and more portable options for all platforms.
2019-11-04 11:52:22 +08:00
wolfbeast
a4dd5cc088 Use ptrdiff_t in RangedPtr. 2019-03-23 06:45:34 +08:00
trav90
48b18a815d Fix Span.h constexprs for VS2017 2019-02-16 00:15:22 +08:00
trav90
037afae5e6 Add mozilla::Span 2019-02-16 00:15:21 +08:00
trav90
c8cdcbc5a7 Fix a warning with GCC 8: unnecessary parentheses in declaration of 'type name' 2019-02-16 00:11:02 +08:00
trav90
d8a8aafc2c Initialize mVersion to silence a warning with GCC 8 2019-02-16 00:10:57 +08:00
Alex Gaynor
57b3983e17 Bug 1462912 - Fixed BufferList::Extract to handle the case where the call consumes the entirety of the BufferList. r=froydnj, a=RyanVM 2019-02-16 00:06:52 +08:00
Alex Gaynor
921ff8f640 Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj, a=RyanVM 2019-02-16 00:06:50 +08:00
Jeff Walden
48ffdb584c Bug 1452619 - Implement mozilla::IsAsciiAlpha. r=froydnj, a=lizzard 2019-02-15 23:53:19 +08:00
Ryan VanderMeulen
23c2b750e3 Bug 1398021 - Update lz4 to version 1.8.0. r=froydnj, a=RyanVM
--HG--
extra : source : 9a4077eda5d80e2f7c7fe271035bee2e2d034cec
extra : histedit_source : 64eb1f6e9b2b08981644d7edccd22997d6463b4b%2C5619daf512a89b3a6bf84eca781190b56e8dea31
2019-02-15 23:37:09 +08:00
trav90
4a350f434e Add MOZ_FALLTHROUGH macro definition for gcc 7 to suppress -Wimplicit-fallthrough warnings
The generic fallback MOZ_FALLTHROUGH definition is insufficient for GCC 7 and above, resulting in build warning spam and --enable-warnings-as-errors builds failing. The check for clang support is changed to use the __has_cpp_attribute macro, which is more robust than checking the __cplusplus version. Also, MOZ_FALLTHROUGH is now only defined in C++ code, since GCC errors out if it encounters a scoped attribute being used with __has_cpp_attribute in C code. No C code uses MOZ_FALLTHROUGH or derivatives at the moment.
2019-02-15 23:35:47 +08:00
wolfbeast
2a9f2dadee Fix off-by-one in Vector::insert. 2019-02-15 23:29:37 +08:00
trav90
7d96c33414 Remove checks for GCC < 4.9 2019-02-15 23:28:59 +08:00
trav90
1eecf39f2b Require at least GCC 4.9 to build 2019-02-15 23:28:57 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00