gecko-dev/mfbt
Nicholas Nethercote cecefaa849 Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden
This is a `constexpr` alternative to HashString(const char16_t*). We can't make
HashString(const char16_t*) itself `constexpr` because HashUntilZero(const T*)
isn't in a form that older compilers (like GCC 4.9) allow to be made
`constexpr`. (The trick to satisfying those compilers is to use recursion
instead of iteration, to get the function into a single `return` statement.)

This requires making a bunch of other functions `constexpr` as well. It also
requires adding MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING
macros to avoid some MSVC weirdness.

The introduction of RotateLeft5() partly undoes one of the patches from bug
1443342, but that's unavoidable.

This change will help with static allocation of static atoms (bug 1411469).

MozReview-Commit-ID: 7r3PnrQXb29
2018-03-08 10:27:14 +11:00
..
decimal Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE 2018-02-21 10:15:43 +02:00
double-conversion Bug 1402344 - Update mfbt-double-conversion to the latest upstream rev. r=froydnj 2017-10-09 22:15:37 -07:00
tests Bug 1445024 - Implement mozilla::WrappingSubtract. r=froydnj 2018-03-06 19:22:20 -08:00
Alignment.h Bug 1435382 - fix documentation for AlignedElem; r=me 2018-02-02 15:24:51 -05:00
AllocPolicy.h Bug 1380410 - Add NeverAllocPolicy, r=erahm 2017-07-25 11:26:21 -04:00
AlreadyAddRefed.h Bug 1442304 - make already_AddRefed returnable in registers in non-DEBUG Unix builds; r=glandium,tjr 2018-03-07 14:27:28 -05:00
Array.h Bug 1319626 - Part 2: Add BorderLayer class and basic support for them. r=mstange 2016-11-24 18:11:30 +13:00
ArrayUtils.h
Assertions.cpp Bug 1338574 - Assertions.cpp can't use MOZ_CRASH_ANNOTATE, so set the crash reason directly. r=froydnj 2017-02-22 15:42:00 -05:00
Assertions.h Bug 1370794 - Use bool instead of integer being casted to bool r=Ehsan 2018-02-07 15:15:28 +01:00
Atomics.h Bug 1407137 - Implement Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete; to remove an actually-non-atomic footgun. r=froydnj 2017-10-10 10:19:31 -07:00
Attributes.h Bug 1437482 - gcc 8 has no-sanitize but not the {un,}signed-integer-overflow option r=Waldo 2018-02-12 12:07:52 +01:00
BinarySearch.h
BloomFilter.h
BufferList.h Bug 1379680. Add a way to append buffers to a BufferList. r=billm 2017-11-29 10:11:13 -05:00
Casting.h Bug 1295611 - Add mozilla::Span. r=froydnj,gerv. 2017-03-31 13:32:18 +03:00
ChaosMode.cpp
ChaosMode.h
Char16.h Bug 1428541 - Make char16ptr_t::operator bool() explicit. r=froydnj 2017-12-24 23:33:56 +09:00
CheckedInt.h Bug 1356936 - Use __builtin_add/sub/mul_overflow() where available to optimize CheckedInt. r=waldo,ehsan 2017-09-21 18:24:10 +02:00
Compiler.h Bug 1322792 - require GCC 4.9 to build; r=glandium 2016-12-23 05:47:31 -05:00
Compression.cpp Bug 1416183 - Build LZ4 as C instead of including it as C++. r=froydnj 2017-11-15 12:51:01 +09:00
Compression.h Bug 1396026 - Update OTS to accept Awami Nastaliq. r=froydnj,jfkthame 2017-09-07 10:40:59 -07:00
DebugOnly.h
DefineEnum.h Bug 1371771 - Add a MOZ_DEFINE_ENUM macro and variants to MFBT. r=froydnj 2017-06-30 19:58:11 -04:00
DoublyLinkedList.h Bug 1396723 - Use DoublyLinkedList in mozjemalloc. r=froydnj 2017-09-02 08:55:42 +09:00
EndianUtils.h Bug 1413049 - Part 1: Add methods to EndianUtils for pointer-sized integers. r=Waldo. 2018-03-01 11:05:13 -06:00
EnumeratedArray.h Initial import of Advanced Layers. (bug 1365879 part 20, r=bas) 2017-06-23 14:23:12 -07:00
EnumeratedRange.h
EnumSet.h Bug 1427229 - Perform validation when sending an EnumSet over IPC. r=botond,froydnj 2018-01-21 21:23:21 +01:00
EnumTypeTraits.h Bug 1427229 - Perform validation when sending an EnumSet over IPC. r=botond,froydnj 2018-01-21 21:23:21 +01:00
FastBernoulliTrial.h
FloatingPoint.cpp
FloatingPoint.h Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj 2018-02-15 17:22:14 -08:00
FStream.h Bug 1441112 - Stop including <iostream> in FStream.h. r=froydnj 2018-02-28 21:45:04 +09:00
GuardObjects.h Bug 1392885 -Add debug message when misusing the guard object. r=froydnj 2017-08-23 11:59:21 +08:00
HashFunctions.cpp
HashFunctions.h Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden 2018-03-08 10:27:14 +11:00
IndexSequence.h Bug 1287006 - Adjust media/ code to not pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer. r=jw_wang, r=rjesup 2017-02-13 09:07:40 -08:00
IntegerPrintfMacros.h Bug 1357873 - Fix up 64-bit Android macros in IntegerPrintfMacros.h; r=Waldo 2017-05-01 14:46:00 -04:00
IntegerRange.h Bug 1315274 - rename mozilla::MakeRange to mozilla::IntegerRange; r=Waldo 2017-01-06 09:22:53 -05:00
IntegerTypeTraits.h
JSONWriter.cpp
JSONWriter.h Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE 2018-02-21 10:15:43 +02:00
Likely.h
LinkedList.h Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn 2017-12-20 01:13:53 +01:00
LinuxSignal.h
lz4.c Bug 1430708 - Update lz4 to version 1.8.1.2. r=froydnj 2018-01-22 08:48:44 -05:00
lz4.h Bug 1430708 - Update lz4 to version 1.8.1.2. r=froydnj 2018-01-22 08:48:44 -05:00
MacroArgs.h Bug 1369622 - Fix MOZ_FOR_EACH with an empty list. r=froydnj 2017-06-02 14:53:54 +09:00
MacroForEach.h Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj 2017-05-25 15:47:21 +09:00
MathAlgorithms.h Bug 1443342 - Remove HashFunctions.h's RotateBitsLeft32 and use the general RotateLeft function instead. r=froydnj 2018-03-01 17:05:58 -08:00
Maybe.h Bug 1414901 - part 2 - poison Maybe<T> instances when not in use; r=Waldo 2018-03-06 11:35:50 -05:00
MaybeOneOf.h Bug 1339555 - Make various operator-news into a known-non-null pointer use a ::operator new overload that odesn't null-check. r=froydnj 2017-02-14 11:23:18 -08:00
MemoryChecking.h
MemoryReporting.h
Move.h
moz.build Bug 1441657 - Create a new mozilla/WrappingOperations.h header to contain implementations of common math operations with well-defined wraparound semantics. r=froydnj 2018-02-15 17:36:50 -08:00
NotNull.h Bug 1443367 - Rework MakeNotNull to build with VS 2017 15.6 - r=njn 2018-03-06 20:27:27 +11:00
NullPtr.h
Opaque.h
OperatorNewExtensions.h
Pair.h
Path.h Bug 1428543 - Add mozilla::filesystem::Path and use it in nsIFile. r=froydnj 2017-12-28 03:03:35 +09:00
PodOperations.h
Poison.cpp Bug 1158445 - posix_madvise() should be used instead of madvise on Solaris. r=froydnj, r=jandem 2017-06-09 00:59:32 -07:00
Poison.h Bug 1414901 - part 1b - eliminate alignment requirements for poisoning memory; r=Waldo 2018-03-06 11:35:50 -05:00
Range.h Bug 1295611 - Add mozilla::Span. r=froydnj,gerv. 2017-03-31 13:32:18 +03:00
RangedArray.h
RangedPtr.h Bug 1319740 - Parametrize ComputeSingleDisplayName based on the character type of the key string, and iterate through the string using iterators, not using null-termination. r=arai 2016-12-02 14:02:36 -08:00
ReentrancyGuard.h
RefCounted.h Bug 1385438 - make mozilla::RefCounted use the strongest memory consistency necessary; r=jrmuizel 2017-10-27 13:05:51 -04:00
RefCountType.h
RefPtr.h Bug 1390568 - manually de-virtualize do_QueryReferent; r=ehsan 2017-08-24 20:04:31 -04:00
Result.h Bug 1419682 - add unwrap_or() for Result. r=Waldo 2017-11-22 17:14:28 +08:00
ResultExtensions.h Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan 2017-08-29 21:28:31 -07:00
ReverseIterator.h
RollingMean.h No bug: RollingMean.h doc fix. DONTBUILD r=kentuckyfriedtakahe 2016-12-20 23:11:30 -08:00
Saturate.h
Scoped.h
ScopeExit.h
SegmentedVector.h Bug 1404297 - Add a move constructor to SegmentedVector. r=smaug 2018-03-01 11:26:54 -08:00
SHA1.cpp
SHA1.h
SmallPointerArray.h Bug 1397056 - Add Contains and a return parameter to Remove for SmallPointerArray. r=froydnj 2017-09-12 14:11:47 -04:00
Span.h Bug 1424103 - constexpr-ify mozilla::Span. r=hsivonen 2017-12-08 23:20:56 +09:00
SplayTree.h Bug 1381253 - Remove redundant control flow declarations rs=ehsan 2017-07-15 19:03:04 +02:00
Sprintf.h Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj 2017-05-04 12:10:19 -06:00
StaticAnalysisFunctions.h Bug 1444416: Handle references in the "can run script" checker. r=mystor 2018-03-09 17:51:59 +01:00
STYLE Bug 1332797 - Move mfbt/double-conversion source files into a new source/ subdirectory, to segregate upstream files from update.sh and our local patches. r=froydnj 2017-01-23 15:11:50 -08:00
TaggedAnonymousMemory.cpp
TaggedAnonymousMemory.h
TemplateLib.h Bug 1338374 - Make tl::Min/Max variadic. r=froydnj 2017-01-30 15:56:05 -08:00
ThreadLocal.h Bug 1417135 - Mark user-defined default constructor for ThreadLocalKeyStorage as constexpr. r=glandium 2017-11-15 01:33:00 -05:00
ThreadSafeWeakPtr.h Bug 1404742 - add ThreadSafeWeakPointer to MFBT. r=nfroyd 2017-10-18 14:21:23 -04:00
ToString.h
Tuple.h
TypedEnumBits.h Bug 1315624 - Delete operator&& and operator|| for CastableTypedEnumResult. r=froydnj 2016-11-07 15:00:16 +08:00
Types.h Bug 1277338 - Part 7: Export mozglue when JS_STANDALONE && !jemalloc; r=glandium,sfink 2017-08-31 15:59:13 -07:00
TypeTraits.h Bug 1318677 part 3 - mozilla::Result: Add a new packing strategy to pack small enumerated values in a single word. r=Waldo 2017-02-07 18:57:43 +00:00
UniquePtr.h
UniquePtrExtensions.h
Unused.cpp Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj 2016-08-24 14:47:04 +08:00
Unused.h Bug 1368616 - Error compiling TestBlockingProcess.exe with MinGW: undefined reference to _imp___ZN7mozilla6UnusedE r=froydnj 2017-06-21 11:47:11 +02:00
Variant.h Add IPC support for mozilla::Variant (bug 1371846); r=botond 2017-07-21 07:18:02 -05:00
Vector.h Bug 1329019 - Allow specifying capacity to Vector::replaceRawBuffer (r=froydnj) 2017-09-22 10:34:24 -05:00
WeakPtr.h Bug 1384395 - Use nsAutoOwningThread for mfbt/WeakPtr.h thread assertions (r=froydnj) 2017-07-28 13:11:44 -07:00
WindowsVersion.h Bug 1406793 - Make IsWindows* methods thread-safe. r=froydnj 2017-10-09 10:36:23 +02:00
WrappingOperations.h Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden 2018-03-08 10:27:14 +11:00
XorShift128PlusRNG.h Bug 1443342 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj 2018-03-06 09:33:52 -08:00