[movitz-devel] loop

rjs at fdy2.demon.co.uk rjs at fdy2.demon.co.uk
Thu Sep 9 19:53:21 UTC 2010


[following up to a message from back in May]

Frode V. Fjeld wrote:
><rjs at fdy2.demon.co.uk> 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




More information about the movitz-devel mailing list