Use deoptimization for questions related to compiler construction which involves speculatively compiling code using heurestics which make assumptions about data types and memory allocation with a fallback to more conservative compilation in case of failure.
Deoptimization allows a compiler to make assumptions to generate optimized code, but if the assumptions in the optimized code turn out to be too optimistic, to reconstruct the state of the virtual registers and register window and bail out to the code generated by the base compiler.
References