Bug 1146311: Make some SIMD nodes cloneable and movable; r=sunfish

This commit is contained in:
Benjamin Bouvier 2015-03-23 13:41:10 +01:00
parent 9d90deaf90
commit 0ee9483405

View File

@ -1491,8 +1491,8 @@ class MSimdConstant
protected: protected:
MSimdConstant(const SimdConstant &v, MIRType type) : value_(v) { MSimdConstant(const SimdConstant &v, MIRType type) : value_(v) {
MOZ_ASSERT(IsSimdType(type)); MOZ_ASSERT(IsSimdType(type));
setResultType(type);
setMovable(); setMovable();
setResultType(type);
} }
public: public:
@ -1527,6 +1527,7 @@ class MSimdConvert
: MUnaryInstruction(obj) : MUnaryInstruction(obj)
{ {
MOZ_ASSERT(IsSimdType(toType)); MOZ_ASSERT(IsSimdType(toType));
setMovable();
setResultType(toType); setResultType(toType);
specialization_ = fromType; // expects fromType as input specialization_ = fromType; // expects fromType as input
} }
@ -1564,6 +1565,7 @@ class MSimdReinterpretCast
: MUnaryInstruction(obj) : MUnaryInstruction(obj)
{ {
MOZ_ASSERT(IsSimdType(toType)); MOZ_ASSERT(IsSimdType(toType));
setMovable();
setResultType(toType); setResultType(toType);
specialization_ = fromType; // expects fromType as input specialization_ = fromType; // expects fromType as input
} }
@ -1608,6 +1610,7 @@ class MSimdExtractElement
MOZ_ASSERT(!IsSimdType(scalarType)); MOZ_ASSERT(!IsSimdType(scalarType));
MOZ_ASSERT(SimdTypeToScalarType(vecType) == scalarType); MOZ_ASSERT(SimdTypeToScalarType(vecType) == scalarType);
setMovable();
specialization_ = vecType; specialization_ = vecType;
setResultType(scalarType); setResultType(scalarType);
} }