public static RedirectCallsState RedirectCalls(RuntimeMethodHandle from, RuntimeMethodHandle to)
{
// GetFunctionPointer enforces compilation of the method.
var fptr1 = from.GetFunctionPointer();
var fptr2 = to.GetFunctionPointer();
return PatchJumpTo(fptr1, fptr2);
}