Re: WISHLIST.txt
- Posted by kbochert at copper.net Aug 23, 2002
- 371 views
-------Phoenix-Boundary-07081998- Hi Kat, you wrote on 8/23/02 9:29:42 AM: >The way i see it, the loop is treated like a local function in Eu (it was >in turbo >pascal), which is why you don't haveto declare the loop variable. Any jump >to *outside* this function will generate default cleanup code exactly as it >does now. Forward jumps are easy to add, backwards jumps to *before* the loop >start are more difficult, it's a few more steps (exit loop, cleanup, >reinit the >loop var, find the target (that's easy, we passed over it before, we know >where it is), and jmp there with everything else unchanged. The fun part >is >the loops are simply exited, triggering the same cleanup as now exists, in >the compiled code,, i assume the interpreter is smart enough too. > exit does no cleanup -- it is a simple jump. >Also, see: Karl's Bach / Bliss in the archives. > goto's that are confined to routines do no setup or cleanup. When jumping out of loops there is nothing that needs to be cleaned up. The only problematical case is jumping into a for loop -- what happens with the loop index=3F There is of course, nothing that can be done. If the programmer has decided to skip over the initialization then the initialization gets skipped. This seemed a little tricky, so Bach prohibits jumping into a loop. Karl Bochert -------Phoenix-Boundary-07081998---