GenericMethod.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 const Il2CppGenericContext* GetContext(const Il2CppGenericMethod* gmethod);
  25. static std::string GetFullName(const Il2CppGenericMethod* gmethod);
  26. static void ClearStatics();
  27. static const Il2CppRGCTXData* InflateRGCTX(const MethodInfo* method);
  28. private:
  29. static const MethodInfo* GetMethod(const Il2CppGenericMethod* gmethod, bool copyMethodPtr);
  30. static const MethodInfo* CreateMethodLocked(const Il2CppGenericMethod* gmethod, bool copyMethodPtr);
  31. static const Il2CppRGCTXData* InflateRGCTXLocked(const Il2CppGenericMethod* gmethod, const il2cpp::os::FastAutoLock& lock);
  32. };
  33. } /* namespace vm */
  34. } /* namespace il2cpp */