Don't compile effectful incslot ops (no bug, r=dvander)

This commit is contained in:
Jan de Mooij 2012-02-03 23:08:58 +01:00
parent e6089a8609
commit 6dd1969747

View File

@ -2397,10 +2397,14 @@ IonBuilder::jsop_incslot(JSOp op, uint32 slot)
current->pushSlot(slot);
MDefinition *value = current->pop();
MInstruction *lhs;
if (types.lhs == MIRType_Int32)
if (types.lhs == MIRType_Int32) {
lhs = MToInt32::New(value);
else
} else if (types.lhs == MIRType_Double) {
lhs = MToDouble::New(value);
} else {
// Don't compile effectful incslot ops.
return abort("INCSLOT non-int/double lhs");
}
current->add(lhs);
// If this is a post operation, save the original value.