GenericMetadata.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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(Il2CppClass* elementClass, const Il2CppGenericInst* inst);
  24. static Il2CppGenericClass* GetGenericClass(TypeDefinitionIndex elementClassIndex, const Il2CppGenericInst* inst);
  25. static const MethodInfo* Inflate(const MethodInfo* methodDefinition, Il2CppClass* declaringClass, const Il2CppGenericContext* context);
  26. static const Il2CppGenericMethod* Inflate(const Il2CppGenericMethod* genericMethod, const Il2CppGenericContext* context);
  27. static Il2CppRGCTXData* InflateRGCTX(RGCTXIndex rgctxEntryIndex, int16_t rgctxEntryCount, const Il2CppGenericContext* context);
  28. // temporary while we generate generics
  29. static void RegisterGenericClass(Il2CppGenericClass *gclass);
  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 const int MaximumRuntimeGenericDepth = 8;
  34. };
  35. } /* namespace vm */
  36. } /* namespace il2cpp */