mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 15:10:29 +02:00
Minor optimization compiling 'and'
* module/language/tree-il/compile-cps.scm (convert): Fold test of constants directly to their branches without reifying booleans, to simplify "and" chains early.
This commit is contained in:
parent
9d1235af96
commit
3ae245bc98
1 changed files with 3 additions and 0 deletions
|
@ -817,6 +817,9 @@
|
|||
(letk kt* ($kargs () () ,t))
|
||||
(letk kf* ($kargs () () ,f))
|
||||
($ (convert-test test kt* kf*))))
|
||||
(($ <const> src c)
|
||||
(with-cps cps
|
||||
(build-term ($continue (if c kt kf) src ($values ())))))
|
||||
(_ (convert-arg cps test
|
||||
(lambda (cps test)
|
||||
(with-cps cps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue