Modcc: refactor function expander and inliner (#912)
* Rewrite the function expander which lowers function calls and function arguments, such that both steps are done in the same visitor, and both visitors are applied to the entire procedure. * Rewrite the function inliner such that it is also applied to an entire procedure, after all functions have been expanded. The function inliner iterates over the body of the procedure, inlining one function call at a time, until all function calls have been inlined. * Conductivity and current accumulations are also modified to be done in one step at the end of `nrn_current`
Showing
- modcc/expression.cpp 5 additions, 2 deletionsmodcc/expression.cpp
- modcc/expression.hpp 12 additions, 0 deletionsmodcc/expression.hpp
- modcc/functionexpander.cpp 137 additions, 85 deletionsmodcc/functionexpander.cpp
- modcc/functionexpander.hpp 19 additions, 68 deletionsmodcc/functionexpander.hpp
- modcc/functioninliner.cpp 176 additions, 156 deletionsmodcc/functioninliner.cpp
- modcc/functioninliner.hpp 43 additions, 76 deletionsmodcc/functioninliner.hpp
- modcc/identifier.hpp 2 additions, 1 deletionmodcc/identifier.hpp
- modcc/module.cpp 131 additions, 156 deletionsmodcc/module.cpp
- modcc/parser.cpp 4 additions, 1 deletionmodcc/parser.cpp
- modcc/solvers.cpp 3 additions, 1 deletionmodcc/solvers.cpp
- test/unit-modcc/mod_files/test6.mod 4 additions, 1 deletiontest/unit-modcc/mod_files/test6.mod
- test/unit-modcc/test_parser.cpp 4 additions, 2 deletionstest/unit-modcc/test_parser.cpp
- test/unit-modcc/test_printers.cpp 38 additions, 31 deletionstest/unit-modcc/test_printers.cpp
Please register or sign in to comment