blob: 60a89a4c4335d7b3e1de3d4ed3cb865b9a0e0577 [file] [log] [blame]
function Foo() { }
Foo.prototype.toString = function() { return "hello" };
function foo(o) {
return String(o);
}
noInline(foo);
for (var i = 0; i < 100000; ++i) {
var result = foo(new Foo());
if (typeof result != "string") {
describe(result);
throw "Error: result isn't a string";
}
if (result != "hello")
throw "Error: bad result: " + result;
}