diff options
author | Andy Wingo <wingo@pobox.com> | 2022-12-01 13:00:18 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2022-12-01 13:01:49 +0100 |
commit | ff7328df0d881f9d13f5aaed8eb16997d82bb884 (patch) | |
tree | 4d6d6a082beefa44651db94d085c1a8275918f72 /test-suite | |
parent | d184d093466a536281dfc2bcb9eb727f6facdeb4 (diff) | |
download | guile-ff7328df0d881f9d13f5aaed8eb16997d82bb884.tar.gz |
Fix peval bug when expand-primitives introduces lexicals
* module/language/tree-il/peval.scm
(augment-var-table-with-externally-introduced-lexicals): New helper.
* module/language/tree-il/peval.scm (peval): Augment store with any
lexicals introduced by expand-primitives.
* test-suite/tests/peval.test ("partial evaluation"): Add tests.
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/peval.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test-suite/tests/peval.test b/test-suite/tests/peval.test index 76fa271fd..89b4870f6 100644 --- a/test-suite/tests/peval.test +++ b/test-suite/tests/peval.test @@ -1,7 +1,7 @@ ;;;; tree-il.test --- test suite for compiling tree-il -*- scheme -*- ;;;; Andy Wingo <wingo@pobox.com> --- May 2009 ;;;; -;;;; Copyright (C) 2009-2014, 2017, 2020 Free Software Foundation, Inc. +;;;; Copyright (C) 2009-2014, 2017, 2020, 2022 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -1349,6 +1349,14 @@ (apply (lambda (x y) (cons x y)) (list 1 2)) (primcall cons (const 1) (const 2))) + (pass-if-peval + (apply = (list 0 0 0)) + (const #t)) + + (pass-if-peval + (apply char<? (list #\a #\b #\c)) + (const #t)) + ;; Disable after removal of abort-in-tail-position optimization, in ;; hopes that CPS does a uniformly better job. #; |