mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
type.[ch]:
provide a vector structure def so vector.[xyz] can be implemented def.c: record the return address in get_temp to aid debugging
This commit is contained in:
parent
575689296a
commit
a20bb946f6
3 changed files with 10 additions and 0 deletions
|
@ -73,6 +73,8 @@ extern type_t *type_category;
|
||||||
extern type_t *type_ivar;
|
extern type_t *type_ivar;
|
||||||
extern type_t *type_module;
|
extern type_t *type_module;
|
||||||
|
|
||||||
|
extern type_t *vector_struct;
|
||||||
|
|
||||||
struct dstring_s;
|
struct dstring_s;
|
||||||
|
|
||||||
type_t *new_type (void);
|
type_t *new_type (void);
|
||||||
|
|
|
@ -387,6 +387,7 @@ get_tempdef (type_t *type, scope_t *scope)
|
||||||
def->type = type;
|
def->type = type;
|
||||||
} else {
|
} else {
|
||||||
def = new_def (type, 0, scope);
|
def = new_def (type, 0, scope);
|
||||||
|
def->return_addr = __builtin_return_address (0);
|
||||||
def->ofs = new_location (type, scope->space);
|
def->ofs = new_location (type, scope->space);
|
||||||
}
|
}
|
||||||
def->freed = def->removed = def->users = 0;
|
def->freed = def->removed = def->users = 0;
|
||||||
|
|
|
@ -91,6 +91,8 @@ type_t *type_category;
|
||||||
type_t *type_ivar;
|
type_t *type_ivar;
|
||||||
type_t *type_module;
|
type_t *type_module;
|
||||||
|
|
||||||
|
type_t *vector_struct;
|
||||||
|
|
||||||
type_t type_floatfield = { ev_field, ".float", NULL, &type_float };
|
type_t type_floatfield = { ev_field, ".float", NULL, &type_float };
|
||||||
|
|
||||||
static type_t *free_types;
|
static type_t *free_types;
|
||||||
|
@ -584,6 +586,11 @@ init_types (void)
|
||||||
if (options.traditional)
|
if (options.traditional)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
type = vector_struct = new_struct (0);
|
||||||
|
new_struct_field (type, &type_float, "x", vis_public);
|
||||||
|
new_struct_field (type, &type_float, "y", vis_public);
|
||||||
|
new_struct_field (type, &type_float, "z", vis_public);
|
||||||
|
|
||||||
type = type_SEL.aux_type = new_struct (0);
|
type = type_SEL.aux_type = new_struct (0);
|
||||||
new_struct_field (type, &type_string, "sel_id", vis_public);
|
new_struct_field (type, &type_string, "sel_id", vis_public);
|
||||||
new_struct_field (type, &type_string, "sel_types", vis_public);
|
new_struct_field (type, &type_string, "sel_types", vis_public);
|
||||||
|
|
Loading…
Reference in a new issue