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

Adjustable and displaced arrays

    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