[JAEGER] Added JSOP_BITNOT.

This commit is contained in:
David Anderson
2010-06-05 17:21:56 -07:00
parent 060c9ba419
commit 2929762456
5 changed files with 66 additions and 0 deletions

View File

@@ -484,6 +484,21 @@ mjit::Compiler::generateMethod()
jsop_binary(op, stubs::Mod);
END_CASE(JSOP_MOD)
BEGIN_CASE(JSOP_BITNOT)
{
FrameEntry *top = frame.peek(-1);
if (top->isConstant() && top->getValue().isPrimitive()) {
int32_t i;
ValueToECMAInt32(cx, top->getValue(), &i);
i = ~i;
frame.pop();
frame.push(Int32Tag(i));
} else {
jsop_bitnot();
}
}
END_CASE(JSOP_BITNOT)
BEGIN_CASE(JSOP_NEG)
{
FrameEntry *top = frame.peek(-1);