1. A method comprising: executing a series of instructions at a computer system; while executing a first instruction in the series of instructions, receiving an interrupt signal; in response to receiving the interrupt signal, searching the series of instructions to identify one or more second instruction that is a safe point; replacing the second instruction with one or more interrupt handler instructions that initiate an interrupt handler; and resuming execution of the first instruction.