aboutsummaryrefslogtreecommitdiff
path: root/include/bytecode
diff options
context:
space:
mode:
Diffstat (limited to 'include/bytecode')
-rw-r--r--include/bytecode/bytecode.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/bytecode/bytecode.h b/include/bytecode/bytecode.h
index a93fe4f..83d62b9 100644
--- a/include/bytecode/bytecode.h
+++ b/include/bytecode/bytecode.h
@@ -83,6 +83,17 @@ typedef u8 AmalOpcodeType;
/* TODO: Make sure this pragma pack works on all platforms */
#pragma pack(push, 1)
typedef struct {
+ u32 magic_number; /* AMAL_BYTECODE_MAGIC_NUMBER */
+ u8 major_version;
+ u8 minor_version;
+ u8 patch_version;
+ u8 endian; /* 0 = little endian, 1 = big endian */
+} BytecodeHeader;
+#pragma pack(pop)
+
+/* TODO: Make sure this pragma pack works on all platforms */
+#pragma pack(push, 1)
+typedef struct {
u32 func_offset;
u8 num_params;
u32 params_num_pointers;