The unreachable detection turned out to be the problem (cf. Issue 8). I tried to fix this feature first but I fear that just introduced new subtle bugs. Problems are in particular:
An else after a return must reset unreachable if unreachable depth is only 1.
If unreachable is set and therefore we skip an end statement the stacks can easily become inconsistent. Imo assertions wrt the stack size would be very valuable. However, I don't understand the code well enough to do so and I could not get the cargo tests running. You can find some manual tests in (cf. Issue 8).
The unreachable detection turned out to be the problem (cf. Issue 8). I tried to fix this feature first but I fear that just introduced new subtle bugs. Problems are in particular:
else
after areturn
must reset unreachable if unreachable depth is only 1.end
statement the stacks can easily become inconsistent. Imo assertions wrt the stack size would be very valuable. However, I don't understand the code well enough to do so and I could not get the cargo tests running. You can find some manual tests in (cf. Issue 8).