diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-15 07:11:36 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-15 07:11:36 -0800 |
commit | acb7f1a837a124488a46f0c83876e2d0ca222f24 (patch) | |
tree | 9673646ba83be35df0fa70582186c01928643ce2 /glob.h | |
parent | cf5bf659c31063541471fe50419b86dcb8f68e16 (diff) | |
download | txr-acb7f1a837a124488a46f0c83876e2d0ca222f24.tar.gz txr-acb7f1a837a124488a46f0c83876e2d0ca222f24.tar.bz2 txr-acb7f1a837a124488a46f0c83876e2d0ca222f24.zip |
structs: recycle IDs of dead struct types.
* struct.c (nelem): New macro.
(struct struct_id_recycle): New struct type.
(struct_id_counter): Initialize to 1 instead of zero.
(get_struct_id, recycle_struct_id): New static functions.
(struct_type_finalize): From each slot symbol, remove the
struct type's ID from it slot cache, and finally recycle the
struct type ID.
(make_struct_type): Use get_struct_id to obtain an ID for the
new struct type, rather than directly incrementing the global
counter.
Diffstat (limited to 'glob.h')
0 files changed, 0 insertions, 0 deletions