refactor #default_display_functions! to do most of the work in the compiler