diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-07 16:00:24 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-07 16:00:24 +0000 |
commit | 7422a29157bf7de1742eade45590dbed7d0d4a12 (patch) | |
tree | e9f65f9293dcc1c9b760fa02880cb1a5f2641272 /src/interp/compiler.boot | |
parent | 4fbe17f6ca64c10f69729c412b7a198da4af65a0 (diff) | |
download | open-axiom-7422a29157bf7de1742eade45590dbed7d0d4a12.tar.gz |
* interp/compiler.boot (replaceExitEtc): Replace TAGGEDreturn with
%return.
* interp/g-opt.boot (removeNeedlessThrow): New.
(optCatch): Use to it to avoid horrendous code generation for
return statement.
* interp/g-util.boot (expandReturn): New. Expand %return forms.
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r-- | src/interp/compiler.boot | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index c4bee569..16222b24 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1036,8 +1036,11 @@ replaceExitEtc(x,tag,opFlag,opMode) == --bound in compSeq1 and compDefineCapsuleFunction $finalEnv => intersectionEnvironment($finalEnv,t.env) t.env - x.op := "THROW" - first(x.args) := tag + if opFlag = 'TAGGEDreturn then + x.op := '%return + else + x.op := "THROW" + first(x.args) := tag second(x.args) := convertOrCroak(t,opMode).expr first(x.args) := second x-1 x is [key,n,t] and key in '(TAGGEDreturn TAGGEDexit) => |