1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 20:30:28 +02:00

Switch to use Whippet allocation fast paths

* libguile/Makefile.am (noinst_HEADERS, modinclude_HEADERS): Move
gc-inline.h to be a private header.
* libguile/gc-inline.h (scm_inline_gc_malloc_pointerless):
(scm_inline_gc_malloc): Use gc_allocate.
* libguile/intrinsics.c (allocate_words_with_freelist):
(allocate_pointerless_words_with_freelist): Remove these intrinsics.
Renumbers the intrinsics.
(scm_bootstrap_intrinsics):
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Adapt to intrinsics
change.
* libguile/jit.c (emit_update_alloc_table):
(emit_allocate_bytes_fast_freelist):
(emit_allocate_words_slow): New helpers.
(compile_allocate_words):
(compile_allocate_words_immediate):
(compile_allocate_words_immediate_slow):
(compile_allocate_pointerless_words):
(compile_allocate_pointerless_words_immediate):
(compile_allocate_pointerless_words_immediate_slow): Use new helpers.
* libguile/threads.c (scm_trace_thread_mutator_roots):
(on_thread_exit):
* libguile/threads.h: Remove Guile-managed thread-local freelists.
This commit is contained in:
Andy Wingo 2025-04-22 13:44:44 +02:00
parent 7696344634
commit 0532602cd3
7 changed files with 93 additions and 185 deletions

View file

@ -1,4 +1,4 @@
/* Copyright 2018-2021, 2023
/* Copyright 2018-2021, 2023, 2025
Free Software Foundation, Inc.
This file is part of Guile.
@ -173,7 +173,6 @@ typedef void (*scm_t_scm_uimm_scm_intrinsic) (SCM, uint8_t, SCM);
M(thread_u8_scm_sp_vra_mra, push_prompt, "push-prompt", PUSH_PROMPT) \
M(thread_scm, unpack_values_object, "unpack-values-object", UNPACK_VALUES_OBJECT) \
M(vcode, handle_interrupt_code, "%handle-interrupt-code", HANDLE_INTERRUPT_CODE) \
M(scm_from_thread_sz, allocate_words_with_freelist, "allocate-words/freelist", ALLOCATE_WORDS_WITH_FREELIST) \
M(scm_from_scm, abs, "abs", ABS) \
M(scm_from_scm, sqrt, "sqrt", SQRT) \
M(f64_from_f64, fabs, "fabs", FABS) \
@ -197,7 +196,6 @@ typedef void (*scm_t_scm_uimm_scm_intrinsic) (SCM, uint8_t, SCM);
M(f64_from_f64, fatan, "fatan", FATAN) \
M(f64_from_f64_f64, fatan2, "fatan2", FATAN2) \
M(scm_from_thread_sz, allocate_pointerless_words, "allocate-pointerless-words", ALLOCATE_POINTERLESS_WORDS) \
M(scm_from_thread_sz, allocate_pointerless_words_with_freelist, "allocate-pointerless-words/freelist", ALLOCATE_POINTERLESS_WORDS_WITH_FREELIST) \
M(scm_from_scm, inexact, "inexact", INEXACT) \
M(f64_from_s64, s64_to_f64, "s64->f64", S64_TO_F64) \
M(scm_from_scm, car, "$car", CAR) \