master: Correct some obsolete bit-masking steps
snuglas via Sbcl-commits <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via 8f009e157941c12239e7ebc7a6af0cf61109f083 (commit)
from d3bd86dd8a65dc78e4900c539f0017ea02ad173e (commit)
- Log -----------------------------------------------------------------
commit 8f009e157941c12239e7ebc7a6af0cf61109f083
Author: Douglas Katzman <[email protected]>
Date: Tue Apr 7 02:02:12 2026 -0400
Correct some obsolete bit-masking steps
They weren't wrong, but just overly complicated in light of earlier changes
---
src/runtime/gencgc-impl.h | 4 ++++
src/runtime/immobile-space.c | 6 ++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/runtime/gencgc-impl.h b/src/runtime/gencgc-impl.h
index 2824a897f..3d92e3465 100644
--- a/src/runtime/gencgc-impl.h
+++ b/src/runtime/gencgc-impl.h
@@ -776,6 +776,10 @@ struct fixedobj_page { // 8 bytes per page
union immobile_page_attr {
int packed;
struct {
+ // The only "flags" indicate the write-protect status. They used to
+ // also indicate the nature of objects stored on a page, distinguishing
+ // interned symbols from uninterned symbols for example.
+ // Revision 6a080ae2 did away with such usage.
unsigned char flags;
unsigned char obj_align; // object spacing expressed in lisp words
unsigned char unused1;
diff --git a/src/runtime/immobile-space.c b/src/runtime/immobile-space.c
index 89038c6b5..2c603ad97 100644
--- a/src/runtime/immobile-space.c
+++ b/src/runtime/immobile-space.c
@@ -105,15 +105,13 @@ unsigned int immobile_scav_queue_count;
#define WRITE_PROTECT_CLEARED 0x40
// Packing and unpacking attributes
-// the low two flag bits are for write-protect status
#define MAKE_ATTR(spacing) ((spacing)<<8)
#define OBJ_SPACING(attr) ((attr>>8) & 0xFF)
// Ignore the write-protect bits and the generations when comparing attributes
#define ATTRIBUTES_MATCH_P(page_attr,specified_attr) \
- ((page_attr & 0xFFFF3F) == specified_attr)
-#define SET_WP_FLAG(index,flag) \
- fixedobj_pages[index].attr.parts.flags = (fixedobj_pages[index].attr.parts.flags & 0x3F) | flag
+ ((page_attr & 0xFFFF00) == specified_attr)
+#define SET_WP_FLAG(index,bits) fixedobj_pages[index].attr.parts.flags = bits
#define set_page_full(i) fixedobj_pages[i].free_index = IMMOBILE_CARD_BYTES
#define page_full_p(i) (fixedobj_pages[i].free_index >= (int)IMMOBILE_CARD_BYTES)
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL