blob: 2e74c63b398cd7a03e1ec40e563c5516e8f4088e [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error;
}
function foo(x) {
return ~x;
}
noInline(foo);
for (let i = 0; i < 1000000; ++i) {
let x = 1n;
assert(foo(x) === (0n - x) - 1n);
x = 10101010101010101010101010101010101010101010101010n;
assert(foo(x) === (0n - x) - 1n);
}