]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/get-by-val-double-predicted-int.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / get-by-val-double-predicted-int.js
CommitLineData
81345200
A
1function foo(a, i) {
2 var x = a[i];
3 predictInt32(x);
4 return x + 2000000000;
5}
6
7noInline(foo);
8
9var array = [2000000000.5];
10
11for (var i = 0; i < 1000000; ++i) {
12 var result = foo(array, 0);
13 if (result != 4000000000.5)
14 throw "Error: bad result: " + result;
15}
16