From c2f451bf5725a17f9005d563d7d07bae05adc897 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 24 Jun 2025 11:38:46 +0200 Subject: [PATCH] Remove unused internal inline allocation functions * libguile/gc-inline.h (scm_inline_cell, scm_inline_double_cell) (scm_inline_words, scm_inline_gc_malloc_pointerless, scm_inline_gc_malloc) (scm_inline_gc_malloc_words, scm_inline_gc_malloc_pointerless_words): Remove. --- libguile/gc-inline.h | 60 -------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/libguile/gc-inline.h b/libguile/gc-inline.h index 15dbea0c9..88c8efc16 100644 --- a/libguile/gc-inline.h +++ b/libguile/gc-inline.h @@ -66,65 +66,5 @@ scm_inline_allocate_sloppy (scm_thread *thread, size_t bytes) GC_ALLOCATION_UNTAGGED_CONSERVATIVE); } -static inline void * -scm_inline_gc_malloc_pointerless (scm_thread *thread, size_t bytes) -{ - return gc_allocate (thread->mutator, bytes, - GC_ALLOCATION_UNTAGGED_POINTERLESS); -} - -static inline void * -scm_inline_gc_malloc (scm_thread *thread, size_t bytes) -{ - return gc_allocate (thread->mutator, bytes, GC_ALLOCATION_TAGGED); -} - -static inline void * -scm_inline_gc_malloc_words (scm_thread *thread, size_t words) -{ - return scm_inline_gc_malloc (thread, words * sizeof (void *)); -} - -static inline void * -scm_inline_gc_malloc_pointerless_words (scm_thread *thread, size_t words) -{ - return scm_inline_gc_malloc_pointerless (thread, words * sizeof (void *)); -} - -static inline SCM -scm_inline_cell (scm_thread *thread, scm_t_bits car, scm_t_bits cdr) -{ - SCM cell = SCM_PACK_POINTER (scm_inline_gc_malloc_words (thread, 2)); - - SCM_GC_SET_CELL_WORD (cell, 0, car); - SCM_GC_SET_CELL_WORD (cell, 1, cdr); - - return cell; -} - -static inline SCM -scm_inline_double_cell (scm_thread *thread, scm_t_bits car, scm_t_bits cbr, - scm_t_bits ccr, scm_t_bits cdr) -{ - SCM cell = SCM_PACK_POINTER (scm_inline_gc_malloc_words (thread, 4)); - - SCM_GC_SET_CELL_WORD (cell, 0, car); - SCM_GC_SET_CELL_WORD (cell, 1, cbr); - SCM_GC_SET_CELL_WORD (cell, 2, ccr); - SCM_GC_SET_CELL_WORD (cell, 3, cdr); - - return cell; -} - -static inline SCM -scm_inline_words (scm_thread *thread, scm_t_bits car, uint32_t n_words) -{ - SCM obj = SCM_PACK_POINTER (scm_inline_gc_malloc_words (thread, n_words)); - - SCM_GC_SET_CELL_WORD (obj, 0, car); - - return obj; -} - #endif /* SCM_GC_INLINE_H */