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

APPLYing an EXTEND with a CALL method



    Date: 11 MAR 1981 2111-EST
    From: RLB at MIT-MC (Richard L. Bryan)
    A defmethod* for CALL messages to  SUBR-CLASS lets me funcall the 
    result of FSYMEVAL (the latter defined by FUNCEL). This is a win.
    However, an attempt to APPLY such a frob loses, with .  .  .
Fixed now -- patched in current LISP, and edited in source.  Apparently
this was also the problem noted in
    Date: 15 March 1981 17:17-EST
    From: Jonathan A. Rees <JAR at MIT-MC>
    5. CALLI stuff works with EXPR props but not with FUNCALL or APPLY.
       Try the following:
	    (DEFVST FOO BAR)
	    (DEFMETHOD* (CALL FOO-CLASS) (SELF) (FOO-BAR SELF))
	    (SETQ Z (CONS-A-FOO BAR 31))
	    (PUTPROP 'FN Z 'EXPR)
	    (FN) ==> 31		;Calling via a symbol works fine
	    (FUNCALL Z)   ==>   ;#{FOO BAR 31} PC WITH ILLEGAL INTRUCTION CODE
	    (APPLY Z '()) ==>   ;#{FOO BAR 31} UNDEFINED FUNCTION OBJECT
	    (DEFMETHOD* (EVAL FOO-CLASS) (SELF)
	      (LET ((G (GENSYM))) (PUTPROP G SELF 'EXPR) G))
	    (APPLY Z '()) ==>   ;Ilgl mem ref
		;Why is an EVAL even being attempted here?
The code for applying and/or evaling a hunk was just falling into the
wrong place -- now, only a CALL message will be sent, and at the right time.
(losing code was at EVAPH)