mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
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.
This commit is contained in:
parent
13ac0d6483
commit
ddd49121a6
3 changed files with 77 additions and 37 deletions
|
|
@ -507,7 +507,7 @@ class MOZ_NON_PARAM alignas(8) Value
|
|||
#if defined(JS_NUNBOX32)
|
||||
return uint32_t(toTag()) <= uint32_t(JSVAL_TAG_CLEAR);
|
||||
#elif defined(JS_PUNBOX64)
|
||||
return (data.asBits | mozilla::DoubleTypeTraits::kSignBit) <= JSVAL_SHIFTED_TAG_MAX_DOUBLE;
|
||||
return (data.asBits | mozilla::FloatingPoint<double>::kSignBit) <= JSVAL_SHIFTED_TAG_MAX_DOUBLE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -1090,7 +1090,7 @@ IsCanonicalized(double d)
|
|||
|
||||
uint64_t bits;
|
||||
mozilla::BitwiseCast<uint64_t>(d, &bits);
|
||||
return (bits & ~mozilla::DoubleTypeTraits::kSignBit) == detail::CanonicalizedNaNBits;
|
||||
return (bits & ~mozilla::FloatingPoint<double>::kSignBit) == detail::CanonicalizedNaNBits;
|
||||
}
|
||||
|
||||
static inline Value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue