The MOO Code Optimizer: /lib/optimizer

At the moment, the optimizer does nothing. Eventually, it may be able to perform static optimizations on a MOO program given its abstract syntax tree.

The interface to the optimizer hasn't been concretely decided upon. The optimizer may be given an AST, but it shouldn't modify it directly because the AST is also used to unparse the MOO program back into source form.

At some point the management of abstract syntax trees may change, and they may even be thrown out entirely once the code has been compiled and the unparser has saved a string with the original source. The trees consume an inordinant amount of memory, so eliminating them should significantly decrease the overall memory usage of the simulation.

At the moment the optimizer's interface is simply:

    mixed *ast;

    ast = OPTIMIZER->main(ast);
Ideally a new, optimized syntax tree would be returned. Currently the same tree is returned untouched.


rob@ccs.neu.edu