aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-06-01 17:54:16 +0000
committerdos-reis <gdr@axiomatics.org>2009-06-01 17:54:16 +0000
commit569c20a430023be60c2b38f47bccc5810c6980aa (patch)
treee7929027ccfb4584225245b0839175b34f02328d /src/interp/compiler.boot
parentb56083910b371806c329bf4657c51db77f7040ef (diff)
downloadopen-axiom-569c20a430023be60c2b38f47bccc5810c6980aa.tar.gz
Simplify compiler ast for `return' expressions.
* interp/parse.boot (parseReturn): Remove. * interp/compiler.boot (compReturn): Tidy.
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r--src/interp/compiler.boot3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index d1c626e0..f14ba01d 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1088,11 +1088,10 @@ compLeave(["leave",level,x],m,e) ==
--% return
compReturn: (%Form,%Mode,%Env) -> %Maybe %Triple
-compReturn(["return",level,x],m,e) ==
+compReturn(["return",x],m,e) ==
null $exitModeStack =>
stackAndThrow('"the return before %1b is unneccessary",[x])
nil
- level^=1 => userError '"multi-level returns not supported"
index:= MAX(0,#$exitModeStack-1)
if index >= 0 then
$returnMode:= resolve($exitModeStack.index,$returnMode)