mie: add value type hierarchy definitions

every construct within Mie, such as constants, instructions, functions, and translation units, are sub-types of the generic mie_value struct.

mie_value will facilitate iterating through the IR, as well as converting the IR to/from different formats.
This commit is contained in:
2025-04-03 10:50:35 +01:00
parent df8d9689d1
commit e7f6d54fa2
9 changed files with 139 additions and 0 deletions

17
mie/include/mie/instr.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef MIE_INSTR_H_
#define MIE_INSTR_H_
#include <mie/value.h>
enum mie_instr_type {
MIE_INSTR_NONE = 0,
};
struct mie_instr {
struct mie_value i_base;
enum mie_instr_type i_type;
b_queue i_operands;
};
#endif