mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-12 08:40:20 +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:
parent
cacc28b577
commit
fb71c4c363
20 changed files with 452 additions and 306 deletions
28
gc-embedder-api.h
Normal file
28
gc-embedder-api.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef GC_EMBEDDER_API_H
|
||||
#define GC_EMBEDDER_API_H
|
||||
|
||||
#include "gc-edge.h"
|
||||
#include "gc-forwarding.h"
|
||||
|
||||
#ifndef GC_EMBEDDER_API
|
||||
#define GC_EMBEDDER_API static
|
||||
#endif
|
||||
|
||||
GC_EMBEDDER_API inline void gc_trace_object(void *object,
|
||||
void (*trace_edge)(struct gc_edge edge,
|
||||
void *trace_data),
|
||||
void *trace_data,
|
||||
size_t *size) GC_ALWAYS_INLINE;
|
||||
|
||||
GC_EMBEDDER_API inline uintptr_t gc_object_forwarded_nonatomic(void *object);
|
||||
GC_EMBEDDER_API inline void gc_object_forward_nonatomic(void *object, uintptr_t new_addr);
|
||||
|
||||
GC_EMBEDDER_API inline struct gc_atomic_forward gc_atomic_forward_begin(void *obj);
|
||||
GC_EMBEDDER_API inline void gc_atomic_forward_acquire(struct gc_atomic_forward *);
|
||||
GC_EMBEDDER_API inline int gc_atomic_forward_retry_busy(struct gc_atomic_forward *);
|
||||
GC_EMBEDDER_API inline void gc_atomic_forward_abort(struct gc_atomic_forward *);
|
||||
GC_EMBEDDER_API inline void gc_atomic_forward_commit(struct gc_atomic_forward *,
|
||||
uintptr_t new_addr);
|
||||
GC_EMBEDDER_API inline uintptr_t gc_atomic_forward_address(struct gc_atomic_forward *);
|
||||
|
||||
#endif // GC_EMBEDDER_API_H
|
Loading…
Add table
Add a link
Reference in a new issue