]> Repositorios git - scryer-prolog.git/commit
don't erase ptr type early when construction a Cons HeapCellValue
authorSkgland <[email protected]>
Wed, 22 Apr 2026 21:22:27 +0000 (23:22 +0200)
committerSkgland <[email protected]>
Sat, 25 Apr 2026 16:12:31 +0000 (18:12 +0200)
commitb4db85c8c329e1f32fb76344aa7b65a749a2d5ad
treec57349bf6646b5e0881fc4b3212d7d935f6de0e6
parent67659216669cf71a2db54ab80bb4f065c19a2642
don't erase ptr type early when construction a Cons HeapCellValue

rather than passing an address as usize pass the ArenaHeader pointer
similarly don't return a u8 ptr but use a ArenaHeader pointer instead

Don't convert the pointer to a ConsPtr by going through native endian
bytes in between.
We are exploiting the fact that the 3 least significant bytes are zero
for pointer to types of alignment 8 and we expect these to line up with
the f, m, and tag field at the end of the ConsPtr struct, but using
native endiannes for this would only work on big endian systems.
src/arena.rs
src/machine/gc.rs
src/macros.rs
src/types.rs