]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/add-int52-constant-overflow-recovery.js
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / tests / stress / add-int52-constant-overflow-recovery.js
1 function foo(a) {
2 return a * 2097144 + 1073745920;
3 }
4
5 noInline(foo);
6
7 for (var i = 0; i < 100000; ++i) {
8 var result = foo(1073736383);
9 if (result != 2251780886936072)
10 throw "Error: bad result: " + result;
11 }
12
13 var result = foo(1073745919);
14 if (result != 2251800885301256)
15 throw "Error: bad result: " + result;