In a dynamically compiling computer system, a system and method for
efficiently transferring control from execution of an instruction in a
first representation to a second representation of the instruction is
disclosed. The system and method include the setting of a tag for entry
points of each instruction in a first representation that has been
translated to a second representation. The tag is stored in memory in
association with each such instruction. When a given instruction in a
first representation is to be executed, the tag is examined, and if it
indicates that a translated version of the instruction has previously
been generated, control is passed to execution of the instruction in the
second representation. The second representation can be a different
instruction set representation, or an optimized representation in the
same instruction set as the original instruction.