wingo pushed a commit to branch wip-whippet
in repository guile.

commit 1b6055dbbd913c4c3991735d3a00e3f6159bd371
Author: Andy Wingo <wi...@pobox.com>
AuthorDate: Wed Apr 23 17:35:27 2025 +0200

    Adapt to Whippet inline allocation changes
    
    * libguile/jit.c (compile_allocate_words_immediate):
    (compile_allocate_words_immediate_slow):
    (compile_allocate_pointerless_words_immediate):
    (compile_allocate_pointerless_words_immediate_slow): Update for new API.
---
 libguile/jit.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/libguile/jit.c b/libguile/jit.c
index c8919a3c9..45dbdff75 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -2350,7 +2350,8 @@ compile_allocate_words_immediate (scm_jit_state *j, 
uint32_t dst, uint32_t nword
 {
   size_t bytes = nwords * sizeof(SCM);
 
-  if (gc_allocator_kind() == GC_ALLOCATOR_INLINE_FREELIST &&
+  if ((gc_inline_allocator_kind(GC_ALLOCATION_TAGGED)
+       == GC_INLINE_ALLOCATOR_FREELIST) &&
       bytes <= gc_allocator_large_threshold ())
     emit_allocate_bytes_fast_freelist (j, T0, bytes, GC_ALLOCATION_TAGGED,
                                        T1, T2);
@@ -2366,7 +2367,8 @@ compile_allocate_words_immediate_slow (scm_jit_state *j, 
uint32_t dst, uint32_t
   size_t bytes = nwords * sizeof(SCM);
 
   /* Only emit a slow path if there is a fast path.  */
-  if (gc_allocator_kind() == GC_ALLOCATOR_INLINE_FREELIST &&
+  if ((gc_inline_allocator_kind(GC_ALLOCATION_TAGGED)
+       == GC_INLINE_ALLOCATOR_FREELIST) &&
       bytes <= gc_allocator_large_threshold ())
     {
       emit_allocate_words_slow (j, T0,
@@ -2394,7 +2396,8 @@ compile_allocate_pointerless_words_immediate 
(scm_jit_state *j, uint32_t dst, ui
 {
   size_t bytes = nwords * sizeof(SCM);
 
-  if (gc_allocator_kind() == GC_ALLOCATOR_INLINE_FREELIST &&
+  if ((gc_inline_allocator_kind(GC_ALLOCATION_UNTAGGED_POINTERLESS)
+       == GC_INLINE_ALLOCATOR_FREELIST) &&
       bytes <= gc_allocator_large_threshold ())
     emit_allocate_bytes_fast_freelist (j, T0, bytes,
                                        GC_ALLOCATION_UNTAGGED_POINTERLESS,
@@ -2411,7 +2414,8 @@ compile_allocate_pointerless_words_immediate_slow 
(scm_jit_state *j, uint32_t ds
   size_t bytes = nwords * sizeof(SCM);
 
   /* Only emit a slow path if there is a fast path.  */
-  if (gc_allocator_kind() == GC_ALLOCATOR_INLINE_FREELIST &&
+  if ((gc_inline_allocator_kind(GC_ALLOCATION_UNTAGGED_POINTERLESS)
+       == GC_INLINE_ALLOCATOR_FREELIST) &&
       bytes <= gc_allocator_large_threshold ())
     {
       emit_allocate_words_slow (j, T0,

Reply via email to