aboutsummaryrefslogtreecommitdiff
path: root/src/interp/lisp-backend.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/lisp-backend.boot')
-rw-r--r--src/interp/lisp-backend.boot7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 61d53837..316a4ef9 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -168,9 +168,10 @@ expandLoop ['%loop,:iters,body,ret] ==
body := mkpf([:filters,body],"AND")
-- If there is any body-wide initialization, now is the time.
body := massageFreeVarInits(body,bodyInits)
- exits := ["COND",
- [mkpf(exits,"OR"),["RETURN",expandToVMForm ret]],
- [true,body]]
+ exits :=
+ exits = nil => body
+ ["COND",[mkpf(exits,"OR"),["RETURN",expandToVMForm ret]],
+ [true,body]]
body := ["LOOP",exits,:cont]
-- Finally, set up loop-wide initializations.
massageFreeVarInits(body,loopInits)