repair to cp0 changes for single-value checking

original commit: 1d0d02a1fd01629a2b72b82e95b60084f5bff4fb
This commit is contained in:
Matthew Flatt 2019-01-08 18:07:31 -07:00
parent 8e53fec779
commit 2fd94d5573
2 changed files with 8 additions and 2 deletions

View File

@ -2815,5 +2815,8 @@
(fields x y))
(if (make-posn 0 ,e) ,v 'other)))
posn-decl-expanded)
(parameterize ([enable-cp0 #t] [#%$suppress-primitive-inlining #f])
(equivalent-expansion?
(expand/optimize '(let ([g1 (begin (unknown) (void))]) 10))
'(begin (unknown) 10)))
)

View File

@ -737,7 +737,10 @@
(cond
[(and (eq? ctxt 'effect) (simple? e2))
e1]
[(and (eq? ctxt 'ignored) (simple1? e2))
[(and (eq? ctxt 'ignored) (simple1? e2)
;; don't move e1 into a single-value
;; position unless that's ok
(single-valued? e1))
e1]
[else
(let ([e1 (nanopass-case (Lsrc Expr) e1