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

push/defvst interaction?



    Date: 14-Aug-82 10:55AM-EDT (Sat)
    From: John Ruttenberg <Ruttenberg at YALE>

    It seems especially odd to me that things should blow up only after the
    second call to bug.

A smaller case of the bug:

(defvst bug-st
  (a = (*array () t 10))
  )

(defun bug (self member index)
  (push member (arraycall t (bug-st-a self) index)))

(setq b (cons-a-bug-st))

(bug b 'a 4)

(bug b 'a 4)

After the first call to BUG it's definition has been changed to be:

(defun bug (self member index)
  (push member (arraycall t <gensym> index)))

This is probably an artifact of PUSH being a fexpr (but thinking like a macro),
bug it also seems to depend heavily on the source of the array being a defvst
accessor.  It doesn't happen if you are using defstruct instead.  Perhaps those
responsible for defvst/push will step forward and fix?