Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

il2cpp-runtime-metadata.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #pragma once
  2. #include <stdint.h>
  3. #include "il2cpp-blob.h"
  4. #include "il2cpp-metadata.h"
  5. struct Il2CppClass;
  6. struct MethodInfo;
  7. struct Il2CppType;
  8. typedef struct Il2CppArrayType
  9. {
  10. const Il2CppType* etype;
  11. uint8_t rank;
  12. uint8_t numsizes;
  13. uint8_t numlobounds;
  14. int *sizes;
  15. int *lobounds;
  16. } Il2CppArrayType;
  17. typedef struct Il2CppGenericInst
  18. {
  19. uint32_t type_argc;
  20. const Il2CppType **type_argv;
  21. } Il2CppGenericInst;
  22. typedef struct Il2CppGenericContext
  23. {
  24. /* The instantiation corresponding to the class generic parameters */
  25. const Il2CppGenericInst *class_inst;
  26. /* The instantiation corresponding to the method generic parameters */
  27. const Il2CppGenericInst *method_inst;
  28. } Il2CppGenericContext;
  29. typedef struct Il2CppGenericClass
  30. {
  31. const Il2CppType* type; /* the generic type definition */
  32. Il2CppGenericContext context; /* a context that contains the type instantiation doesn't contain any method instantiation */
  33. Il2CppClass *cached_class; /* if present, the Il2CppClass corresponding to the instantiation. */
  34. } Il2CppGenericClass;
  35. typedef struct Il2CppGenericMethod
  36. {
  37. const MethodInfo* methodDefinition;
  38. Il2CppGenericContext context;
  39. } Il2CppGenericMethod;
  40. typedef struct Il2CppType
  41. {
  42. union
  43. {
  44. // We have this dummy field first because pre C99 compilers (MSVC) can only initializer the first value in a union.
  45. void* dummy;
  46. TypeDefinitionIndex __klassIndex; /* for VALUETYPE and CLASS at startup */
  47. Il2CppMetadataTypeHandle typeHandle; /* for VALUETYPE and CLASS at runtime */
  48. const Il2CppType *type; /* for PTR and SZARRAY */
  49. Il2CppArrayType *array; /* for ARRAY */
  50. //MonoMethodSignature *method;
  51. GenericParameterIndex __genericParameterIndex; /* for VAR and MVAR at startup */
  52. Il2CppMetadataGenericParameterHandle genericParameterHandle; /* for VAR and MVAR at runtime */
  53. Il2CppGenericClass *generic_class; /* for GENERICINST */
  54. } data;
  55. unsigned int attrs : 16; /* param attributes or field flags */
  56. Il2CppTypeEnum type : 8;
  57. unsigned int num_mods : 5; /* max 64 modifiers follow at the end */
  58. unsigned int byref : 1;
  59. unsigned int pinned : 1; /* valid when included in a local var signature */
  60. unsigned int valuetype : 1;
  61. //MonoCustomMod modifiers [MONO_ZERO_LEN_ARRAY]; /* this may grow */
  62. } Il2CppType;
  63. typedef struct Il2CppMetadataFieldInfo
  64. {
  65. const Il2CppType* type;
  66. const char* name;
  67. uint32_t token;
  68. } Il2CppMetadataFieldInfo;
  69. typedef struct Il2CppMetadataMethodInfo
  70. {
  71. Il2CppMetadataMethodDefinitionHandle handle;
  72. const char* name;
  73. const Il2CppType* return_type;
  74. uint32_t token;
  75. uint16_t flags;
  76. uint16_t iflags;
  77. uint16_t slot;
  78. uint16_t parameterCount;
  79. bool isUnmangedCallersOnly;
  80. } Il2CppMetadataMethodInfo;
  81. typedef struct Il2CppMetadataParameterInfo
  82. {
  83. const char* name;
  84. uint32_t token;
  85. const Il2CppType* type;
  86. } Il2CppMetadataParameterInfo;
  87. typedef struct Il2CppMetadataPropertyInfo
  88. {
  89. const char* name;
  90. const MethodInfo* get;
  91. const MethodInfo* set;
  92. uint32_t attrs;
  93. uint32_t token;
  94. } Il2CppMetadataPropertyInfo;
  95. typedef struct Il2CppMetadataEventInfo
  96. {
  97. const char* name;
  98. const Il2CppType* type;
  99. const MethodInfo* add;
  100. const MethodInfo* remove;
  101. const MethodInfo* raise;
  102. uint32_t token;
  103. } Il2CppMetadataEventInfo;
  104. typedef struct Il2CppInterfaceOffsetInfo
  105. {
  106. const Il2CppType* interfaceType;
  107. int32_t offset;
  108. } Il2CppInterfaceOffsetInfo;
  109. typedef struct Il2CppGenericParameterInfo
  110. {
  111. Il2CppMetadataGenericContainerHandle containerHandle;
  112. const char* name;
  113. uint16_t num;
  114. uint16_t flags;
  115. } Il2CppGenericParameterInfo;