jumps
fundamental form of control for most languages
types of jump
call
return
transfer to saved program point and restore saved state
exception handler
save program point and state for later use and execute body of handler
exception raise
find matching handler and transfer to saved program point and state
C exceptions
libc procedures setjmp and longjump can be used as a primitive form of exception handling
state (stack frame and registers) represented my struct jmpbuf
setjmp inits jmpbuf
longjump reads a jmpbuf and restores state