You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There may be cases when a tail recursive call has multiple execution paths after the call itself. The optimization should be performed in cases where it is possible.
publicstaticintcount(intn) {
start:
if (n == 0) {
return0;
}
if (n == 2) {
intv = count(n - 1);
callSomeOtherMethod();
returnv;
}
// this below is the same as // return count(n - 1);n = n - 1;
gotostart;
}
Current state
Currently we allow branches to be present in the return path, but they all need to be side-effect free. This issue requires individual modifications and analysis to the subsequent execution paths.