[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



CC: (BUG LISPM) at MIT-MC
    Date: Thu ,27 Sep 79 12:51:00 EDT
    From: Henry at MIT-AI (Henry Lieberman)
    To: (BUG LISPM) at MIT-AI
    
    The following function works interpretively, but compiled
    causes the machine to require a boot:
    
    (DEFUN LOSSAGE NIL
      (UNWIND-PROTECT
        (DO NIL
    	(NIL)
          (*CATCH 'CATCH-TEST
    	      (PROGN (PRINC "Type (RETURN NIL) to see lossage: ")
    		     (LET ((READ (READ)))
    		       (COND ((AND (LISTP READ)
    				   (EQ (CAR READ) 'RETURN))
    			      (RETURN (CADR READ)))
    			     ((PRINT (EVAL READ))))))))
        (PRINT 'UNWOUND)))

Well, this compiles using the "SHRINK-PDL-SAVE-TOP" instruction, which doesn't
work.  Thus it messes up the stack and dies.  I think it's also giving the
instruction the wrong argument, and doesn't need to use it anyway since
the UNWIND-PROTECT is at top-level in a form, although it doesn't know
that since it's a macro.  You can get around this in the obvious way, by defining
an auxiliary function.

RMS, does your new compiler deal with this better?