Bug 1316830 - Use default value instead of duplicating code. r=bbouvier

This commit is contained in:
Nicolas B. Pierron 2016-11-14 07:27:00 +01:00
parent 9c8d7b0849
commit 6ff62e4d56

View File

@ -6790,18 +6790,7 @@ class MAdd : public MBinaryArithInstruction
setResultType(MIRType::Value);
}
MAdd(MDefinition* left, MDefinition* right, MIRType type)
: MAdd(left, right)
{
specialization_ = type;
setResultType(type);
if (type == MIRType::Int32) {
setTruncateKind(Truncate);
setCommutative();
}
}
MAdd(MDefinition* left, MDefinition* right, MIRType type, TruncateKind truncateKind)
MAdd(MDefinition* left, MDefinition* right, MIRType type, TruncateKind truncateKind = Truncate)
: MAdd(left, right)
{
specialization_ = type;