4 valueOf: function() { return this.i; }
10 for (var j = 0; j < 10; j++) {
19 // Busy work just to allow the DFG and FTL to optimize this out. If the above causes
20 // us to speculation fail out to the baseline, this busy work will take a lot longer
22 // This loop below also gets the DFG to compile this function sooner.
23 var origResult = result;
24 for (var i = 1; i < 1000; i++)
26 result = origResult > result ? origResult : result;
34 // The layout test doesn't like too many iterations and may time out.
36 expectedResult = 499660;
39 expectedResult = 4999660;
43 for (var i = 0; i <= iterations; i++) {
46 result += foo(o1, 10);
51 if (result != expectedResult)
52 throw "Bad result: " + result;