diff options
author | dos-reis <gdr@axiomatics.org> | 2011-12-10 23:49:01 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-12-10 23:49:01 +0000 |
commit | c5d7d1291dad4814157c57406fdfbd233a16bcb0 (patch) | |
tree | 05730dba14066f7477a12db0f54e931c6b49a09a | |
parent | 367602f23aeedbfae9887771527d72a860b4bc3f (diff) | |
download | open-axiom-c5d7d1291dad4814157c57406fdfbd233a16bcb0.tar.gz |
* interp/g-opt.boot (optSeq): Remove splicePROGN as redundant.
* interp/functor.boot (optFunctorBody): Generate %seq form, not PROGN.
(DescendCode): Likewise.
* interp/c-util.boot (displayComp): Fix thinko.
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/interp/c-util.boot | 2 | ||||
-rw-r--r-- | src/interp/functor.boot | 6 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 6 | ||||
-rw-r--r-- | src/interp/g-util.boot | 4 | ||||
-rw-r--r-- | src/interp/msgdb.boot | 3 |
6 files changed, 16 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 137bcb48..386c55af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2011-12-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (optSeq): Remove splicePROGN as redundant. + * interp/functor.boot (optFunctorBody): Generate %seq form, not PROGN. + (DescendCode): Likewise. + * interp/c-util.boot (displayComp): Fix thinko. + +2011-12-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (optSeq): Remove seqToCOND as now redundant with packWhen!. diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index b5f9fae3..83220eb8 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -415,7 +415,7 @@ displayComp level == sayBrightly ['"****** level",:bright level,'" ******"] [$x,$m,$f,$exitModeStack]:= ELEM($s,level) SAY("$x:= ",$x) - sayBrightly ['"$m := ",form2String $m] + sayBrightly ['"$m := ",:listify form2String $m] --SAY "$f:=" --F_,PRINT_-ONE $f nil diff --git a/src/interp/functor.boot b/src/interp/functor.boot index c07346a4..91564e08 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -252,7 +252,7 @@ optFunctorBody x == every?(function optFunctorBodyQuotable,l) => quote [optFunctorBodyRequote u for u in l] ['%list,:l] - x is ['PROGN,:l] => ['PROGN,:optFunctorPROGN l] + x is ['PROGN,:l] => ['%seq,:optFunctorPROGN l] x is ['%when,:l] => l := [v for u in l | v := relevantClause u] where relevantClause u == @@ -263,7 +263,7 @@ optFunctorBody x == nil l = nil => nil CAAR l='%otherwise => - (null CDAR l => nil; null CDDAR l => CADAR l; ["PROGN",:CDAR l]) + (null CDAR l => nil; null CDDAR l => CADAR l; ['%seq,:CDAR l]) null rest l and null CDAR l => --there is no meat to this conditional form pred:= CAAR l @@ -451,7 +451,7 @@ DescendCode(db,code,flag,viewAssoc,e) == if first u is ['HasCategory,dom,cat] then [[dom,:cat],:viewAssoc] else viewAssoc,e) for v in rest u] - TruthP CAAR c => ['PROGN,:CDAR c] + TruthP CAAR c => ['%seq,:CDAR c] while (c and (last c is [c1] or last c is [c1,[]]) and (c1 = '%true or c1 is ['HasAttribute,:.])) repeat --strip out some worthless junk at the end diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index a16041a3..23f53c16 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -555,11 +555,7 @@ replaceableTemporary?(g,x) == or/[jumpTarget?(g,x') for x' in x] optSeq ['%seq,:l] == - tryToRemoveSeq ['%seq,:getRidOfTemps splicePROGN l] where - splicePROGN l == - atomic? l => l - l is [["PROGN",:stmts],:l'] => [:stmts,:l'] - l.rest := splicePROGN rest l + tryToRemoveSeq ['%seq,:getRidOfTemps l] where getRidOfTemps l == null l => nil l is [["%LET",g,x],:r] and replaceableTemporary?(g,r) => diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index a43ff7c7..8313c000 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -122,6 +122,10 @@ walkWith!(x,f) == ys.first := walkWith!(first ys,f) apply(f,x,nil) +listify x == + x is [.,:.] => x + [x] + --% ++ List of category constructors that do not have entries in the diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot index c0da49b3..a1fbc880 100644 --- a/src/interp/msgdb.boot +++ b/src/interp/msgdb.boot @@ -163,9 +163,6 @@ applyPrefix2String args == g x == $texFormatting => prefix2StringAsTeX x prefix2String x - listify x == - cons? x => x - [x] substituteSegmentedMsg(msg,args) == -- this does substitution of the parameters |