summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/bigint/bug1580020.js
blob: 52ef27dd5fd661f72c3d6c8aed84d4638a501e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This test was designed for asan.
//
// In the deferred mode of parsing we need to ensure that the
// asmJS parser doesn't emit the deferred big int under the
// asmJS lifo alloc.
var x = -1n;
function a() {
  'use asm';
  function f() {
    return (((((-1) >>> (0 + 0)) | 0) % 10000) >> (0 + 0)) | 0;
  }
  return f;
}
assertEq(true, a()() == x);