jvm-tail-recursion
jvm-tail-recursion copied to clipboard
Optimizer library for tail recursive calls in Java bytecode
I'm getting this error: ``` Exception in thread "main" java.lang.IllegalArgumentException: Class versions V1_5 or less must use F_NEW frames. at sipka.jvm.tailrec.thirdparty.org.objectweb.asm.MethodWriter.visitFrame(MethodWriter.java:779) at sipka.jvm.tailrec.thirdparty.org.objectweb.asm.tree.FrameNode.accept(FrameNode.java:141) at sipka.jvm.tailrec.thirdparty.org.objectweb.asm.tree.InsnList.accept(InsnList.java:145) at sipka.jvm.tailrec.thirdparty.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:752) at sipka.jvm.tailrec.thirdparty.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:650) at...
I wonder how does this compare to kotlin tailrec keyword implementation.
Seems like this would be a good spotbugs check to identify recursion that could easily be improved by the programmer. Spotbugs doesn't modify the output but can produce a warning...
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. One example...