Tail Calls

D.Sturm D.Sturm42 at gmail.com
Sun Mar 16 13:19:38 UTC 2014


I was trying to write a testcase for the aarch64 backend for tail
recursion, but I can't seem to get Graal to generate the code for it. I
tried it with the following, but that just causes a normal static call:

        public static int tailCallTest(int n, int total) {
                if (n == 0) return total;
                return tailCallTest(n - 1, total + 1);
        }

any ideas?

-- Daniel


More information about the graal-dev mailing list