[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SETF losing on FIX-I stuff...
- To: (BUG LISP) at MIT-MC
- Subject: SETF losing on FIX-I stuff...
- From: KMP at MIT-MC (Kent M. Pitman)
- Date: Thu, 29 Jan 81 03:02:00 GMT
- Original-date: 28 JAN 1981 2202-EST
(MACROEXPAND '(SETF (FIXNUM-IDENTITY (CAR X)) Y))
=> (PROGN (FIXNUM-IDENTITY (RPLACA X Y)) Y)
This seems to me to be a bit silly... I suspect it means that the recursive
relation you are using to do expansions in general has a bug in it ... whatever
mechanism you use should see to it that the FIXNUM-IDENTITY is held to the
outside... I don't really understand why it doesn't just return
(FIXNUM-IDENTITY (SETF (CAR X) Y))
and then let the SETF inside get expanded later. That would assure that later
an independent macroexpansion would leave you with the form
(FIXNUM-IDENTITY (PROGN (RPLACA X Y) Y))
which is what I think ought to be returned ... I still question whether
(SETF (FIXNUM-IDENTITY x) y) shouldn't turn into
(FIXNUM-IDENTITY (SETF x (FIXNUM-IDENTITY y)))
since in the case of GJC's generalization of PUSH/POP, it might be useful
to know the typep of the value being put into the slot ...