Dynamic recompilation
|
In computer science, dynamic recompilation is a feature of some emulators and virtual machines, where the system may recompile some part of a program during execution. By compiling during execution, the system can tailor the generated code to reflect the program's run-time environment, and perhaps produce more efficient code by exploiting information that is not available to a traditional static compiler. In other cases, a system may employ dynamic recompilation as part of an adaptive optimization strategy to execute a portable program representation such as Java or CLR bytecodes.
Many implementations of Java feature dynamic compilation, at least in the more advanced VMs.
The HP Dynamo project is an example of a transparent binary dynamic optimizer.
The emulator used in Mac OS to run 680x0 code on the PowerPC hardware was a dynamically recompiling emulator. Virtual PC for Mac, used to run x86 code on PowerPC, is another example.
Apple's new Rosetta for Mac OS X on x86 is another example, allowing PowerPC code to be run on the x86 architecture.