diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 143fe6af..137bcb48 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-12-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (optSeq): Remove seqToCOND as now redundant + with packWhen!. + +2011-12-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + * boot/parser.boot (bpArgtypeList): Accept mapping types. * boot/ast.boot (bfType): New. * boot/translator.boot (genDeclaration): Use it. diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 1ba56076..a16041a3 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -555,7 +555,7 @@ replaceableTemporary?(g,x) == or/[jumpTarget?(g,x') for x' in x] optSeq ['%seq,:l] == - tryToRemoveSeq seqToCOND getRidOfTemps splicePROGN l where + tryToRemoveSeq ['%seq,:getRidOfTemps splicePROGN l] where splicePROGN l == atomic? l => l l is [["PROGN",:stmts],:l'] => [:stmts,:l'] @@ -565,13 +565,6 @@ optSeq ['%seq,:l] == l is [["%LET",g,x],:r] and replaceableTemporary?(g,r) => getRidOfTemps substitute(x,g,r) [first l,:getRidOfTemps rest l] - seqToCOND l == - transform:= [[a,b] for x in l while (x is ['%when,[a,['%exit,b]]])] - before:= take(#transform,l) - aft:= after(l,before) - null before => ['%seq,:aft] - null aft => ['%when,:transform,'(%otherwise (conderr))] - optCond ['%when,:transform,['%otherwise,optSeq ['%seq,:aft]]] tryToRemoveSeq l == l is ['%seq,[op,a]] and op in '(%exit RETURN %leave %return) => a l |