GenericMetadata.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include <stdint.h>
  3. #include "il2cpp-metadata.h"
  4. #include "metadata/Il2CppTypeVector.h"
  5. struct Il2CppGenericClass;
  6. struct Il2CppGenericContext;
  7. struct Il2CppGenericInst;
  8. struct Il2CppGenericMethod;
  9. union Il2CppRGCTXData;
  10. struct Il2CppRGCTXDefinition;
  11. struct Il2CppType;
  12. struct MethodInfo;
  13. struct ParameterInfo;
  14. struct Il2CppClass;
  15. namespace il2cpp
  16. {
  17. namespace metadata
  18. {
  19. class GenericMetadata
  20. {
  21. public:
  22. static ParameterInfo* InflateParameters(const ParameterInfo* parameters, uint8_t parameterCount, const Il2CppGenericContext* context, bool inflateMethodVars);
  23. static Il2CppGenericClass* GetGenericClass(const Il2CppClass* elementClass, const Il2CppGenericInst* inst);
  24. static Il2CppGenericClass* GetGenericClass(const Il2CppType* elementType, const Il2CppGenericInst* inst);
  25. static const MethodInfo* Inflate(const MethodInfo* methodDefinition, const Il2CppGenericContext* context);
  26. static const Il2CppGenericMethod* Inflate(const Il2CppGenericMethod* genericMethod, const Il2CppGenericContext* context);
  27. static Il2CppRGCTXData* InflateRGCTX(const Il2CppImage* image, uint32_t token, const Il2CppGenericContext* context);
  28. // temporary while we generate generics
  29. static void RegisterGenericClasses(Il2CppGenericClass* const* genericClasses, int32_t genericClassesCount);
  30. static const Il2CppType* InflateIfNeeded(const Il2CppType* type, const Il2CppGenericContext* context, bool inflateMethodVars);
  31. typedef void(*GenericClassWalkCallback)(Il2CppClass* type, void* context);
  32. static void WalkAllGenericClasses(GenericClassWalkCallback callback, void* context);
  33. static int GetMaximumRuntimeGenericDepth();
  34. static void SetMaximumRuntimeGenericDepth(int depth);
  35. static void Clear();
  36. };
  37. } /* namespace vm */
  38. } /* namespace il2cpp */