mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-01 09:02:08 +00:00
Resolve local def type encodings
They need to be resolved at load-time.
This commit is contained in:
parent
c51c9edd9d
commit
1cfac0f11a
1 changed files with 12 additions and 2 deletions
|
@ -234,6 +234,13 @@ dump_functions (progs_t *pr)
|
||||||
const char *name;
|
const char *name;
|
||||||
int start, count;
|
int start, count;
|
||||||
const char *comment;
|
const char *comment;
|
||||||
|
pr_def_t *encodings_def;
|
||||||
|
pointer_t type_encodings = 0;
|
||||||
|
|
||||||
|
encodings_def = PR_FindGlobal (pr, ".type_encodings");
|
||||||
|
if (encodings_def) {
|
||||||
|
type_encodings = encodings_def->ofs;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < pr->progs->numfunctions; i++) {
|
for (i = 0; i < pr->progs->numfunctions; i++) {
|
||||||
dfunction_t *func = &pr->pr_functions[i];
|
dfunction_t *func = &pr->pr_functions[i];
|
||||||
|
@ -256,7 +263,7 @@ dump_functions (progs_t *pr)
|
||||||
func->parm_size[j].size);
|
func->parm_size[j].size);
|
||||||
printf (") %d @ %x", func->locals, func->parm_start);
|
printf (") %d @ %x", func->locals, func->parm_start);
|
||||||
puts ("");
|
puts ("");
|
||||||
if (pr->debug) {
|
if (pr->debug && type_encodings) {
|
||||||
pr_auxfunction_t *aux = pr->auxfunction_map[i];
|
pr_auxfunction_t *aux = pr->auxfunction_map[i];
|
||||||
if (!aux)
|
if (!aux)
|
||||||
continue;
|
continue;
|
||||||
|
@ -265,8 +272,11 @@ dump_functions (progs_t *pr)
|
||||||
aux->line_info,
|
aux->line_info,
|
||||||
aux->local_defs, aux->num_locals,
|
aux->local_defs, aux->num_locals,
|
||||||
aux->return_type);
|
aux->return_type);
|
||||||
for (j = 0; j < (int)aux->num_locals; j++)
|
for (j = 0; j < (int)aux->num_locals; j++) {
|
||||||
|
pr->local_defs[+ aux->local_defs + j].type_encoding
|
||||||
|
+= type_encodings;
|
||||||
dump_def (pr, pr->local_defs + aux->local_defs + j, 1);
|
dump_def (pr, pr->local_defs + aux->local_defs + j, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue