[INFER] Always mark overflows for slowpath incops, bug 646594.

This commit is contained in:
Brian Hackett 2011-03-30 15:01:31 -07:00
parent 0efc0215e7
commit 47fe3ec386
2 changed files with 4 additions and 3 deletions

View File

@ -4174,7 +4174,7 @@ do_incop:
goto error;
if (!cx->typeMonitorAssign(obj, id, regs.sp[-1]))
goto error;
if (!regs.sp[-1].isInt32() && !script->typeMonitorOverflow(cx, regs.pc))
if (!script->typeMonitorOverflow(cx, regs.pc))
goto error;
regs.fp->setAssigning();
JSBool ok = obj->setProperty(cx, id, &regs.sp[-1], script->strictModeCode);
@ -4248,7 +4248,7 @@ BEGIN_CASE(JSOP_LOCALINC)
PUSH_COPY(*vp);
if (!js_DoIncDec(cx, &js_CodeSpec[op], &regs.sp[-1], vp))
goto error;
if (!vp->isInt32() && !script->typeMonitorOverflow(cx, regs.pc))
if (!script->typeMonitorOverflow(cx, regs.pc))
goto error;
}
len = JSOP_INCARG_LENGTH;

View File

@ -1691,7 +1691,8 @@ ObjIncOp(VMFrame &f, JSObject *obj, jsid id)
d += N;
ref.setNumber(d);
}
if (!v.setNumber(d) && !f.script()->typeMonitorOverflow(cx, f.pc()))
v.setNumber(d);
if (!f.script()->typeMonitorOverflow(cx, f.pc()))
return false;
if (!cx->typeMonitorAssign(obj, id, v))
return false;