Use alloca_pair instead of make_pair for literals

This commit is contained in:
Justin Ethier 2018-10-18 13:10:32 -04:00
parent 5752f6ace5
commit 5f760e4a2c

View file

@ -398,7 +398,7 @@
(create-cons (create-cons
(lambda (cvar a b) (lambda (cvar a b)
(c-code/vars (c-code/vars
(string-append "make_pair(" cvar "," (c:body a) "," (c:body b) ");") (string-append "alloca_pair(" cvar "," (c:body a) "," (c:body b) ");")
(append (c:allocs a) (c:allocs b)))) (append (c:allocs a) (c:allocs b))))
) )
(_c-compile-scalars (_c-compile-scalars
@ -416,7 +416,7 @@
(_c-compile-scalars (cdr args))))) (_c-compile-scalars (cdr args)))))
(set! num-args (+ 1 num-args)) (set! num-args (+ 1 num-args))
(c-code/vars (c-code/vars
(string-append "&" cvar-name) cvar-name ;; Not needed with alloca - (string-append "&" cvar-name)
(append (append
(c:allocs cell) (c:allocs cell)
(list (c:body cell)))))))))) (list (c:body cell))))))))))