add gc2 support to random mutator

This commit is contained in:
Robby Findler 2012-02-20 15:28:08 -06:00
parent 3f5a45e904
commit 7109e92b04
2 changed files with 6 additions and 5 deletions

View File

@ -249,14 +249,14 @@
#:heap-values [heap-values (list 0 1 -1 'x 'y #f #t '())]
#:iterations [iterations 200]
#:program-size [program-size 10]
#:heap-size [heap-size 200])
#:heap-size [heap-size 200]
#:gc2? [gc2? #f])
(call-with-output-file filename
(λ (port)
(cond
[collector
(fprintf port "#lang plai/mutator\n")
(fprintf port "~s\n" `(allocator-setup ,collector ,heap-size))
(fprintf port "~s\n" `(import-primitives symbol=?))]
(fprintf port "#lang plai/~amutator\n" (if gc2? "gc2/" ""))
(fprintf port "~s\n" `(allocator-setup ,collector ,heap-size))]
[else
(fprintf port "#lang scheme\n")
(for-each

View File

@ -11,7 +11,8 @@
exact-positive-integer?
#:heap-values (cons/c heap-value? (listof heap-value?))
#:program-size exact-positive-integer?
#:heap-size exact-positive-integer?)
#:heap-size exact-positive-integer?
#:gc2? boolean?)
void?)]
[find-heap-values
(-> (or/c path-string? input-port?)