diff --git a/compiler.rkt b/compiler.rkt index ff3ca72..5cbdd7e 100644 --- a/compiler.rkt +++ b/compiler.rkt @@ -1843,7 +1843,9 @@ (make-instruction-sequence `(,(make-AssignImmediateStatement to from)))) (build-list count (lambda: ([i : Natural]) - (make-EnvLexicalReference (+ i (InstallValue-depth exp)) + (make-EnvLexicalReference (+ i + (InstallValue-depth exp) + (sub1 count)) (InstallValue-box? exp)))) (cons (make-Reg 'val) (build-list (sub1 count) (lambda: ([i : Natural])