Bug 1102820 - Use MOZ_CONSTEXPR appropriately. r=mh+mozilla

This commit is contained in:
Lars T Hansen 2014-11-25 11:15:20 +01:00
parent 01b660f7c0
commit 03216f8975

View File

@ -39,33 +39,33 @@ enum MemoryBarrierBits {
MembarAllbits = 31,
};
inline MemoryBarrierBits
static inline MOZ_CONSTEXPR MemoryBarrierBits
operator|(MemoryBarrierBits a, MemoryBarrierBits b)
{
return MemoryBarrierBits(int(a) | int(b));
}
inline MemoryBarrierBits
static inline MOZ_CONSTEXPR MemoryBarrierBits
operator&(MemoryBarrierBits a, MemoryBarrierBits b)
{
return MemoryBarrierBits(int(a) & int(b));
}
inline MemoryBarrierBits
static inline MOZ_CONSTEXPR MemoryBarrierBits
operator~(MemoryBarrierBits a)
{
return MemoryBarrierBits(~int(a));
}
// Standard barrier bits for a full barrier.
static const MemoryBarrierBits MembarFull = MembarLoadLoad|MembarLoadStore|MembarStoreLoad|MembarStoreStore;
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarFull = MembarLoadLoad|MembarLoadStore|MembarStoreLoad|MembarStoreStore;
// Standard sets of barrier bits for atomic loads and stores.
// See http://gee.cs.oswego.edu/dl/jmm/cookbook.html for more.
static const MemoryBarrierBits MembarBeforeLoad = MembarNobits;
static const MemoryBarrierBits MembarAfterLoad = MembarLoadLoad|MembarLoadStore;
static const MemoryBarrierBits MembarBeforeStore = MembarStoreStore;
static const MemoryBarrierBits MembarAfterStore = MembarStoreLoad;
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarBeforeLoad = MembarNobits;
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarAfterLoad = MembarLoadLoad|MembarLoadStore;
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarBeforeStore = MembarStoreStore;
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarAfterStore = MembarStoreLoad;
} // namespace jit
} // namespace js