Optimize default C# stdlib references to prevent using jit-ed features in a game assembly

This commit is contained in:
Wojtek Figat
2023-04-01 23:34:05 +02:00
parent 2196a3d791
commit 12f4dc74d2
18 changed files with 186 additions and 163 deletions

View File

@@ -1273,8 +1273,8 @@ void* MMethod::GetThunk()
{
if (!_cachedThunk)
{
static void* GetMethodUnmanagedFunctionPointerPtr = GetStaticMethodPointer(TEXT("GetMethodUnmanagedFunctionPointer"));
_cachedThunk = CallStaticMethod<void*, void*>(GetMethodUnmanagedFunctionPointerPtr, _handle);
static void* GetThunkPtr = GetStaticMethodPointer(TEXT("GetThunk"));
_cachedThunk = CallStaticMethod<void*, void*>(GetThunkPtr, _handle);
}
return _cachedThunk;
}