Refactor fault handling.

This commit is contained in:
Brad Nelson
2023-01-14 22:28:38 -08:00
parent f8cfaedc84
commit 2f79192ea0
9 changed files with 110 additions and 79 deletions

View File

@ -34,6 +34,9 @@ typedef uintptr_t ucell_t;
#define PARK DUP; *++rp = (cell_t) fp; *++rp = (cell_t) sp; *++rp = (cell_t) ip
#define UNPARK ip = (cell_t *) *rp--; sp = (cell_t *) *rp--; fp = (float *) *rp--; DROP
#define THROWIT(n) rp = *g_sys->throw_handler; *g_sys->throw_handler = (cell_t *) *rp--; \
sp = (cell_t *) *rp--; fp = (float *) *rp--; ip = (cell_t *) *rp--; \
NIP; tos = (n);
#define TOFLAGS(xt) ((uint8_t *) (((cell_t *) (xt)) - 1))
#define TONAMELEN(xt) (TOFLAGS(xt) + 1)