Mill Computing, Inc. › Forums › The Mill › Architecture › array bound checking › Reply To: array bound checking
Does the Mill have any instructions that can directly support fat pointers? E.g. in Zig I can do cur = cur[1..];
, where cur
has a ptr
and len
field, each a machine word, and this will add 1
to the ptr
and subtract 1
from len
. It would be cool if addp
e.g. could work directly on fat pointers. I.e. In the case that addp
is given a fat pointer as an argument, it would simultaneously add to the pointer and subtract from the length, giving back a 16 byte fat pointer with the pointer half increased and the length half decreased (assuming you are on a Mill member with where each slot on the belt can hold 16 bytes). If the length goes below 0 it should return a NaR.