Replace fl_readstate_t with struct
This commit is contained in:
parent
b561f9d4b0
commit
262ace1efd
|
@ -127,9 +127,9 @@ static value_t apply_cl(uint32_t nargs);
|
||||||
static value_t *alloc_words(int n);
|
static value_t *alloc_words(int n);
|
||||||
static value_t relocate(value_t v);
|
static value_t relocate(value_t v);
|
||||||
|
|
||||||
static fl_readstate_t *readstate = NULL;
|
static struct fl_readstate *readstate = NULL;
|
||||||
|
|
||||||
static void free_readstate(fl_readstate_t *rs)
|
static void free_readstate(struct fl_readstate *rs)
|
||||||
{
|
{
|
||||||
htable_free(&rs->backrefs);
|
htable_free(&rs->backrefs);
|
||||||
htable_free(&rs->gensyms);
|
htable_free(&rs->gensyms);
|
||||||
|
@ -557,7 +557,7 @@ void gc(int mustgrow)
|
||||||
static int grew = 0;
|
static int grew = 0;
|
||||||
void *temp;
|
void *temp;
|
||||||
uint32_t i, f, top;
|
uint32_t i, f, top;
|
||||||
fl_readstate_t *rs;
|
struct fl_readstate *rs;
|
||||||
|
|
||||||
curheap = tospace;
|
curheap = tospace;
|
||||||
if (grew)
|
if (grew)
|
||||||
|
|
|
@ -162,19 +162,19 @@ fixnum_t tofixnum(value_t v, char *fname);
|
||||||
char *tostring(value_t v, char *fname);
|
char *tostring(value_t v, char *fname);
|
||||||
|
|
||||||
/* error handling */
|
/* error handling */
|
||||||
typedef struct _fl_readstate_t {
|
struct fl_readstate {
|
||||||
struct htable backrefs;
|
struct htable backrefs;
|
||||||
struct htable gensyms;
|
struct htable gensyms;
|
||||||
value_t source;
|
value_t source;
|
||||||
struct _fl_readstate_t *prev;
|
struct fl_readstate *prev;
|
||||||
} fl_readstate_t;
|
};
|
||||||
|
|
||||||
typedef struct _ectx_t {
|
typedef struct _ectx_t {
|
||||||
jmp_buf buf;
|
jmp_buf buf;
|
||||||
uint32_t sp;
|
uint32_t sp;
|
||||||
uint32_t frame;
|
uint32_t frame;
|
||||||
uint32_t ngchnd;
|
uint32_t ngchnd;
|
||||||
fl_readstate_t *rdst;
|
struct fl_readstate *rdst;
|
||||||
struct _ectx_t *prev;
|
struct _ectx_t *prev;
|
||||||
} fl_exception_context_t;
|
} fl_exception_context_t;
|
||||||
|
|
||||||
|
|
2
c/read.h
2
c/read.h
|
@ -678,7 +678,7 @@ static value_t do_read_sexpr(value_t label)
|
||||||
value_t fl_read_sexpr(value_t f)
|
value_t fl_read_sexpr(value_t f)
|
||||||
{
|
{
|
||||||
value_t v;
|
value_t v;
|
||||||
fl_readstate_t state;
|
struct fl_readstate state;
|
||||||
state.prev = readstate;
|
state.prev = readstate;
|
||||||
htable_new(&state.backrefs, 8);
|
htable_new(&state.backrefs, 8);
|
||||||
htable_new(&state.gensyms, 8);
|
htable_new(&state.gensyms, 8);
|
||||||
|
|
Loading…
Reference in New Issue