il2cpp-tabledefs.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #pragma once
  2. /*
  3. * Field Attributes (21.1.5).
  4. */
  5. #define FIELD_ATTRIBUTE_FIELD_ACCESS_MASK 0x0007
  6. #define FIELD_ATTRIBUTE_COMPILER_CONTROLLED 0x0000
  7. #define FIELD_ATTRIBUTE_PRIVATE 0x0001
  8. #define FIELD_ATTRIBUTE_FAM_AND_ASSEM 0x0002
  9. #define FIELD_ATTRIBUTE_ASSEMBLY 0x0003
  10. #define FIELD_ATTRIBUTE_FAMILY 0x0004
  11. #define FIELD_ATTRIBUTE_FAM_OR_ASSEM 0x0005
  12. #define FIELD_ATTRIBUTE_PUBLIC 0x0006
  13. #define FIELD_ATTRIBUTE_STATIC 0x0010
  14. #define FIELD_ATTRIBUTE_INIT_ONLY 0x0020
  15. #define FIELD_ATTRIBUTE_LITERAL 0x0040
  16. #define FIELD_ATTRIBUTE_NOT_SERIALIZED 0x0080
  17. #define FIELD_ATTRIBUTE_SPECIAL_NAME 0x0200
  18. #define FIELD_ATTRIBUTE_PINVOKE_IMPL 0x2000
  19. /* For runtime use only */
  20. #define FIELD_ATTRIBUTE_RESERVED_MASK 0x9500
  21. #define FIELD_ATTRIBUTE_RT_SPECIAL_NAME 0x0400
  22. #define FIELD_ATTRIBUTE_HAS_FIELD_MARSHAL 0x1000
  23. #define FIELD_ATTRIBUTE_HAS_DEFAULT 0x8000
  24. #define FIELD_ATTRIBUTE_HAS_FIELD_RVA 0x0100
  25. /*
  26. * Method Attributes (22.1.9)
  27. */
  28. #define METHOD_IMPL_ATTRIBUTE_CODE_TYPE_MASK 0x0003
  29. #define METHOD_IMPL_ATTRIBUTE_IL 0x0000
  30. #define METHOD_IMPL_ATTRIBUTE_NATIVE 0x0001
  31. #define METHOD_IMPL_ATTRIBUTE_OPTIL 0x0002
  32. #define METHOD_IMPL_ATTRIBUTE_RUNTIME 0x0003
  33. #define METHOD_IMPL_ATTRIBUTE_MANAGED_MASK 0x0004
  34. #define METHOD_IMPL_ATTRIBUTE_UNMANAGED 0x0004
  35. #define METHOD_IMPL_ATTRIBUTE_MANAGED 0x0000
  36. #define METHOD_IMPL_ATTRIBUTE_FORWARD_REF 0x0010
  37. #define METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG 0x0080
  38. #define METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL 0x1000
  39. #define METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED 0x0020
  40. #define METHOD_IMPL_ATTRIBUTE_NOINLINING 0x0008
  41. #define METHOD_IMPL_ATTRIBUTE_MAX_METHOD_IMPL_VAL 0xffff
  42. #define METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK 0x0007
  43. #define METHOD_ATTRIBUTE_COMPILER_CONTROLLED 0x0000
  44. #define METHOD_ATTRIBUTE_PRIVATE 0x0001
  45. #define METHOD_ATTRIBUTE_FAM_AND_ASSEM 0x0002
  46. #define METHOD_ATTRIBUTE_ASSEM 0x0003
  47. #define METHOD_ATTRIBUTE_FAMILY 0x0004
  48. #define METHOD_ATTRIBUTE_FAM_OR_ASSEM 0x0005
  49. #define METHOD_ATTRIBUTE_PUBLIC 0x0006
  50. #define METHOD_ATTRIBUTE_STATIC 0x0010
  51. #define METHOD_ATTRIBUTE_FINAL 0x0020
  52. #define METHOD_ATTRIBUTE_VIRTUAL 0x0040
  53. #define METHOD_ATTRIBUTE_HIDE_BY_SIG 0x0080
  54. #define METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK 0x0100
  55. #define METHOD_ATTRIBUTE_REUSE_SLOT 0x0000
  56. #define METHOD_ATTRIBUTE_NEW_SLOT 0x0100
  57. #define METHOD_ATTRIBUTE_STRICT 0x0200
  58. #define METHOD_ATTRIBUTE_ABSTRACT 0x0400
  59. #define METHOD_ATTRIBUTE_SPECIAL_NAME 0x0800
  60. #define METHOD_ATTRIBUTE_PINVOKE_IMPL 0x2000
  61. #define METHOD_ATTRIBUTE_UNMANAGED_EXPORT 0x0008
  62. /*
  63. * For runtime use only
  64. */
  65. #define METHOD_ATTRIBUTE_RESERVED_MASK 0xd000
  66. #define METHOD_ATTRIBUTE_RT_SPECIAL_NAME 0x1000
  67. #define METHOD_ATTRIBUTE_HAS_SECURITY 0x4000
  68. #define METHOD_ATTRIBUTE_REQUIRE_SEC_OBJECT 0x8000
  69. /*
  70. * Type Attributes (21.1.13).
  71. */
  72. #define TYPE_ATTRIBUTE_VISIBILITY_MASK 0x00000007
  73. #define TYPE_ATTRIBUTE_NOT_PUBLIC 0x00000000
  74. #define TYPE_ATTRIBUTE_PUBLIC 0x00000001
  75. #define TYPE_ATTRIBUTE_NESTED_PUBLIC 0x00000002
  76. #define TYPE_ATTRIBUTE_NESTED_PRIVATE 0x00000003
  77. #define TYPE_ATTRIBUTE_NESTED_FAMILY 0x00000004
  78. #define TYPE_ATTRIBUTE_NESTED_ASSEMBLY 0x00000005
  79. #define TYPE_ATTRIBUTE_NESTED_FAM_AND_ASSEM 0x00000006
  80. #define TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM 0x00000007
  81. #define TYPE_ATTRIBUTE_LAYOUT_MASK 0x00000018
  82. #define TYPE_ATTRIBUTE_AUTO_LAYOUT 0x00000000
  83. #define TYPE_ATTRIBUTE_SEQUENTIAL_LAYOUT 0x00000008
  84. #define TYPE_ATTRIBUTE_EXPLICIT_LAYOUT 0x00000010
  85. #define TYPE_ATTRIBUTE_CLASS_SEMANTIC_MASK 0x00000020
  86. #define TYPE_ATTRIBUTE_CLASS 0x00000000
  87. #define TYPE_ATTRIBUTE_INTERFACE 0x00000020
  88. #define TYPE_ATTRIBUTE_ABSTRACT 0x00000080
  89. #define TYPE_ATTRIBUTE_SEALED 0x00000100
  90. #define TYPE_ATTRIBUTE_SPECIAL_NAME 0x00000400
  91. #define TYPE_ATTRIBUTE_IMPORT 0x00001000
  92. #define TYPE_ATTRIBUTE_SERIALIZABLE 0x00002000
  93. #define TYPE_ATTRIBUTE_STRING_FORMAT_MASK 0x00030000
  94. #define TYPE_ATTRIBUTE_ANSI_CLASS 0x00000000
  95. #define TYPE_ATTRIBUTE_UNICODE_CLASS 0x00010000
  96. #define TYPE_ATTRIBUTE_AUTO_CLASS 0x00020000
  97. #define TYPE_ATTRIBUTE_BEFORE_FIELD_INIT 0x00100000
  98. #define TYPE_ATTRIBUTE_FORWARDER 0x00200000
  99. #define TYPE_ATTRIBUTE_RESERVED_MASK 0x00040800
  100. #define TYPE_ATTRIBUTE_RT_SPECIAL_NAME 0x00000800
  101. #define TYPE_ATTRIBUTE_HAS_SECURITY 0x00040000
  102. /*
  103. * Flags for Params (22.1.12)
  104. */
  105. #define PARAM_ATTRIBUTE_IN 0x0001
  106. #define PARAM_ATTRIBUTE_OUT 0x0002
  107. #define PARAM_ATTRIBUTE_OPTIONAL 0x0010
  108. #define PARAM_ATTRIBUTE_RESERVED_MASK 0xf000
  109. #define PARAM_ATTRIBUTE_HAS_DEFAULT 0x1000
  110. #define PARAM_ATTRIBUTE_HAS_FIELD_MARSHAL 0x2000
  111. #define PARAM_ATTRIBUTE_UNUSED 0xcfe0
  112. // Flags for Generic Parameters (II.23.1.7)
  113. #define GENERIC_PARAMETER_ATTRIBUTE_NON_VARIANT 0x00
  114. #define GENERIC_PARAMETER_ATTRIBUTE_COVARIANT 0x01
  115. #define GENERIC_PARAMETER_ATTRIBUTE_CONTRAVARIANT 0x02
  116. #define GENERIC_PARAMETER_ATTRIBUTE_VARIANCE_MASK 0x03
  117. #define GENERIC_PARAMETER_ATTRIBUTE_REFERENCE_TYPE_CONSTRAINT 0x04
  118. #define GENERIC_PARAMETER_ATTRIBUTE_NOT_NULLABLE_VALUE_TYPE_CONSTRAINT 0x08
  119. #define GENERIC_PARAMETER_ATTRIBUTE_DEFAULT_CONSTRUCTOR_CONSTRAINT 0x10
  120. #define GENERIC_PARAMETER_ATTRIBUTE_SPECIAL_CONSTRAINT_MASK 0x1C
  121. /**
  122. * 21.5 AssemblyRefs
  123. */
  124. #define ASSEMBLYREF_FULL_PUBLIC_KEY_FLAG 0x00000001
  125. #define ASSEMBLYREF_RETARGETABLE_FLAG 0x00000100
  126. #define ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG 0x00008000
  127. #define ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG 0x00004000