fix setup for the letrec-check pass
Due to an obvious problem in the setup, the letrec-check pass wasn't running an intended dead-code pruning pass. Correcting the problem cuases one test in "optimize.rktl" to change, because the letrec-check pass can see more in one case than thanother. (Problem discovered by accidentally fixing the setup in a Racket branch based on "linklets".)
This commit is contained in:
parent
0198847980
commit
cc9889d7ab
|
@ -4450,7 +4450,8 @@
|
|||
(test-comp '(lambda (f) (letrec ([x (lambda() y)] [y (lambda () x)] [z (error 'error)]) #f))
|
||||
'(lambda (f) (letrec ([x (lambda() y)] [y (lambda () x)] [z (error 'error)]) (f x y z)) 5))
|
||||
(test-comp '(lambda (f) (letrec ([x (lambda() y)] [z (error 'error)] [y #f]) #f))
|
||||
'(lambda (f) (letrec ([x (lambda() y)] [z (error 'error)] [y (lambda () x)]) (f x y z)) 5))
|
||||
'(lambda (f) (letrec ([x (lambda() y)] [z (error 'error)] [y (lambda () x)]) (f x y z)) 5)
|
||||
#f) ; letrec-check pass determines that the body of `x` is dead
|
||||
(test-comp '(lambda (f) (letrec ([z (error 'error)] [x #f] [y #f]) #f))
|
||||
'(lambda (f) (letrec ([z (error 'error)] [x (lambda() y)] [y (lambda () x)]) (f x y z)) 5))
|
||||
|
||||
|
|
|
@ -1101,7 +1101,7 @@ Scheme_Object *scheme_letrec_check_expr(Scheme_Object *expr)
|
|||
positions. We use a list of numbers for the RHS of a
|
||||
`let[rec]-values` form with multiple variables. */
|
||||
|
||||
val = letrec_check_expr(expr, NULL, init_pos);
|
||||
val = letrec_check_expr(expr, frame, init_pos);
|
||||
|
||||
clean_dead_deferred_expr(*frame->deferred_chain);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user