Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
ArtistA beautiful purple-haired ghost wearing a long purple velvet ankle-length dress with flouncy sleeves and purple suede high heels. She is holding a metre rule which is divided into different coloured sections.
In each Buf header is a field called WIDTH. It is normally zero, allowing the elements of the Buf to represent a ragged array whose elements may be different datatypes and sizes. This is resolved by the Dope Vector, a list of offsets and lengths describing the address and length of each element in the storage area.
However, often we have a use case whose elements are all the same type and length, for example a vector of small integers (e.g. 1_9, (1,2,3,4,5,6,7,8,9)) or an array of states in a MSM or FSM (as frequently used in the ::SHE+ILA:: compiler). In order to optimise this, we set the WIDTH field in the Buf header to the length in bytes of each element, and store the data contiguously inline with the Buf header, omitting the Dope vector. Such a Buf is processed as a whole, moved or stretched in the Page as a single unit (and in the end tidied as a whole by the Garbage Collector). Two particular cases of this "immediate Buf" are compiler expression tree nodes (e.g. (+, a, b) ) and compiler external states (see the picture of the train and the boot). A ::SHE+ILA:: system consisting only of "immediate Bufs" can be run under a greatly reduced version of the ::SHE:: kernel, and may not require Protected mode (e.g. it may run under DOS or MS-Windows).