Fixing a safe-for-space error that Robby found
This commit is contained in:
parent
eb0e188b63
commit
ffcda4741f
|
@ -145,16 +145,21 @@
|
|||
(syntax/loc stx
|
||||
(let*-values ([(tmp ...)
|
||||
(syntax-parameterize ([mutator-env-roots
|
||||
(list* #'previous-tmp ...
|
||||
(syntax-parameter-value #'mutator-env-roots))]
|
||||
(append
|
||||
(find-referenced-locals
|
||||
(list #'previous-tmp ...)
|
||||
#'expr)
|
||||
(syntax-parameter-value #'mutator-env-roots))]
|
||||
[mutator-tail-call? #f])
|
||||
expr)]
|
||||
...)
|
||||
(let-values ([(id ...) (values tmp ...)]
|
||||
...)
|
||||
(syntax-parameterize ([mutator-env-roots
|
||||
(list* #'id ... ...
|
||||
(syntax-parameter-value #'mutator-env-roots))])
|
||||
(append (find-referenced-locals
|
||||
(list #'id ... ...)
|
||||
#'body-expr)
|
||||
(syntax-parameter-value #'mutator-env-roots))])
|
||||
(->address body-expr))))))))]
|
||||
[(_ ([(id ...) expr]
|
||||
...)
|
||||
|
@ -185,8 +190,11 @@
|
|||
(let ([closure
|
||||
(lambda (free-id ... id ...)
|
||||
(syntax-parameterize ([mutator-env-roots
|
||||
(list #'id ...
|
||||
#'free-id ...)]
|
||||
(append
|
||||
(find-referenced-locals
|
||||
(list #'id ...)
|
||||
#'body)
|
||||
(list #'free-id ...))]
|
||||
[mutator-tail-call? #t])
|
||||
(->address body)))])
|
||||
closure))])
|
||||
|
|
|
@ -145,16 +145,21 @@
|
|||
(syntax/loc stx
|
||||
(let*-values ([(tmp ...)
|
||||
(syntax-parameterize ([mutator-env-roots
|
||||
(list* #'previous-tmp ...
|
||||
(syntax-parameter-value #'mutator-env-roots))]
|
||||
(append
|
||||
(find-referenced-locals
|
||||
(list #'previous-tmp ...)
|
||||
#'expr)
|
||||
(syntax-parameter-value #'mutator-env-roots))]
|
||||
[mutator-tail-call? #f])
|
||||
expr)]
|
||||
...)
|
||||
(let-values ([(id ...) (values tmp ...)]
|
||||
...)
|
||||
(syntax-parameterize ([mutator-env-roots
|
||||
(list* #'id ... ...
|
||||
(syntax-parameter-value #'mutator-env-roots))])
|
||||
(append (find-referenced-locals
|
||||
(list #'id ... ...)
|
||||
#'body-expr)
|
||||
(syntax-parameter-value #'mutator-env-roots))])
|
||||
(->address body-expr))))))))]
|
||||
[(_ ([(id ...) expr]
|
||||
...)
|
||||
|
@ -181,8 +186,11 @@
|
|||
(quasisyntax/loc stx
|
||||
(let ([closure (lambda (id ...)
|
||||
(syntax-parameterize ([mutator-env-roots
|
||||
(list #'id ...
|
||||
#'free-id ...)]
|
||||
(append
|
||||
(find-referenced-locals
|
||||
(list #'id ...)
|
||||
#'body)
|
||||
(list #'free-id ...))]
|
||||
[mutator-tail-call? #t])
|
||||
(->address body)))])
|
||||
(add-closure-env! closure (list (make-env-root free-id) ...))
|
||||
|
|
5
collects/tests/plai/gc/good-mutators/sfs.rkt
Normal file
5
collects/tests/plai/gc/good-mutators/sfs.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang plai/mutator
|
||||
(allocator-setup "../good-collectors/good-collector.rkt" 7)
|
||||
(let ([x (cons 1 2)])
|
||||
(let ([y (cons 3 4)])
|
||||
y))
|
5
collects/tests/plai/gc2/good-mutators/sfs.rkt
Normal file
5
collects/tests/plai/gc2/good-mutators/sfs.rkt
Normal file
|
@ -0,0 +1,5 @@
|
|||
#lang plai/gc2/mutator
|
||||
(allocator-setup "../good-collectors/good-collector.rkt" 7)
|
||||
(let ([x (cons 1 2)])
|
||||
(let ([y (cons 3 4)])
|
||||
y))
|
|
@ -15,7 +15,7 @@
|
|||
; Finally it runs the sample tests distributed with the assignment
|
||||
|
||||
|
||||
(allocator-setup "../good-collectors/good-collector.rkt" 110)
|
||||
(allocator-setup "../good-collectors/good-collector.rkt" 112)
|
||||
|
||||
; Helper to generate long lists
|
||||
(define (gen-list x)
|
||||
|
|
Loading…
Reference in New Issue
Block a user