diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-11-18 00:34:23 -0600 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-11-18 00:34:23 -0600 |
commit | 943a6597b2bcd1b3ed208458a5cba61ad5b4051c (patch) | |
tree | d0acf34996941417aca241f5f01e399aaa90af39 /src/gc.h | |
parent | 57331ba9756df043b5c665aa4952a0a7b38799e5 (diff) |
...
Diffstat (limited to 'src/gc.h')
-rw-r--r-- | src/gc.h | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -2,15 +2,21 @@ #define IMB3_GC_H #include "value.h" -#include <stddef.h> void gc_init(void); void gc_collect(void); struct object; -struct value gc_read_value_slot(struct object *, size_t); -uintptr_t gc_read_untraced_slot(struct object *, size_t); -uint8_t gc_read_untraced_byte(struct object *, size_t); + +struct object *gc_alloc(size_t value_slot_count, size_t untraced_slot_count); +struct object *gc_alloc_compiled_function(size_t value_slot_count, + size_t untraced_slot_count); +struct object *gc_alloc_hashtable_eq(size_t value_slot_count, + size_t untraced_slot_count); + +struct value gc_read_value_slot(const struct object *, size_t); +uintptr_t gc_read_untraced_slot(const struct object *, size_t); +uint8_t gc_read_untraced_byte(const struct object *, size_t); void gc_write_value_slot(struct object *, size_t, struct value); void gc_write_untraced_slot(struct object *, size_t, uintptr_t); void gc_write_untraced_byte(struct object *, size_t, uint8_t); |