]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/int52-argument.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / int52-argument.js
CommitLineData
81345200
A
1function foo(x) {
2 var y = x;
3 x = y * 2;
4 if (x) {
5 x += y;
6 x += y;
7 x += y;
8 }
9 return x;
10}
11
12noInline(foo);
13
14for (var i = 0; i < 100000; ++i) {
15 var result = foo(1000000000);
16 if (result != 1000000000 * 2 + 1000000000 * 3)
17 throw "Error: bad result: " + result;
18}