fix inline fn args not removed from stack

This commit is contained in:
Mylloon 2022-12-23 06:40:40 +01:00
parent b74a526b2f
commit 843ba8b034
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -30,10 +30,10 @@ let rec compile_expr env = function
args
in
List.flatten ca
@
if Env.mem f Baselib.builtins
then Env.find f Baselib.builtins
else [ Jal (puf ^ f); Addi (SP, SP, 4 * List.length args) ]
@ (if Env.mem f Baselib.builtins
then Env.find f Baselib.builtins
else [ Jal (puf ^ f) ])
@ [ Addi (SP, SP, 4 * List.length args) ]
;;
let rec compile_instr info = function