I am playing with Java bytecode generation (using Clojure with https://github.com/jgpc42/insn), Currently I am trying to generate a bytecode for a nested for
loop, bellow is the relevant part of the generated bytecode, but when I try to run it I’m get a:
Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 114
part of the bytecode related with the for
:
111: bipush 0
113: istore_0
114: iload_0
115: bipush 3
117: if_icmpge 154
120: bipush 0
122: istore_1
123: iload_0
124: bipush 3
126: if_icmpge 147
129: invokestatic #14 // Method my/pkg/RaspIvok.getInvoker:()Lrasp_lang/lib/core2/Invoker;
132: invokestatic #44 // Method my/pkg/RaspIvok.getPrintln:()Lmy/pkg/Test/Println;
135: ldc #46 // String Hello
137: invokevirtual #49 // Method rasp_lang/lib/core2/Invoker.call:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
140: pop
141: iinc 1, 1
144: goto 123
147: pop
148: iinc 0, 1
151: goto 114
154: return
Any help how to understand in order to fix the issue?
Thanks