1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

Merged Whippet into libguile/whippet

This commit is contained in:
Andy Wingo 2025-04-11 14:10:41 +02:00
commit db181e67ff
112 changed files with 18115 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#ifndef GC_EDGE_H
#define GC_EDGE_H
#include "gc-ref.h"
struct gc_edge {
struct gc_ref *dst;
};
static inline struct gc_edge gc_edge(void* addr) {
return (struct gc_edge){addr};
}
static inline struct gc_ref gc_edge_ref(struct gc_edge edge) {
return *edge.dst;
}
static inline struct gc_ref* gc_edge_loc(struct gc_edge edge) {
return edge.dst;
}
static inline uintptr_t gc_edge_address(struct gc_edge edge) {
return (uintptr_t)gc_edge_loc(edge);
}
static inline void gc_edge_update(struct gc_edge edge, struct gc_ref ref) {
*edge.dst = ref;
}
#endif // GC_EDGE_H