Make AM registers into an array

This commit is contained in:
cdo committed 2025-08-10 20:31:54 +01:00
1 parent 52a42d2937
commit 57c39fd00b
14 files changed
+311 -288

No files matched your search

+17 -1
View File
@@ -6,8 +6,24 @@
#define AM_STACK_SIZE 128U
#define AM_ARGL(am) am->regs[ARGL]
#define AM_ENV(am) am->regs[ENV]
#define AM_EXPR(am) am->regs[EXPR]
#define AM_UNEV(am) am->regs[UNEV]
#define AM_VAL(am) am->regs[VAL]
typedef enum {
ARGL,
ENV,
EXPR,
UNEV,
VAL,
AM_REG_COUNT,
} am_reg_t;
typedef struct am {
expr_t *argl, *env, *expr, *unev, *val;
expr_t *regs[AM_REG_COUNT];
expr_t **sp, *stack[AM_STACK_SIZE];
store_t store;
} am_t;