]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/fold-based-on-int32-proof-or-zero.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / fold-based-on-int32-proof-or-zero.js
1 function foo(a, b) {
2 var c = a + b;
3 return (c | 0) == c;
4 }
5 noInline(foo);
6
7 for (var i = 0; i < 10000; ++i) {
8 var result = foo(1, 1);
9 if (result !== true)
10 throw "Error: bad result: " + result;
11 }
12
13 var result = foo(1073741824, 1073741824);
14 if (result !== false)
15 throw "Error: bad result at end: " + result;