mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 11:10:21 +02:00
Constant-folding eq? and eqv? uses deduplication
* test-suite/tests/peval.test ("partial evaluation"): Add tests. * module/language/tree-il/peval.scm (peval): Constant-fold eq? and eqv? using equal?, anticipating deduplication.
This commit is contained in:
parent
ff5cafc77d
commit
229d062f83
2 changed files with 17 additions and 1 deletions
|
@ -1359,6 +1359,14 @@
|
|||
(((x) #f #f #f () (_))
|
||||
(call (toplevel bar) (lexical x _))))))
|
||||
|
||||
(pass-if-peval
|
||||
(eq? '(a b) '(a b))
|
||||
(const #t))
|
||||
|
||||
(pass-if-peval
|
||||
(eqv? '(a b) '(a b))
|
||||
(const #t))
|
||||
|
||||
(pass-if-peval
|
||||
((lambda (foo)
|
||||
(define* (bar a #:optional (b (1+ a)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue