Patent ID: 8006237

Claim:
A method of executing target code by a processor of a second type, the method comprising: translating into the target code a first program code for a processor of a first type different from the second type, wherein the translating includes: decoding a sequence of instructions of the first program code without executing the sequence of instructions and forming a program code block of the first program code; generating an intermediate representation of the program code block; generating a target code block of the target code from said intermediate representation, wherein the target code is binary program code directly executable by the processor of the second type; immediately after generating the target code block, executing said target code block on said processor of the second type and returning a value; selecting a next sequence of instructions in the first program code utilizing the value; and repeating the translating for the next sequence of instructions in the first program code, wherein only those program code blocks of the first program code needed for a current execution of the first program code are executed on the processor of the second type, and wherein the translating is performed dynamically while the target code is executed by the processor of the second type.