mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
Revert "Primitive expand numerical comparisons with more than 2 arguments."
This reverts commit 4dc4b86e85
.
This commit is contained in:
parent
4dc4b86e85
commit
e6c1c5f6cb
1 changed files with 0 additions and 20 deletions
|
@ -491,26 +491,6 @@
|
|||
(define-primitive-expander f64vector-set! (vec i x)
|
||||
(bytevector-ieee-double-native-set! vec (* i 8) x))
|
||||
|
||||
(define (chained-comparison-expander prim-name)
|
||||
(case-lambda
|
||||
((src) (make-const src #t))
|
||||
((src a) #f)
|
||||
((src a b) #f)
|
||||
((src a b . rest)
|
||||
(make-conditional src
|
||||
(make-application src
|
||||
(make-primitive-ref src prim-name)
|
||||
(list a b))
|
||||
(make-application src
|
||||
(make-primitive-ref src prim-name)
|
||||
(cons b rest))
|
||||
(make-const src #f)))))
|
||||
|
||||
(for-each (lambda (prim-name)
|
||||
(hashq-set! *primitive-expand-table* prim-name
|
||||
(chained-comparison-expander prim-name)))
|
||||
'(< > <= >= =))
|
||||
|
||||
;; Appropriate for use with either 'eqv?' or 'equal?'.
|
||||
(define maybe-simplify-to-eq
|
||||
(case-lambda
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue