merge compact and codegen