Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (237428 => 237429)
--- trunk/Source/_javascript_Core/ChangeLog 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-10-25 22:23:23 UTC (rev 237429)
@@ -1,3 +1,21 @@
+2018-10-25 Ross Kirsling <[email protected]>
+
+ Cleanup: inline constexpr is redundant as constexpr implies inline
+ https://bugs.webkit.org/show_bug.cgi?id=190819
+
+ Reviewed by Mark Lam.
+
+ * bytecode/ArrayProfile.h:
+ (JSC::asArrayModes):
+ * runtime/IndexingType.h:
+ (JSC::isCopyOnWrite):
+ * runtime/MathCommon.h:
+ (JSC::maxSafeInteger):
+ (JSC::minSafeInteger):
+ * runtime/StackAlignment.h:
+ (JSC::stackAlignmentBytes):
+ (JSC::stackAlignmentRegisters):
+
2018-10-24 Megan Gardner <[email protected]>
Turn on Conic Gradients
Modified: trunk/Source/_javascript_Core/bytecode/ArrayProfile.h (237428 => 237429)
--- trunk/Source/_javascript_Core/bytecode/ArrayProfile.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/_javascript_Core/bytecode/ArrayProfile.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -58,7 +58,7 @@
const ArrayModes Float32ArrayMode = 1 << 28;
const ArrayModes Float64ArrayMode = 1 << 29;
-inline constexpr ArrayModes asArrayModes(IndexingType indexingMode)
+constexpr ArrayModes asArrayModes(IndexingType indexingMode)
{
return static_cast<unsigned>(1) << static_cast<unsigned>(indexingMode);
}
Modified: trunk/Source/_javascript_Core/runtime/IndexingType.h (237428 => 237429)
--- trunk/Source/_javascript_Core/runtime/IndexingType.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/_javascript_Core/runtime/IndexingType.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -195,7 +195,7 @@
return hasSlowPutArrayStorage(indexingType);
}
-inline constexpr bool isCopyOnWrite(IndexingType indexingMode)
+constexpr bool isCopyOnWrite(IndexingType indexingMode)
{
return indexingMode & CopyOnWrite;
}
Modified: trunk/Source/_javascript_Core/runtime/MathCommon.h (237428 => 237429)
--- trunk/Source/_javascript_Core/runtime/MathCommon.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/_javascript_Core/runtime/MathCommon.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -35,13 +35,13 @@
int32_t JIT_OPERATION operationToInt32(double) WTF_INTERNAL;
int32_t JIT_OPERATION operationToInt32SensibleSlow(double) WTF_INTERNAL;
-inline constexpr double maxSafeInteger()
+constexpr double maxSafeInteger()
{
// 2 ^ 53 - 1
return 9007199254740991.0;
}
-inline constexpr double minSafeInteger()
+constexpr double minSafeInteger()
{
// -(2 ^ 53 - 1)
return -9007199254740991.0;
Modified: trunk/Source/_javascript_Core/runtime/StackAlignment.h (237428 => 237429)
--- trunk/Source/_javascript_Core/runtime/StackAlignment.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/_javascript_Core/runtime/StackAlignment.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -32,9 +32,9 @@
namespace JSC {
// NB. Different platforms may have different requirements here. But 16 bytes is very common.
-inline constexpr unsigned stackAlignmentBytes() { return 16; }
+constexpr unsigned stackAlignmentBytes() { return 16; }
-inline constexpr unsigned stackAlignmentRegisters()
+constexpr unsigned stackAlignmentRegisters()
{
return stackAlignmentBytes() / sizeof(EncodedJSValue);
}
Modified: trunk/Source/WTF/ChangeLog (237428 => 237429)
--- trunk/Source/WTF/ChangeLog 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/ChangeLog 2018-10-25 22:23:23 UTC (rev 237429)
@@ -1,3 +1,43 @@
+2018-10-25 Ross Kirsling <[email protected]>
+
+ Cleanup: inline constexpr is redundant as constexpr implies inline
+ https://bugs.webkit.org/show_bug.cgi?id=190819
+
+ Reviewed by Mark Lam.
+
+ * wtf/Bitmap.h:
+ (WTF::WordType>::Bitmap):
+ * wtf/LEBDecoder.h:
+ (WTF::LEBDecoder::maxByteLength):
+ * wtf/MathExtras.h:
+ (defaultMinimumForClamp):
+ (defaultMaximumForClamp):
+ (clampToAccepting64):
+ (isLessThan):
+ (isLessThanEqual):
+ (isGreaterThan):
+ (isGreaterThanEqual):
+ (WTF::roundUpToPowerOfTwo):
+ (WTF::maskForSize):
+ * wtf/Optional.h:
+ * wtf/PtrTag.h:
+ (WTF::tagCodePtr):
+ (WTF::untagCodePtr):
+ (WTF::retagCodePtr):
+ (WTF::removeCodePtrTag):
+ * wtf/StdLibExtras.h:
+ (WTF::roundUpToMultipleOf):
+ * wtf/Variant.h:
+ (WTF::operator==):
+ (WTF::operator!=):
+ (WTF::operator>=):
+ (WTF::operator<=):
+ (WTF::operator>):
+ (WTF::operator<):
+ * wtf/text/StringImpl.h:
+ (WTF::StringImplShape::StringImplShape):
+ (WTF::StringImpl::StaticStringImpl::StaticStringImpl):
+
2018-10-25 Geoffrey Garen <[email protected]>
HashMap should support selecting a random entry
Modified: trunk/Source/WTF/wtf/Bitmap.h (237428 => 237429)
--- trunk/Source/WTF/wtf/Bitmap.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/Bitmap.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -133,7 +133,7 @@
};
template<size_t bitmapSize, typename WordType>
-constexpr inline Bitmap<bitmapSize, WordType>::Bitmap()
+constexpr Bitmap<bitmapSize, WordType>::Bitmap()
{
clearAll();
}
Modified: trunk/Source/WTF/wtf/LEBDecoder.h (237428 => 237429)
--- trunk/Source/WTF/wtf/LEBDecoder.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/LEBDecoder.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -36,7 +36,7 @@
namespace WTF { namespace LEBDecoder {
template<typename T>
-inline constexpr size_t maxByteLength()
+constexpr size_t maxByteLength()
{
const size_t numBits = sizeof(T) * CHAR_BIT;
return (numBits - 1) / 7 + 1; // numBits / 7 rounding up.
Modified: trunk/Source/WTF/wtf/MathExtras.h (237428 => 237429)
--- trunk/Source/WTF/wtf/MathExtras.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/MathExtras.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -118,10 +118,10 @@
inline float grad2rad(float g) { return g * piFloat / 200.0f; }
// std::numeric_limits<T>::min() returns the smallest positive value for floating point types
-template<typename T> constexpr inline T defaultMinimumForClamp() { return std::numeric_limits<T>::min(); }
-template<> constexpr inline float defaultMinimumForClamp() { return -std::numeric_limits<float>::max(); }
-template<> constexpr inline double defaultMinimumForClamp() { return -std::numeric_limits<double>::max(); }
-template<typename T> constexpr inline T defaultMaximumForClamp() { return std::numeric_limits<T>::max(); }
+template<typename T> constexpr T defaultMinimumForClamp() { return std::numeric_limits<T>::min(); }
+template<> constexpr float defaultMinimumForClamp() { return -std::numeric_limits<float>::max(); }
+template<> constexpr double defaultMinimumForClamp() { return -std::numeric_limits<double>::max(); }
+template<typename T> constexpr T defaultMaximumForClamp() { return std::numeric_limits<T>::max(); }
template<typename T> inline T clampTo(double value, T min = defaultMinimumForClamp<T>(), T max = defaultMaximumForClamp<T>())
{
@@ -172,7 +172,7 @@
// Explicitly accept 64bit result when clamping double value.
// Keep in mind that double can only represent 53bit integer precisely.
-template<typename T> constexpr inline T clampToAccepting64(double value, T min = defaultMinimumForClamp<T>(), T max = defaultMaximumForClamp<T>())
+template<typename T> constexpr T clampToAccepting64(double value, T min = defaultMinimumForClamp<T>(), T max = defaultMaximumForClamp<T>())
{
return (value >= static_cast<double>(max)) ? max : ((value <= static_cast<double>(min)) ? min : static_cast<T>(value));
}
@@ -250,10 +250,10 @@
return !!((value >> 1) >> (power - 1));
}
-template<typename T> constexpr inline bool isLessThan(const T& a, const T& b) { return a < b; }
-template<typename T> constexpr inline bool isLessThanEqual(const T& a, const T& b) { return a <= b; }
-template<typename T> constexpr inline bool isGreaterThan(const T& a, const T& b) { return a > b; }
-template<typename T> constexpr inline bool isGreaterThanEqual(const T& a, const T& b) { return a >= b; }
+template<typename T> constexpr bool isLessThan(const T& a, const T& b) { return a < b; }
+template<typename T> constexpr bool isLessThanEqual(const T& a, const T& b) { return a <= b; }
+template<typename T> constexpr bool isGreaterThan(const T& a, const T& b) { return a > b; }
+template<typename T> constexpr bool isGreaterThanEqual(const T& a, const T& b) { return a >= b; }
#ifndef UINT64_C
#if COMPILER(MSVC)
@@ -333,7 +333,7 @@
namespace WTF {
// From http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
-inline constexpr uint32_t roundUpToPowerOfTwo(uint32_t v)
+constexpr uint32_t roundUpToPowerOfTwo(uint32_t v)
{
v--;
v |= v >> 1;
@@ -345,7 +345,7 @@
return v;
}
-inline constexpr unsigned maskForSize(unsigned size)
+constexpr unsigned maskForSize(unsigned size)
{
if (!size)
return 0;
Modified: trunk/Source/WTF/wtf/Optional.h (237428 => 237429)
--- trunk/Source/WTF/wtf/Optional.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/Optional.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -215,18 +215,18 @@
namespace detail_ {
// workaround: std utility functions aren't constexpr yet
-template <class T> inline constexpr T&& constexpr_forward(typename std::remove_reference<T>::type& t) __NOEXCEPT
+template <class T> constexpr T&& constexpr_forward(typename std::remove_reference<T>::type& t) __NOEXCEPT
{
return static_cast<T&&>(t);
}
-template <class T> inline constexpr T&& constexpr_forward(typename std::remove_reference<T>::type&& t) __NOEXCEPT
+template <class T> constexpr T&& constexpr_forward(typename std::remove_reference<T>::type&& t) __NOEXCEPT
{
static_assert(!std::is_lvalue_reference<T>::value, "!!");
return static_cast<T&&>(t);
}
-template <class T> inline constexpr typename std::remove_reference<T>::type&& constexpr_move(T&& t) __NOEXCEPT
+template <class T> constexpr typename std::remove_reference<T>::type&& constexpr_move(T&& t) __NOEXCEPT
{
return static_cast<typename std::remove_reference<T>::type&&>(t);
}
Modified: trunk/Source/WTF/wtf/PtrTag.h (237428 => 237429)
--- trunk/Source/WTF/wtf/PtrTag.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/PtrTag.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -82,46 +82,46 @@
inline const char* tagForPtr(const void*) { return "<no tag>"; }
template<typename T, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value && !std::is_same<T, PtrType>::value>>
-inline constexpr T tagCodePtr(PtrType ptr, PtrTag) { return bitwise_cast<T>(ptr); }
+constexpr T tagCodePtr(PtrType ptr, PtrTag) { return bitwise_cast<T>(ptr); }
template<typename T, PtrTag, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
inline T tagCodePtr(PtrType ptr) { return bitwise_cast<T>(ptr); }
template<typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
-inline constexpr PtrType tagCodePtr(PtrType ptr, PtrTag) { return ptr; }
+constexpr PtrType tagCodePtr(PtrType ptr, PtrTag) { return ptr; }
template<PtrTag, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
inline PtrType tagCodePtr(PtrType ptr) { return ptr; }
template<typename T, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value && !std::is_same<T, PtrType>::value>>
-inline constexpr T untagCodePtr(PtrType ptr, PtrTag) { return bitwise_cast<T>(ptr); }
+constexpr T untagCodePtr(PtrType ptr, PtrTag) { return bitwise_cast<T>(ptr); }
template<typename T, PtrTag, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
inline T untagCodePtr(PtrType ptr) { return bitwise_cast<T>(ptr); }
template<typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
-inline constexpr PtrType untagCodePtr(PtrType ptr, PtrTag) { return ptr; }
+constexpr PtrType untagCodePtr(PtrType ptr, PtrTag) { return ptr; }
template<PtrTag, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
inline PtrType untagCodePtr(PtrType ptr) { return ptr; }
template<typename T, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value && !std::is_same<T, PtrType>::value>>
-inline constexpr T retagCodePtr(PtrType ptr, PtrTag, PtrTag) { return bitwise_cast<T>(ptr); }
+constexpr T retagCodePtr(PtrType ptr, PtrTag, PtrTag) { return bitwise_cast<T>(ptr); }
template<typename T, PtrTag, PtrTag, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
inline T retagCodePtr(PtrType ptr) { return bitwise_cast<T>(ptr); }
template<typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
-inline constexpr PtrType retagCodePtr(PtrType ptr, PtrTag, PtrTag) { return ptr; }
+constexpr PtrType retagCodePtr(PtrType ptr, PtrTag, PtrTag) { return ptr; }
template<PtrTag, PtrTag, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
inline PtrType retagCodePtr(PtrType ptr) { return ptr; }
template<typename T, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value && !std::is_same<T, PtrType>::value>>
-inline constexpr T removeCodePtrTag(PtrType ptr) { return bitwise_cast<T>(ptr); }
+constexpr T removeCodePtrTag(PtrType ptr) { return bitwise_cast<T>(ptr); }
template<typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value>>
-inline constexpr PtrType removeCodePtrTag(PtrType ptr) { return ptr; }
+constexpr PtrType removeCodePtrTag(PtrType ptr) { return ptr; }
template<typename T, typename PtrType, typename = std::enable_if_t<std::is_pointer<PtrType>::value && !std::is_same<T, PtrType>::value>>
inline T tagCFunctionPtr(PtrType ptr, PtrTag) { return bitwise_cast<T>(ptr); }
Modified: trunk/Source/WTF/wtf/StdLibExtras.h (237428 => 237429)
--- trunk/Source/WTF/wtf/StdLibExtras.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/StdLibExtras.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -189,7 +189,7 @@
return roundUpToMultipleOfImpl(divisor, x);
}
-template<size_t divisor> inline constexpr size_t roundUpToMultipleOf(size_t x)
+template<size_t divisor> constexpr size_t roundUpToMultipleOf(size_t x)
{
static_assert(divisor && !(divisor & (divisor - 1)), "divisor must be a power of two!");
return roundUpToMultipleOfImpl(divisor, x);
@@ -448,7 +448,7 @@
// This workaround can be removed after 2019-04 and all users of WTF::tie can be converted to std::tie
// For more info see: https://bugs.webkit.org/show_bug.cgi?id=180692 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65978
template <class ...Args>
-inline constexpr std::tuple<Args&...> tie(Args&... values)
+constexpr std::tuple<Args&...> tie(Args&... values)
{
return std::tuple<Args&...>(values...);
}
Modified: trunk/Source/WTF/wtf/Variant.h (237428 => 237429)
--- trunk/Source/WTF/wtf/Variant.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/Variant.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -2027,12 +2027,12 @@
struct Monostate{};
-constexpr inline bool operator==(Monostate const&,Monostate const&){ return true;}
-constexpr inline bool operator!=(Monostate const&,Monostate const&){ return false;}
-constexpr inline bool operator>=(Monostate const&,Monostate const&){ return true;}
-constexpr inline bool operator<=(Monostate const&,Monostate const&){ return true;}
-constexpr inline bool operator>(Monostate const&,Monostate const&){ return false;}
-constexpr inline bool operator<(Monostate const&,Monostate const&){ return false;}
+constexpr bool operator==(Monostate const&, Monostate const&) { return true; }
+constexpr bool operator!=(Monostate const&, Monostate const&) { return false; }
+constexpr bool operator>=(Monostate const&, Monostate const&) { return true; }
+constexpr bool operator<=(Monostate const&, Monostate const&) { return true; }
+constexpr bool operator>(Monostate const&, Monostate const&) { return false; }
+constexpr bool operator<(Monostate const&, Monostate const&) { return false; }
struct __hash_visitor{
template<typename _Type>
Modified: trunk/Source/WTF/wtf/text/StringImpl.h (237428 => 237429)
--- trunk/Source/WTF/wtf/text/StringImpl.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/WTF/wtf/text/StringImpl.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -773,7 +773,7 @@
{
}
-template<unsigned characterCount> inline constexpr StringImplShape::StringImplShape(unsigned refCount, unsigned length, const char (&characters)[characterCount], unsigned hashAndFlags, ConstructWithConstExprTag)
+template<unsigned characterCount> constexpr StringImplShape::StringImplShape(unsigned refCount, unsigned length, const char (&characters)[characterCount], unsigned hashAndFlags, ConstructWithConstExprTag)
: m_refCount(refCount)
, m_length(length)
, m_data8Char(characters)
@@ -781,7 +781,7 @@
{
}
-template<unsigned characterCount> inline constexpr StringImplShape::StringImplShape(unsigned refCount, unsigned length, const char16_t (&characters)[characterCount], unsigned hashAndFlags, ConstructWithConstExprTag)
+template<unsigned characterCount> constexpr StringImplShape::StringImplShape(unsigned refCount, unsigned length, const char16_t (&characters)[characterCount], unsigned hashAndFlags, ConstructWithConstExprTag)
: m_refCount(refCount)
, m_length(length)
, m_data16Char(characters)
@@ -1159,13 +1159,13 @@
ASSERT(existingHash() == StringHasher::computeHashAndMaskTop8Bits(characters8(), length()));
}
-template<unsigned characterCount> inline constexpr StringImpl::StaticStringImpl::StaticStringImpl(const char (&characters)[characterCount], StringKind stringKind)
+template<unsigned characterCount> constexpr StringImpl::StaticStringImpl::StaticStringImpl(const char (&characters)[characterCount], StringKind stringKind)
: StringImplShape(s_refCountFlagIsStaticString, characterCount - 1, characters,
s_hashFlag8BitBuffer | s_hashFlagDidReportCost | stringKind | BufferInternal | (StringHasher::computeLiteralHashAndMaskTop8Bits(characters) << s_flagCount), ConstructWithConstExpr)
{
}
-template<unsigned characterCount> inline constexpr StringImpl::StaticStringImpl::StaticStringImpl(const char16_t (&characters)[characterCount], StringKind stringKind)
+template<unsigned characterCount> constexpr StringImpl::StaticStringImpl::StaticStringImpl(const char16_t (&characters)[characterCount], StringKind stringKind)
: StringImplShape(s_refCountFlagIsStaticString, characterCount - 1, characters,
s_hashFlagDidReportCost | stringKind | BufferInternal | (StringHasher::computeLiteralHashAndMaskTop8Bits(characters) << s_flagCount), ConstructWithConstExpr)
{
Modified: trunk/Source/bmalloc/ChangeLog (237428 => 237429)
--- trunk/Source/bmalloc/ChangeLog 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/bmalloc/ChangeLog 2018-10-25 22:23:23 UTC (rev 237429)
@@ -1,3 +1,25 @@
+2018-10-25 Ross Kirsling <[email protected]>
+
+ Cleanup: inline constexpr is redundant as constexpr implies inline
+ https://bugs.webkit.org/show_bug.cgi?id=190819
+
+ Reviewed by Mark Lam.
+
+ * bmalloc/Algorithm.h:
+ (bmalloc::max):
+ (bmalloc::min):
+ (bmalloc::mask):
+ (bmalloc::test):
+ (bmalloc::isPowerOfTwo):
+ (bmalloc::roundDownToMultipleOf):
+ (bmalloc::sizeOf):
+ (bmalloc::bitCount):
+ (bmalloc::log2):
+ * bmalloc/Bits.h:
+ (bmalloc::bitsArrayLength):
+ * bmalloc/Sizes.h:
+ (bmalloc::Sizes::maskSizeClass):
+
2018-10-24 Alexey Proskuryakov <[email protected]>
Add BPLATFORM(IOS_FAMILY)
Modified: trunk/Source/bmalloc/bmalloc/Algorithm.h (237428 => 237429)
--- trunk/Source/bmalloc/bmalloc/Algorithm.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/bmalloc/bmalloc/Algorithm.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -38,17 +38,17 @@
namespace bmalloc {
// Versions of min and max that are compatible with compile-time constants.
-template<typename T> inline constexpr T max(T a, T b)
+template<typename T> constexpr T max(T a, T b)
{
return a > b ? a : b;
}
-template<typename T> inline constexpr T min(T a, T b)
+template<typename T> constexpr T min(T a, T b)
{
return a < b ? a : b;
}
-template<typename T> inline constexpr T mask(T value, uintptr_t mask)
+template<typename T> constexpr T mask(T value, uintptr_t mask)
{
static_assert(sizeof(T) == sizeof(uintptr_t), "sizeof(T) must be equal to sizeof(uintptr_t).");
return static_cast<T>(static_cast<uintptr_t>(value) & mask);
@@ -59,13 +59,13 @@
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(value) & mask);
}
-template<typename T> inline constexpr bool test(T value, uintptr_t mask)
+template<typename T> constexpr bool test(T value, uintptr_t mask)
{
return !!(reinterpret_cast<uintptr_t>(value) & mask);
}
template <typename T>
-inline constexpr bool isPowerOfTwo(T size)
+constexpr bool isPowerOfTwo(T size)
{
static_assert(std::is_integral<T>::value, "");
return size && !(size & (size - 1));
@@ -102,7 +102,7 @@
return reinterpret_cast<T>(mask(reinterpret_cast<uintptr_t>(x), ~(divisor - 1ul)));
}
-template<size_t divisor, typename T> inline constexpr T roundDownToMultipleOf(T x)
+template<size_t divisor, typename T> constexpr T roundDownToMultipleOf(T x)
{
static_assert(isPowerOfTwo(divisor), "'divisor' must be a power of two.");
return roundDownToMultipleOf(divisor, x);
@@ -129,12 +129,12 @@
// Version of sizeof that returns 0 for empty classes.
-template<typename T> inline constexpr size_t sizeOf()
+template<typename T> constexpr size_t sizeOf()
{
return std::is_empty<T>::value ? 0 : sizeof(T);
}
-template<typename T> inline constexpr size_t bitCount()
+template<typename T> constexpr size_t bitCount()
{
return sizeof(T) * 8;
}
@@ -156,7 +156,7 @@
}
#endif
-inline constexpr unsigned long log2(unsigned long value)
+constexpr unsigned long log2(unsigned long value)
{
return bitCount<unsigned long>() - 1 - __builtin_clzl(value);
}
Modified: trunk/Source/bmalloc/bmalloc/Bits.h (237428 => 237429)
--- trunk/Source/bmalloc/bmalloc/Bits.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/bmalloc/bmalloc/Bits.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -31,7 +31,7 @@
namespace bmalloc {
-constexpr inline size_t bitsArrayLength(size_t numBits) { return (numBits + 31) / 32; }
+constexpr size_t bitsArrayLength(size_t numBits) { return (numBits + 31) / 32; }
class BitsWordView {
public:
Modified: trunk/Source/bmalloc/bmalloc/Sizes.h (237428 => 237429)
--- trunk/Source/bmalloc/bmalloc/Sizes.h 2018-10-25 20:49:47 UTC (rev 237428)
+++ trunk/Source/bmalloc/bmalloc/Sizes.h 2018-10-25 22:23:23 UTC (rev 237429)
@@ -73,7 +73,7 @@
static const size_t maskSizeClassCount = maskSizeClassMax / alignment;
- inline constexpr size_t maskSizeClass(size_t size)
+ constexpr size_t maskSizeClass(size_t size)
{
// We mask to accommodate zero.
return mask((size - 1) / alignment, maskSizeClassCount - 1);