blob: 00cf16878e07cb02f2d003db054f93ab1c4c4609 [file] [log] [blame]
function foo(a, b) {
return a + b;
}
noInline(foo);
var things = [1, 2.5, "3", {valueOf: function() { return 4; }}];
var results = [2, 3.5, "31", 5];
for (var i = 0; i < 100000; ++i) {
var result = foo(things[i % things.length], 1);
var expected = results[i % results.length];
if (result != expected)
throw "Error: bad result for i = " + i + ": " + result;
}