blob: 2a57afd49b31b5a490789a0837d173f41fb6a63d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// |jit-test| --fast-warmup; --ion-offthread-compile=off
function foo(n, trigger) {
let result = Atomics.isLockFree(n * -1);
if (trigger) {
assertEq(result, false);
}
}
for (var i = 0; i < 100; i++) {
foo(-50, false);
}
foo(0, true);
function bar(n, trigger) {
let result = Atomics.isLockFree(n * 4);
if (trigger) {
assertEq(result, false);
}
}
for (var i = 0; i < 100; i++) {
bar(1, false);
}
bar(0x40000001, true);
|