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