Bug 1331939 Rename GlobalFlags to GlobalTypeImmediate to fix MinGW build
MozReview-Commit-ID: 1jXd3LUZ0dT
--- a/js/src/wasm/WasmBinaryConstants.h
+++ b/js/src/wasm/WasmBinaryConstants.h
@@ -98,17 +98,17 @@ typedef Vector<ValType, 8, SystemAllocPo
enum class DefinitionKind
{
Function = 0x00,
Table = 0x01,
Memory = 0x02,
Global = 0x03
};
-enum class GlobalFlags
+enum class GlobalTypeImmediate
{
IsMutable = 0x1,
AllowedMask = 0x1
};
enum class MemoryTableFlags
{
Default = 0x0
--- a/js/src/wasm/WasmTextToBinary.cpp
+++ b/js/src/wasm/WasmTextToBinary.cpp
@@ -4432,17 +4432,17 @@ EncodeTableLimits(Encoder& e, const Limi
return EncodeLimits(e, limits);
}
static bool
EncodeGlobalType(Encoder& e, const AstGlobal* global)
{
return e.writeValType(global->type()) &&
- e.writeVarU32(global->isMutable() ? uint32_t(GlobalFlags::IsMutable) : 0);
+ e.writeVarU32(global->isMutable() ? uint32_t(GlobalTypeImmediate::IsMutable) : 0);
}
static bool
EncodeImport(Encoder& e, AstImport& imp)
{
if (!EncodeBytes(e, imp.module()))
return false;
--- a/js/src/wasm/WasmValidate.cpp
+++ b/js/src/wasm/WasmValidate.cpp
@@ -909,20 +909,20 @@ DecodeGlobalType(Decoder& d, ValType* ty
{
if (!DecodeValType(d, ModuleKind::Wasm, type))
return false;
uint32_t flags;
if (!d.readVarU32(&flags))
return d.fail("expected global flags");
- if (flags & ~uint32_t(GlobalFlags::AllowedMask))
+ if (flags & ~uint32_t(GlobalTypeImmediate::AllowedMask))
return d.fail("unexpected bits set in global flags");
- *isMutable = flags & uint32_t(GlobalFlags::IsMutable);
+ *isMutable = flags & uint32_t(GlobalTypeImmediate::IsMutable);
return true;
}
static bool
DecodeMemoryLimits(Decoder& d, ModuleEnvironment* env)
{
if (env->usesMemory())
return d.fail("already have default memory");