[INFER] Use AnyRegisterID::fromRaw in peekReg instead of casting to RegisterID, bug 655810. r=bhackett

This commit is contained in:
Jan de Mooij 2011-05-12 15:31:17 +02:00
parent 55015fcf39
commit fb403a239f
2 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,6 @@
function f(arr) {
var x = arr[0];
if (typeof x) {};
Math.abs(x);
}
f([1.2]);

View File

@ -434,10 +434,9 @@ struct Registers {
AnyRegisterID peekReg(uint32 mask) {
JS_ASSERT(!empty(mask));
int ireg;
unsigned ireg;
JS_FLOOR_LOG2(ireg, freeMask & mask);
RegisterID reg = (RegisterID)ireg;
return reg;
return AnyRegisterID::fromRaw(ireg);
}
AnyRegisterID peekReg() {