From rjs at fdy2.demon.co.uk Thu Sep 9 19:53:21 2010 From: rjs at fdy2.demon.co.uk (rjs at fdy2.demon.co.uk) Date: Thu, 9 Sep 2010 20:53:21 +0100 (BST) Subject: [movitz-devel] loop In-Reply-To: <82ocgjvu0q.fsf@netfonds.no> (frode@netfonds.no) Message-ID: <20100909195321.6CE8B76D4@fdy2.demon.co.uk> [following up to a message from back in May] Frode V. Fjeld wrote: > writes: > >> The LOOP macro doesn't seem to create a NIL block. > >The macro-expander for LOOP is copied pretty much verbatim from some >other implementation (perhaps CMUCL), so I'd be surprised if there's an >obvious problem like that. I'll have a look at it this evening, >hopefully. I think that there is a missing NIL block in loop but that isn't what is causing the problem I'm seeing. The code that I'm trying to compile uses a CLtL1 style loop syntax so the block is created in LOOP-STANDARD-EXPANSION. It basically does: (loop ... (return t) ... (return nil)) I added some code to the compiler to print out what environments were being searched when trying to compile the return/return-from forms. It seems as if a WITH-THINGS-ON-STACK-ENV is created in between the LOOP and the second RETURN form, I'm guessing this was created to manage the stack unwinding of the first RETURN, this is the environment used in the the compilation of the second RETURN instead of the one belonging to the enclosing LOOP special form. Robert Swindells