Patent ID: 7450131

Claim:
A method comprising: storing in a memory, a plurality of instructions at a plurality of addresses; storing in the memory, a plurality of pointers to the plurality of addresses, each pointer associated with an instruction; moving a first pointer associated with a first instruction from pointing to a first address to point to a second address of a second instruction; moving a second pointer associated with the second instruction from pointing to the second address to point to the first address, wherein moving the second pointer includes accessing the first pointer before moving the first pointer to determine that the second pointer is to point to the first address; and compiling into a compiled code a re-ordered order of the instructions after the instructions have been moved according to the moved pointers; accessing the second pointer before moving the second pointer to determine that the first pointer is to point to the second address; re-ordering the original order to a re-ordered order of the plurality of instructions at the plurality of addresses, wherein re-ordering comprises: moving a first instruction at the first address in the memory to the second address, wherein moving the first instruction comprises accessing the first pointer; moving a second instruction at the second address in the memory to the first address, wherein moving the second instruction comprises accessing the second pointer; just-in-time (JIT) compiling the re-ordered plurality of instructions into compiled code to be executed by a circuit.