mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 15:10:29 +02:00
Add gc_edge data structure
Less casting in user programs, and it's a step on the way to evacuation in whippet.
This commit is contained in:
parent
808d365f4b
commit
52166fe286
9 changed files with 81 additions and 48 deletions
|
@ -2,6 +2,7 @@
|
|||
#define HEAP_OBJECTS_H
|
||||
|
||||
#include "inline.h"
|
||||
#include "gc-types.h"
|
||||
|
||||
#define DECLARE_NODE_TYPE(name, Name, NAME) \
|
||||
struct Name; \
|
||||
|
@ -18,7 +19,7 @@ enum alloc_kind {
|
|||
#define DEFINE_METHODS(name, Name, NAME) \
|
||||
static inline size_t name##_size(Name *obj) ALWAYS_INLINE; \
|
||||
static inline void visit_##name##_fields(Name *obj,\
|
||||
void (*visit)(void **loc, void *visit_data), \
|
||||
void (*visit)(struct gc_edge edge, void *visit_data), \
|
||||
void *visit_data) ALWAYS_INLINE;
|
||||
FOR_EACH_HEAP_OBJECT_KIND(DEFINE_METHODS)
|
||||
#undef DEFINE_METHODS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue