diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 18 |
2 files changed, 6 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index af7b76a7..ad3c9bed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-09-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (optXLAMCond): Remove as useless. + (optCONDtail): Likewise. + +2011-09-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (optIadd): Remork. (optIsub): Likewise. (optIdec): New. diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 709e7b41..7e754db3 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -261,7 +261,7 @@ optCall (x is ['%call,:u]) == u is [['XLAM,vars,body],:args] => vars isnt [.,:.] => body #vars > #args => systemErrorHere ['optCall,x] - resetTo(x,optXLAMCond applySubst(pairList(vars,args),body)) + resetTo(x,applySubst(pairList(vars,args),body)) [fn,:a] := u fn isnt [.,:.] => opt := fn has OPTIMIZE => resetTo(x,FUNCALL(opt,u)) @@ -343,22 +343,6 @@ optIF2COND ["IF",a,b,c] == c is ["IF",:.] => ['%when,[a,b],:rest optIF2COND c] c is ['%when,:p] => ['%when,[a,b],:p] ['%when,[a,b],['%otherwise,c]] - -optXLAMCond x == - x is ['%when,u:= [p,c],:l] => - p is '%otherwise => c - ['%when,u,:optCONDtail l] - x isnt [.,:.] => x - x.first := optXLAMCond first x - x.rest := optXLAMCond rest x - x - -optCONDtail l == - null l => nil - [frst:= [p,c],:l']:= l - p is '%otherwise => [['%otherwise,c]] - null rest l => [frst,['%otherwise,["CondError"]]] - [frst,:optCONDtail l'] ++ Determine whether the symbol `g' is the name of a temporary that ++ can be replaced in the form `x', if it is of linear usage and not |