I am curious to know how to implement inline expansion.
I am writing my own compiler just for fun and education.
I learn a lot by example so if someone can provide me an algorithm that does inlining that would help me a lot.
I prefer in C++ but the language doesn't matter.
The target language that I'm trying to write inlining for is JavaScript.
EDIT:
Just to clarify, I am looking for ways to improve ShrinkSafe.
GWT inlines javascript functions so it is possible.
GWT does inlining before the code is run.