4 valueOf: function() { return this.i; }
10 for (var j = 0; j < 10; j++) {
17 // Busy work just to allow the DFG and FTL to optimize this out. If the above causes
18 // us to speculation fail out to the baseline, this busy work will take a lot longer
20 // This loop below also gets the DFG to compile this function sooner.
21 var origResult = result;
22 for (var i = 1; i < 1000; i++)
24 result = origResult < result ? origResult : result;
32 // The layout test doesn't like too many iterations and may time out.
34 expectedResult = 5000495600;
37 expectedResult = 500004995600;
41 for (var i = 0; i <= iterations; i++) {
44 result += foo(o1, 10);
49 if (result != expectedResult)
50 throw "Bad result: " + result;