Make AM registers into an array
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user