mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
This attribute originally got removed because you could determine the type of the variable based on the instruction opcode. For example: x1 = OPCODE_ADD_INT32 y1, 10. x1 type is an int32. We cannot apply this to control instructions because that would bloat the amount of opcodes needed. An opcode has 10 bits, so we can define 1024 opcodes. Adding different variations for an `IF` instruction alone would fill uo way to much space: x1 = IF_INT8 (condition) x1 = IF_INT16 (condition) x1 = IF_INT32 (condition) x1 = IF_UINT8 (condition) x1 = IF_FLOAT (condition) x1 = IF_VECTOR (condition) etc... So to solve creating unecessary opcodes, ssa_version_t will hold the variable type instead: x1 = IF (condition) DEF_TYPE: INT32 ssa_version_t.type = DEF_TYPE Signed-off-by: Ronald Caesar <github43132@proton.me>