Consistently use MIT_ERROR_OK for normal termination and MIT_ERROR_BREAK to signal that a break_fn wants to stop execution. If a caller receives the former code, it will continue execution (e.g. if a subroutine returns normally), but if it receives the latter it will propagate the error.
Known violations of this:
state.BreakHandler.break_fn has these codes the wrong way around, as does its caller run_inner_break (generated in gen-instructions).
THROW_LONGJMP abuses MIT_ERROR_BREAK to implement 0 throw, as does its caller run_fn.run_fn.
Consistently use
MIT_ERROR_OK
for normal termination andMIT_ERROR_BREAK
to signal that abreak_fn
wants to stop execution. If a caller receives the former code, it will continue execution (e.g. if a subroutine returns normally), but if it receives the latter it will propagate the error.Known violations of this:
state.BreakHandler.break_fn
has these codes the wrong way around, as does its callerrun_inner_break
(generated ingen-instructions
).THROW_LONGJMP
abusesMIT_ERROR_BREAK
to implement0 throw
, as does its callerrun_fn.run_fn
.Update documentation in
mit.h
formit_run_break
.