Talk:Jump anywhere: Difference between revisions

It depends on the language
No edit summary
(It depends on the language)
Line 21:
 
::: That would normally involves unwinding the stack, then, because if you are going out of a proc or function and not coming back, you have to clean up what's already allocated for your current scope, or everyone gets confused -- unless your language doesn't have a stack concept, which is rare. --[[User:Ledrug|Ledrug]] 08:39, 11 June 2011 (UTC)
 
:::: Yeah. It depends on the language. A local jump within the same procedure would probably not need an unwind. A global jumb could need an unwind, and the unwind may be done at source, prior to the jump or at destination following the jump. Jumping out of a procedure (following a call) is not usually a good idea, although it may be for a critical reason, such as an abort. I would just stick a note saying "the stack will need to be unwound, before this jump is performed" and cross reference to the stack unwinding task. Some languages may have a garbage collector, which removes the need to unwind the stack. Maybe it would be tidier to split the task into Jumps/Local, Jumps/Global and Jumps/With stack unwinding. --[[User:Markhobley|Markhobley]] 10:20, 11 June 2011 (UTC)