Automate g_sys structure handling for web.
This commit is contained in:
@ -16,3 +16,23 @@
|
||||
#define SMUDGE 2
|
||||
#define BUILTIN_FORK 4
|
||||
#define BUILTIN_MARK 8
|
||||
|
||||
typedef struct {
|
||||
cell_t *heap, **current, ***context;
|
||||
cell_t *latestxt, notfound;
|
||||
cell_t *heap_start;
|
||||
cell_t heap_size, stack_cells;
|
||||
const char *boot;
|
||||
cell_t boot_size;
|
||||
const char *tib;
|
||||
cell_t ntib, tin, state, base;
|
||||
int argc;
|
||||
char **argv;
|
||||
cell_t *(*runner)(cell_t *rp); // pointer to forth_run
|
||||
|
||||
// Layout not used by Forth.
|
||||
cell_t *rp; // spot to park main thread
|
||||
cell_t DOLIT_XT, DOFLIT_XT, DOEXIT_XT, YIELD_XT;
|
||||
void *DOCREATE_OP;
|
||||
const BUILTIN_WORD *builtins;
|
||||
} G_SYS;
|
||||
|
||||
@ -43,25 +43,6 @@ enum {
|
||||
#undef V
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
cell_t *heap, **current, ***context;
|
||||
cell_t *latestxt, notfound;
|
||||
cell_t *heap_start;
|
||||
cell_t heap_size, stack_cells;
|
||||
const char *boot;
|
||||
cell_t boot_size;
|
||||
const char *tib;
|
||||
cell_t ntib, tin, state, base;
|
||||
int argc;
|
||||
char **argv;
|
||||
cell_t *(*runner)(cell_t *rp); // pointer to forth_run
|
||||
|
||||
// Layout not used by Forth.
|
||||
cell_t *rp; // spot to park main thread
|
||||
cell_t DOLIT_XT, DOFLIT_XT, DOEXIT_XT, YIELD_XT;
|
||||
void *DOCREATE_OP;
|
||||
const BUILTIN_WORD *builtins;
|
||||
} G_SYS;
|
||||
static G_SYS *g_sys = 0;
|
||||
|
||||
static cell_t convert(const char *pos, cell_t n, cell_t base, cell_t *ret) {
|
||||
|
||||
Reference in New Issue
Block a user