diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-23 20:59:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-23 20:59:43 -0800 |
commit | 3343e230783eefbf3c479f00e46164a2407c2019 (patch) | |
tree | bb05c593035819eac2a76aa0c518c37e9986a1fa /parser.c | |
parent | 9c050d2fdca0b4fa525a3dc6d99cec9d17ec703e (diff) | |
download | txr-3343e230783eefbf3c479f00e46164a2407c2019.tar.gz txr-3343e230783eefbf3c479f00e46164a2407c2019.tar.bz2 txr-3343e230783eefbf3c479f00e46164a2407c2019.zip |
Struct instances now point directly to low level type.
This change eliminates numerous cast expressions and a pointer
chase from some operations, though some, like the struct_type
function, end up chasing an extra pointer.
* struct.c (struct struct_type): New member, self.
(struct struct_inst): Type member changed from val to
struct struct_type *.
(make_struct_type): Initialize new self member.
(super): Obtain type from si->type->self rather than
si->type. There appears to be a bug here.
(make_struct, lazy_struct_init): Initialize type field with
struct pointer rather than type object. Add an assertion which
references the type parameter, to prevent the cobj call from
garbage collecting type.
(copy_struct, clear_struct, replace_struct, reset_struct,
(lookup_slot, slot, slotset, struct_type, uslot_fun,
umethod_fun, struct_inst_print, struct_inst_mark,
struct_inst_equal, struct_inst_hash, struct_inst_equalsub):
All updated to new way of referencing type structure
and type object.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions