feat+ref: refactor + new types

This commit is contained in:
samsonium
2026-10-11 08:51:54 +03:00
parent e3b8ec6b7d
commit 83e20d78f3
13 changed files with 532 additions and 341 deletions
+10 -10
View File
@@ -4,17 +4,17 @@
// Available opcodes
typedef enum
{
FZL_OPCODE_LOADCONST, // Load const into T (temp) reg
FZL_OPCODE_CALL_BUILTIN, // Call builtin function
FZL_OPCODE_PUSHNUM, // Push number into stack
FZL_OPCODE_LOADCONST = 0xF00001, // Load const into T (temp) reg
FZL_OPCODE_CALL_BUILTIN = 0xF00002, // Call builtin function
FZL_OPCODE_PUSHNUM = 0xF00003, // Push number into stack
FZL_OPCODE_ADD, // Sum two numbers in arg strack
FZL_OPCODE_SUB, // Subract two numbers in arg stack
FZL_OPCODE_MUL, // Multiply two numbers in arg stack
FZL_OPCODE_DIV, // Divide two numbers in arg stack
FZL_OPCODE_POW, // Power first number in arg stack by second
FZL_OPCODE_MOD, // Get module of two numbers in arg stack
FZL_OPCODE_NEG, // Negotiate number in arg stack
FZL_OPCODE_ADD = 0xA00001, // Sum two numbers in arg strack
FZL_OPCODE_SUB = 0xA00002, // Subract two numbers in arg stack
FZL_OPCODE_MUL = 0xA00003, // Multiply two numbers in arg stack
FZL_OPCODE_DIV = 0xA00004, // Divide two numbers in arg stack
FZL_OPCODE_POW = 0xA00005, // Power first number in arg stack by second
FZL_OPCODE_MOD = 0xA00006, // Get module of two numbers in arg stack
FZL_OPCODE_NEG = 0xA00007, // Negotiate number in arg stack
} fzl_opcode_t;
#endif // FZL_OPCODES_H