compiler: factorize VirtualRuntimeFunction and SeparateRuntimeFunction