GenericMethod.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include <string>
  3. #include "il2cpp-class-internals.h"
  4. #include "os/Mutex.h"
  5. struct MethodInfo;
  6. struct Il2CppGenericMethod;
  7. struct Il2CppGenericContext;
  8. struct Il2CppGenericInst;
  9. namespace il2cpp
  10. {
  11. namespace metadata
  12. {
  13. class GenericMethod
  14. {
  15. public:
  16. // exported
  17. public:
  18. //internal
  19. static const MethodInfo* GetGenericVirtualMethod(const MethodInfo* vtableSlotMethod, const MethodInfo* genericVirtualMethod);
  20. static const MethodInfo* GetMethod(const MethodInfo* methodDefinition, const Il2CppGenericInst* classInst, const Il2CppGenericInst* methodInst);
  21. static const MethodInfo* GetMethod(const Il2CppGenericMethod* gmethod);
  22. static MethodInfo* AllocateNewMethodInfo(const MethodInfo* methodDefinition, const Il2CppGenericInst* classInst, const Il2CppGenericInst* methodInst);
  23. static bool IsGenericAmbiguousMethodInfo(const MethodInfo* method);
  24. static Il2CppMethodPointer GetVirtualCallMethodPointer(const MethodInfo* method);
  25. static const Il2CppGenericContext* GetContext(const Il2CppGenericMethod* gmethod);
  26. static std::string GetFullName(const Il2CppGenericMethod* gmethod);
  27. static void ClearStatics();
  28. static const Il2CppRGCTXData* InflateRGCTX(const MethodInfo* method);
  29. private:
  30. static const MethodInfo* GetMethod(const Il2CppGenericMethod* gmethod, bool copyMethodPtr);
  31. static const MethodInfo* CreateMethodLocked(const Il2CppGenericMethod* gmethod, bool copyMethodPtr);
  32. static const Il2CppRGCTXData* InflateRGCTXLocked(const Il2CppGenericMethod* gmethod, const il2cpp::os::FastAutoLock& lock);
  33. };
  34. } /* namespace vm */
  35. } /* namespace il2cpp */