diff options
author | dos-reis <gdr@axiomatics.org> | 2011-12-08 00:46:22 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-12-08 00:46:22 +0000 |
commit | e37be16362b844403c5d4c47fa91fd2540389041 (patch) | |
tree | 318be19e821a8a05be39652848235d123708d99b /src/interp | |
parent | 1328fa0128ebf17c274b230eb724df195be8a915 (diff) | |
download | open-axiom-e37be16362b844403c5d4c47fa91fd2540389041.tar.gz |
* interp/g-opt.boot: %writeString, %writeNewline and %writeLine
are side-effect full.
(removeSeq!): Tidy. Skip side-effectfree statements.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/g-opt.boot | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 05708d68..1813d18e 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -228,11 +228,12 @@ removeSeq! x == walkWith!(x,function f) where x := first xs x is "/throwAway" => g rest xs -- skip garbages x is ['%seq,:.] => -- splice sub-sequences - ys := g x.args => - lastNode(ys).rest := g rest xs - ys + ys := x.args => + lastNode(ys).rest := rest xs + g ys g rest xs -- skip empty statements rest xs = nil => xs + sideEffectFree? x => g rest xs -- skip effect-less statements. xs.rest := g rest xs xs @@ -564,7 +565,6 @@ $VMsideEffectFreeOperators == %bitvecnot %bitvecand %bitvecnand %bivecor %bitvecnor %bitvecxor %bitveccopy %bitvecconc %bitveclength %bitvecref %bitveceq %bitveclt %before? %equal %sptreq %ident? %property %tref - %writeString %writeNewline %writeLine %void %retract %pullback %lambda %closure) ++ List of simple VM operators |