1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

lame tweak to the inliner

* module/language/tree-il/inline.scm: Tweak to avoid a (if #t #t #f).
  Yes, it's lame.
This commit is contained in:
Andy Wingo 2009-12-11 21:51:02 +01:00
parent 5bb408ccaf
commit 492e7efe6d

View file

@ -77,20 +77,23 @@
((memq memv) ((memq memv)
(pmatch args (pmatch args
((,k ,l) (guard (const? l) (list? (const-exp l))) ((,k ,l) (guard (const? l) (list? (const-exp l)))
(let lp ((elts (const-exp l))) (if (null? (const-exp l))
(if (null? elts) (make-const #f #f)
(make-const #f #f) (let lp ((elts (const-exp l)))
(make-conditional (let ((test (make-application
src #f
(make-application (make-primitive-ref #f (case name
#f ((memq) 'eq?)
(make-primitive-ref #f (case name ((memv) 'eqv?)
((memq) 'eq?) (else (error "what"))))
((memv) 'eqv?) (list k (make-const #f (car elts))))))
(else (error "what")))) (if (null? (cdr elts))
(list k (make-const #f (car elts)))) test
(make-const #f #t) (make-conditional
(lp (cdr elts)))))) src
test
(make-const #f #t)
(lp (cdr elts))))))))
(else #f))) (else #f)))