optimize generateInstruction code emitting