1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Don't clear log bits when marking

This happens in a post-pass.
This commit is contained in:
Andy Wingo 2024-10-04 13:51:27 +02:00
parent 6d48e12f78
commit b4ea55b9c4

View file

@ -1408,11 +1408,8 @@ nofl_space_should_evacuate(struct nofl_space *space, uint8_t metadata_byte,
static inline int static inline int
nofl_space_set_mark(struct nofl_space *space, uint8_t *metadata, uint8_t byte) { nofl_space_set_mark(struct nofl_space *space, uint8_t *metadata, uint8_t byte) {
// Clear logged bits when we mark: after marking, there will be no
// young objects.
uint8_t mask = NOFL_METADATA_BYTE_YOUNG | NOFL_METADATA_BYTE_MARK_0 uint8_t mask = NOFL_METADATA_BYTE_YOUNG | NOFL_METADATA_BYTE_MARK_0
| NOFL_METADATA_BYTE_MARK_1 | NOFL_METADATA_BYTE_MARK_2 | NOFL_METADATA_BYTE_MARK_1 | NOFL_METADATA_BYTE_MARK_2;
| NOFL_METADATA_BYTE_LOGGED_0 | NOFL_METADATA_BYTE_LOGGED_1;
atomic_store_explicit(metadata, atomic_store_explicit(metadata,
(byte & ~mask) | space->marked_mask, (byte & ~mask) | space->marked_mask,
memory_order_relaxed); memory_order_relaxed);