1. A method for hot-swapping a first code generator, comprising: while a program using the first code generator is being executed by an execution environment in a computer, receiving an indication to hot-swap the first code generator, wherein the first code generator is configured to generate a new code sequence based on a code sequence of the program; in response to receiving the indication, preparing to hot-swap the first code generator by the execution environment, wherein the preparing includes disengaging the first code generator from the execution environment, wherein the preparing includes disengaging the first code generator from the execution environment and allowing execution of the program to be in an interpreted mode only; once preparing is complete, removing the first code generator from the execution environment and introducing a second code generator in the execution environment to replace the first code generator; and interpreting code sequences of the program using an interpreter when the execution environment is in the interpreted mode only.