diff options
author | Andy Wingo <wingo@pobox.com> | 2016-06-24 17:35:55 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-06-24 17:37:51 +0200 |
commit | 229d062f83d7c79fa08729330406d25755b25080 (patch) | |
tree | 16c6218e563768a215c81b1be119ce40ff888ad4 /test-suite/tests/peval.test | |
parent | ff5cafc77d34420b12a134ef2c1d5bd7ca4794cb (diff) | |
download | guile-229d062f83d7c79fa08729330406d25755b25080.tar.gz |
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.
Diffstat (limited to 'test-suite/tests/peval.test')
-rw-r--r-- | test-suite/tests/peval.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test-suite/tests/peval.test b/test-suite/tests/peval.test index 340780873..4e2ccf9c6 100644 --- a/test-suite/tests/peval.test +++ b/test-suite/tests/peval.test @@ -1360,6 +1360,14 @@ (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))) (list a b)) |