]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/fold-to-int52-constant-then-exit.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / fold-to-int52-constant-then-exit.js
CommitLineData
81345200
A
1function foo(a, b) {
2 if (DFGTrue())
3 a = b = 2000000000;
4 var c = a + b;
5 if (isFinalTier())
6 OSRExit();
7 return c + 42;
8}
9
10noInline(foo);
11
12for (var i = 0; i < 100000; ++i) {
13 var result = foo(2000000001, 2000000001);
14 if (result != 2000000001 + 2000000001 + 42 && result != 2000000000 + 2000000000 + 42)
15 throw "Error: bad result: " + result;
16}
17