summaryrefslogtreecommitdiff
path: root/module/language/tree-il/peval.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-06-20 22:04:45 +0200
committerAndy Wingo <wingo@pobox.com>2016-06-20 22:04:45 +0200
commitfff013215fb1a5d211df5037dcf52c92063050a8 (patch)
treeb8fdd2238a8449a010bead2aca2ee1384479414d /module/language/tree-il/peval.scm
parent5b6eaa91d23199f9266a3c338b8be8dcad5ecc38 (diff)
downloadguile-fff013215fb1a5d211df5037dcf52c92063050a8.tar.gz
Fix peval on (call-with-values foo (lambda (x) x))
* module/language/tree-il/peval.scm (peval): Don't inline (call-with-values foo (lambda (x) exp)) to (let ((x (foo))) exp). The idea is that call-with-values sets up an explicit context in which we are requesting an explicit return arity, and that dropping extra values when there's not a rest argument is the wrong thing. Fixes #13966. * test-suite/tests/peval.test ("partial evaluation"): Update test.
Diffstat (limited to 'module/language/tree-il/peval.scm')
-rw-r--r--module/language/tree-il/peval.scm4
1 files changed, 0 insertions, 4 deletions
diff --git a/module/language/tree-il/peval.scm b/module/language/tree-il/peval.scm
index 1cf2cb1a8..8e1069d38 100644
--- a/module/language/tree-il/peval.scm
+++ b/module/language/tree-il/peval.scm
@@ -1014,10 +1014,6 @@ top-level bindings from ENV and return the resulting expression."
;; reconstruct the let-values, pevaling the consumer.
(let ((producer (for-values producer)))
(or (match consumer
- (($ <lambda-case> src (req-name) #f #f #f () (req-sym) body #f)
- (for-tail
- (make-let src (list req-name) (list req-sym) (list producer)
- body)))
((and ($ <lambda-case> src () #f rest #f () (rest-sym) body #f)
(? (lambda _ (singly-valued-expression? producer))))
(let ((tmp (gensym "tmp ")))