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:
parent
fe9bdf6397
commit
b082f5f50d
28 changed files with 344 additions and 189 deletions
31
precise-roots-embedder.h
Normal file
31
precise-roots-embedder.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef PRECISE_ROOTS_EMBEDDER_H
|
||||
#define PRECISE_ROOTS_EMBEDDER_H
|
||||
|
||||
#include "gc-edge.h"
|
||||
#include "precise-roots-types.h"
|
||||
|
||||
static inline void visit_roots(struct handle *roots,
|
||||
void (*trace_edge)(struct gc_edge edge,
|
||||
void *trace_data),
|
||||
void *trace_data) {
|
||||
for (struct handle *h = roots; h; h = h->next)
|
||||
trace_edge(gc_edge(&h->v), 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);
|
||||
}
|
||||
|
||||
#endif // PRECISE_ROOTS_EMBEDDER_H
|
Loading…
Add table
Add a link
Reference in a new issue