зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271959 - Don't specify a size for enum class SimdType. r=bbouvier
There is a bug in GCC 4.8 that miscompiles some uses of an enum with uint8_t size. Work around this compiler bug by not specifying a size for SimdType. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64037
This commit is contained in:
Родитель
9e1b71d4c8
Коммит
75dc89e58f
|
@ -755,7 +755,7 @@ namespace js {
|
|||
// It must be kept in sync with the enumeration of values in
|
||||
// TypedObjectConstants.h; in particular we need to ensure that Count is
|
||||
// appropriately set with respect to the number of actual types.
|
||||
enum class SimdType : uint8_t {
|
||||
enum class SimdType {
|
||||
Int8x16 = JS_SIMDTYPEREPR_INT8X16,
|
||||
Int16x8 = JS_SIMDTYPEREPR_INT16X8,
|
||||
Int32x4 = JS_SIMDTYPEREPR_INT32X4,
|
||||
|
|
|
@ -327,7 +327,7 @@ class ComplexTypeDescr : public TypeDescr
|
|||
}
|
||||
};
|
||||
|
||||
enum class SimdType : uint8_t;
|
||||
enum class SimdType;
|
||||
|
||||
/*
|
||||
* SIMD Type descriptors.
|
||||
|
|
|
@ -1335,7 +1335,7 @@ MSimdBox::writeRecoverData(CompactBufferWriter& writer) const
|
|||
{
|
||||
MOZ_ASSERT(canRecoverOnBailout());
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_SimdBox));
|
||||
static_assert(sizeof(SimdType) == sizeof(uint8_t), "assuming uint8 storage class for SimdType");
|
||||
static_assert(unsigned(SimdType::Count) < 0x100, "assuming SimdType fits in 8 bits");
|
||||
writer.writeByte(uint8_t(simdType()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class StaticBlockScope;
|
|||
class ClonedBlockObject;
|
||||
|
||||
class SimdTypeDescr;
|
||||
enum class SimdType : uint8_t;
|
||||
enum class SimdType;
|
||||
|
||||
/*
|
||||
* Global object slots are reserved as follows:
|
||||
|
|
Загрузка…
Ссылка в новой задаче