Correct handling of procedure env roots in mutator

This commit is contained in:
Jay McCarthy 2010-10-28 10:54:51 -06:00
parent a744958fd5
commit 05832af083
2 changed files with 14 additions and 2 deletions

View File

@ -178,8 +178,8 @@
(quasisyntax/loc stx (quasisyntax/loc stx
(let ([closure (lambda (id ...) (let ([closure (lambda (id ...)
(syntax-parameterize ([mutator-env-roots (syntax-parameterize ([mutator-env-roots
(list* #'id ... (list #'id ...
(syntax-parameter-value #'mutator-env-roots))] #'free-id ...)]
[mutator-tail-call? #t]) [mutator-tail-call? #t])
(->address body)))]) (->address body)))])
(add-closure-env! closure (list (make-env-root free-id) ...)) (add-closure-env! closure (list (make-env-root free-id) ...))

View File

@ -0,0 +1,12 @@
#lang plai/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 6)
(define
proc
(let* ([not-root 1] ; 2
[root 2]) ; 4
(lambda () ; 6
3
root)))
(proc)