added code gen for exit and cycle statements