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