Move function helpers to compiler runtime