diff options
author | dos-reis <gdr@axiomatics.org> | 2011-02-11 17:27:33 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-02-11 17:27:33 +0000 |
commit | 8ecbf7e6da63799ae070e1b81a048a7b7790000f (patch) | |
tree | 85d031aba9ccbc72af13f53c9cb6aa61a9bf16f0 /src | |
parent | f14f1018fb9d94d4bff48e1475978b0a9deec0d1 (diff) | |
download | open-axiom-8ecbf7e6da63799ae070e1b81a048a7b7790000f.tar.gz |
* interp/compiler.boot (canReturn): Don't check for LET*.
* interp/g-opt.boot (optLET*): Remove as we now generate only
%bind forms.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/compiler.boot | 2 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 14 | ||||
-rw-r--r-- | src/interp/i-coerce.boot | 2 |
4 files changed, 10 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6334dc87..90ca0eab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-02-11 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/compiler.boot (canReturn): Don't check for LET*. + * interp/g-opt.boot (optLET*): Remove as we now generate only + %bind forms. + +2011-02-11 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot ($VMsideEffectFreeOperators): Include %funcall and %nothing. * algebra/mkfunc.spad.pamphlet: Use %funcall instead of FUNCALL. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 3c928a81..4b9a3df0 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1285,7 +1285,7 @@ canReturn(expr,level,exitCount,ValueFlag) == --SPAD: exit and friends pp expr canReturn(a,level,exitCount,nil) or canReturn(b,level,exitCount,ValueFlag) or canReturn(c,level,exitCount,ValueFlag) - op in '(LET LET_* %bind) => + op in '(LET %bind) => or/[canReturn(init,level,exitCount,false) for [.,init] in second expr] or canReturn(third expr,level,exitCount,ValueFlag) --now we have an ordinary form diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 797b50d8..fd5010a0 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -568,15 +568,6 @@ optLET u == def.rest := second def SUBLIS(inits,body) -optLET_* form == - form isnt ["LET*",:.] => form - ok := true - while ok for [[var,.],:inits] in tails second form repeat - if CONTAINED(var,inits) then ok := false - not ok => form - form.first := "LET" - optLET form - optBind form == form isnt ['%bind,inits,.] => form -- accept only simple bodies ok := true @@ -638,7 +629,7 @@ optCollectVector form == index := gensym() iters := [:iters,['STEP,index,0,1]] vec := gensym() - ["LET",[[vec,["makeSimpleArray",["getVMType",eltType],vecSize]]], + ['%bind,[[vec,["makeSimpleArray",["getVMType",eltType],vecSize]]], ['%loop,:iters,["setSimpleArrayEntry",vec,index,body],vec]] ++ Translate retraction of a value denoted by `e' to sub-domain `m' @@ -649,7 +640,7 @@ optRetract ["%retract",e,m,pred] == cond = '%true => e ["check-subtype",cond,MKQ m,e] g := gensym() - ["LET",[[g,e]],["check-subtype",substitute(g,"#1",pred),MKQ m,g]] + ['%bind,[[g,e]],["check-subtype",substitute(g,"#1",pred),MKQ m,g]] --% Boolean expression transformers @@ -763,7 +754,6 @@ opt2bool(x is ['%2bool,a]) == for x in '( (%call optCall) _ (SEQ optSEQ)_ (LET optLET)_ - (LET_* optLET_*)_ (%bind optBind)_ (%try optTry)_ (%not optNot)_ diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index a891b567..b20c951f 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -966,7 +966,7 @@ coerceIntAlgebraicConstant(object,t2) == ++ returns true if `val' belongs to the Union branch guarded by `pred'. thisUnionBranch?: (%Code,%Thing) -> %Boolean thisUnionBranch?(pred,val) == - eval ["LET",[["#1",MKQ val]],pred] + eval ['%bind,[["#1",MKQ val]],pred] coerceUnion2Branch(object) == [.,:doms] := objMode object |