summaryrefslogtreecommitdiffstats
path: root/stdlib/compiler.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-04-17 18:12:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-04-17 18:12:44 -0700
commit1adb48a63e59b8b774c357646ebb9cd4039c7f7c (patch)
treedb1a697ab17ddb91ac41ce6537451589faef1374 /stdlib/compiler.tl
parenta50921651490df9b6278c20290b4e428cfc7d057 (diff)
downloadtxr-1adb48a63e59b8b774c357646ebb9cd4039c7f7c.tar.gz
txr-1adb48a63e59b8b774c357646ebb9cd4039c7f7c.tar.bz2
txr-1adb48a63e59b8b774c357646ebb9cd4039c7f7c.zip
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.
Diffstat (limited to 'stdlib/compiler.tl')
-rw-r--r--stdlib/compiler.tl4
1 files changed, 1 insertions, 3 deletions
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])