aboutsummaryrefslogtreecommitdiff
path: root/include/program.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/program.h')
-rw-r--r--include/program.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/program.h b/include/program.h
index b98c0a6..6603c63 100644
--- a/include/program.h
+++ b/include/program.h
@@ -6,7 +6,8 @@
#include "../executor/executor.h"
#define AMAL_PROGRAM_OK 0
-#define AMAL_PROGRAM_INVALID_HEADER -1
+#define AMAL_PROGRAM_ERR -1
+#define AMAL_PROGRAM_INVALID_HEADER -16
#define AMAL_PROGRAM_INVALID_MAGIC_NUMBER -2
#define AMAL_PROGRAM_INCOMPATIBLE -3
#define AMAL_PROGRAM_INVALID_INTERMEDIATES -4
@@ -21,6 +22,7 @@
#define AMAL_PROGRAM_INSTRUCTION_STACK_OVERFLOW -13
#define AMAL_PROGRAM_INSTRUCTION_STACK_OOM -14
#define AMAL_PROGRAM_INSTRUCTION_ILLEGAL_JUMP_TARGET -15
+#define AMAL_PROGRAM_INVALID_FUNCTIONS -16
#define AMAL_PROGRAM_MAGIC_NUMBER (u32)0xdec05eba
#define AMAL_PROGRAM_MAJOR_VERSION 1
@@ -36,8 +38,9 @@ typedef struct {
char *strings_start; /* Reference inside @data */
usize read_index;
- u16 num_strings;
u16 num_intermediates;
+ u16 num_strings;
+ u16 num_functions;
} amal_program;
CHECK_RESULT int amal_program_init(amal_program *self);