1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-10 07:50:24 +02:00

Separate tagging from collector

The collector now has an abstract interface onto the embedder.  The
embedder has to supply some functionality, such as tracing and
forwarding.  This is a pretty big change in terms of lines but it's
supposed to have no functional or performance change.
This commit is contained in:
Andy Wingo 2022-08-12 16:44:38 +02:00
parent cacc28b577
commit fb71c4c363
20 changed files with 452 additions and 306 deletions

View file

@ -1,8 +1,8 @@
#ifndef HEAP_OBJECTS_H
#define HEAP_OBJECTS_H
#include "inline.h"
#include "gc-api.h"
#include "gc-inline.h"
#include "gc-edge.h"
#define DECLARE_NODE_TYPE(name, Name, NAME) \
struct Name; \
@ -17,10 +17,10 @@ enum alloc_kind {
#undef DEFINE_ENUM
#define DEFINE_METHODS(name, Name, NAME) \
static inline size_t name##_size(Name *obj) ALWAYS_INLINE; \
static inline size_t name##_size(Name *obj) GC_ALWAYS_INLINE; \
static inline void visit_##name##_fields(Name *obj,\
void (*visit)(struct gc_edge edge, void *visit_data), \
void *visit_data) ALWAYS_INLINE;
void *visit_data) GC_ALWAYS_INLINE;
FOR_EACH_HEAP_OBJECT_KIND(DEFINE_METHODS)
#undef DEFINE_METHODS