Debian Codegraph @

js/src/jit-test/tests/ion/bug1064537.js

raw
1
2 function test(a) {
3 return (a)?a:0;
4 }
5 function test2(a) {
6 return (a)?0:a;
7 }
8
9 function isNegativeZero(x) {
10 return x===0 && (1/x)===-Infinity;
11 }
12
13 test(0)
14 assertEq(isNegativeZero(test(-0)), false)
15 assertEq(isNegativeZero(test(-0)), false)
16 assertEq(isNegativeZero(test2(-0)), true)
17 assertEq(isNegativeZero(test2(-0)), true)