blob: 0038b5b8d2481dee98bc1d2374f84d73005f901c [file] [log] [blame]
function foo(a, b) {
try {
return a ^ b;
} catch (e) {
return e;
}
}
noInline(foo);
for (var i = 0; i < 100000; ++i) {
var result = foo((i & 1) ? 32 : "32", 10);
if (result !== 42)
throw "Error: bad result: " + result;
}
var result = foo({valueOf: function() { throw "error42"; }}, 10);
if (result !== "error42")
throw "Error: bad result at end: " + result;