]> git.saurik.com Git - apple/javascriptcore.git/blame - 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
CommitLineData
81345200
A
1function foo(o, io) {
2 var i = io.f;
3 if (i != 92160)
4 o.g = 42;
5 return o.f.f + i;
6}
7
8noInline(foo);
9
10for (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
16var result = foo({f:{g:20, f:21}}, {f:92160});
17if (result != 92181)
18 throw "Error: bad result: " + result;