some def stuff shuffling

This commit is contained in:
Bill Currie 2002-06-07 21:17:51 +00:00
parent ef57625355
commit 541f7ed1b8
3 changed files with 10 additions and 9 deletions

View file

@ -38,13 +38,12 @@
typedef struct def_s {
struct type_s *type;
const char *name;
int locals;
int *alloc;
int ofs;
int initialized; // for uninit var detection
int constant; // 1 when a declaration included "= immediate"
struct reloc_s *refs; // for relocations
int initialized:1; // for uninit var detection
int constant:1; // 1 when a declaration included "= immediate"
unsigned freed:1; // already freed from the scope
unsigned removed:1; // already removed from the symbol table
unsigned used:1; // unused local detection
@ -56,6 +55,8 @@ typedef struct def_s {
int users; // ref counted temps
struct expr_s *expr; // temp expr using this def
int locals;
int *alloc;
struct def_s *def_next; // for writing out the global defs list
struct def_s *next; // general purpose linking
struct def_s *scope_next; // to facilitate hash table removal

View file

@ -45,6 +45,11 @@ typedef struct locref_s {
int ofs;
} locref_t;
def_t def_void = { &type_void, "temp" };
def_t def_function = { &type_function, "temp" };
def_t def_ret, def_parms[MAX_PARMS];
static def_t *free_temps[4]; // indexted by type size
static def_t temp_scope;
static def_t *free_defs;

View file

@ -90,11 +90,6 @@ type_t *type_module;
type_t type_floatfield = { ev_field, NULL, &type_float };
def_t def_void = { &type_void, "temp" };
def_t def_function = { &type_function, "temp" };
def_t def_ret, def_parms[MAX_PARMS];
static type_t *free_types;
static inline void