From 1adb48a63e59b8b774c357646ebb9cd4039c7f7c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 17 Apr 2023 18:12:44 -0700 Subject: compiler: bugfix: lingering funarg eval order issue. * stdlib/compiler.tl (compiler comp-call-impl): We can no longer free the temporary registers as-we-go based on whether the argument expression frag uses them as the output register frag. Let's just put them all into the aoregs list to be freed afterward. --- stdlib/compiler.tl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'stdlib/compiler.tl') diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl index b09324f9..913263a3 100644 --- a/stdlib/compiler.tl +++ b/stdlib/compiler.tl @@ -1496,9 +1496,7 @@ (afrags0 (collect-each ((arg args)) (let* ((aoreg me.(alloc-treg)) (afrag me.(compile aoreg env arg))) - (if (nequal afrag.oreg aoreg) - me.(free-treg aoreg) - (push aoreg aoregs)) + (push aoreg aoregs) afrag))) (afrags (handle-mutated-var-args afrags0 spy.mutated-vars)) (fvars [reduce-left uni afrags nil .fvars]) -- cgit v1.2.3