aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 089e2718..2bdde63a 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -318,7 +318,13 @@ unnestWhen! x == f x where
x
do
abstraction? x => x.absBody := f x.absBody
- x is ['%leave,.,y] => second(x.args) := f y
+ x is ['%leave,.,y] or x is ['%return,.,y] => second(x.args) := f y
+ x is ['%when,:.] =>
+ for cl in x.args repeat
+ second(cl) := f second cl
+ x is ['%seq,:.] =>
+ for stmts in tails x.args repeat
+ stmts.first := f first stmts
x
++ Transform nested-to-tower.