In #24 , we reorganized the processDecls function into separate parts. Yet, we lost a good optimization of the older processDecls: it would inline definitions in a much smarter way. We would like to eventually implement that again as a whole-program transformation in Pirouette.Transformation.
The core idea is to start inlining functions in their dependency order, memoize the results, then use them for further inlinings. Look at the old processDecls linked above for inspiration.
In #24 , we reorganized the
processDecls
function into separate parts. Yet, we lost a good optimization of the olderprocessDecls
: it would inline definitions in a much smarter way. We would like to eventually implement that again as a whole-program transformation inPirouette.Transformation
.The core idea is to start inlining functions in their dependency order, memoize the results, then use them for further inlinings. Look at the old
processDecls
linked above for inspiration.