replace all static invocations with generated inlineable functions