Fixing problem with previous "fix" to mutator-begin

This commit is contained in:
Jay McCarthy 2010-11-24 23:32:59 -05:00
parent c9dcbb9edb
commit eecbc539c1
4 changed files with 13 additions and 4 deletions

View File

@ -110,7 +110,10 @@
[(_) (mutator-app void)]
[(_ e) e]
[(_ fe e ...)
(let ([tmp fe]) (mutator-begin e ...))]))
(let ([tmp
(syntax-parameterize ([mutator-tail-call? #f])
fe)])
(mutator-begin e ...))]))
; Real Macros
(define-syntax-rule (mutator-define-values (id ...) e)

View File

@ -1,5 +1,5 @@
#lang plai/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 4)
(allocator-setup "../good-collectors/good-collector.rkt" 6)
(define (go)
(let ([obj 'z])

View File

@ -51,6 +51,14 @@
(good (heap-loc head) 62 62 "at line 18")
(bad (heap-loc head) 62 47 "at line 19")
END
(capture-output (test-mutator (build-path here "other-mutators" "begin.rkt")))
=>
#<<END
Value at location 2:
#t
END
(test-mutator (build-path here "other-mutators" "quote.rkt"))

View File

@ -15,8 +15,6 @@
;; returns true if evaluating the example code (as a mutator)
;; returns one result at the top-level, namely the symbol 'passed.
(define (test-code exps)
(printf "Test code\n")
(for-each pretty-print exps)
(let ([tmpfile (make-temporary-file "plai-random-mutator-test-~a")])
(call-with-output-file tmpfile
(λ (port)