| 1963 | } |
| 1964 | |
| 1965 | void* GetStaticMethodPointer(StringView methodName) |
| 1966 | { |
| 1967 | void* fun; |
| 1968 | if (CachedFunctions.TryGet(methodName, fun)) |
| 1969 | return fun; |
| 1970 | PROFILE_CPU(); |
| 1971 | PROFILE_MEM(ScriptingCSharp); |
| 1972 | const int rc = get_function_pointer(NativeInteropTypeName, FLAX_CORECLR_STRING(methodName).Get(), UNMANAGEDCALLERSONLY_METHOD, nullptr, nullptr, &fun); |
| 1973 | if (rc != 0) |
| 1974 | LOG(Fatal, "Failed to get unmanaged function pointer for method '{0}': 0x{1:x}", methodName, (unsigned int)rc); |
| 1975 | CachedFunctions.Add(methodName, fun); |
| 1976 | return fun; |
| 1977 | } |
| 1978 | |
| 1979 | #elif DOTNET_HOST_MONO |
| 1980 |
no test coverage detected