mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 11:36:32 +01:00
fix(guile-2.2.4): remove fixnums range-guard assertion blocks in rnrs arithmetic module
This commit is contained in:
parent
a20351b1d5
commit
2816e891dd
1 changed files with 53 additions and 0 deletions
|
|
@ -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))
|
||||
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue