diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-14 19:05:21 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-14 19:05:21 -0800 |
commit | 86e34526a52f4102ffdab6d7249d529a2174c87f (patch) | |
tree | 72ee2c3b303f7108c40b9a4568c3d9070d2b7b15 /struct.h | |
parent | 32385342eaa73711cbd2d3481ecd98969bb382ef (diff) | |
download | txr-86e34526a52f4102ffdab6d7249d529a2174c87f.tar.gz txr-86e34526a52f4102ffdab6d7249d529a2174c87f.tar.bz2 txr-86e34526a52f4102ffdab6d7249d529a2174c87f.zip |
Introducing struct instance dirty flags.
* struct.c (struct struct_inst): New bitfield member, dirty.
(struct_init): Register test-dirty, test-clear-dirty and
clear-dirty intrinsics.
(make_struct): Initialize dirty flag to 1.
(slotset): If the object is clean, then determine whether
the slot being set is an instance slot. If so, then
set the dirty flag.
(test_dirty, test_clear_dirty, clear_dirty): New functions.
* struct.h (test_dirty, test_clear_dirty, clear_dirty):
Declared.
* txr.1: Documented dirty flags concept and new functions.
Diffstat (limited to 'struct.h')
-rw-r--r-- | struct.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -46,6 +46,9 @@ val slotset(val strct, val sym, val newval); val static_slot(val stype, val sym); val static_slot_set(val stype, val sym, val newval); val static_slot_ensure(val stype, val sym, val newval, val no_error_p); +val test_dirty(val strct); +val test_clear_dirty(val strct); +val clear_dirty(val strct); val slotp(val type, val sym); val static_slot_p(val type, val sym); val slots(val stype); |