The 'ptrbuf' branch implements PMCs for low-level buffer access which separate the representation from the pointers.
The immediate goal of this branch is to provide a replacement for Pointer, UnManagedStruct, and ManagedStruct, which have been described in the past as hard and/or inconvenient to use. The replacements to these are more unified, streamlined, and simpler. Pointer objects track the pointer (Ptr) and optionally buffer length (PtrBuf) and lightweight-object-y things such as GC marking (PtrObj). Types providing baseline and added functionality are available and build on each other, rather than existing independently. Pointers are interpreted using 'StructView' objects, which are constructed from FixedIntegerArrays (not OrderedHash, which can probably get the axe now too) of type flags. I have endeavoured to provide good documentation for the use of the replacement PMCs. A secondary goal is reducing the need to write single-purpose struct-like or buffer-like PMCs in C, as is often done now (eg: MappedByteArray, Sockaddr). With pointer-ish objects easier to create and manipulate from hosted languages, it is my hope that we can start implementing objects fitting this description on top of Parrot. At this point I'd like to get some feedback about the direction being taken. If you've used (and been dissatisfied with) the old native type PMCs, I'd like to hear what you think of the replacements. If there are no major objections in the next 2 days, I'd like to merge this branch and deprecate Pointer, UnManagedStruct, and ManagedStruct (OrderedHash too, if there are no other users). _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
