]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - tests/stress/add-constant-overflow-recovery.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / add-constant-overflow-recovery.js
... / ...
CommitLineData
1function foo(a) {
2 return a.f + 2000000000;
3}
4
5noInline(foo);
6
7for (var i = 0; i < 100000; ++i) {
8 var result = foo({f:1});
9 if (result != 2000000001)
10 throw "Error: bad result: " + result;
11}
12
13var result = foo({f:2000000000});
14if (result != 4000000000)
15 throw "Error: bad result: " + result;