optimizer: test use of virtual clock in branches

Test that the optimizer don't move some expressions inside if branches.
This commit is contained in:
Gustavo Massaccesi 2014-06-24 10:06:11 -03:00 committed by Matthew Flatt
parent f4be105ab6
commit 49ff6d3c84

View File

@ -1575,6 +1575,13 @@
'(lambda (x y)
(list (if x x y) (+ x y))))
(test-comp '(lambda (x y)
(let ([z (car y)])
(if x x z)))
'(lambda (x y)
(if x x (car y)))
#f)
(test-comp '(let-values ([(x y) (values 1 2)])
(+ x y))
3)