diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3c00a3c7..a8326673 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-06-09 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/g-opt.boot (removeNeedlessThrow): Tidy. + 2010-06-08 Gabriel Dos Reis <gdr@cs.tamu.edu> Widen scope of iterator variables in presence of terminating diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index ad2cff91..3557f554 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -145,13 +145,17 @@ changeThrowToGo(s,g) == ++ Change any `(THROW tag (%return expr))' in x to just ++ `(%return expr) since a return-operator transfer control -++ out of the function body anyway. +++ out of the function body anyway. Similarly, transform +++ reudant `(THROW tag (THROW tag expr))' to `(THROW tag expr)'. removeNeedlessThrow x == isAtomicForm x => x x is ['THROW,.,y] and y is ['%return,:.] => removeNeedlessThrow third y x.op := y.op x.args := y.args + x is ['THROW,g,y] and y is ['THROW,=g,z] => + removeNeedlessThrow z + second(x.args) := z for x' in x repeat removeNeedlessThrow x' |