1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +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)
(pmatch args
((,k ,l) (guard (const? l) (list? (const-exp l)))
(let lp ((elts (const-exp l)))
(if (null? elts)
(make-const #f #f)
(make-conditional
src
(make-application
#f
(make-primitive-ref #f (case name
((memq) 'eq?)
((memv) 'eqv?)
(else (error "what"))))
(list k (make-const #f (car elts))))
(make-const #f #t)
(lp (cdr elts))))))
(if (null? (const-exp l))
(make-const #f #f)
(let lp ((elts (const-exp l)))
(let ((test (make-application
#f
(make-primitive-ref #f (case name
((memq) 'eq?)
((memv) 'eqv?)
(else (error "what"))))
(list k (make-const #f (car elts))))))
(if (null? (cdr elts))
test
(make-conditional
src
test
(make-const #f #t)
(lp (cdr elts))))))))
(else #f)))