diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-04-17 18:12:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-04-17 18:12:44 -0700 |
commit | 1adb48a63e59b8b774c357646ebb9cd4039c7f7c (patch) | |
tree | db1a697ab17ddb91ac41ce6537451589faef1374 /stdlib/compiler.tl | |
parent | a50921651490df9b6278c20290b4e428cfc7d057 (diff) | |
download | txr-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.tl | 4 |
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]) |