;; This looks scary but it's basically all just
;; making and filling an environment structure
;; for a particular closure
(define impc:ir:compile:make-closureenv
(lambda (ast types)
;; (println 'make-closure-env 'ast: ast 'types: types)
(let* ((os2 (make-string 0))
(os1 (make-string 0))
(name (list-ref ast 2))
(allocate-mem? (list-ref ast 1))
(rettype (list-ref ast 3))
(env (list-ref ast 4))
(args (list-ref ast 5))
(code (list-ref ast 6)))
(define func-type-str (impc:ir:make-function-str (list* rettype (map (lambda (x) (cdr x)) args)) #t))