|
union LocationClass { |
|
// TODO: Register can have multiple fields? |
|
RegisterLocation, |
Describes a set of locations that represent a composite location.
table LocationPiece {
location: LocationClass;
width: BitSize;
storage_offset: BitOffset;
location_offset: BitOffset;
}
table CompositeLocation {
pieces: [LocationPiece];
}
union LocationClass {
RegisterLocation,
StackLocation,
CompositeLocation,
}
Something like this seems reasonable, storage_offset describes the offset into the data, whereas location_offset describes the offset into the location. We need storage_offset to match the pieces with the parts of the data they refer to, and we need location_offset to pack multiple pieces into a given location.
Some semi relevant links:
warp/type.fbs
Lines 164 to 166 in c9cfe5b
Describes a set of locations that represent a composite location.
Something like this seems reasonable,
storage_offsetdescribes the offset into the data, whereaslocation_offsetdescribes the offset into thelocation. We needstorage_offsetto match the pieces with the parts of the data they refer to, and we needlocation_offsetto pack multiple pieces into a givenlocation.Some semi relevant links: