CS 342 Lecture -*- Outline -*- * Non-local goto ** Problem: restore envrionment of definition of the label (in general, throw away ARs) ----------- program non_local_goto; {in Pascal} label 9999; var x: real; procedure Q; var x: real; begin ... goto 9999; ... end begin Q; ... 9999: x := 0.0; ... end. ----------- ** static links follow SD links (where SD is static difference) EP := M[EP].SL; ... {SD of these} EP := M[EP].SL; cut back stack to point to to of the AR now in EP ** display: have to pop AR's off stack one at a time (returns) until find correct AR (messy)