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:
parent
5bb408ccaf
commit
492e7efe6d
1 changed files with 17 additions and 14 deletions
|
@ -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)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue