Precise exceptions handling in the optimized binary translated code is
achieved by transitioning execution to the non-optimized step-by-step
foreign code execution means in accordance with one of the several
coherent foreign states designated during the optimized translation of
the foreign code. A method to improve the operation by avoiding complete
foreign state updates in the optimized code, an apparatus to track the
switching between the states and a method to recompute the complete
foreign state in accordance to the current state identification,
execution context and additional documentation provided during the
translation time are proposed.