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

mmc: Fix inlining of trace_conservative_edges for pinned roots

This commit is contained in:
Andy Wingo 2025-05-26 11:56:34 +02:00
parent cc9eb16e92
commit 94f6c8ce6a

View file

@ -379,6 +379,16 @@ trace_conservative_edges(uintptr_t low, uintptr_t high, int possibly_interior,
possibly_interior); possibly_interior);
} }
static void
trace_conservative_edges_wrapper(uintptr_t low, uintptr_t high,
int possibly_interior,
struct gc_heap *heap, void *data) {
if (possibly_interior)
trace_conservative_edges(low, high, 1, heap, data);
else
trace_conservative_edges(low, high, 0, heap, data);
}
static inline struct gc_trace_plan static inline struct gc_trace_plan
trace_plan(struct gc_heap *heap, struct gc_ref ref) { trace_plan(struct gc_heap *heap, struct gc_ref ref) {
if (GC_LIKELY(nofl_space_contains(heap_nofl_space(heap), ref))) { if (GC_LIKELY(nofl_space_contains(heap_nofl_space(heap), ref))) {
@ -448,13 +458,13 @@ trace_root(struct gc_root root, struct gc_heap *heap,
case GC_ROOT_KIND_HEAP_PINNED_ROOTS: case GC_ROOT_KIND_HEAP_PINNED_ROOTS:
gc_trace_heap_pinned_roots(root.heap->roots, gc_trace_heap_pinned_roots(root.heap->roots,
tracer_visit_pinned_root, tracer_visit_pinned_root,
trace_conservative_edges, trace_conservative_edges_wrapper,
heap, worker); heap, worker);
break; break;
case GC_ROOT_KIND_MUTATOR_PINNED_ROOTS: case GC_ROOT_KIND_MUTATOR_PINNED_ROOTS:
gc_trace_mutator_pinned_roots(root.mutator->roots, gc_trace_mutator_pinned_roots(root.mutator->roots,
tracer_visit_pinned_root, tracer_visit_pinned_root,
trace_conservative_edges, trace_conservative_edges_wrapper,
heap, worker); heap, worker);
break; break;
default: default: