moving machines
This commit is contained in:
parent
2347568a6c
commit
73177ceddc
|
@ -341,13 +341,16 @@
|
|||
|
||||
(define-for-syntax (add-eres-lets an-istx res-proj-vars arg/res-to-indy-var stx)
|
||||
(cond
|
||||
[(ormap eres? (istx-ress an-istx))
|
||||
(with-syntax ([(vars ...) (map arg/res-var (istx-ress an-istx))]
|
||||
[(rhs ...) (map (λ (res-proj-var res)
|
||||
#`(#,res-proj-var #,@(map arg/res-to-indy-var (arg/res-vars res))))
|
||||
(vector->list res-proj-vars)
|
||||
(istx-ress an-istx))])
|
||||
#`(let ([vars rhs] ...) #,stx))]
|
||||
;; WRONG: this needs to use its own, new set of variables
|
||||
[(and (istx-ress an-istx)
|
||||
(ormap eres? (istx-ress an-istx)))
|
||||
(for/fold ([body stx])
|
||||
([an-arg/res (in-list (reverse (istx-ress an-istx)))]
|
||||
[res-proj-var (in-vector res-proj-vars (- (vector-length res-proj-vars) 1) -1 -1)])
|
||||
(if (arg/res-vars an-arg/res)
|
||||
#`(let ([#,(arg/res-var an-arg/res) (#,res-proj-var #,@(map arg/res-to-indy-var (arg/res-vars an-arg/res)))])
|
||||
#,body)
|
||||
body))]
|
||||
[else stx]))
|
||||
|
||||
(define-for-syntax (mk-wrapper-func an-istx used-indy-vars)
|
||||
|
|
Loading…
Reference in New Issue
Block a user