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.boot8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 3b41d361..61d53837 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -196,6 +196,11 @@ expandList(x is ['%list,:args]) ==
args' = 'failed => ['LIST,:args]
quote args'
+expandLeave ['%leave,l,x] ==
+ x := expandToVMForm x
+ l = nil => ['RETURN,x]
+ ['RETURN_-FROM,l,x]
+
expandReturn(x is ['%return,.,y]) ==
$FUNNAME = nil => systemErrorHere ['expandReturn,x]
['RETURN_-FROM,$FUNNAME,expandToVMForm y]
@@ -626,8 +631,6 @@ for x in [
['%equal, :'EQUAL],
['%tref, :'shellEntry],
['%sptreq, :'EQL], -- system pointer equality
- ['%lam, :'LAMBDA],
- ['%leave, :'RETURN],
['%otherwise,:'T],
['%closure, :'CONS],
['%funcall, :'FUNCALL],
@@ -647,6 +650,7 @@ for x in [
['%collect, :function expandCollect],
['%loop, :function expandLoop],
['%return, :function expandReturn],
+ ['%leave, :function expandLeave],
['%bcompl, :function expandBcompl],