fix plai/gc2/mutator for the case where a lambda-bound

variable is shadowing something
This commit is contained in:
Robby Findler 2013-03-21 22:47:26 -05:00
parent 0e6975fb2c
commit 092d98656c
2 changed files with 11 additions and 1 deletions

View File

@ -206,7 +206,11 @@
(syntax-case stx ()
[(_ (id ...) body)
(let ([env-roots (syntax-parameter-value #'mutator-env-roots)])
(with-syntax ([(free-id ...) (map syntax-local-introduce (find-referenced-locals env-roots stx))]
(with-syntax ([(free-id ...) (map syntax-local-introduce
(filter
(λ (x) (for/and ([id (in-list (syntax->list #'(id ...)))])
(not (free-identifier=? id x))))
(find-referenced-locals env-roots stx)))]
[(env-id ...) env-roots]
[closure (or (syntax-parameter-value #'mutator-name)
(syntax-local-name)

View File

@ -0,0 +1,6 @@
#lang plai/gc2/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 40)
(let ([x 1])
((λ (x)
x)
x))