Re: adjust-array and basic-vector
Frode Vatvedt Fjeld <[email protected]> Fri, 03 Jun 2005 07:36:41 +0200
| Newsgroups | gmane.lisp.movitz.devel |
|---|---|
| Message-ID | <[email protected]> |
Shawn Betts <[email protected]> writes: > I noticed that adjust-array isn't implemented (and hash > resizing). The basic-vector binary-type has a section called > data. The comment suggests the data is stored right there..as > opposed to pointing to where the data is stored. Is this so? Yes. > If so, won't this be problematic for resizing the vector? That's right, such a vector cannot be adjustable. But this isn't really a problem with the basic-vector layout as such, rather the point is that there needs to be (at least) one other data-structure that implements adjustable (and/or displaced, multi-dimensional) arrays. This could I suppose be done simply by building on the existing stuff, e.g. by using defstruct etc on the losp/.. side of things. A number of functions in array.lisp would have to be modified, and also several things in typep.lisp, to integrate it properly with the type-system. Hash resizing can be implemented independently of this, since the hash-table object already gives you an indirect link to the vector data. (And BTW note that EQ hash-tables aren't GC-safe yet, either... for keys other than immediates and symbols, that is.) -- Frode Vatvedt Fjeld