Fixing problem with previous "fix" to mutator-begin
This commit is contained in:
parent
c9dcbb9edb
commit
eecbc539c1
|
@ -110,7 +110,10 @@
|
||||||
[(_) (mutator-app void)]
|
[(_) (mutator-app void)]
|
||||||
[(_ e) e]
|
[(_ e) e]
|
||||||
[(_ fe e ...)
|
[(_ fe e ...)
|
||||||
(let ([tmp fe]) (mutator-begin e ...))]))
|
(let ([tmp
|
||||||
|
(syntax-parameterize ([mutator-tail-call? #f])
|
||||||
|
fe)])
|
||||||
|
(mutator-begin e ...))]))
|
||||||
|
|
||||||
; Real Macros
|
; Real Macros
|
||||||
(define-syntax-rule (mutator-define-values (id ...) e)
|
(define-syntax-rule (mutator-define-values (id ...) e)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang plai/mutator
|
#lang plai/mutator
|
||||||
(allocator-setup "../good-collectors/good-collector.rkt" 4)
|
(allocator-setup "../good-collectors/good-collector.rkt" 6)
|
||||||
|
|
||||||
(define (go)
|
(define (go)
|
||||||
(let ([obj 'z])
|
(let ([obj 'z])
|
|
@ -51,6 +51,14 @@
|
||||||
(good (heap-loc head) 62 62 "at line 18")
|
(good (heap-loc head) 62 62 "at line 18")
|
||||||
(bad (heap-loc head) 62 47 "at line 19")
|
(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
|
END
|
||||||
|
|
||||||
(test-mutator (build-path here "other-mutators" "quote.rkt"))
|
(test-mutator (build-path here "other-mutators" "quote.rkt"))
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
;; returns true if evaluating the example code (as a mutator)
|
;; returns true if evaluating the example code (as a mutator)
|
||||||
;; returns one result at the top-level, namely the symbol 'passed.
|
;; returns one result at the top-level, namely the symbol 'passed.
|
||||||
(define (test-code exps)
|
(define (test-code exps)
|
||||||
(printf "Test code\n")
|
|
||||||
(for-each pretty-print exps)
|
|
||||||
(let ([tmpfile (make-temporary-file "plai-random-mutator-test-~a")])
|
(let ([tmpfile (make-temporary-file "plai-random-mutator-test-~a")])
|
||||||
(call-with-output-file tmpfile
|
(call-with-output-file tmpfile
|
||||||
(λ (port)
|
(λ (port)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user