[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Adjustable and displaced arrays
- To: Guy Steele <gls%AQUINAS@THINK.ARPA>
- Subject: Adjustable and displaced arrays
- From: Rob MacLachlan <RAM@CMU-CS-C.ARPA>
- Date: Thu, 23 May 1985 17:35:00 -0000
- Cc: common-lisp%SU-AI@THINK.ARPA
- In-reply-to: Msg of 23 May 1985 10:51-EDT from Guy Steele <gls%AQUINAS at THINK.ARPA>
I'm still not sure we have communicated here. My specific concern
is that if I am interpreting you intent correctly, the implementation
of complex arrays in Spice Lisp (and derived implementations) is
seriously flawed.
Spice Lisp implements complex arrays as a header which contains,
among other things, a pointer to the one-dimensional simple-array
which actually holds tha data, and the displaced-index-offset. When a
displaced array is made, the data vector is the data vector of the
original array, and the offset is set appropriately.
With this representation displacement is handled with minimal
additional overhead. The problem is that the header for the displaced
array contains the pointer to the actual data vector for the original
array. If the original array is adjusted, the aliasing will be lost.
If this implementation is indeed incorrect, what is the correct
implementation?
Rob