dimitriv / Ziria

A domain-specific-language and compiler for low-level bitstream processing.
92 stars 18 forks source link

int8_to_bits bug #45

Open bradunov opened 9 years ago

bradunov commented 9 years ago
dimitriv commented 9 years ago

Hmm is this related to the currently (slightly annoying discrepancy) that bit-arrays and slices are by-value, whereas their int counter-parts are by reference (i.e. can be modified in place)? If yes, I do not think it is a bug, but we should try to make the semantics consistent.

dimitriv commented 9 years ago

Actually I think it is a bug ... Semantics of bit arrays and the other arrays should be exactly the same. This means though tha we need a calling convention for passing bit array slices. For instance, the pointer to offset 0 of the slice plus the offset. (whereas for ordinary array slices we just pass the pointer to offset 0 because the beginning of the slice coincides with the data type boundary. On my list todo for the codegen improvements over the next week.