UnityEngine.JSONSerializeModule.cpp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. #include "pch-cpp.hpp"
  2. #ifndef _MSC_VER
  3. # include <alloca.h>
  4. #else
  5. # include <malloc.h>
  6. #endif
  7. #include <limits>
  8. struct IntPtrU5BU5D_tFD177F8C806A6921AD7150264CCC62FA00CAD832;
  9. struct StackTraceU5BU5D_t32FBCB20930EAF5BAE3F450FF75228E5450DA0DF;
  10. struct ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263;
  11. struct CancellationTokenSource_tAAE1E0033BCFC233801F8CB4CED5C852B350CB7B;
  12. struct IDictionary_t6D03155AF1FA9083817AA5B6AD7DEEACC26AB220;
  13. struct SafeSerializationManager_tCBB85B95DFD1634237140CD892E82D06ECB3F5E6;
  14. struct String_t;
  15. struct Void_t4861ACF8F4594C3437BB48B6E56783494B843915;
  16. IL2CPP_EXTERN_C RuntimeClass* ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263_il2cpp_TypeInfo_var;
  17. IL2CPP_EXTERN_C RuntimeClass* MonoBehaviour_t532A11E69716D348D8AA7F854AFCBFCB8AD17F71_il2cpp_TypeInfo_var;
  18. IL2CPP_EXTERN_C RuntimeClass* Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_il2cpp_TypeInfo_var;
  19. IL2CPP_EXTERN_C RuntimeClass* ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A_il2cpp_TypeInfo_var;
  20. IL2CPP_EXTERN_C String_t* _stringLiteral8B9E56C5D95D7C3EED5199236F70D44573B11813;
  21. IL2CPP_EXTERN_C String_t* _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709;
  22. IL2CPP_EXTERN_C const RuntimeMethod* JsonUtility_ToJson_m53A1FEE0D388CF3A629E093C04B5E1A6D5463B53_RuntimeMethod_var;
  23. struct Exception_t_marshaled_com;
  24. struct Exception_t_marshaled_pinvoke;
  25. IL2CPP_EXTERN_C_BEGIN
  26. IL2CPP_EXTERN_C_END
  27. #ifdef __clang__
  28. #pragma clang diagnostic push
  29. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  30. #pragma clang diagnostic ignored "-Wunused-variable"
  31. #endif
  32. struct U3CModuleU3E_t2F9091E403B25A5364AE8A6B2C249E31D405E3F4
  33. {
  34. };
  35. struct JsonUtility_t731013D97E03B7EDAE6186D6D6826A53B85F7197 : public RuntimeObject
  36. {
  37. };
  38. struct String_t : public RuntimeObject
  39. {
  40. int32_t ____stringLength;
  41. Il2CppChar ____firstChar;
  42. };
  43. struct ValueType_t6D9B272BD21782F0A9A14F2E41F85A50E97A986F : public RuntimeObject
  44. {
  45. };
  46. struct ValueType_t6D9B272BD21782F0A9A14F2E41F85A50E97A986F_marshaled_pinvoke
  47. {
  48. };
  49. struct ValueType_t6D9B272BD21782F0A9A14F2E41F85A50E97A986F_marshaled_com
  50. {
  51. };
  52. struct Boolean_t09A6377A54BE2F9E6985A8149F19234FD7DDFE22
  53. {
  54. bool ___m_value;
  55. };
  56. struct IntPtr_t
  57. {
  58. void* ___m_value;
  59. };
  60. struct Void_t4861ACF8F4594C3437BB48B6E56783494B843915
  61. {
  62. union
  63. {
  64. struct
  65. {
  66. };
  67. uint8_t Void_t4861ACF8F4594C3437BB48B6E56783494B843915__padding[1];
  68. };
  69. };
  70. struct Exception_t : public RuntimeObject
  71. {
  72. String_t* ____className;
  73. String_t* ____message;
  74. RuntimeObject* ____data;
  75. Exception_t* ____innerException;
  76. String_t* ____helpURL;
  77. RuntimeObject* ____stackTrace;
  78. String_t* ____stackTraceString;
  79. String_t* ____remoteStackTraceString;
  80. int32_t ____remoteStackIndex;
  81. RuntimeObject* ____dynamicMethods;
  82. int32_t ____HResult;
  83. String_t* ____source;
  84. SafeSerializationManager_tCBB85B95DFD1634237140CD892E82D06ECB3F5E6* ____safeSerializationManager;
  85. StackTraceU5BU5D_t32FBCB20930EAF5BAE3F450FF75228E5450DA0DF* ___captured_traces;
  86. IntPtrU5BU5D_tFD177F8C806A6921AD7150264CCC62FA00CAD832* ___native_trace_ips;
  87. int32_t ___caught_in_unmanaged;
  88. };
  89. struct Exception_t_marshaled_pinvoke
  90. {
  91. char* ____className;
  92. char* ____message;
  93. RuntimeObject* ____data;
  94. Exception_t_marshaled_pinvoke* ____innerException;
  95. char* ____helpURL;
  96. Il2CppIUnknown* ____stackTrace;
  97. char* ____stackTraceString;
  98. char* ____remoteStackTraceString;
  99. int32_t ____remoteStackIndex;
  100. Il2CppIUnknown* ____dynamicMethods;
  101. int32_t ____HResult;
  102. char* ____source;
  103. SafeSerializationManager_tCBB85B95DFD1634237140CD892E82D06ECB3F5E6* ____safeSerializationManager;
  104. StackTraceU5BU5D_t32FBCB20930EAF5BAE3F450FF75228E5450DA0DF* ___captured_traces;
  105. Il2CppSafeArray* ___native_trace_ips;
  106. int32_t ___caught_in_unmanaged;
  107. };
  108. struct Exception_t_marshaled_com
  109. {
  110. Il2CppChar* ____className;
  111. Il2CppChar* ____message;
  112. RuntimeObject* ____data;
  113. Exception_t_marshaled_com* ____innerException;
  114. Il2CppChar* ____helpURL;
  115. Il2CppIUnknown* ____stackTrace;
  116. Il2CppChar* ____stackTraceString;
  117. Il2CppChar* ____remoteStackTraceString;
  118. int32_t ____remoteStackIndex;
  119. Il2CppIUnknown* ____dynamicMethods;
  120. int32_t ____HResult;
  121. Il2CppChar* ____source;
  122. SafeSerializationManager_tCBB85B95DFD1634237140CD892E82D06ECB3F5E6* ____safeSerializationManager;
  123. StackTraceU5BU5D_t32FBCB20930EAF5BAE3F450FF75228E5450DA0DF* ___captured_traces;
  124. Il2CppSafeArray* ___native_trace_ips;
  125. int32_t ___caught_in_unmanaged;
  126. };
  127. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C : public RuntimeObject
  128. {
  129. intptr_t ___m_CachedPtr;
  130. };
  131. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_marshaled_pinvoke
  132. {
  133. intptr_t ___m_CachedPtr;
  134. };
  135. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_marshaled_com
  136. {
  137. intptr_t ___m_CachedPtr;
  138. };
  139. struct Component_t39FBE53E5EFCF4409111FB22C15FF73717632EC3 : public Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C
  140. {
  141. };
  142. struct ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A : public Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C
  143. {
  144. };
  145. struct ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A_marshaled_pinvoke : public Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_marshaled_pinvoke
  146. {
  147. };
  148. struct ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A_marshaled_com : public Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_marshaled_com
  149. {
  150. };
  151. struct SystemException_tCC48D868298F4C0705279823E34B00F4FBDB7295 : public Exception_t
  152. {
  153. };
  154. struct ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263 : public SystemException_tCC48D868298F4C0705279823E34B00F4FBDB7295
  155. {
  156. String_t* ____paramName;
  157. };
  158. struct Behaviour_t01970CFBBA658497AE30F311C447DB0440BAB7FA : public Component_t39FBE53E5EFCF4409111FB22C15FF73717632EC3
  159. {
  160. };
  161. struct MonoBehaviour_t532A11E69716D348D8AA7F854AFCBFCB8AD17F71 : public Behaviour_t01970CFBBA658497AE30F311C447DB0440BAB7FA
  162. {
  163. CancellationTokenSource_tAAE1E0033BCFC233801F8CB4CED5C852B350CB7B* ___m_CancellationTokenSource;
  164. };
  165. struct String_t_StaticFields
  166. {
  167. String_t* ___Empty;
  168. };
  169. struct Boolean_t09A6377A54BE2F9E6985A8149F19234FD7DDFE22_StaticFields
  170. {
  171. String_t* ___TrueString;
  172. String_t* ___FalseString;
  173. };
  174. struct Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_StaticFields
  175. {
  176. int32_t ___OffsetOfInstanceIDInCPlusPlusObject;
  177. };
  178. #ifdef __clang__
  179. #pragma clang diagnostic pop
  180. #endif
  181. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* JsonUtility_ToJson_m53A1FEE0D388CF3A629E093C04B5E1A6D5463B53 (RuntimeObject* ___0_obj, bool ___1_prettyPrint, const RuntimeMethod* method) ;
  182. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ArgumentException__ctor_m026938A67AF9D36BB7ED27F80425D7194B514465 (ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263* __this, String_t* ___0_message, const RuntimeMethod* method) ;
  183. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* JsonUtility_ToJsonInternal_mB893BE1511779B2E36B24BC77D2FB52BF5894CDD (RuntimeObject* ___0_obj, bool ___1_prettyPrint, const RuntimeMethod* method) ;
  184. #ifdef __clang__
  185. #pragma clang diagnostic push
  186. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  187. #pragma clang diagnostic ignored "-Wunused-variable"
  188. #endif
  189. #ifdef __clang__
  190. #pragma clang diagnostic pop
  191. #endif
  192. #ifdef __clang__
  193. #pragma clang diagnostic push
  194. #pragma clang diagnostic ignored "-Winvalid-offsetof"
  195. #pragma clang diagnostic ignored "-Wunused-variable"
  196. #endif
  197. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* JsonUtility_ToJsonInternal_mB893BE1511779B2E36B24BC77D2FB52BF5894CDD (RuntimeObject* ___0_obj, bool ___1_prettyPrint, const RuntimeMethod* method)
  198. {
  199. typedef String_t* (*JsonUtility_ToJsonInternal_mB893BE1511779B2E36B24BC77D2FB52BF5894CDD_ftn) (RuntimeObject*, bool);
  200. static JsonUtility_ToJsonInternal_mB893BE1511779B2E36B24BC77D2FB52BF5894CDD_ftn _il2cpp_icall_func;
  201. if (!_il2cpp_icall_func)
  202. _il2cpp_icall_func = (JsonUtility_ToJsonInternal_mB893BE1511779B2E36B24BC77D2FB52BF5894CDD_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.JsonUtility::ToJsonInternal(System.Object,System.Boolean)");
  203. String_t* icallRetVal = _il2cpp_icall_func(___0_obj, ___1_prettyPrint);
  204. return icallRetVal;
  205. }
  206. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* JsonUtility_ToJson_m28CC6843B9D3723D88AD13EA3829B71FDE7826BA (RuntimeObject* ___0_obj, const RuntimeMethod* method)
  207. {
  208. String_t* V_0 = NULL;
  209. {
  210. RuntimeObject* L_0 = ___0_obj;
  211. String_t* L_1;
  212. L_1 = JsonUtility_ToJson_m53A1FEE0D388CF3A629E093C04B5E1A6D5463B53(L_0, (bool)0, NULL);
  213. V_0 = L_1;
  214. goto IL_000b;
  215. }
  216. IL_000b:
  217. {
  218. String_t* L_2 = V_0;
  219. return L_2;
  220. }
  221. }
  222. IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* JsonUtility_ToJson_m53A1FEE0D388CF3A629E093C04B5E1A6D5463B53 (RuntimeObject* ___0_obj, bool ___1_prettyPrint, const RuntimeMethod* method)
  223. {
  224. static bool s_Il2CppMethodInitialized;
  225. if (!s_Il2CppMethodInitialized)
  226. {
  227. il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&MonoBehaviour_t532A11E69716D348D8AA7F854AFCBFCB8AD17F71_il2cpp_TypeInfo_var);
  228. il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_il2cpp_TypeInfo_var);
  229. il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A_il2cpp_TypeInfo_var);
  230. il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709);
  231. s_Il2CppMethodInitialized = true;
  232. }
  233. bool V_0 = false;
  234. String_t* V_1 = NULL;
  235. bool V_2 = false;
  236. int32_t G_B6_0 = 0;
  237. int32_t G_B8_0 = 0;
  238. {
  239. RuntimeObject* L_0 = ___0_obj;
  240. V_0 = (bool)((((RuntimeObject*)(RuntimeObject*)L_0) == ((RuntimeObject*)(RuntimeObject*)NULL))? 1 : 0);
  241. bool L_1 = V_0;
  242. if (!L_1)
  243. {
  244. goto IL_0011;
  245. }
  246. }
  247. {
  248. V_1 = _stringLiteralDA39A3EE5E6B4B0D3255BFEF95601890AFD80709;
  249. goto IL_004c;
  250. }
  251. IL_0011:
  252. {
  253. RuntimeObject* L_2 = ___0_obj;
  254. if (!((Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C*)IsInstClass((RuntimeObject*)L_2, Object_tC12DECB6760A7F2CBF65D9DCF18D044C2D97152C_il2cpp_TypeInfo_var)))
  255. {
  256. goto IL_0032;
  257. }
  258. }
  259. {
  260. RuntimeObject* L_3 = ___0_obj;
  261. if (((MonoBehaviour_t532A11E69716D348D8AA7F854AFCBFCB8AD17F71*)IsInstClass((RuntimeObject*)L_3, MonoBehaviour_t532A11E69716D348D8AA7F854AFCBFCB8AD17F71_il2cpp_TypeInfo_var)))
  262. {
  263. goto IL_002f;
  264. }
  265. }
  266. {
  267. RuntimeObject* L_4 = ___0_obj;
  268. G_B6_0 = ((((int32_t)((!(((RuntimeObject*)(ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A*)((ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A*)IsInstClass((RuntimeObject*)L_4, ScriptableObject_tB3BFDB921A1B1795B38A5417D3B97A89A140436A_il2cpp_TypeInfo_var))) <= ((RuntimeObject*)(RuntimeObject*)NULL)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
  269. goto IL_0030;
  270. }
  271. IL_002f:
  272. {
  273. G_B6_0 = 0;
  274. }
  275. IL_0030:
  276. {
  277. G_B8_0 = G_B6_0;
  278. goto IL_0033;
  279. }
  280. IL_0032:
  281. {
  282. G_B8_0 = 0;
  283. }
  284. IL_0033:
  285. {
  286. V_2 = (bool)G_B8_0;
  287. bool L_5 = V_2;
  288. if (!L_5)
  289. {
  290. goto IL_0042;
  291. }
  292. }
  293. {
  294. ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263* L_6 = (ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263*)il2cpp_codegen_object_new(((RuntimeClass*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&ArgumentException_tAD90411542A20A9C72D5CDA3A84181D8B947A263_il2cpp_TypeInfo_var)));
  295. ArgumentException__ctor_m026938A67AF9D36BB7ED27F80425D7194B514465(L_6, ((String_t*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&_stringLiteral8B9E56C5D95D7C3EED5199236F70D44573B11813)), NULL);
  296. IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, ((RuntimeMethod*)il2cpp_codegen_initialize_runtime_metadata_inline((uintptr_t*)&JsonUtility_ToJson_m53A1FEE0D388CF3A629E093C04B5E1A6D5463B53_RuntimeMethod_var)));
  297. }
  298. IL_0042:
  299. {
  300. RuntimeObject* L_7 = ___0_obj;
  301. bool L_8 = ___1_prettyPrint;
  302. String_t* L_9;
  303. L_9 = JsonUtility_ToJsonInternal_mB893BE1511779B2E36B24BC77D2FB52BF5894CDD(L_7, L_8, NULL);
  304. V_1 = L_9;
  305. goto IL_004c;
  306. }
  307. IL_004c:
  308. {
  309. String_t* L_10 = V_1;
  310. return L_10;
  311. }
  312. }
  313. #ifdef __clang__
  314. #pragma clang diagnostic pop
  315. #endif