summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/compiler.tl8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 5704e590..573d4e37 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -516,13 +516,17 @@
(defmeth compiler comp-progn (me oreg env args)
(let* (ffuns fvars
- (nargs (len args))
+ (lead-forms (butlastn 1 args))
+ (last-form (nthlast 1 args))
+ (eff-lead-forms (remove-if [orf constantp symbolp] lead-forms))
+ (forms (append eff-lead-forms last-form))
+ (nargs (len forms))
lastfrag
(oreg-discard (if (eq (car oreg) t)
oreg
me.(alloc-treg)))
(code (build
- (each ((form args)
+ (each ((form forms)
(n (range 1)))
(let ((islast (eql n nargs)))
(let ((frag me.(compile (if islast oreg oreg-discard)