blob: ed7ac630d55cc91d3659de3608f7ec11366ca246 [file] [log] [blame]
function foo(a) {
switch (a) {
case 0:
return 0;
case 1:
return 1;
case 2:
return 2;
default:
return 3;
}
}
function bar(a, runFoo) {
if (runFoo)
return foo(a);
return 0;
}
noInline(bar);
var sum = 0;
for (var i = 0; i < 5; i++)
sum += bar(i, true);
var i = 0;
while (!dfgCompiled({f:bar})) {
sum += bar(i, false);
i++;
}
sum += bar(i, true);