mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-06 16:01:10 +00:00
some def stuff shuffling
This commit is contained in:
parent
ef57625355
commit
541f7ed1b8
3 changed files with 10 additions and 9 deletions
|
@ -38,13 +38,12 @@
|
||||||
typedef struct def_s {
|
typedef struct def_s {
|
||||||
struct type_s *type;
|
struct type_s *type;
|
||||||
const char *name;
|
const char *name;
|
||||||
int locals;
|
|
||||||
int *alloc;
|
|
||||||
int ofs;
|
int ofs;
|
||||||
int initialized; // for uninit var detection
|
|
||||||
int constant; // 1 when a declaration included "= immediate"
|
|
||||||
struct reloc_s *refs; // for relocations
|
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 freed:1; // already freed from the scope
|
||||||
unsigned removed:1; // already removed from the symbol table
|
unsigned removed:1; // already removed from the symbol table
|
||||||
unsigned used:1; // unused local detection
|
unsigned used:1; // unused local detection
|
||||||
|
@ -56,6 +55,8 @@ typedef struct def_s {
|
||||||
int users; // ref counted temps
|
int users; // ref counted temps
|
||||||
struct expr_s *expr; // temp expr using this def
|
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 *def_next; // for writing out the global defs list
|
||||||
struct def_s *next; // general purpose linking
|
struct def_s *next; // general purpose linking
|
||||||
struct def_s *scope_next; // to facilitate hash table removal
|
struct def_s *scope_next; // to facilitate hash table removal
|
||||||
|
|
|
@ -45,6 +45,11 @@ typedef struct locref_s {
|
||||||
int ofs;
|
int ofs;
|
||||||
} locref_t;
|
} 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 *free_temps[4]; // indexted by type size
|
||||||
static def_t temp_scope;
|
static def_t temp_scope;
|
||||||
static def_t *free_defs;
|
static def_t *free_defs;
|
||||||
|
|
|
@ -90,11 +90,6 @@ type_t *type_module;
|
||||||
|
|
||||||
type_t type_floatfield = { ev_field, NULL, &type_float };
|
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 type_t *free_types;
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
Loading…
Reference in a new issue