* libguile/jit.c (compile_ursh_immediate):
(compile_ulsh_immediate): Fix immediate/register variant calling.
Happily a benefit of lightening, as type safety did this for us.
(DEFINE_CLOBBER_RECORDING_EMITTER_R_R_2): Pass JIT state.
* libguile/programs.c (scm_i_program_name): Use scm_i_primitive_name for
primitives. No functional change though.
* libguile/vm.c (DEFINE_BUILTIN): Mark builtins as primitives.
* libguile/jit.c: Operands have their ABI in them. We can now have
addends on GPR and MEM operands, which can improve register
allocation. Use new jit_calli_3, etc helper APIs.
* libguile/jit.c (compute_mcode): Move analysis outside the code
emitter, as it doesn't need to re-run on overflow.
(compile): Clear labels before emitting, as they may have changed if we
overflowed.
* libguile/jit.c (fp_scm_operand): Fix assertion about register state.
(compile_call_scm_sz_u32): Fix ABI declaration for immediate.
Some whitespace cleanups as well.
* libguile/jit.c (prepare_jit_state): Remove unused function.
(initialize_thread_jit_state): Since the lightening state is allocated
using GC memory, trace the JIT state.
(compute_mcode): Avoid double-compile.
* libguile/jit.c (struct scm_jit_state): Remove entry_mcode member.
(add_inter_instruction_patch): Fix off-by-one.
(compile): Reset reloc_idx when restarting a compile. All instructions
record their addresses.
* libguile/macros.c (scm_i_make_primitive_macro): Give primitive macros
a primitive-macro macro-type.
* module/ice-9/psyntax.scm (put-global-definition-hook)
(get-global-definition-hook): Inline into uses.
(make-binding): Change format of lexically defined or rebound syntax
parameters to just be the transformer, not a list of the transformer.
(resolve-identifier, expand-install-global, expand-body)
(syntax-parameterize): Adapt to use the variable object (box) holding
the top-level syntax parameter as the "key" for lookups into the
lexical environment, instead of a fresh object associated with the
syntax transformer.
* module/ice-9/psyntax-pp.scm: Regenerate.
Fixes#27476, a horrible race when one thread is expanding a
syntax-parameterize form including uses, and another thread is expanding
the corresponding define-syntax-parameter. See
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27476#102.
* libguile/jit.c (compile_u64_imm_less): Compare high word using
not-equal, to avoid a signedness compare.
(compile_s64_imm_less, compile_imm_s64_less): Fix the not-less cases.
* libguile/jit.c (record_gpr_clobber): If we clobber SP or FP, clear the
appropriate register state bits. Only exercised for 32-bit targets in
practice!
(emit_alloc_frame, emit_push_frame): Fix a couple places where we were
failing to track the register state correctly.
(compile_umul): Remove a needless register state flush, nowthat
qmulr_u has a wrapper that tracks this for us.