[INFER] Don't push a constant value in JSOP_TYPEOF, bug 643733. r=bhackett

This commit is contained in:
Jan de Mooij 2011-03-22 12:35:05 -07:00
parent bf929fa84d
commit 49c9ac30f6
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,4 @@
var x;
assertEq(-(typeof (x+x)), NaN);
assertEq(-(typeof Math.abs()), NaN);

View File

@ -798,8 +798,10 @@ mjit::Compiler::jsop_typeof()
} }
if (atom) { if (atom) {
RegisterID reg = frame.allocReg();
masm.move(ImmPtr(ATOM_TO_STRING(atom)), reg);
frame.pop(); frame.pop();
frame.push(StringValue(ATOM_TO_STRING(atom))); frame.pushTypedPayload(JSVAL_TYPE_STRING, reg);
return; return;
} }
} }