So, 64 bit fields need a different approach than 8 bit fields.
Luckily, one can mostly rely on that smaller integer fields are cheaper, comparing to zero is normally cheap, and negating an integer is cheap too. I am not sure about taking the absolute value without branching.
I need the following:
- a bit to check whether a field is a constant series of bits,
- an integer field mapping to a record table (of strings),
- an integer field mapping to a type table (of strings),
- an integer describing the full size of the record.
I decided on distributing them on 1, 15, 16, 32 bit, without a real rationale other than that probably 64K of types is enough, and a large record size can be abused to implement arrays.
So I am thinking on using the signs of the fields to bit twiddle; or not even that, but just store the information. Like a negative record table value indicates a primitive value and a zero is reserved for thunks.