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