]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/exit-after-int52-to-double.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / exit-after-int52-to-double.js
CommitLineData
81345200
A
1function foo(a, b, c) {
2 return a.f + b.f + c.f;
3}
4
5noInline(foo);
6
7for (var i = 0; i < 100000; ++i) {
8 var result = foo({f:2000000000}, {f:2000000000}, {f:0.5});
9 if (result != 4000000000.5)
10 throw "Error: bad result: " + result;
11}
12
13var result = foo({f:2000000000}, {f:2000000000}, {f:"42"});
14if (result != "400000000042")
15 throw "Error: bad result: " + result;
16