Properly propagate return values in LOCALINC/ARGINC. no bug, r=dvander
Properly propagate return values in LOCALINC/ARGINC. no bug, r=dvander
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -1563,17 +1563,17 @@ IonBuilder::jsop_localinc(JSOp op)
current->pushLocal(GET_SLOTNO(pc));
if (!pushConstant(Int32Value(amt)))
return false;
if (!jsop_binary(JSOP_ADD))
return false;
- if (current->setLocal(GET_SLOTNO(pc)))
+ if (!current->setLocal(GET_SLOTNO(pc)))
return false;
if (post_incr)
current->pop();
return true;
}
@@ -1589,17 +1589,17 @@ IonBuilder::jsop_arginc(JSOp op)
current->pushArg(GET_SLOTNO(pc));
if (!pushConstant(Int32Value(amt)))
return false;
if (!jsop_binary(JSOP_ADD))
return false;
- if (current->setArg(GET_SLOTNO(pc)))
+ if (!current->setArg(GET_SLOTNO(pc)))
return false;
if (post_incr)
current->pop();
return true;
}