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

[no subject]



Consider also the following:

;;; (SET-ARRAY val type (arrayobj subscript1 subscript2 ...))
;;;  stores val in arrayname

(DEFUN SET-ARRAY MACRO (FORM)
  (LET (((VAL TYPE REF) (CDR FORM)) (OBJ))
       (SETQ OBJ (CAR REF))
       (WITHOUT-INTERRUPTS
	(DISPLACE REF `(ARRAYCALL ,TYPE ,OBJ ,@(CDR REF)))
	(DISPLACE FORM `(STORE ,REF ,VAL)))))

Assume that arrayobj will eval to an array object. If the form that gets
bound to REF is pure, the ''wrong thing'' will happen -- REF will not
get displaced FORM may ... so then you get something that looks like

(STORE (arrayobj s1 s2 ...) val)

Other cases are possible to construct. Note that these are uses of DISPLACE
in macro definitions and consistent with *all* information heretofore 
distributed about what DISPLACE does. My argument is that there needs to
be a DISPLACE for forming code incrementally. DISPLACE does this already.
I use it for that application in my Fortran translator and several other
packages I'm sure ... There needs to be a different operator which is more
tolerant -- but people that call it should be clearly aware when they are
doing so that it will, in some sense, not care if the DISPLACE fails...

-kmp