Add a with-scope so that optimize-tree doesn't pollute namespace

db4
Slava Pestov 2009-05-27 18:58:54 -05:00
parent 117cb78d6b
commit 7b88756fd0
1 changed files with 17 additions and 15 deletions

View File

@ -25,18 +25,20 @@ SYMBOL: check-optimizer?
] when ; ] when ;
: optimize-tree ( nodes -- nodes' ) : optimize-tree ( nodes -- nodes' )
analyze-recursive [
normalize analyze-recursive
propagate normalize
cleanup propagate
dup run-escape-analysis? [ cleanup
escape-analysis dup run-escape-analysis? [
unbox-tuples escape-analysis
] when unbox-tuples
apply-identities ] when
compute-def-use apply-identities
remove-dead-code compute-def-use
?check remove-dead-code
compute-def-use ?check
optimize-modular-arithmetic compute-def-use
finalize ; optimize-modular-arithmetic
finalize
] with-scope ;