diff --git a/gc.c b/gc.c index 0d190161..a69c2fc1 100644 --- a/gc.c +++ b/gc.c @@ -1753,22 +1753,6 @@ void gc_thr_grow_move_buffer(gc_thread_data * d) #endif } -/** - * @brief Add an object to the move buffer - * @param d Mutator data object containing the buffer - * @param alloci Pointer to the next open slot in the buffer - * @param obj Object to add - */ -void gc_thr_add_to_move_buffer(gc_thread_data * d, int *alloci, object obj) -{ - if (*alloci == d->moveBufLen) { - gc_thr_grow_move_buffer(d); - } - - d->moveBuf[*alloci] = obj; - (*alloci)++; -} - // END heap definitions // Tri-color GC section diff --git a/include/cyclone/types.h b/include/cyclone/types.h index 5e597653..e880af0b 100644 --- a/include/cyclone/types.h +++ b/include/cyclone/types.h @@ -381,7 +381,6 @@ void gc_mark_globals(object globals, object global_table); //size_t gc_sweep(gc_heap * h, int heap_type, size_t * sum_freed_ptr, gc_thread_data *thd); gc_heap *gc_sweep(gc_heap * h, int heap_type, gc_thread_data *thd); void gc_thr_grow_move_buffer(gc_thread_data * d); -void gc_thr_add_to_move_buffer(gc_thread_data * d, int *alloci, object obj); void gc_thread_data_init(gc_thread_data * thd, int mut_num, char *stack_base, long stack_size); void gc_thread_data_free(gc_thread_data * thd); diff --git a/runtime.c b/runtime.c index 7678fba6..19179507 100644 --- a/runtime.c +++ b/runtime.c @@ -5325,7 +5325,23 @@ void gc_request_mark_globals(void) gc_mark_globals(Cyc_global_variables, global_table); } -char *gc_fixup_moved_obj(gc_thread_data * thd, int *alloci, char *obj, +/** + * @brief Add an object to the move buffer + * @param d Mutator data object containing the buffer + * @param alloci Pointer to the next open slot in the buffer + * @param obj Object to add + */ +static void gc_thr_add_to_move_buffer(gc_thread_data * d, int *alloci, object obj) +{ + if (*alloci == d->moveBufLen) { + gc_thr_grow_move_buffer(d); + } + + d->moveBuf[*alloci] = obj; + (*alloci)++; +} + +static char *gc_fixup_moved_obj(gc_thread_data * thd, int *alloci, char *obj, object hp) { int acquired_lock = 0;