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


    Date: 16 March 1980 14:04-EST
    From: Jonathan A. Rees <REES at MIT-MC>
    Subject:  Purcopied code which needs to macroexpand
       Some macros like FBOUNDP that are defined using DEFBOTHMACRO can't
    be called inside the compiler, because they consist of pure EXPR code
    which hasn't been MACRO-EXPANDed.  When a macro inside this code goes
    to displace the call it tries to write on a pure page.  Seems to me
    that this is a bug in the DEFMACRO package (it should be more careful
    when displacing - this is difficult since we lack a PUREP predicate),
    although it could also be argued that either COMPLR (who is guilty of
    PURCOPYing EXPR code) or DEFBOTHMACRO (who arranges to avoid the
    MACRO-EXPANDsion) is at fault.  I currently get around this by doing
    (setq defmacro-displace-call 'macromemo), which I suppose is alright.
Setting "defmacro-displace-call" affects the compilation of the macros - 
you really want to affect the runtime environment.  Any facility which 
PURCOPYs code likely to contain macros should ascertain that 
MACRO-EXPANSION-USE is also set to either () or MACROMEMO.  By the bye,
there are only two states of  "defmacro-displace-call" - () and non-().