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

Separate compilation!!!!!

This commit is contained in:
Andy Wingo 2022-08-16 17:54:15 +02:00
parent fe9bdf6397
commit b082f5f50d
28 changed files with 344 additions and 189 deletions

View file

@ -19,34 +19,15 @@ static inline void gc_trace_object(void *object,
FOR_EACH_HEAP_OBJECT_KIND(SCAN_OBJECT)
#undef SCAN_OBJECT
default:
abort ();
GC_CRASH();
}
}
struct handle;
struct gc_heap_roots { struct handle *roots; };
struct gc_mutator_roots { struct handle *roots; };
static inline void visit_roots(struct handle *roots,
void (*trace_edge)(struct gc_edge edge,
void *trace_data),
void *trace_data);
static inline void gc_trace_mutator_roots(struct gc_mutator_roots *roots,
void (*trace_edge)(struct gc_edge edge,
void *trace_data),
void *trace_data) {
if (roots)
visit_roots(roots->roots, trace_edge, trace_data);
}
static inline void gc_trace_heap_roots(struct gc_heap_roots *roots,
void (*trace_edge)(struct gc_edge edge,
void *trace_data),
void *trace_data) {
if (roots)
visit_roots(roots->roots, trace_edge, trace_data);
}
#if GC_PRECISE
#include "precise-roots-embedder.h"
#else
#include "conservative-roots-embedder.h"
#endif
static inline uintptr_t gc_object_forwarded_nonatomic(void *object) {
uintptr_t tag = *tag_word(object);