This puts in a reduced-register version of Xoroshiro128++ which /just/
fits in our x86 7-register space by making use of an extra mState to
temporarily store the result to be passed back.
Resolves#2895
Surrounding structures remain the same because the bit width remains 128.
The more complicated algorithm requires more temp registers in LRandom
to account for intermediate result placeholders in the JITed version of
this algorithm.
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.
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.
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).
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
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.
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.
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.