From 2816e891dd4ca4e5913ea5cc6d830e1b13455085 Mon Sep 17 00:00:00 2001 From: vxtls <187420201+vxtls@users.noreply.github.com> Date: Thu, 19 Mar 2026 08:24:07 -0400 Subject: [PATCH] fix(guile-2.2.4): remove fixnums range-guard assertion blocks in rnrs arithmetic module --- .../patches/remove-fixnums-range-guards.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch diff --git a/steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch b/steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch new file mode 100644 index 00000000..e6999210 --- /dev/null +++ b/steps-guix/guile-2.2.4/patches/remove-fixnums-range-guards.patch @@ -0,0 +1,53 @@ +--- guile-2.2.4/module/rnrs/arithmetic/fixnums.scm ++++ guile-2.2.4/module/rnrs/arithmetic/fixnums.scm +@@ -242,50 +242,34 @@ + + (define (fxcopy-bit fx1 fx2 fx3) + (assert-fixnum fx1 fx2 fx3) +- (unless (and (<= 0 fx2) (< fx2 (fixnum-width))) +- (raise (make-assertion-violation))) + (bitwise-copy-bit fx1 fx2 fx3)) + + (define (fxbit-field fx1 fx2 fx3) + (assert-fixnum fx1 fx2 fx3) +- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width))) +- (raise (make-assertion-violation))) + (bitwise-bit-field fx1 fx2 fx3)) + + (define (fxcopy-bit-field fx1 fx2 fx3 fx4) + (assert-fixnum fx1 fx2 fx3 fx4) +- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width))) +- (raise (make-assertion-violation))) + (bitwise-copy-bit-field fx1 fx2 fx3 fx4)) + + (define (fxarithmetic-shift fx1 fx2) + (assert-fixnum fx1 fx2) +- (unless (< (abs fx2) (fixnum-width)) +- (raise (make-assertion-violation))) + (ash fx1 fx2)) + + (define (fxarithmetic-shift-left fx1 fx2) + (assert-fixnum fx1 fx2) +- (unless (and (<= 0 fx2) (< fx2 (fixnum-width))) +- (raise (make-assertion-violation))) + (ash fx1 fx2)) + + (define (fxarithmetic-shift-right fx1 fx2) + (assert-fixnum fx1 fx2) +- (unless (and (<= 0 fx2) (< fx2 (fixnum-width))) +- (raise (make-assertion-violation))) + (ash fx1 (- fx2))) + + (define (fxrotate-bit-field fx1 fx2 fx3 fx4) + (assert-fixnum fx1 fx2 fx3 fx4) +- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width)) (< fx4 (- fx3 fx2))) +- (raise (make-assertion-violation))) + (bitwise-rotate-bit-field fx1 fx2 fx3 fx4)) + + (define (fxreverse-bit-field fx1 fx2 fx3) + (assert-fixnum fx1 fx2 fx3) +- (unless (and (<= 0 fx2 fx3) (< fx3 (fixnum-width))) +- (raise (make-assertion-violation))) + (bitwise-reverse-bit-field fx1 fx2 fx3)) + + )