1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Add ephemeron implementation

This commit adds support for ephemerons to the API and wires it into the
collectors.  It also adds a new test.
This commit is contained in:
Andy Wingo 2022-11-26 22:28:57 +01:00
parent 44f37a373c
commit 78da8d5811
18 changed files with 1455 additions and 56 deletions

View file

@ -5,8 +5,9 @@
#include "simple-roots-types.h"
#define HANDLE_TO(T) union { T* v; struct handle handle; }
#define HANDLE_REF(h) h.v
#define HANDLE_SET(h,val) do { h.v = val; } while (0)
#define HANDLE_LOC(h) &(h).v
#define HANDLE_REF(h) (h).v
#define HANDLE_SET(h,val) do { (h).v = val; } while (0)
#define PUSH_HANDLE(cx, h) push_handle(&(cx)->roots.roots, &h.handle)
#define POP_HANDLE(cx) pop_handle(&(cx)->roots.roots)