[qfcc] Bring back the core of type aliasing

No aliasing is done yet, but most of the infrastructure is there again.
This commit is contained in:
Bill Currie 2020-03-27 12:27:46 +09:00
parent 53fd55143e
commit 8b1e4eea58
6 changed files with 44 additions and 0 deletions

View file

@ -234,6 +234,9 @@ pr_debug_type_size (const progs_t *pr, const qfot_type_t *type)
return type->t.array.size * size;
case ty_class:
return 1; //FIXME or should it return sizeof class struct?
case ty_alias:
aux_type = &G_STRUCT (pr, qfot_type_t, type->t.alias.aux_type);
return pr_debug_type_size (pr, aux_type);
}
return 0;
}
@ -883,6 +886,9 @@ value_string (pr_debug_data_t *data, qfot_type_t *type, pr_type_t *value)
case ty_class:
raw_type_view.class_view (type, value, data);
break;
case ty_alias://XXX
type = &G_STRUCT (data->pr, qfot_type_t, type->t.alias.aux_type);
return value_string (data, type, value);
}
return data->dstr->str;
}