diff --git a/js/src/jit-test/tests/jaeger/bug647785.js b/js/src/jit-test/tests/jaeger/bug647785.js new file mode 100644 index 00000000000..8c53e3f8da4 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/bug647785.js @@ -0,0 +1,4 @@ +assertEq(-(!Int32Array(5)), -0); +assertEq(-(!Math), -0); +assertEq(-(!{}), -0); +assertEq(-(![]), -0); diff --git a/js/src/methodjit/FastOps.cpp b/js/src/methodjit/FastOps.cpp index 46c75ff555c..85a6b99f938 100644 --- a/js/src/methodjit/FastOps.cpp +++ b/js/src/methodjit/FastOps.cpp @@ -617,8 +617,11 @@ mjit::Compiler::jsop_not() case JSVAL_TYPE_OBJECT: { + RegisterID reg = frame.allocReg(); + masm.move(Imm32(0), reg); + frame.pop(); - frame.push(BooleanValue(false)); + frame.pushTypedPayload(JSVAL_TYPE_BOOLEAN, reg); break; }