diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-15 11:54:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-15 11:54:06 -0800 |
commit | 3a53af3b6db3821fc614ba51c0f4ea25009a0374 (patch) | |
tree | b0d72fddb350be541109624d11ebfde203ef0291 /struct.c | |
parent | acb7f1a837a124488a46f0c83876e2d0ca222f24 (diff) | |
download | txr-3a53af3b6db3821fc614ba51c0f4ea25009a0374.tar.gz txr-3a53af3b6db3821fc614ba51c0f4ea25009a0374.tar.bz2 txr-3a53af3b6db3821fc614ba51c0f4ea25009a0374.zip |
structs: fix poorly maintained bitfield size.
* struct.c (struct struct_inst): When the dirty flag was
added, the id field was not decreased by one bit to make
space, so the desired packing is not being achieved any
more. Let's just use TAG_SHIFT to reserve the maximum bits
that will still let us fit a fixnum into id.
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -84,7 +84,7 @@ struct struct_type { struct struct_inst { struct struct_type *type; - cnum id : sizeof (cnum) * CHAR_BIT - 1 ; + cnum id : sizeof (cnum) * CHAR_BIT - TAG_SHIFT; unsigned lazy : 1; unsigned dirty : 1; val slot[1]; |