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

[no subject]



    Date: 26 November 1980 22:58-EST
    From: William G. Dubuque <WGD>
    Sender: BIL
    To:   BUG-LISP

    (defmacro foo () nil) then do (foo) and you get infinite recursion.
-----
This is the result of a bad interaction between the NIL return value --
which fights with the (OR (MACROFETCH ...) ; NIL falls through!
			  (MACROMEMO ...)) ; expansion returned
and the fact that the thing being memo-ized isn't CDR'd as it would be
in (DEFMACRO FOO (X) ...) =>
   (DEFUN FOO MACRO (FOOMACROARG)
      (OR ... (MACROMEMO ... (PROGN ... (LET (((X) (CDR FOOMACROARG))))) ...)))
which ends up displacing the source form returning
(MACROEXPANDED A (0 . 0) (A) (MACROEXPANDED A (0 . 0) (A) (MACROEXPANDED ...)))
which is circular with respect to its expansion... I can't fathom enough of
the code to suggest a fix or even to more precisely characterize the problem.
I will point out that I was expecting (DEFUN FOO (&WHOLE X) NIL) to manifest
the same bug, but it doesn't -- you can't even DEFINE that one without getting
a PDL-OVERFLOW ... 

Something in the new DEFMAX is still losing badly.