Hi everyone,
First of all, congrats to the maintainers for the wonderful work they have made with this library.
I'm exploring some ways to convert a stack based machine bytecode (Java bytecode) to LibJit instructions.
Take for example this Java byte code:
0: iconst_1
1: istore_0
2: iload_0
3: ifeq 10
6: iconst_1
7: goto 11
10: iconst_0
11: ireturn
The maximum runtime stack size is 1 (as indicated by the compiler in the class data).
But if I try to follow the method highlighted in the documentation page I ends with a stack of size 2. And of course the top element just before the return instruction is always a 0 value.
Did I missed something? What would be the proper way to achieve that?
Thanks a lot for any help or any indication.