]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/fiat-value-to-int52.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / fiat-value-to-int52.js
1 function foo() {
2 return fiatInt52(bar(DFGTrue())) + 1;
3 }
4
5 function bar(p) {
6 return p ? 42 : 5.5;
7 }
8
9 noInline(foo);
10 noInline(bar);
11
12 for (var i = 0; i < 1000000; ++i) {
13 var result = foo();
14 if (result != 43 && result != 6.5)
15 throw "Error: bad result: " + result;
16 }