[DGD] How are the "end" of catch/rlimits/atomic blocks marked in bytecode
Felix A. Croes
felix at dworkin.nl
Wed Apr 12 23:02:24 CEST 2017
Carter Cheng <cartercheng at gmail.com> wrote:
> I am curious about how this is handled i.e. is a I_RETURN used to mark the
> end point? and how does the interpreter which is re entered- know where the
> next instruction is after the return is the I_CATCH followed by some sort
> of jmp?
There are no atomic blocks, only atomic fumctions. Catch and rlimits call
the interpreter function recursively but with the same stack frame, so
the program counter is carried to and from those contexts; it may be
changed after the call. I_RETURN returns from those calls, and thereby
ends the catch/rlimits context. You should identify the purpose of each
I_RETURN and replace them with ENDCATCH/ENDRLIMITS as needed.
Regards,
Felix Croes
More information about the DGD
mailing list