Chez Scheme: repair for call-with-values ... values
cp0 conversion
Closes #3576
This commit is contained in:
parent
72d278cb84
commit
0ce89f53c4
|
@ -2358,6 +2358,18 @@
|
|||
(set! i (add1 i))
|
||||
(+ i 1)))))
|
||||
|
||||
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Regression test to make sure a `values` wrapper is not
|
||||
;; discarded:
|
||||
|
||||
(err/rt-test (for/fold ([x 0]
|
||||
[y 0])
|
||||
([i '(1)])
|
||||
(values (values x y)))
|
||||
exn:fail:contract:arity?)
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -377,6 +377,18 @@
|
|||
'(lambda (x)
|
||||
(#3%$value (if x 1 (#2%values 3 3 3)))
|
||||
#t)))
|
||||
|
||||
(not
|
||||
(equivalent-expansion?
|
||||
(expand/optimize
|
||||
'(lambda (g x y)
|
||||
(call-with-values (lambda ()
|
||||
(values
|
||||
(values x y)))
|
||||
(case-lambda
|
||||
[(x y) (g x y)]))))
|
||||
'(lambda (g x y) (g x y))))
|
||||
|
||||
)
|
||||
|
||||
(cp0-mat cp0-mrvs
|
||||
|
|
|
@ -2457,7 +2457,7 @@
|
|||
[(p-opnd c-opnd)
|
||||
(let ((p-temp (cp0-make-temp #f)) (c-temp (cp0-make-temp #f)))
|
||||
(with-extended-env ((env ids) (empty-env (list p-temp c-temp) (app-opnds ctxt)))
|
||||
(let ((ctxt1 (make-app '() 'value 'call #f (app-preinfo ctxt))))
|
||||
(let ((ctxt1 (make-app '() 'tail 'call #f (app-preinfo ctxt))))
|
||||
(let ((*p-val (cp0 (build-ref p-temp) ctxt1 env sc wd #f moi)))
|
||||
(cond
|
||||
[(and (app-used ctxt1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user