]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/exit-after-llvm-folds-large-int-constant.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / exit-after-llvm-folds-large-int-constant.js
1 function foo(o, io) {
2 var i = io.f;
3 if (i != 92160)
4 o.g = 42;
5 return o.f.f + i;
6 }
7
8 noInline(foo);
9
10 for (var i = 0; i < 100000; ++i) {
11 var result = foo({f:{f:42}}, {f:92160});
12 if (result != 92202)
13 throw "Error: bad result: " + result;
14 }
15
16 var result = foo({f:{g:20, f:21}}, {f:92160});
17 if (result != 92181)
18 throw "Error: bad result: " + result;