trying to fix the code with let-void

This commit is contained in:
Danny Yoo 2011-07-01 10:00:18 -04:00
parent 523fa09071
commit 0a4b6da39e

View File

@ -1748,9 +1748,11 @@
(let*: ([n : Natural (LetVoid-count exp)] (let*: ([n : Natural (LetVoid-count exp)]
[after-let : Symbol (make-label 'afterLet)] [after-let : Symbol (make-label 'afterLet)]
[after-body-code : Symbol (make-label 'afterLetBody)] [after-body-code : Symbol (make-label 'afterLetBody)]
[extended-cenv : CompileTimeEnvironment (append (build-list (LetVoid-count exp) [extended-cenv : CompileTimeEnvironment
(lambda: ([i : Natural]) '?)) (append (build-list (LetVoid-count exp)
cenv)] (lambda: ([i : Natural]) '?))
cenv)]
[context : ValuesContext (linkage-context linkage)]
[let-linkage : Linkage [let-linkage : Linkage
(cond (cond
[(NextLinkage? linkage) [(NextLinkage? linkage)
@ -1760,9 +1762,9 @@
[(ReturnLinkage-tail? linkage) [(ReturnLinkage-tail? linkage)
linkage] linkage]
[else [else
(make-LabelLinkage after-body-code (linkage-context linkage))])] (make-LabelLinkage after-body-code context)])]
[(LabelLinkage? linkage) [(LabelLinkage? linkage)
(make-LabelLinkage after-body-code (LabelLinkage-context linkage))])] (make-LabelLinkage after-body-code context)])]
[body-target : Target (adjust-target-depth target n)] [body-target : Target (adjust-target-depth target n)]
[body-code : InstructionSequence [body-code : InstructionSequence
(compile (LetVoid-body exp) extended-cenv body-target let-linkage)]) (compile (LetVoid-body exp) extended-cenv body-target let-linkage)])
@ -1779,9 +1781,12 @@
;; There may be multiple values coming back at this point. ;; There may be multiple values coming back at this point.
;; We need to route around those. ;; We need to route around those.
(make-instruction-sequence (make-instruction-sequence
`(,(make-PopEnvironment (make-Const n) (make-SubtractArg `(,(make-PopEnvironment (make-Const n)
(make-Reg 'argcount) (make-Const 0)
(make-Const 1))))) ;(make-SubtractArg
; (make-Reg 'argcount)
; (make-Const 1))
)))
after-let)))) after-let))))