[INFER] Don't use loop registers for entries whose representation changed due to a jump into the loop, bug 684824.

This commit is contained in:
Brian Hackett 2011-09-11 22:36:04 -07:00
parent 093c919b57
commit bd9939fb3a
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,7 @@
function X(n) {
while ('' + (n--)) {
break;
}
}
X();

View File

@ -7216,7 +7216,12 @@ mjit::Compiler::updateJoinVarTypes()
if (newv->slot < TotalSlots(script)) {
VarType &vt = a->varTypes[newv->slot];
vt.types = analysis->getValueTypes(newv->value);
vt.type = vt.types->getKnownTypeTag(cx);
JSValueType newType = vt.types->getKnownTypeTag(cx);
if (newType != vt.type) {
FrameEntry *fe = frame.getSlotEntry(newv->slot);
frame.forgetLoopReg(fe);
}
vt.type = newType;
}
newv++;
}