[add] first
This commit is contained in:
		
							
								
								
									
										9
									
								
								Libraries/libil2cpp/include/char-conversions.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								Libraries/libil2cpp/include/char-conversions.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| #pragma once | ||||
|  | ||||
| extern const uint8_t CategoryData_v4[71680]; | ||||
| extern const uint8_t NumericData[12938]; | ||||
| extern const double NumericDataValues[58]; | ||||
| extern const Il2CppChar ToLowerDataLow[9424]; | ||||
| extern const Il2CppChar ToLowerDataHigh[223]; | ||||
| extern const Il2CppChar ToUpperDataLow[9450]; | ||||
| extern const Il2CppChar ToUpperDataHigh[223]; | ||||
							
								
								
									
										454
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-common-big.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										454
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-common-big.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,454 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-codegen-common.h" | ||||
|  | ||||
| #include <cmath> | ||||
| #include <cstdlib> | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-class-internals.h" | ||||
| #include "il2cpp-tabledefs.h" | ||||
|  | ||||
| #include "vm-utils/Debugger.h" | ||||
| #include "vm-utils/Finally.h" | ||||
| #include "utils/ExceptionSupportStack.h" | ||||
| #include "utils/Output.h" | ||||
|  | ||||
| REAL_NORETURN IL2CPP_NO_INLINE void il2cpp_codegen_no_return(); | ||||
|  | ||||
| #if IL2CPP_COMPILER_MSVC | ||||
| #define DEFAULT_CALL STDCALL | ||||
| #else | ||||
| #define DEFAULT_CALL | ||||
| #endif | ||||
|  | ||||
| #if defined(__ARMCC_VERSION) | ||||
| inline double bankers_round(double x) | ||||
| { | ||||
|     return __builtin_round(x); | ||||
| } | ||||
|  | ||||
| inline float bankers_roundf(float x) | ||||
| { | ||||
|     return __builtin_roundf(x); | ||||
| } | ||||
|  | ||||
| #else | ||||
| inline double bankers_round(double x) | ||||
| { | ||||
|     double integerPart; | ||||
|     if (x >= 0.0) | ||||
|     { | ||||
|         if (modf(x, &integerPart) == 0.5) | ||||
|             return (int64_t)integerPart % 2 == 0 ? integerPart : integerPart + 1.0; | ||||
|         return floor(x + 0.5); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         if (modf(x, &integerPart) == -0.5) | ||||
|             return (int64_t)integerPart % 2 == 0 ? integerPart : integerPart - 1.0; | ||||
|         return ceil(x - 0.5); | ||||
|     } | ||||
| } | ||||
|  | ||||
| inline float bankers_roundf(float x) | ||||
| { | ||||
|     double integerPart; | ||||
|     if (x >= 0.0f) | ||||
|     { | ||||
|         if (modf(x, &integerPart) == 0.5) | ||||
|             return (int64_t)integerPart % 2 == 0 ? (float)integerPart : (float)integerPart + 1.0f; | ||||
|         return floorf(x + 0.5f); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         if (modf(x, &integerPart) == -0.5) | ||||
|             return (int64_t)integerPart % 2 == 0 ? (float)integerPart : (float)integerPart - 1.0f; | ||||
|         return ceilf(x - 0.5f); | ||||
|     } | ||||
| } | ||||
|  | ||||
| #endif | ||||
|  | ||||
| // returns true if overflow occurs | ||||
| inline bool il2cpp_codegen_check_mul_overflow_i64(int64_t a, int64_t b, int64_t imin, int64_t imax) | ||||
| { | ||||
|     // TODO: use a better algorithm without division | ||||
|     uint64_t ua = (uint64_t)llabs(a); | ||||
|     uint64_t ub = (uint64_t)llabs(b); | ||||
|  | ||||
|     uint64_t c; | ||||
|     if ((a > 0 && b > 0) || (a <= 0 && b <= 0)) | ||||
|         c = (uint64_t)llabs(imax); | ||||
|     else | ||||
|         c = (uint64_t)llabs(imin); | ||||
|  | ||||
|     return ua != 0 && ub > c / ua; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_check_mul_oveflow_u64(uint64_t a, uint64_t b) | ||||
| { | ||||
|     return b != 0 && (a * b) / b != a; | ||||
| } | ||||
|  | ||||
| inline int32_t il2cpp_codegen_abs(uint32_t value) | ||||
| { | ||||
|     return abs(static_cast<int32_t>(value)); | ||||
| } | ||||
|  | ||||
| inline int32_t il2cpp_codegen_abs(int32_t value) | ||||
| { | ||||
|     return abs(value); | ||||
| } | ||||
|  | ||||
| inline int64_t il2cpp_codegen_abs(uint64_t value) | ||||
| { | ||||
|     return llabs(static_cast<int64_t>(value)); | ||||
| } | ||||
|  | ||||
| inline int64_t il2cpp_codegen_abs(int64_t value) | ||||
| { | ||||
|     return llabs(value); | ||||
| } | ||||
|  | ||||
| // Exception support macros | ||||
| #define IL2CPP_PUSH_ACTIVE_EXCEPTION(Exception) \ | ||||
|     __active_exceptions.push(Exception) | ||||
|  | ||||
| #define IL2CPP_POP_ACTIVE_EXCEPTION() \ | ||||
|     __active_exceptions.pop() | ||||
|  | ||||
| #define IL2CPP_GET_ACTIVE_EXCEPTION(ExcType) \ | ||||
|     (ExcType)__active_exceptions.top() | ||||
|  | ||||
| #define IL2CPP_RAISE_NULL_REFERENCE_EXCEPTION() \ | ||||
|     do {\ | ||||
|         il2cpp_codegen_raise_null_reference_exception();\ | ||||
|         il2cpp_codegen_no_return();\ | ||||
|     } while (0) | ||||
|  | ||||
| #define IL2CPP_RAISE_MANAGED_EXCEPTION(ex, lastManagedFrame) \ | ||||
|     do {\ | ||||
|         il2cpp_codegen_raise_exception((Exception_t*)ex, (RuntimeMethod*)lastManagedFrame);\ | ||||
|         il2cpp_codegen_no_return();\ | ||||
|     } while (0) | ||||
|  | ||||
| #define IL2CPP_RETHROW_MANAGED_EXCEPTION(ex) \ | ||||
|     do {\ | ||||
|         il2cpp_codegen_rethrow_exception((Exception_t*)ex);\ | ||||
|         il2cpp_codegen_no_return();\ | ||||
|     } while (0) | ||||
|  | ||||
| void il2cpp_codegen_memory_barrier(); | ||||
|  | ||||
| template<typename T> | ||||
| inline T VolatileRead(T* location) | ||||
| { | ||||
|     T result = *location; | ||||
|     il2cpp_codegen_memory_barrier(); | ||||
|     return result; | ||||
| } | ||||
|  | ||||
| template<typename T, typename U> | ||||
| inline void VolatileWrite(T** location, U* value) | ||||
| { | ||||
|     il2cpp_codegen_memory_barrier(); | ||||
|     *location = value; | ||||
|     Il2CppCodeGenWriteBarrier((void**)location, value); | ||||
| } | ||||
|  | ||||
| template<typename T, typename U> | ||||
| inline void VolatileWrite(T* location, U value) | ||||
| { | ||||
|     il2cpp_codegen_memory_barrier(); | ||||
|     *location = value; | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_write_to_stdout(const char* str) | ||||
| { | ||||
|     il2cpp::utils::Output::WriteToStdout(str); | ||||
| } | ||||
|  | ||||
| #if IL2CPP_TARGET_LUMIN | ||||
| #include <stdarg.h> | ||||
| #include <stdio.h> | ||||
| inline void il2cpp_codegen_write_to_stdout_args(const char* str, ...) | ||||
| { | ||||
|     va_list args, local; | ||||
|     char* buffer = nullptr; | ||||
|     va_start(args, str); | ||||
|     va_copy(local, args); | ||||
|     int size = vsnprintf(nullptr, 0, str, local); | ||||
|     if (size < 0) | ||||
|     { | ||||
|         va_end(local); | ||||
|         va_end(args); | ||||
|         return; | ||||
|     } | ||||
|     va_end(local); | ||||
|     va_copy(local, args); | ||||
|     buffer = new char[size + 1]; | ||||
|     vsnprintf(buffer, size + 1, str, local); | ||||
|     il2cpp::utils::Output::WriteToStdout(buffer); | ||||
|     if (buffer != nullptr) | ||||
|         delete[] buffer; | ||||
|     va_end(local); | ||||
|     va_end(args); | ||||
| } | ||||
|  | ||||
| #endif | ||||
|  | ||||
| inline void il2cpp_codegen_write_to_stderr(const char* str) | ||||
| { | ||||
|     il2cpp::utils::Output::WriteToStderr(str); | ||||
| } | ||||
|  | ||||
| #if IL2CPP_TARGET_LUMIN | ||||
| inline void il2cpp_codegen_write_to_stderr_args(const char* str, ...) | ||||
| { | ||||
|     va_list args, local; | ||||
|     char* buffer = nullptr; | ||||
|     va_start(args, str); | ||||
|     va_copy(local, args); | ||||
|     int size = vsnprintf(nullptr, 0, str, local); | ||||
|     if (size < 0) | ||||
|     { | ||||
|         va_end(local); | ||||
|         va_end(args); | ||||
|         return; | ||||
|     } | ||||
|     va_end(local); | ||||
|     va_copy(local, args); | ||||
|     buffer = new char[size + 1]; | ||||
|     vsnprintf(buffer, size + 1, str, local); | ||||
|     il2cpp::utils::Output::WriteToStderr(buffer); | ||||
|     if (buffer != nullptr) | ||||
|         delete[] buffer; | ||||
|     va_end(local); | ||||
|     va_end(args); | ||||
| } | ||||
|  | ||||
| #endif | ||||
|  | ||||
| REAL_NORETURN void il2cpp_codegen_abort(); | ||||
|  | ||||
| inline bool il2cpp_codegen_check_add_overflow(int64_t left, int64_t right) | ||||
| { | ||||
|     return (right >= 0 && left > kIl2CppInt64Max - right) || | ||||
|         (left < 0 && right < kIl2CppInt64Min - left); | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_check_sub_overflow(int64_t left, int64_t right) | ||||
| { | ||||
|     return (right >= 0 && left < kIl2CppInt64Min + right) || | ||||
|         (right < 0 && left > kIl2CppInt64Max + right); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_register_debugger_data(const Il2CppDebuggerMetadataRegistration *data) | ||||
| { | ||||
| #if IL2CPP_MONO_DEBUGGER | ||||
|     il2cpp::utils::Debugger::RegisterMetadata(data); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_check_sequence_point(Il2CppSequencePointExecutionContext* executionContext, Il2CppSequencePoint* seqPoint) | ||||
| { | ||||
| #if IL2CPP_MONO_DEBUGGER | ||||
|     il2cpp::utils::Debugger::CheckSequencePoint(executionContext, seqPoint); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_check_sequence_point_entry(Il2CppSequencePointExecutionContext* executionContext, Il2CppSequencePoint* seqPoint) | ||||
| { | ||||
| #if IL2CPP_MONO_DEBUGGER | ||||
|     il2cpp::utils::Debugger::CheckSequencePointEntry(executionContext, seqPoint); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_check_sequence_point_exit(Il2CppSequencePointExecutionContext* executionContext, Il2CppSequencePoint* seqPoint) | ||||
| { | ||||
| #if IL2CPP_MONO_DEBUGGER | ||||
|     il2cpp::utils::Debugger::CheckSequencePointExit(executionContext, seqPoint); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_check_pause_point() | ||||
| { | ||||
| #if IL2CPP_MONO_DEBUGGER | ||||
|     il2cpp::utils::Debugger::CheckPausePoint(); | ||||
| #endif | ||||
| } | ||||
|  | ||||
| class MethodExitSequencePointChecker | ||||
| { | ||||
| private: | ||||
|     Il2CppSequencePoint* m_seqPoint; | ||||
|     Il2CppSequencePointExecutionContext* m_seqPointStorage; | ||||
|  | ||||
| public: | ||||
|     MethodExitSequencePointChecker(Il2CppSequencePointExecutionContext* seqPointStorage, Il2CppSequencePoint* seqPoint) : | ||||
|         m_seqPointStorage(seqPointStorage), m_seqPoint(seqPoint) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     ~MethodExitSequencePointChecker() | ||||
|     { | ||||
| #if IL2CPP_MONO_DEBUGGER | ||||
|         il2cpp_codegen_check_sequence_point_exit(m_seqPointStorage, m_seqPoint); | ||||
| #endif | ||||
|     } | ||||
| }; | ||||
|  | ||||
| #ifdef _MSC_VER | ||||
| #define IL2CPP_DISABLE_OPTIMIZATIONS __pragma(optimize("", off)) | ||||
| #define IL2CPP_ENABLE_OPTIMIZATIONS __pragma(optimize("", on)) | ||||
| #elif IL2CPP_TARGET_LINUX | ||||
| #define IL2CPP_DISABLE_OPTIMIZATIONS | ||||
| #define IL2CPP_ENABLE_OPTIMIZATIONS | ||||
| #else | ||||
| #define IL2CPP_DISABLE_OPTIMIZATIONS __attribute__ ((optnone)) | ||||
| #define IL2CPP_ENABLE_OPTIMIZATIONS | ||||
| #endif | ||||
|  | ||||
| // Array Unsafe | ||||
| #define IL2CPP_ARRAY_UNSAFE_LOAD(TArray, TIndex) \ | ||||
|     (TArray)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(TIndex)) | ||||
|  | ||||
| inline bool il2cpp_codegen_object_reference_equals(const RuntimeObject *obj1, const RuntimeObject *obj2) | ||||
| { | ||||
|     return obj1 == obj2; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_platform_is_osx_or_ios() | ||||
| { | ||||
|     return IL2CPP_TARGET_OSX != 0 || IL2CPP_TARGET_IOS != 0; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_platform_is_freebsd() | ||||
| { | ||||
|     // we don't currently support FreeBSD | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_platform_is_uwp() | ||||
| { | ||||
|     return IL2CPP_TARGET_WINRT != 0; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_platform_disable_libc_pinvoke() | ||||
| { | ||||
|     return IL2CPP_PLATFORM_DISABLE_LIBC_PINVOKE; | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T il2cpp_unsafe_read_unaligned(void* location) | ||||
| { | ||||
|     T result; | ||||
| #if IL2CPP_TARGET_ARMV7 || IL2CPP_TARGET_JAVASCRIPT | ||||
|     memcpy(&result, location, sizeof(T)); | ||||
| #else | ||||
|     result = *((T*)location); | ||||
| #endif | ||||
|     return result; | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline void il2cpp_unsafe_write_unaligned(void* location, T value) | ||||
| { | ||||
| #if IL2CPP_TARGET_ARMV7 || IL2CPP_TARGET_JAVASCRIPT | ||||
|     memcpy(location, &value, sizeof(T)); | ||||
| #else | ||||
|     *((T*)location) = value; | ||||
| #endif | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T il2cpp_unsafe_read(void* location) | ||||
| { | ||||
|     return *((T*)location); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline void il2cpp_unsafe_write(void* location, T value) | ||||
| { | ||||
|     *((T*)location) = value; | ||||
| } | ||||
|  | ||||
| template<typename T, typename TOffset> | ||||
| inline T* il2cpp_unsafe_add(void* source, TOffset offset) | ||||
| { | ||||
|     return reinterpret_cast<T*>(source) + offset; | ||||
| } | ||||
|  | ||||
| template<typename T, typename TOffset> | ||||
| inline T* il2cpp_unsafe_add_byte_offset(void* source, TOffset offset) | ||||
| { | ||||
|     return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(source) + offset); | ||||
| } | ||||
|  | ||||
| template<typename T, typename TOffset> | ||||
| inline T* il2cpp_unsafe_subtract(void* source, TOffset offset) | ||||
| { | ||||
|     return reinterpret_cast<T*>(source) - offset; | ||||
| } | ||||
|  | ||||
| template<typename T, typename TOffset> | ||||
| inline T* il2cpp_unsafe_subtract_byte_offset(void* source, TOffset offset) | ||||
| { | ||||
|     return reinterpret_cast<T*>(reinterpret_cast<uint8_t*>(source) - offset); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T il2cpp_unsafe_as(void* source) | ||||
| { | ||||
|     return reinterpret_cast<T>(source); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T* il2cpp_unsafe_as_ref(void* source) | ||||
| { | ||||
|     return reinterpret_cast<T*>(source); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_unsafe_as_pointer(void* source) | ||||
| { | ||||
|     return source; | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T* il2cpp_unsafe_null_ref() | ||||
| { | ||||
|     return reinterpret_cast<T*>(NULL); | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_unsafe_are_same(void* left, void* right) | ||||
| { | ||||
|     return left == right; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_unsafe_is_addr_gt(void* left, void* right) | ||||
| { | ||||
|     return left > right; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_unsafe_is_addr_lt(void* left, void* right) | ||||
| { | ||||
|     return left < right; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_unsafe_is_null_ref(void* source) | ||||
| { | ||||
|     return source == NULL; | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline int32_t il2cpp_unsafe_sizeof() | ||||
| { | ||||
|     return sizeof(T); | ||||
| } | ||||
|  | ||||
| inline intptr_t il2cpp_unsafe_byte_offset(void* origin, void* target) | ||||
| { | ||||
|     return reinterpret_cast<uint8_t*>(target) - reinterpret_cast<uint8_t*>(origin); | ||||
| } | ||||
| @@ -0,0 +1,249 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-codegen-common.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include <cmath> | ||||
| #include <limits> | ||||
| #include <type_traits> | ||||
|  | ||||
| template<typename TInput, typename TOutput, typename TFloat> | ||||
| inline TOutput il2cpp_codegen_cast_floating_point(TFloat value) | ||||
| { | ||||
|     // In release builds and on ARM, a cast from a floating point to | ||||
|     // integer value will use the min or max value if the cast is out | ||||
|     // of range (instead of overflowing like x86/x64 debug builds). | ||||
|     // So first do a cast to the output type (which is signed in | ||||
|     // .NET - the value stack does not have unsigned types) to try to | ||||
|     // get the value into a range that will actually be cast the way .NET does. | ||||
|     if (value < 0) | ||||
|         return (TOutput)((TInput)(TOutput)value); | ||||
|     return (TOutput)((TInput)value); | ||||
| } | ||||
|  | ||||
| // ARM targets handle a cast of floating point positive infinity (0x7F800000) | ||||
| // differently from Intel targets. The expected behavior for .NET is from Intel, | ||||
| // where the cast to a 32-bit int produces the value 0x80000000. On ARM, the sign | ||||
| // is unchanged, producing 0x7FFFFFFF. To work around this change the positive | ||||
| // infinity value to negative infinity. | ||||
| template<typename T> | ||||
| inline T il2cpp_codegen_cast_double_to_int(double value) | ||||
| { | ||||
| #if IL2CPP_TARGET_ARM64 || IL2CPP_TARGET_ARMV7 | ||||
|     if (value == HUGE_VAL) | ||||
|     { | ||||
|         if (std::is_same<T, int64_t>::value) | ||||
|             return INT64_MIN; | ||||
|         if (std::is_same<T, int32_t>::value) | ||||
|             return INT32_MIN; | ||||
|         return 0; | ||||
|     } | ||||
| #endif | ||||
|     return (T)value; | ||||
| } | ||||
|  | ||||
| template<bool, class T, class U> | ||||
| struct pick_first; | ||||
|  | ||||
| template<class T, class U> | ||||
| struct pick_first<true, T, U> | ||||
| { | ||||
|     typedef T type; | ||||
| }; | ||||
|  | ||||
| template<class T, class U> | ||||
| struct pick_first<false, T, U> | ||||
| { | ||||
|     typedef U type; | ||||
| }; | ||||
|  | ||||
| template<class T, class U> | ||||
| struct pick_bigger | ||||
| { | ||||
|     typedef typename pick_first<(sizeof(T) >= sizeof(U)), T, U>::type type; | ||||
| }; | ||||
|  | ||||
| template<typename T, typename U> | ||||
| inline typename pick_bigger<T, U>::type il2cpp_codegen_multiply(T left, U right) | ||||
| { | ||||
|     return left * right; | ||||
| } | ||||
|  | ||||
| template<typename T, typename U> | ||||
| inline typename pick_bigger<T, U>::type il2cpp_codegen_add(T left, U right) | ||||
| { | ||||
|     return left + right; | ||||
| } | ||||
|  | ||||
| template<typename T, typename U> | ||||
| inline typename pick_bigger<T, U>::type il2cpp_codegen_subtract(T left, U right) | ||||
| { | ||||
|     return left - right; | ||||
| } | ||||
|  | ||||
| NORETURN void il2cpp_codegen_raise_exception(Exception_t* ex, RuntimeMethod* lastManagedFrame = NULL); | ||||
|  | ||||
| // NativeArray macros | ||||
| #define IL2CPP_NATIVEARRAY_GET_ITEM(TElementType, TTField, TIndex) \ | ||||
|     *(reinterpret_cast<TElementType*>(TTField) + TIndex) | ||||
|  | ||||
| #define IL2CPP_NATIVEARRAY_SET_ITEM(TElementType, TTField, TIndex, TValue) \ | ||||
|    *(reinterpret_cast<TElementType*>(TTField) + TIndex) = TValue; | ||||
|  | ||||
| #define IL2CPP_NATIVEARRAY_GET_LENGTH(TLengthField) \ | ||||
|    (TLengthField) | ||||
|  | ||||
| #if IL2CPP_TINY | ||||
|  | ||||
| #include "utils/StringUtils.h" | ||||
|  | ||||
| String_t* il2cpp_codegen_string_new_utf16(const il2cpp::utils::StringView<Il2CppChar>& str); | ||||
|  | ||||
| inline String_t* il2cpp_codegen_string_new_from_char_array(Il2CppArray* characterArray, size_t startIndex, size_t length) | ||||
| { | ||||
|     il2cpp_array_size_t arraySize = characterArray->max_length; | ||||
|     if (startIndex + length > arraySize || startIndex < 0) | ||||
|         il2cpp_codegen_raise_exception(NULL); | ||||
|  | ||||
|     return il2cpp_codegen_string_new_utf16(il2cpp::utils::StringView<Il2CppChar>(reinterpret_cast<Il2CppChar*>(characterArray + 1), startIndex, length)); | ||||
| } | ||||
|  | ||||
| inline int il2cpp_codegen_get_offset_to_string_data() | ||||
| { | ||||
|     return offsetof(Il2CppString, chars); | ||||
| } | ||||
|  | ||||
| inline int32_t il2cpp_codegen_get_array_length(Il2CppArray* szArray) | ||||
| { | ||||
|     return static_cast<int32_t>(szArray->max_length); | ||||
| } | ||||
|  | ||||
| int il2cpp_codegen_double_to_string(double value, uint8_t* format, uint8_t* buffer, int bufferLength); | ||||
|  | ||||
| struct Delegate_t; | ||||
|  | ||||
| inline intptr_t il2cpp_codegen_marshal_get_function_pointer_for_delegate(const Delegate_t* d) | ||||
| { | ||||
|     return reinterpret_cast<intptr_t>(reinterpret_cast<const Il2CppDelegate*>(d)->m_ReversePInvokeWrapperPtr); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_get_reverse_pinvoke_function_ptr(void* d) | ||||
| { | ||||
|     return d; | ||||
| } | ||||
|  | ||||
| #endif // IL2CPP_TINY | ||||
|  | ||||
| template<typename T> | ||||
| constexpr bool il2cpp_codegen_is_floating_point_type() | ||||
| { | ||||
|     return std::is_same<T, float>::value || std::is_same<T, double>::value; | ||||
| } | ||||
|  | ||||
| NORETURN void il2cpp_codegen_raise_overflow_exception(const RuntimeMethod* method); | ||||
|  | ||||
| template<typename TDest, typename TSource, typename TILStackType, bool checkOverflow, bool treatInputAsUnsigned, bool destIsFloatingPoint, bool sourceIsFloatingPoint> | ||||
| class ConvImpl | ||||
| { | ||||
|     static TDest Conv(TSource srcValue, const RuntimeMethod* method); | ||||
| }; | ||||
|  | ||||
| template<typename TDest, typename TSource, typename TILStackType, bool checkOverflow, bool treatInputAsUnsigned> | ||||
| struct ConvImpl<TDest, TSource, TILStackType, checkOverflow, treatInputAsUnsigned, false, false> | ||||
| { | ||||
|     // Integer type to integer type | ||||
|     static TDest Conv(TSource srcValue, const RuntimeMethod* method) | ||||
|     { | ||||
|         IL2CPP_ASSERT(!il2cpp_codegen_is_floating_point_type<TDest>() && !il2cpp_codegen_is_floating_point_type<TSource>()); | ||||
|         TILStackType ilStackValue = (TILStackType)srcValue; | ||||
|  | ||||
|         if (checkOverflow) | ||||
|         { | ||||
|             typedef typename pick_bigger<TDest, TILStackType>::type CompType; | ||||
|  | ||||
|             if (!treatInputAsUnsigned && !std::is_unsigned<TDest>::value) | ||||
|             { | ||||
|                 if ((CompType)ilStackValue > (CompType)std::numeric_limits<TDest>::max()) | ||||
|                     il2cpp_codegen_raise_overflow_exception(method); | ||||
|                 if ((CompType)ilStackValue < (CompType)std::numeric_limits<TDest>::min()) | ||||
|                     il2cpp_codegen_raise_overflow_exception(method); | ||||
|             } | ||||
|             if (treatInputAsUnsigned || std::is_unsigned<TDest>::value) | ||||
|             { | ||||
|                 if ((typename std::make_unsigned<TILStackType>::type)ilStackValue > (typename std::make_unsigned<TDest>::type) std::numeric_limits<TDest>::max()) | ||||
|                     il2cpp_codegen_raise_overflow_exception(method); | ||||
|                 if (!treatInputAsUnsigned && ilStackValue < 0) | ||||
|                     il2cpp_codegen_raise_overflow_exception(method); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if (std::is_unsigned<TDest>::value) | ||||
|             return (TDest)(typename std::make_unsigned<TILStackType>::type)ilStackValue; | ||||
|  | ||||
|     #if __cplusplus < 202022L | ||||
|         // Prior to C++ 20 conversion of integer types to smaller types is undefined behavior | ||||
|         // In most implementations it works as expected, except the optimizer is allowed to optimize it out | ||||
|         if (sizeof(TDest) >= sizeof(TILStackType)) | ||||
|             return (TDest)ilStackValue; | ||||
|         constexpr TILStackType mask = (TILStackType)std::numeric_limits<typename std::make_unsigned<TDest>::type>::max(); | ||||
|         return (TDest)(ilStackValue & mask); | ||||
|     #else | ||||
|         return (TDest)ilStackValue; | ||||
|     #endif | ||||
|     } | ||||
| }; | ||||
|  | ||||
| template<typename TDest, typename TSource, typename TILStackType, bool checkOverflow, bool treatInputAsUnsigned> | ||||
| struct ConvImpl<TDest, TSource, TILStackType, checkOverflow, treatInputAsUnsigned, false, true> | ||||
| { | ||||
|     // Floating point type to integer type | ||||
|     static TDest Conv(TSource srcValue, const RuntimeMethod* method) | ||||
|     { | ||||
|         IL2CPP_ASSERT(!il2cpp_codegen_is_floating_point_type<TDest>() && il2cpp_codegen_is_floating_point_type<TSource>()); | ||||
|         TILStackType ilStackValue = (TILStackType)srcValue; | ||||
|  | ||||
|         if (checkOverflow) | ||||
|         { | ||||
|             if (ilStackValue > (TILStackType)std::numeric_limits<TDest>::max()) | ||||
|                 il2cpp_codegen_raise_overflow_exception(method); | ||||
|             if (std::is_signed<TDest>::value && ilStackValue < (TILStackType)std::numeric_limits<TDest>::min()) | ||||
|                 il2cpp_codegen_raise_overflow_exception(method); | ||||
|             if (std::is_unsigned<TDest>::value && ilStackValue < 0) | ||||
|                 il2cpp_codegen_raise_overflow_exception(method); | ||||
|         } | ||||
|  | ||||
|         if (std::is_same<TDest, typename std::make_unsigned<TDest>::type>::value) | ||||
|             return il2cpp_codegen_cast_floating_point<typename std::make_signed<TDest>::type, TDest, TSource>(ilStackValue); | ||||
|         return il2cpp_codegen_cast_double_to_int<TDest>(ilStackValue); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| template<typename TDest, typename TSource, typename TILStackType, bool checkOverflow, bool treatInputAsUnsigned> | ||||
| struct ConvImpl<TDest, TSource, TILStackType, checkOverflow, treatInputAsUnsigned, true, false> | ||||
| { | ||||
|     // Integer type to floating point type | ||||
|     static TDest Conv(TSource srcValue, const RuntimeMethod * method) | ||||
|     { | ||||
|         IL2CPP_ASSERT(il2cpp_codegen_is_floating_point_type<TDest>() && !il2cpp_codegen_is_floating_point_type<TSource>()); | ||||
|         TILStackType ilStackValue = (TILStackType)srcValue; | ||||
|         if (treatInputAsUnsigned) | ||||
|             return (TDest)(typename std::make_unsigned<TILStackType>::type)ilStackValue; | ||||
|         return (TDest)ilStackValue; | ||||
|     } | ||||
| }; | ||||
|  | ||||
| template<typename TDest, typename TSource, typename TILStackType, bool checkOverflow, bool treatInputAsUnsigned> | ||||
| struct ConvImpl<TDest, TSource, TILStackType, checkOverflow, treatInputAsUnsigned, true, true> | ||||
| { | ||||
|     // Floating point to floating point type | ||||
|     static TDest Conv(TSource srcValue, const RuntimeMethod* method) | ||||
|     { | ||||
|         IL2CPP_ASSERT(il2cpp_codegen_is_floating_point_type<TDest>() && il2cpp_codegen_is_floating_point_type<TSource>()); | ||||
|         return (TDest)srcValue; | ||||
|     } | ||||
| }; | ||||
|  | ||||
| template<typename TDest, typename TSource, typename TILStackType, bool checkOverflow, bool treatInputAsUnsigned> | ||||
| TDest il2cpp_codegen_conv(TSource srcValue, const RuntimeMethod* method) | ||||
| { | ||||
|     return ConvImpl<TDest, TSource, TILStackType, checkOverflow, treatInputAsUnsigned, il2cpp_codegen_is_floating_point_type<TDest>(), il2cpp_codegen_is_floating_point_type<TSource>()>::Conv(srcValue, method); | ||||
| } | ||||
							
								
								
									
										98
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-common.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-common.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,98 @@ | ||||
| #pragma once | ||||
|  | ||||
| #ifdef _MSC_VER | ||||
| #define IL2CPP_DISABLE_OPTIMIZATIONS __pragma(optimize("", off)) | ||||
| #define IL2CPP_ENABLE_OPTIMIZATIONS __pragma(optimize("", on)) | ||||
| #elif IL2CPP_TARGET_LINUX | ||||
| #define IL2CPP_DISABLE_OPTIMIZATIONS | ||||
| #define IL2CPP_ENABLE_OPTIMIZATIONS | ||||
| #else | ||||
| #define IL2CPP_DISABLE_OPTIMIZATIONS __attribute__ ((optnone)) | ||||
| #define IL2CPP_ENABLE_OPTIMIZATIONS | ||||
| #endif | ||||
|  | ||||
|  | ||||
| #if IL2CPP_ENABLE_WRITE_BARRIERS | ||||
| void Il2CppCodeGenWriteBarrier(void** targetAddress, void* object); | ||||
| void Il2CppCodeGenWriteBarrierForType(const Il2CppType* type, void** targetAddress, void* object); | ||||
| void Il2CppCodeGenWriteBarrierForClass(Il2CppClass* klass, void** targetAddress, void* object); | ||||
| #else | ||||
| inline void Il2CppCodeGenWriteBarrier(void** targetAddress, void* object) {} | ||||
| inline void Il2CppCodeGenWriteBarrierForType(const Il2CppType* type, void** targetAddress, void* object) {} | ||||
| inline void Il2CppCodeGenWriteBarrierForClass(Il2CppClass* klass, void** targetAddress, void* object) {} | ||||
| #endif | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(void* dest, const void* src, size_t count) | ||||
| { | ||||
|     return memcpy(dest, src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(intptr_t dest, const void* src, size_t count) | ||||
| { | ||||
|     return memcpy((void*)dest, src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(uintptr_t dest, const void* src, size_t count) | ||||
| { | ||||
|     return memcpy((void*)dest, src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(void* dest, intptr_t src, size_t count) | ||||
| { | ||||
|     return memcpy(dest, (void*)src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(intptr_t dest, intptr_t src, size_t count) | ||||
| { | ||||
|     return memcpy((void*)dest, (void*)src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(uintptr_t dest, intptr_t src, size_t count) | ||||
| { | ||||
|     return memcpy((void*)dest, (void*)src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(void* dest, uintptr_t src, size_t count) | ||||
| { | ||||
|     return memcpy(dest, (void*)src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(intptr_t dest, uintptr_t src, size_t count) | ||||
| { | ||||
|     return memcpy((void*)dest, (void*)src, count); | ||||
| } | ||||
|  | ||||
| inline void* il2cpp_codegen_memcpy(uintptr_t dest, uintptr_t src, size_t count) | ||||
| { | ||||
|     return memcpy((void*)dest, (void*)src, count); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_memset(void* ptr, int value, size_t num) | ||||
| { | ||||
|     memset(ptr, value, num); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_memset(intptr_t ptr, int value, size_t num) | ||||
| { | ||||
|     memset((void*)ptr, value, num); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_memset(uintptr_t ptr, int value, size_t num) | ||||
| { | ||||
|     memset((void*)ptr, value, num); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_initobj(void* value, size_t size) | ||||
| { | ||||
|     memset(value, 0, size); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_initobj(intptr_t value, size_t size) | ||||
| { | ||||
|     memset((void*)value, 0, size); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_initobj(uintptr_t value, size_t size) | ||||
| { | ||||
|     memset((void*)value, 0, size); | ||||
| } | ||||
							
								
								
									
										1247
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-il2cpp.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1247
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-il2cpp.h
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -0,0 +1,34 @@ | ||||
| #pragma once | ||||
|  | ||||
| typedef struct String_t String_t; | ||||
| struct Type_t; | ||||
| struct Exception_t; | ||||
| struct StringBuilder_t; | ||||
| struct MulticastDelegate_t; | ||||
| struct MethodBase_t; | ||||
| struct Assembly_t; | ||||
|  | ||||
| #include "il2cpp-class-internals.h" | ||||
|  | ||||
| #if RUNTIME_TINY | ||||
|  | ||||
| struct RuntimeMethod; | ||||
|  | ||||
| #else | ||||
|  | ||||
| struct TypeInfo; | ||||
| struct MethodInfo; | ||||
| struct FieldInfo; | ||||
| struct Il2CppType; | ||||
| typedef Il2CppClass RuntimeClass; | ||||
| typedef MethodInfo RuntimeMethod; | ||||
| typedef FieldInfo RuntimeField; | ||||
| typedef Il2CppType RuntimeType; | ||||
| typedef Il2CppObject RuntimeObject; | ||||
| typedef Il2CppImage RuntimeImage; | ||||
| typedef Il2CppException RuntimeException; | ||||
| typedef Il2CppArray RuntimeArray; | ||||
| typedef Il2CppAssembly RuntimeAssembly; | ||||
| typedef Il2CppString RuntimeString; | ||||
| typedef Il2CppDelegate RuntimeDelegate; | ||||
| #endif | ||||
							
								
								
									
										731
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-tiny.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										731
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen-tiny.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,731 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-codegen-common-small.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-debug-metadata.h" | ||||
| #include "gc/GarbageCollector.h" | ||||
| #include "gc/WriteBarrier.h" | ||||
| #include "os/Memory.h" | ||||
| #include "vm/Array.h" | ||||
| #include "vm/Exception.h" | ||||
| #include "vm/Object.h" | ||||
| #include "vm/PlatformInvoke.h" | ||||
| #include "vm/ScopedThreadAttacher.h" | ||||
| #include "vm/String.h" | ||||
| #include "vm/Runtime.h" | ||||
| #include "vm/Thread.h" | ||||
| #include "vm/Type.h" | ||||
| #include "vm/TypeUniverse.h" | ||||
| #include "vm-utils/Finally.h" | ||||
| #include "vm-utils/icalls/mscorlib/System.Threading/Interlocked.h" | ||||
| #include "vm-utils/VmThreadUtils.h" | ||||
| #include "utils/ExceptionSupportStack.h" | ||||
| #include "utils/MemoryUtils.h" | ||||
| #include "utils/StringView.h" | ||||
| #include <string> | ||||
|  | ||||
| struct Exception_t; | ||||
| struct Delegate_t; | ||||
| struct MulticastDelegate_t; | ||||
| struct String_t; | ||||
| struct Type_t; | ||||
|  | ||||
| typedef Il2CppObject RuntimeObject; | ||||
| typedef Il2CppArray RuntimeArray; | ||||
|  | ||||
| #if IL2CPP_COMPILER_MSVC | ||||
| #define DEFAULT_CALL STDCALL | ||||
| #else | ||||
| #define DEFAULT_CALL | ||||
| #endif | ||||
|  | ||||
| inline RuntimeObject* il2cpp_codegen_object_new(size_t size, TinyType* typeInfo) | ||||
| { | ||||
|     return (RuntimeObject*)tiny::vm::Object::New(size, typeInfo); | ||||
| } | ||||
|  | ||||
| inline Il2CppObject* Box(TinyType* type, void* value, size_t size) | ||||
| { | ||||
|     COMPILE_TIME_CONST size_t alignedObjectSize = IL2CPP_ALIGNED_OBJECT_SIZE; | ||||
|     Il2CppObject* obj = il2cpp_codegen_object_new(size + alignedObjectSize, type); | ||||
|     memcpy(reinterpret_cast<uint8_t*>(obj) + alignedObjectSize, value, size); | ||||
|     il2cpp::gc::GarbageCollector::SetWriteBarrier((void**)(reinterpret_cast<uint8_t*>(obj) + alignedObjectSize), size); | ||||
|     return obj; | ||||
| } | ||||
|  | ||||
| static intptr_t align(intptr_t x, size_t alignment) | ||||
| { | ||||
|     return (x + alignment - 1) & ~(alignment - 1); | ||||
| } | ||||
|  | ||||
| template<typename ArgumentType> | ||||
| static uint8_t* NullableValueField(void* storage) | ||||
| { | ||||
|     // The hasValue field is the first one in the Nullable struct. It is a one byte Boolean. | ||||
|     // We're trying to get the address of the value field in the Nullable struct, so offset | ||||
|     // past the hasValue field, then offset to the alignment value of the type stored in the | ||||
|     // Nullable struct. | ||||
|     uint8_t* byteAfterhasValueField = static_cast<uint8_t*>(storage) + 1; | ||||
|  | ||||
|     size_t alignmentOfArgumentType = alignof(ArgumentType); | ||||
|  | ||||
|     intptr_t offsetToAlign = 0; | ||||
|     if ((intptr_t)byteAfterhasValueField % alignmentOfArgumentType != 0) | ||||
|         offsetToAlign = alignmentOfArgumentType - 1; | ||||
|     return byteAfterhasValueField + offsetToAlign; | ||||
| } | ||||
|  | ||||
| template<typename NullableType, typename ArgumentType> | ||||
| inline Il2CppObject* BoxNullable(TinyType* type, NullableType* value) | ||||
| { | ||||
|     /* | ||||
|     From ECMA-335, I.8.2.4 Boxing and unboxing of values: | ||||
|  | ||||
|     All value types have an operation called box. Boxing a value of any value type produces its boxed value; | ||||
|     i.e., a value of the corresponding boxed type containing a bitwise copy of the original value. If the | ||||
|     value type is a nullable type defined as an instantiation of the value type System.Nullable<T> the result | ||||
|     is a null reference or bitwise copy of its Value property of type T, depending on its HasValue property | ||||
|     (false and true, respectively). | ||||
|     */ | ||||
|  | ||||
|     bool hasValue = *reinterpret_cast<bool*>(reinterpret_cast<uint8_t*>(value)); | ||||
|     if (!hasValue) | ||||
|         return NULL; | ||||
|  | ||||
|     uint32_t valueSize = sizeof(ArgumentType); | ||||
|     return Box(type, NullableValueField<ArgumentType>(value), valueSize); | ||||
| } | ||||
|  | ||||
| inline void* UnBox(Il2CppObject* obj) | ||||
| { | ||||
|     return tiny::vm::Object::Unbox(obj); | ||||
| } | ||||
|  | ||||
| inline void* UnBox(Il2CppObject* obj, TinyType* expectedBoxedType) | ||||
| { | ||||
|     COMPILE_TIME_CONST size_t alignedObjectSize = IL2CPP_ALIGNED_OBJECT_SIZE; | ||||
|     if (obj->klass == expectedBoxedType) | ||||
|         return reinterpret_cast<uint8_t*>(obj) + alignedObjectSize; | ||||
|  | ||||
|     tiny::vm::Exception::RaiseInvalidCastException(obj, expectedBoxedType); | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| template<typename ArgumentType> | ||||
| inline void UnBoxNullable(Il2CppObject* obj, TinyType* expectedBoxedClass, void* storage) | ||||
| { | ||||
|     // We assume storage is on the stack, if not we'll need a write barrier | ||||
|     IL2CPP_ASSERT_STACK_PTR(storage); | ||||
|  | ||||
|     // We only need to do type checks if obj is not null | ||||
|     // Unboxing null nullable is perfectly valid and returns an instance that has no value | ||||
|     if (obj != NULL) | ||||
|     { | ||||
|         if (obj->klass != expectedBoxedClass) | ||||
|             tiny::vm::Exception::RaiseInvalidCastException(obj, expectedBoxedClass); | ||||
|     } | ||||
|  | ||||
|     uint32_t valueSize = sizeof(ArgumentType); | ||||
|  | ||||
|     if (obj == NULL) | ||||
|     { | ||||
|         memset(NullableValueField<ArgumentType>(storage), 0, valueSize); | ||||
|         *(static_cast<uint8_t*>(storage)) = false; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         memcpy(NullableValueField<ArgumentType>(storage), UnBox(obj), valueSize); | ||||
|         *(static_cast<uint8_t*>(storage)) = true; | ||||
|     } | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_is_fake_boxed_object(RuntimeObject* object) | ||||
| { | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| struct Il2CppFakeBox : RuntimeObject | ||||
| { | ||||
|     alignas(IL2CPP_ALIGNED_OBJECT_SIZE) T m_Value; | ||||
|  | ||||
|     Il2CppFakeBox(TinyType* boxedType, T* value) | ||||
|     { | ||||
|         klass = boxedType; | ||||
|         m_Value = *value; | ||||
|     } | ||||
| }; | ||||
|  | ||||
|  | ||||
| // Exception support macros | ||||
|  | ||||
| #define IL2CPP_PUSH_ACTIVE_EXCEPTION(Exception) \ | ||||
|     __active_exceptions.push(Exception) | ||||
|  | ||||
| #define IL2CPP_POP_ACTIVE_EXCEPTION() \ | ||||
|     __active_exceptions.pop() | ||||
|  | ||||
| #define IL2CPP_GET_ACTIVE_EXCEPTION(ExcType) \ | ||||
|     (ExcType)__active_exceptions.top() | ||||
|  | ||||
| #define IL2CPP_LEAVE(Offset, Target) \ | ||||
|     __leave_targets.push(Offset); \ | ||||
|     goto Target; | ||||
|  | ||||
| #define IL2CPP_END_FINALLY(Id) \ | ||||
|     goto __CLEANUP_ ## Id; | ||||
|  | ||||
| #define IL2CPP_CLEANUP(Id) \ | ||||
|     __CLEANUP_ ## Id: | ||||
|  | ||||
| #define IL2CPP_RETHROW_IF_UNHANDLED(ExcType) \ | ||||
|     if(__last_unhandled_exception) { \ | ||||
|         ExcType _tmp_exception_local = __last_unhandled_exception; \ | ||||
|         __last_unhandled_exception = 0; \ | ||||
|         il2cpp_codegen_raise_exception(_tmp_exception_local); \ | ||||
|         } | ||||
|  | ||||
| #define IL2CPP_JUMP_TBL(Offset, Target) \ | ||||
|     if(!__leave_targets.empty() && __leave_targets.top() == Offset) { \ | ||||
|         __leave_targets.pop(); \ | ||||
|         goto Target; \ | ||||
|         } | ||||
|  | ||||
| #define IL2CPP_END_CLEANUP(Offset, Target) \ | ||||
|     if(!__leave_targets.empty() && __leave_targets.top() == Offset) \ | ||||
|         goto Target; | ||||
|  | ||||
|  | ||||
| inline void il2cpp_codegen_memory_barrier() | ||||
| { | ||||
|     // The joy of singlethreading | ||||
| } | ||||
|  | ||||
| inline TinyType* LookupTypeInfoFromCursor(uint32_t typeCursor) | ||||
| { | ||||
|     return reinterpret_cast<TinyType*>(Il2CppGetTinyTypeUniverse() + typeCursor); | ||||
| } | ||||
|  | ||||
| inline String_t* LookupStringFromCursor(uint32_t stringCursor) | ||||
| { | ||||
|     return reinterpret_cast<String_t*>(Il2CppGetStringLiterals() + stringCursor); | ||||
| } | ||||
|  | ||||
| inline bool HasParentOrIs(const TinyType* type, const TinyType* targetType) | ||||
| { | ||||
|     IL2CPP_ASSERT(type != NULL); | ||||
|     IL2CPP_ASSERT(targetType != NULL); | ||||
|  | ||||
|     if (type == targetType) | ||||
|         return true; | ||||
|  | ||||
|     uint16_t typeHierarchySize = type->typeHierarchySize; | ||||
|     uint16_t targetTypeHierarchySize = targetType->typeHierarchySize; | ||||
|     if (typeHierarchySize <= targetTypeHierarchySize) | ||||
|         return false; | ||||
|  | ||||
|     if (type->GetTypeHierarchy()[targetTypeHierarchySize] == targetType) | ||||
|         return true; | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| inline bool IsAssignableFrom(const TinyType* klass, const TinyType* oklass) | ||||
| { | ||||
|     if (HasParentOrIs(oklass, klass)) | ||||
|         return true; | ||||
|  | ||||
|     const TinyType* const* interfaces = oklass->GetInterfaces(); | ||||
|     uint8_t size = oklass->interfacesSize; | ||||
|     for (uint8_t i = 0; i != size; i++) | ||||
|     { | ||||
|         if (interfaces[i] == klass) | ||||
|             return true; | ||||
|     } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| inline Il2CppObject* IsInst(Il2CppObject* obj, TinyType* klass) | ||||
| { | ||||
|     if (!obj) | ||||
|         return NULL; | ||||
|  | ||||
|     TinyType* objClass = obj->klass; | ||||
|     if (IsAssignableFrom(klass, objClass)) | ||||
|         return obj; | ||||
|  | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline RuntimeObject* IsInstClass(RuntimeObject* obj, TinyType* targetType) | ||||
| { | ||||
|     IL2CPP_ASSERT(targetType != NULL); | ||||
|  | ||||
|     if (!obj) | ||||
|         return NULL; | ||||
|  | ||||
|     if (HasParentOrIs(obj->klass, targetType)) | ||||
|         return obj; | ||||
|  | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline RuntimeObject* IsInstSealed(RuntimeObject* obj, TinyType* targetType) | ||||
| { | ||||
|     if (!obj) | ||||
|         return NULL; | ||||
|  | ||||
|     // optimized version to compare sealed classes | ||||
|     return (obj->klass == targetType ? obj : NULL); | ||||
| } | ||||
|  | ||||
| inline RuntimeObject* Castclass(RuntimeObject* obj, TinyType* targetType) | ||||
| { | ||||
|     if (!obj) | ||||
|         return NULL; | ||||
|  | ||||
|     RuntimeObject* result = IsInst(obj, targetType); | ||||
|     if (result) | ||||
|         return result; | ||||
|  | ||||
|     tiny::vm::Exception::RaiseInvalidCastException(obj, targetType); | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline RuntimeObject* CastclassSealed(RuntimeObject *obj, TinyType* targetType) | ||||
| { | ||||
|     if (!obj) | ||||
|         return NULL; | ||||
|  | ||||
|     RuntimeObject* result = IsInstSealed(obj, targetType); | ||||
|     if (result) | ||||
|         return result; | ||||
|  | ||||
|     tiny::vm::Exception::RaiseInvalidCastException(obj, targetType); | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline RuntimeObject* CastclassClass(RuntimeObject *obj, TinyType* targetType) | ||||
| { | ||||
|     if (!obj) | ||||
|         return NULL; | ||||
|  | ||||
|     RuntimeObject* result = IsInstClass(obj, targetType); | ||||
|     if (result) | ||||
|         return result; | ||||
|  | ||||
|     tiny::vm::Exception::RaiseInvalidCastException(obj, targetType); | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_is_assignable_from(Type_t* left, Type_t* right) | ||||
| { | ||||
|     if (right == NULL) | ||||
|         return false; | ||||
|  | ||||
|     return IsAssignableFrom(reinterpret_cast<Il2CppReflectionType*>(left)->typeHandle, reinterpret_cast<Il2CppReflectionType*>(right)->typeHandle); | ||||
| } | ||||
|  | ||||
| // il2cpp generates direct calls to this specific name | ||||
| inline bool il2cpp_codegen_class_is_assignable_from(TinyType* left, TinyType* right) | ||||
| { | ||||
|     if (right == NULL) | ||||
|         return false; | ||||
|     return IsAssignableFrom(left, right); | ||||
| } | ||||
|  | ||||
| inline TinyType* il2cpp_codegen_object_class(RuntimeObject *obj) | ||||
| { | ||||
|     return obj->klass; | ||||
| } | ||||
|  | ||||
| inline String_t* il2cpp_codegen_string_new_length(int length) | ||||
| { | ||||
|     return reinterpret_cast<String_t*>(tiny::vm::String::NewLen(length)); | ||||
| } | ||||
|  | ||||
| inline String_t* il2cpp_codegen_string_new_utf16(const il2cpp::utils::StringView<Il2CppChar>& str) | ||||
| { | ||||
|     return (String_t*)tiny::vm::String::NewLen(str.Str(), static_cast<uint32_t>(str.Length())); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline Il2CppArray* SZArrayNew(TinyType* arrayType, uint32_t elementSize, uint32_t arrayLength) | ||||
| { | ||||
|     return tiny::vm::Array::New<T>(arrayType, elementSize, arrayLength); | ||||
| } | ||||
|  | ||||
| template<size_t N> | ||||
| inline Il2CppMultidimensionalArray<N>* GenArrayNew(TinyType* arrayType, uint32_t elementSize, il2cpp_array_size_t(&dimensions)[N]) | ||||
| { | ||||
|     il2cpp_array_size_t arrayLength = elementSize; | ||||
|     for (uint32_t i = 0; i < N; i++) | ||||
|         arrayLength *= dimensions[i]; | ||||
|  | ||||
|     Il2CppMultidimensionalArray<N>* genArray = static_cast<Il2CppMultidimensionalArray<N>*>(il2cpp_codegen_object_new(sizeof(Il2CppMultidimensionalArray<N>) + elementSize * arrayLength, arrayType)); | ||||
|     for (uint32_t i = 0; i < N; i++) | ||||
|         genArray->bounds[i] = dimensions[i]; | ||||
|  | ||||
|     return genArray; | ||||
| } | ||||
|  | ||||
| inline int32_t il2cpp_codegen_get_array_length(Il2CppArray* genArray, int32_t dimension) | ||||
| { | ||||
|     return static_cast<int32_t>(reinterpret_cast<Il2CppMultidimensionalArray<1>*>(genArray)->bounds[dimension]); | ||||
| } | ||||
|  | ||||
| inline Type_t* il2cpp_codegen_get_type(Il2CppObject* obj) | ||||
| { | ||||
|     return reinterpret_cast<Type_t*>(tiny::vm::Type::GetTypeFromHandle((intptr_t)obj->klass)); | ||||
| } | ||||
|  | ||||
| inline Type_t* il2cpp_codegen_get_base_type(const Type_t* t) | ||||
| { | ||||
|     const Il2CppReflectionType* type = reinterpret_cast<const Il2CppReflectionType*>(t); | ||||
|     const TinyType* tinyType = type->typeHandle; | ||||
|     uint8_t typeHierarchySize = tinyType->typeHierarchySize; | ||||
|     if (typeHierarchySize == 0) | ||||
|         return NULL; | ||||
|  | ||||
|     return const_cast<Type_t*>(reinterpret_cast<const Type_t*>(tiny::vm::Type::GetTypeFromHandle((intptr_t)(tinyType->GetTypeHierarchy()[typeHierarchySize - 1])))); | ||||
| } | ||||
|  | ||||
| inline MulticastDelegate_t* il2cpp_codegen_create_combined_delegate(Type_t* type, Il2CppArray* delegates, int delegateCount) | ||||
| { | ||||
|     Il2CppMulticastDelegate* result = static_cast<Il2CppMulticastDelegate*>(il2cpp_codegen_object_new(sizeof(Il2CppMulticastDelegate), const_cast<TinyType*>(reinterpret_cast<Il2CppReflectionType*>(type)->typeHandle))); | ||||
|     IL2CPP_OBJECT_SETREF(result, delegates, delegates); | ||||
|     IL2CPP_OBJECT_SETREF(result, m_target, result); | ||||
|     result->delegateCount = delegateCount; | ||||
|     result->invoke_impl = il2cpp_array_get(delegates, Il2CppDelegate*, 0)->multicast_invoke_impl; | ||||
|     result->multicast_invoke_impl = result->invoke_impl; | ||||
|     return reinterpret_cast<MulticastDelegate_t*>(result); | ||||
| } | ||||
|  | ||||
| inline const VirtualInvokeData& il2cpp_codegen_get_virtual_invoke_data(Il2CppMethodSlot slot, const RuntimeObject* obj) | ||||
| { | ||||
|     Assert(slot != kInvalidIl2CppMethodSlot && "il2cpp_codegen_get_virtual_invoke_data got called on a non-virtual method"); | ||||
|     return obj->klass->GetVTable()[slot]; | ||||
| } | ||||
|  | ||||
| inline const VirtualInvokeData& il2cpp_codegen_get_interface_invoke_data(Il2CppMethodSlot slot, const Il2CppObject* obj, TinyType* declaringInterface) | ||||
| { | ||||
|     for (int i = 0; i < obj->klass->interfacesSize; ++i) | ||||
|     { | ||||
|         if (obj->klass->GetInterfaces()[i] == declaringInterface) | ||||
|             return il2cpp_codegen_get_virtual_invoke_data((Il2CppMethodSlot)obj->klass->GetInterfaceOffsets()[i] + slot, obj); | ||||
|     } | ||||
|  | ||||
|     tiny::vm::Exception::Raise(); | ||||
|     IL2CPP_UNREACHABLE; | ||||
| } | ||||
|  | ||||
| inline Exception_t* il2cpp_codegen_get_overflow_exception() | ||||
| { | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline Exception_t* il2cpp_codegen_get_argument_exception(const char* param, const char* msg) | ||||
| { | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| inline Exception_t* il2cpp_codegen_get_missing_method_exception(const char* msg) | ||||
| { | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| NORETURN inline void il2cpp_codegen_no_return() | ||||
| { | ||||
|     IL2CPP_UNREACHABLE; | ||||
| } | ||||
|  | ||||
| NORETURN inline void il2cpp_codegen_raise_exception(Exception_t* ex, RuntimeMethod* lastManagedFrame) | ||||
| { | ||||
|     tiny::vm::Exception::Raise((Il2CppException*)ex); | ||||
|     IL2CPP_UNREACHABLE; | ||||
| } | ||||
|  | ||||
| NORETURN inline void il2cpp_codegen_raise_exception(const char* message) | ||||
| { | ||||
|     tiny::vm::Exception::Raise(message); | ||||
|     IL2CPP_UNREACHABLE; | ||||
| } | ||||
|  | ||||
| NORETURN void il2cpp_codegen_raise_generic_virtual_method_exception(const char* methodFullName); | ||||
|  | ||||
| inline Exception_t* il2cpp_codegen_get_marshal_directive_exception(const char* msg) | ||||
| { | ||||
|     return NULL; | ||||
| } | ||||
|  | ||||
| #define IL2CPP_RAISE_NULL_REFERENCE_EXCEPTION() \ | ||||
|     do {\ | ||||
|         il2cpp_codegen_raise_null_reference_exception();\ | ||||
|         IL2CPP_UNREACHABLE;\ | ||||
|     } while (0) | ||||
|  | ||||
| #define IL2CPP_RAISE_MANAGED_EXCEPTION(ex, lastManagedFrame) \ | ||||
|     do {\ | ||||
|         il2cpp_codegen_raise_exception(ex);\ | ||||
|         IL2CPP_UNREACHABLE;\ | ||||
|     } while (0) | ||||
|  | ||||
| #define IL2CPP_RETHROW_MANAGED_EXCEPTION(ex) \ | ||||
|     do {\ | ||||
|         il2cpp_codegen_raise_exception(ex);\ | ||||
|         IL2CPP_UNREACHABLE;\ | ||||
|     } while (0) | ||||
|  | ||||
| #if _DEBUG | ||||
| #define IL2CPP_ARRAY_BOUNDS_CHECK(index, length) \ | ||||
|     do { \ | ||||
|         if (((uint32_t)(index)) >= ((uint32_t)length)) tiny::vm::Exception::RaiseGetIndexOutOfRangeException(); \ | ||||
|     } while (0) | ||||
| #else | ||||
| #define IL2CPP_ARRAY_BOUNDS_CHECK(index, length) | ||||
| #endif | ||||
|  | ||||
| inline void ArrayElementTypeCheck(Il2CppArray* array, void* value) | ||||
| { | ||||
| } | ||||
|  | ||||
| template<typename FunctionPointerType, size_t dynamicLibraryLength, size_t entryPointLength> | ||||
| inline FunctionPointerType il2cpp_codegen_resolve_pinvoke(const Il2CppNativeChar(&nativeDynamicLibrary)[dynamicLibraryLength], const char(&entryPoint)[entryPointLength], | ||||
|     Il2CppCallConvention callingConvention, Il2CppCharSet charSet, int parameterSize, bool isNoMangle) | ||||
| { | ||||
|     const PInvokeArguments pinvokeArgs = | ||||
|     { | ||||
|         il2cpp::utils::StringView<Il2CppNativeChar>(nativeDynamicLibrary), | ||||
|         il2cpp::utils::StringView<char>(entryPoint), | ||||
|         callingConvention, | ||||
|         charSet, | ||||
|         parameterSize, | ||||
|         isNoMangle | ||||
|     }; | ||||
|  | ||||
|     return reinterpret_cast<FunctionPointerType>(tiny::vm::PlatformInvoke::Resolve(pinvokeArgs)); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T* il2cpp_codegen_marshal_allocate() | ||||
| { | ||||
|     return static_cast<T*>(tiny::vm::PlatformInvoke::MarshalAllocate(sizeof(T))); | ||||
| } | ||||
|  | ||||
| inline char* il2cpp_codegen_marshal_string(String_t* string) | ||||
| { | ||||
|     if (string == NULL) | ||||
|         return NULL; | ||||
|  | ||||
|     Il2CppString* managedString = ((Il2CppString*)string); | ||||
|     return tiny::vm::PlatformInvoke::MarshalCSharpStringToCppString(managedString->chars, managedString->length); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_marshal_string_fixed(String_t* string, char* buffer, uint32_t numberOfCharacters) | ||||
| { | ||||
|     IL2CPP_ASSERT(numberOfCharacters > 0); | ||||
|  | ||||
|     if (string == NULL) | ||||
|     { | ||||
|         *buffer = '\0'; | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     Il2CppString* managedString = ((Il2CppString*)string); | ||||
|     tiny::vm::PlatformInvoke::MarshalCSharpStringToFixedCppStringBuffer(managedString->chars, managedString->length, buffer, numberOfCharacters); | ||||
| } | ||||
|  | ||||
| inline Il2CppChar* il2cpp_codegen_marshal_wstring(String_t* string) | ||||
| { | ||||
|     if (string == NULL) | ||||
|         return NULL; | ||||
|  | ||||
|     Il2CppString* managedString = ((Il2CppString*)string); | ||||
|     return tiny::vm::PlatformInvoke::MarshalCSharpStringToCppWString(managedString->chars, managedString->length); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_marshal_wstring_fixed(String_t* string, Il2CppChar* buffer, uint32_t numberOfCharacters) | ||||
| { | ||||
|     IL2CPP_ASSERT(numberOfCharacters > 0); | ||||
|  | ||||
|     if (string == NULL) | ||||
|     { | ||||
|         *buffer = '\0'; | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     Il2CppString* managedString = ((Il2CppString*)string); | ||||
|     tiny::vm::PlatformInvoke::MarshalCSharpStringToFixedCppWStringBuffer(managedString->chars, managedString->length, buffer, numberOfCharacters); | ||||
| } | ||||
|  | ||||
| inline String_t* il2cpp_codegen_marshal_string_result(const char* value) | ||||
| { | ||||
|     if (value == NULL) | ||||
|         return NULL; | ||||
|  | ||||
|     return reinterpret_cast<String_t*>(tiny::vm::PlatformInvoke::MarshalCppStringToCSharpStringResult(value)); | ||||
| } | ||||
|  | ||||
| inline String_t* il2cpp_codegen_marshal_wstring_result(const Il2CppChar* value) | ||||
| { | ||||
|     if (value == NULL) | ||||
|         return NULL; | ||||
|  | ||||
|     return reinterpret_cast<String_t*>(tiny::vm::PlatformInvoke::MarshalCppWStringToCSharpStringResult(value)); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T* il2cpp_codegen_marshal_allocate_array(size_t length) | ||||
| { | ||||
|     return static_cast<T*>(tiny::vm::PlatformInvoke::MarshalAllocate(sizeof(T) * length)); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_marshal_free(void* ptr) | ||||
| { | ||||
|     tiny::vm::PlatformInvoke::MarshalFree(ptr); | ||||
| } | ||||
|  | ||||
| inline String_t* il2cpp_codegen_marshal_ptr_to_string_ansi(intptr_t ptr) | ||||
| { | ||||
|     return il2cpp_codegen_marshal_string_result(reinterpret_cast<const char*>(ptr)); | ||||
| } | ||||
|  | ||||
| inline intptr_t il2cpp_codegen_marshal_string_to_co_task_mem_ansi(String_t* ptr) | ||||
| { | ||||
|     return reinterpret_cast<intptr_t>(il2cpp_codegen_marshal_string(ptr)); | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_marshal_string_free_co_task_mem(intptr_t ptr) | ||||
| { | ||||
|     il2cpp_codegen_marshal_free(reinterpret_cast<void*>(ptr)); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| struct Il2CppReversePInvokeMethodHolder | ||||
| { | ||||
|     Il2CppReversePInvokeMethodHolder(T** storageAddress) : | ||||
|         m_LastValue(*storageAddress), | ||||
|         m_StorageAddress(storageAddress) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     ~Il2CppReversePInvokeMethodHolder() | ||||
|     { | ||||
|         *m_StorageAddress = m_LastValue; | ||||
|     } | ||||
|  | ||||
| private: | ||||
|     T* const m_LastValue; | ||||
|     T** const m_StorageAddress; | ||||
| }; | ||||
|  | ||||
| inline void* InterlockedExchangeImplRef(void** location, void* value) | ||||
| { | ||||
|     return tiny::icalls::mscorlib::System::Threading::Interlocked::ExchangePointer(location, value); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T InterlockedCompareExchangeImpl(T* location, T value, T comparand) | ||||
| { | ||||
|     return (T)tiny::icalls::mscorlib::System::Threading::Interlocked::CompareExchange_T((void**)location, value, comparand); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| inline T InterlockedExchangeImpl(T* location, T value) | ||||
| { | ||||
|     return (T)InterlockedExchangeImplRef((void**)location, value); | ||||
| } | ||||
|  | ||||
| void il2cpp_codegen_stacktrace_push_frame(TinyStackFrameInfo& frame); | ||||
|  | ||||
| void il2cpp_codegen_stacktrace_pop_frame(); | ||||
|  | ||||
| struct StackTraceSentry | ||||
| { | ||||
|     StackTraceSentry(const RuntimeMethod* method) : m_method(method) | ||||
|     { | ||||
|         TinyStackFrameInfo frame_info; | ||||
|  | ||||
|         frame_info.method = (TinyMethod*)method; | ||||
|  | ||||
|         il2cpp_codegen_stacktrace_push_frame(frame_info); | ||||
|     } | ||||
|  | ||||
|     ~StackTraceSentry() | ||||
|     { | ||||
|         il2cpp_codegen_stacktrace_pop_frame(); | ||||
|     } | ||||
|  | ||||
| private: | ||||
|     const RuntimeMethod* m_method; | ||||
| }; | ||||
|  | ||||
| inline const RuntimeMethod* GetVirtualMethodInfo(RuntimeObject* pThis, Il2CppMethodSlot slot) | ||||
| { | ||||
|     if (!pThis) | ||||
|         tiny::vm::Exception::Raise(); | ||||
|  | ||||
|     return (const RuntimeMethod*)pThis->klass->GetVTable()[slot]; | ||||
| } | ||||
|  | ||||
| inline void il2cpp_codegen_no_reverse_pinvoke_wrapper(const char* methodName, const char* reason) | ||||
| { | ||||
|     std::string message = "No reverse pinvoke wrapper exists for method: '"; | ||||
|     message += methodName; | ||||
|     message += "' because "; | ||||
|     message += reason; | ||||
|     tiny::vm::Runtime::FailFast(message.c_str()); | ||||
| } | ||||
|  | ||||
| #define IL2CPP_TINY_IS_INTERFACE 1 | ||||
| #define IL2CPP_TINY_IS_ABSTRACT 2 | ||||
| #define IL2CPP_TINY_IS_POINTER 4 | ||||
|  | ||||
| inline bool il2cpp_codegen_type_is_interface(Type_t* t) | ||||
| { | ||||
|     const Il2CppReflectionType* type = reinterpret_cast<const Il2CppReflectionType*>(t); | ||||
|     const TinyType* tinyType = type->typeHandle; | ||||
|     if (IL2CPP_TINY_ADDITIONAL_TYPE_METADATA(tinyType->packedVtableSizeAndAdditionalTypeMetadata) & IL2CPP_TINY_IS_INTERFACE) | ||||
|         return true; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_type_is_abstract(Type_t* t) | ||||
| { | ||||
|     const Il2CppReflectionType* type = reinterpret_cast<const Il2CppReflectionType*>(t); | ||||
|     const TinyType* tinyType = type->typeHandle; | ||||
|     if (IL2CPP_TINY_ADDITIONAL_TYPE_METADATA(tinyType->packedVtableSizeAndAdditionalTypeMetadata) & IL2CPP_TINY_IS_ABSTRACT) | ||||
|         return true; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| inline bool il2cpp_codegen_type_is_pointer(Type_t* t) | ||||
| { | ||||
|     const Il2CppReflectionType* type = reinterpret_cast<const Il2CppReflectionType*>(t); | ||||
|     const TinyType* tinyType = type->typeHandle; | ||||
|     if (IL2CPP_TINY_ADDITIONAL_TYPE_METADATA(tinyType->packedVtableSizeAndAdditionalTypeMetadata) & IL2CPP_TINY_IS_POINTER) | ||||
|         return true; | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| void GetGenericValueImpl(RuntimeArray* thisPtr, int32_t pos, T* value) | ||||
| { | ||||
|     // GetGenericValueImpl is only called from the class libs internally and T is never a field | ||||
|     IL2CPP_ASSERT_STACK_PTR(value); | ||||
|     memcpy(value, il2cpp_array_addr_with_size(thisPtr, sizeof(T), pos), sizeof(T)); | ||||
| } | ||||
|  | ||||
| template<typename T> | ||||
| void SetGenericValueImpl(RuntimeArray* thisPtr, int32_t pos, T* value) | ||||
| { | ||||
|     il2cpp_array_setrefwithsize(thisPtr, sizeof(T), pos, value); | ||||
| } | ||||
|  | ||||
| void il2cpp_codegen_marshal_store_last_error(); | ||||
|  | ||||
| template<typename T> | ||||
| inline void* il2cpp_codegen_unsafe_cast(T* ptr) | ||||
| { | ||||
|     return reinterpret_cast<void*>(ptr); | ||||
| } | ||||
							
								
								
									
										18
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Libraries/libil2cpp/include/codegen/il2cpp-codegen.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-codegen-metadata.h" | ||||
|  | ||||
| #if RUNTIME_TINY | ||||
| #include "il2cpp-codegen-tiny.h" | ||||
| #else | ||||
| struct Il2CppStringBuilder; | ||||
| typedef Il2CppStringBuilder RuntimeStringBuilder; | ||||
| #include "il2cpp-codegen-il2cpp.h" | ||||
| #endif | ||||
|  | ||||
| #ifdef GC_H | ||||
| #error It looks like this codegen only header ends up including gc.h from the boehm gc. We should not expose boehmgc to generated code | ||||
| #endif | ||||
| #ifdef MONO_CONFIG_H_WAS_INCLUDED | ||||
| #error It looks like this codegen only header ends up including headers from libmono. We should not expose those to generated code | ||||
| #endif | ||||
							
								
								
									
										103
									
								
								Libraries/libil2cpp/include/debugger/il2cpp-api-debugger.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								Libraries/libil2cpp/include/debugger/il2cpp-api-debugger.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,103 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| // This header defines an extension to the IL2CPP embedding API that the debugger code requires. | ||||
| // It should not include any Mono headers. | ||||
|  | ||||
| #include "il2cpp-api.h" | ||||
|  | ||||
| // These macros were used to build the debugger agent for the now unused Mono runtime backend. | ||||
| // We don't have tha backend any more, but we will keep these macros to avoid code churn. | ||||
| #define VM_DOMAIN_GET_AGENT_INFO(domain) il2cpp_domain_get_agent_info(domain) | ||||
| #define VM_DOMAIN_SET_AGENT_INFO(domain, value) il2cpp_domain_set_agent_info(domain, value) | ||||
| #define VM_DOMAIN_GET_FRIENDLY_NAME(domain) il2cpp_domain_get_friendly_name(domain) | ||||
| #define VM_METHOD_IS_STRING_CTOR(method) il2cpp_method_is_string_ctor(method) | ||||
| #define VM_INFLATED_METHOD_GET_DECLARING(imethod) il2cpp_method_get_generic_definition(imethod) | ||||
| #define VM_INFLATED_METHOD_GET_CLASS_INST(imethod) il2cpp_method_get_generic_class_inst(imethod) | ||||
| #define VM_OBJECT_GET_DOMAIN(object) mono_domain_get() | ||||
| #define VM_GENERIC_CLASS_GET_CONTAINER_CLASS(gklass) il2cpp_generic_class_get_container_class(gklass) | ||||
| #define VM_DEFAULTS_OBJECT_CLASS il2cpp_defaults_object_class() | ||||
| #define VM_DEFAULTS_EXCEPTION_CLASS il2cpp_defaults_exception_class() | ||||
| #define VM_DEFAULTS_CORLIB_IMAGE il2cpp_defaults_corlib_image() | ||||
| #define VM_DEFAULTS_VOID_CLASS il2cpp_defaults_void_class() | ||||
| #define VM_GENERIC_INST_TYPE_ARGC(inst) il2cpp_generic_inst_get_argc(inst) | ||||
| #define VM_GENERIC_INST_TYPE_ARGV(inst, index) il2cpp_generic_inst_get_argv(inst, index) | ||||
| #define VM_IMAGE_GET_MODULE_NAME(image) il2cpp_image_get_name(image) | ||||
|  | ||||
| // These types are used in debugger-agent.c for field access | ||||
| // (not via an API), so we need to map them to the IL2CPP types | ||||
| // so that the field layout is correct. | ||||
| #define MonoArray Il2CppArraySize | ||||
| #define MonoAssembly Il2CppAssembly | ||||
| #define MonoGenericContainer Il2CppGenericContainer | ||||
| #define MonoInternalThread Il2CppInternalThread | ||||
| #define MonoMethod MethodInfo | ||||
| #define MonoObject Il2CppObject | ||||
| #define MonoThread Il2CppThread | ||||
| #define MonoType Il2CppType | ||||
|  | ||||
| // These defines map objects that the debugger-agent.c code uses directly to there | ||||
| // IL2CPP counterparts. | ||||
| #define debug_options il2cpp_mono_debug_options | ||||
| #define mono_defaults il2cpp_mono_defaults | ||||
|  | ||||
| // These are some defines from Mono that the debugger-agent.c code uses. | ||||
| #define MONO_MAX_IREGS 1 | ||||
| #define NOT_IMPLEMENTED do { g_assert_not_reached (); } while (0) | ||||
|  | ||||
| #if IL2CPP_COMPILER_MSVC | ||||
| typedef int32_t (*MonoSuspendThreadCallback) (MonoThreadInfo *info, void* user_data); | ||||
| #else | ||||
| #if defined(__cplusplus) | ||||
| enum SuspendThreadResult : int32_t; | ||||
| #endif | ||||
| typedef SuspendThreadResult (*MonoSuspendThreadCallback) (MonoThreadInfo *info, void* user_data); | ||||
| #endif | ||||
|  | ||||
| #if defined(__cplusplus) | ||||
| extern "C" { | ||||
| #endif | ||||
| // These functions expose the IL2CPP C++ API to C for the debugger using Mono's types. | ||||
| void il2cpp_start_debugger_thread(); | ||||
| Il2CppSequencePoint* il2cpp_get_method_sequence_points(MonoMethod* method, void* *iter); | ||||
| MonoClass* il2cpp_defaults_object_class(); | ||||
| uint8_t* il2cpp_field_get_address(MonoObject *obj, MonoClassField *monoField); | ||||
| MonoClass* il2cpp_defaults_exception_class(); | ||||
| MonoImage* il2cpp_defaults_corlib_image(); | ||||
| bool il2cpp_method_is_string_ctor(const MonoMethod * method); | ||||
| MonoClass* il2cpp_defaults_void_class(); | ||||
| MonoMethod* il2cpp_get_interface_method(MonoClass* klass, MonoClass* itf, int slot); | ||||
| int32_t il2cpp_field_is_deleted(MonoClassField *field); | ||||
| MonoClass* il2cpp_iterate_loaded_classes(void* *iter); | ||||
| const char** il2cpp_get_source_files_for_type(MonoClass *klass, int *count); | ||||
| MonoMethod* il2cpp_method_get_generic_definition(MonoMethodInflated *imethod); | ||||
| MonoGenericInst* il2cpp_method_get_generic_class_inst(MonoMethodInflated *imethod); | ||||
| MonoClass* il2cpp_generic_class_get_container_class(MonoGenericClass *gclass); | ||||
| Il2CppSequencePoint* il2cpp_get_sequence_point(MonoImage* image, int id); | ||||
| char* il2cpp_assembly_get_full_name(MonoAssembly *assembly); | ||||
| const MonoMethod* il2cpp_get_seq_point_method(Il2CppSequencePoint *seqPoint); | ||||
| const MonoClass* il2cpp_get_class_from_index(int index); | ||||
| const MonoType* il2cpp_get_type_from_method_context(MonoType* type, const MonoMethod* method); | ||||
| const MonoType* il2cpp_type_inflate(MonoType* type, const MonoGenericContext* context); | ||||
| void il2cpp_debugger_get_method_execution_context_and_header_info(const MonoMethod* method, uint32_t* executionContextInfoCount, const Il2CppMethodExecutionContextInfo **executionContextInfo, const Il2CppMethodHeaderInfo **headerInfo, const Il2CppMethodScope **scopes); | ||||
| Il2CppThreadUnwindState* il2cpp_debugger_get_thread_context(); | ||||
| const MonoAssembly* il2cpp_m_method_get_assembly(MonoMethod* method); | ||||
| Il2CppSequencePointSourceFile* il2cpp_debug_get_source_file(MonoImage* image, int index); | ||||
| Il2CppCatchPoint* il2cpp_get_method_catch_points(MonoMethod* method, void* *iter); | ||||
| Il2CppSequencePoint* il2cpp_get_seq_point_from_catch_point(Il2CppCatchPoint *cp); | ||||
| size_t il2cpp_type_size(MonoType *t); | ||||
| MonoMethod* il2cpp_get_generic_method_definition(MonoMethod* method); | ||||
| bool il2cpp_class_is_initialized(MonoClass* klass); | ||||
| void* il2cpp_domain_get_agent_info(MonoAppDomain* domain); | ||||
| void il2cpp_domain_set_agent_info(MonoAppDomain* domain, void* agentInfo); | ||||
| const char* il2cpp_domain_get_friendly_name(MonoAppDomain* domain); | ||||
| int il2cpp_generic_inst_get_argc(MonoGenericInst * inst); | ||||
| MonoType* il2cpp_generic_inst_get_argv(MonoGenericInst * inst, int index); | ||||
| MonoObject* il2cpp_assembly_get_object(MonoDomain * domain, MonoAssembly * assembly, MonoError * error); | ||||
| const MonoType* il2cpp_get_type_from_index(int index); | ||||
| void il2cpp_thread_info_safe_suspend_and_run(size_t id, int32_t interrupt_kernel, MonoSuspendThreadCallback callback, void* user_data); | ||||
| MonoGenericParam* il2cpp_generic_container_get_param(MonoGenericContainer * gc, int i); | ||||
| #if defined(__cplusplus) | ||||
| } | ||||
| #endif | ||||
							
								
								
									
										55
									
								
								Libraries/libil2cpp/include/gc/Allocator.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								Libraries/libil2cpp/include/gc/Allocator.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| #pragma once | ||||
| #include "GarbageCollector.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace gc | ||||
| { | ||||
|     template<typename T> | ||||
|     class Allocator | ||||
|     { | ||||
|     public: | ||||
|         typedef size_t    size_type; | ||||
|         typedef ptrdiff_t difference_type; | ||||
|         typedef T*        pointer; | ||||
|         typedef const T*  const_pointer; | ||||
|         typedef T&        reference; | ||||
|         typedef const T&  const_reference; | ||||
|         typedef T         value_type; | ||||
|         typedef Allocator<T> allocator_type; | ||||
|         Allocator() {} | ||||
|         Allocator(const Allocator&) {} | ||||
|  | ||||
|         pointer allocate(size_type n, const void * = 0) | ||||
|         { | ||||
|             T* t = (T*)GarbageCollector::AllocateFixed(n * sizeof(T), 0); | ||||
|             return t; | ||||
|         } | ||||
|  | ||||
|         void deallocate(void* p, size_type) | ||||
|         { | ||||
|             if (p) | ||||
|             { | ||||
|                 GarbageCollector::FreeFixed(p); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         pointer address(reference x) const { return &x; } | ||||
|         const_pointer address(const_reference x) const { return &x; } | ||||
|         Allocator<T>& operator=(const Allocator&) { return *this; } | ||||
|         void construct(pointer p, const T& val) { new((T*)p) T(val); } | ||||
|         void destroy(pointer p) { p->~T(); } | ||||
|  | ||||
|         size_type max_size() const { return size_t(-1); } | ||||
|  | ||||
|         template<class U> | ||||
|         struct rebind { typedef Allocator<U> other; }; | ||||
|  | ||||
|         template<class U> | ||||
|         Allocator(const Allocator<U>&) {} | ||||
|  | ||||
|         template<class U> | ||||
|         Allocator& operator=(const Allocator<U>&) { return *this; } | ||||
|     }; | ||||
| } | ||||
| } | ||||
							
								
								
									
										127
									
								
								Libraries/libil2cpp/include/gc/AppendOnlyGCHashMap.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										127
									
								
								Libraries/libil2cpp/include/gc/AppendOnlyGCHashMap.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,127 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "utils/Il2CppHashMap.h" | ||||
| #include "utils/NonCopyable.h" | ||||
| #include "GarbageCollector.h" | ||||
| #include "os/FastReaderReaderWriterLock.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace gc | ||||
| { | ||||
|     template<class Key, class T, | ||||
|              class HashFcn, | ||||
|              class EqualKey = std::equal_to<Key> > | ||||
|     class AppendOnlyGCHashMap : public il2cpp::utils::NonCopyable | ||||
|     { | ||||
|         typedef Il2CppHashMap<Key, size_t, HashFcn, EqualKey> hash_map_type; | ||||
|         typedef typename Il2CppHashMap<Key, size_t, HashFcn, EqualKey>::const_iterator ConstIterator; | ||||
|     public: | ||||
|  | ||||
|         typedef typename hash_map_type::key_type key_type; | ||||
|         typedef T data_type; | ||||
|         typedef typename hash_map_type::size_type size_type; | ||||
|         typedef typename hash_map_type::hasher hasher; | ||||
|         typedef typename hash_map_type::key_equal key_equal; | ||||
|  | ||||
|         AppendOnlyGCHashMap() : | ||||
|             m_Data(NULL), | ||||
|             m_Size(0) | ||||
|         { | ||||
|         } | ||||
|  | ||||
|         ~AppendOnlyGCHashMap() | ||||
|         { | ||||
|             if (m_Data) | ||||
|                 il2cpp::gc::GarbageCollector::FreeFixed(m_Data); | ||||
|         } | ||||
|  | ||||
|         bool Contains(const Key& k) | ||||
|         { | ||||
|             os::FastReaderReaderWriterAutoSharedLock readLock(&lock); | ||||
|             return m_Map.find(k) != m_Map.end(); | ||||
|         } | ||||
|  | ||||
|         // Returns the existing value if the it was already added or inserts and returns value | ||||
|         T GetOrAdd(const Key& k, T value) | ||||
|         { | ||||
|             os::FastReaderReaderWriterAutoExclusiveLock writeLock(&lock); | ||||
|  | ||||
|             ConstIterator iter = m_Map.find(k); | ||||
|             if (iter != m_Map.end()) | ||||
|             { | ||||
|                 size_t index = iter->second; | ||||
|                 IL2CPP_ASSERT(index <= m_Map.size()); | ||||
|                 return m_Data[index]; | ||||
|             } | ||||
|  | ||||
|             if (m_Size == 0) | ||||
|             { | ||||
|                 m_Size = 8; | ||||
|                 m_Data = (T*)il2cpp::gc::GarbageCollector::AllocateFixed(m_Size * sizeof(T), NULL); | ||||
|                 IL2CPP_ASSERT(m_Data); | ||||
|             } | ||||
|             else if (m_Map.size() == m_Size) | ||||
|             { | ||||
|                 size_t newSize = 2 * m_Size; | ||||
|                 T* newData = (T*)il2cpp::gc::GarbageCollector::AllocateFixed(newSize * sizeof(T), NULL); | ||||
|  | ||||
|                 MemCpyData memCpyData = { newData, m_Data, m_Size * sizeof(T) }; | ||||
|                 // perform memcpy with GC lock held so GC doesn't see torn pointer values.I think this is less of an issue with Boehm than other GCs, but being safe. | ||||
|                 il2cpp::gc::GarbageCollector::CallWithAllocLockHeld(&CopyValues, &memCpyData); | ||||
|  | ||||
|                 il2cpp::gc::GarbageCollector::FreeFixed(m_Data); | ||||
|  | ||||
|                 GarbageCollector::SetWriteBarrier((void**)newData, m_Size * sizeof(T)); | ||||
|  | ||||
|                 m_Size = newSize; | ||||
|                 m_Data = newData; | ||||
|                 IL2CPP_ASSERT(m_Data); | ||||
|             } | ||||
|  | ||||
|             size_t index = m_Map.size(); | ||||
|             m_Map.insert(std::make_pair(k, index)); | ||||
|             m_Data[index] = value; | ||||
|  | ||||
|             GarbageCollector::SetWriteBarrier((void**)(m_Data + index)); | ||||
|  | ||||
|             IL2CPP_ASSERT(m_Map.size() <= m_Size); | ||||
|             return value; | ||||
|         } | ||||
|  | ||||
|         bool TryGetValue(const Key& k, T* value) | ||||
|         { | ||||
|             os::FastReaderReaderWriterAutoSharedLock readLock(&lock); | ||||
|  | ||||
|             ConstIterator iter = m_Map.find(k); | ||||
|             if (iter == m_Map.end()) | ||||
|                 return false; | ||||
|  | ||||
|             size_t index = iter->second; | ||||
|             IL2CPP_ASSERT(index <= m_Map.size()); | ||||
|             *value = m_Data[index]; | ||||
|             return true; | ||||
|         } | ||||
|  | ||||
|     private: | ||||
|         struct MemCpyData | ||||
|         { | ||||
|             void* dst; | ||||
|             const void* src; | ||||
|             size_t size; | ||||
|         }; | ||||
|  | ||||
|         static void* CopyValues(void* arg) | ||||
|         { | ||||
|             MemCpyData* thisPtr = (MemCpyData*)arg; | ||||
|             memcpy(thisPtr->dst, thisPtr->src, thisPtr->size); | ||||
|             return NULL; | ||||
|         } | ||||
|  | ||||
|         Il2CppHashMap<Key, size_t, HashFcn, EqualKey> m_Map; | ||||
|         T* m_Data; | ||||
|         size_t m_Size; | ||||
|         os::FastReaderReaderWriterLock lock; | ||||
|     }; | ||||
| } | ||||
| } | ||||
							
								
								
									
										38
									
								
								Libraries/libil2cpp/include/gc/GCHandle.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								Libraries/libil2cpp/include/gc/GCHandle.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "utils/Expected.h" | ||||
| #include "utils/Il2CppError.h" | ||||
|  | ||||
| #include <stdint.h> | ||||
|  | ||||
| struct Il2CppObject; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace gc | ||||
| { | ||||
|     enum GCHandleType | ||||
|     { | ||||
|         HANDLE_WEAK, | ||||
|         HANDLE_WEAK_TRACK, | ||||
|         HANDLE_NORMAL, | ||||
|         HANDLE_PINNED | ||||
|     }; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API GCHandle | ||||
|     { | ||||
|     public: | ||||
|         // external | ||||
|         static uint32_t New(Il2CppObject *obj, bool pinned); | ||||
|         static utils::Expected<uint32_t> NewWeakref(Il2CppObject *obj, bool track_resurrection); | ||||
|         static Il2CppObject* GetTarget(uint32_t gchandle); | ||||
|         static GCHandleType GetHandleType(uint32_t gcHandle); | ||||
|         static void Free(uint32_t gchandle); | ||||
|     public: | ||||
|         //internal | ||||
|         static utils::Expected<uint32_t> GetTargetHandle(Il2CppObject * obj, int32_t handle, int32_t type); | ||||
|         typedef void(*WalkGCHandleTargetsCallback)(Il2CppObject* obj, void* context); | ||||
|         static void WalkStrongGCHandleTargets(WalkGCHandleTargetsCallback callback, void* context); | ||||
|     }; | ||||
| } /* gc */ | ||||
| } /* il2cpp */ | ||||
							
								
								
									
										114
									
								
								Libraries/libil2cpp/include/gc/GarbageCollector.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										114
									
								
								Libraries/libil2cpp/include/gc/GarbageCollector.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,114 @@ | ||||
| #pragma once | ||||
|  | ||||
| struct Il2CppGuid; | ||||
| struct Il2CppIUnknown; | ||||
| struct Il2CppObject; | ||||
| struct Il2CppThread; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace gc | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API GarbageCollector | ||||
|     { | ||||
|     public: | ||||
|         static void Collect(int maxGeneration); | ||||
|         static int32_t CollectALittle(); | ||||
|         static int32_t GetCollectionCount(int32_t generation); | ||||
|         static int64_t GetUsedHeapSize(); | ||||
| #if IL2CPP_ENABLE_WRITE_BARRIERS | ||||
|         static void SetWriteBarrier(void **ptr); | ||||
|         static void SetWriteBarrier(void **ptr, size_t numBytes); | ||||
| #else | ||||
|         static inline void SetWriteBarrier(void **ptr) {} | ||||
|         static inline void SetWriteBarrier(void **ptr, size_t numBytes) {} | ||||
| #endif | ||||
|  | ||||
|     public: | ||||
|         // internal | ||||
|         typedef void (*FinalizerCallback)(void* object, void* client_data); | ||||
|  | ||||
|         // functions implemented in a GC agnostic manner | ||||
|         static void UninitializeGC(); | ||||
|         static void AddMemoryPressure(int64_t value); | ||||
|         static int32_t GetMaxGeneration(); | ||||
|         static int32_t GetGeneration(void* addr); | ||||
| #if !RUNTIME_TINY | ||||
|         static void InitializeFinalizer(); | ||||
|         static bool IsFinalizerThread(Il2CppThread* thread); | ||||
|         static void UninitializeFinalizers(); | ||||
|         static void NotifyFinalizers(); | ||||
|         static void RunFinalizer(void *obj, void *data); | ||||
|         static void RegisterFinalizerForNewObject(Il2CppObject* obj); | ||||
|         static void RegisterFinalizer(Il2CppObject* obj); | ||||
|         static void SuppressFinalizer(Il2CppObject* obj); | ||||
|         static void WaitForPendingFinalizers(); | ||||
|         static Il2CppIUnknown* GetOrCreateCCW(Il2CppObject* obj, const Il2CppGuid& iid); | ||||
| #endif | ||||
|  | ||||
|         // functions implemented in a GC specific manner | ||||
|         static void Initialize(); | ||||
|  | ||||
|         // Deprecated. Remove when Unity has switched to mono_unity_gc_set_mode | ||||
|         static void Enable(); | ||||
|         // Deprecated. Remove when Unity has switched to mono_unity_gc_set_mode | ||||
|         static void Disable(); | ||||
|         // Deprecated. Remove when Unity has switched to mono_unity_gc_set_mode | ||||
|         static bool IsDisabled(); | ||||
|  | ||||
|         static void SetMode(Il2CppGCMode mode); | ||||
|  | ||||
|         static bool IsIncremental(); | ||||
|         static void StartIncrementalCollection(); | ||||
|  | ||||
|         static int64_t GetMaxTimeSliceNs(); | ||||
|         static void SetMaxTimeSliceNs(int64_t maxTimeSlice); | ||||
|  | ||||
|         static FinalizerCallback RegisterFinalizerWithCallback(Il2CppObject* obj, FinalizerCallback callback); | ||||
|  | ||||
|         static int64_t GetAllocatedHeapSize(); | ||||
|  | ||||
|         static void* MakeDescriptorForObject(size_t *bitmap, int numbits); | ||||
|         static void* MakeDescriptorForString(); | ||||
|         static void* MakeDescriptorForArray(); | ||||
|  | ||||
| #if RUNTIME_TINY | ||||
|         static void* Allocate(size_t size); | ||||
|         static void* AllocateObject(size_t size, void* type); | ||||
| #endif | ||||
|  | ||||
|         static void* AllocateFixed(size_t size, void *descr); | ||||
|         static void FreeFixed(void* addr); | ||||
|  | ||||
|         static bool RegisterThread(void *baseptr); | ||||
|         static bool UnregisterThread(); | ||||
|  | ||||
| #if !RUNTIME_TINY | ||||
|         static bool HasPendingFinalizers(); | ||||
|         static int32_t InvokeFinalizers(); | ||||
| #endif | ||||
|  | ||||
|         static void AddWeakLink(void **link_addr, Il2CppObject *obj, bool track); | ||||
|         static void RemoveWeakLink(void **link_addr); | ||||
|         static Il2CppObject *GetWeakLink(void **link_addr); | ||||
|  | ||||
|         /* Used by liveness code */ | ||||
|         static void StopWorld(); | ||||
|         static void StartWorld(); | ||||
|  | ||||
|         typedef void (*HeapSectionCallback) (void* user_data, void* start, void* end); | ||||
|         static void ForEachHeapSection(void* user_data, HeapSectionCallback callback); | ||||
|         static size_t GetSectionCount(); | ||||
|  | ||||
|         typedef void* (*GCCallWithAllocLockCallback)(void* user_data); | ||||
|         static void* CallWithAllocLockHeld(GCCallWithAllocLockCallback callback, void* user_data); | ||||
|  | ||||
|         static void RegisterRoot(char *start, size_t size); | ||||
|         static void UnregisterRoot(char* start); | ||||
|  | ||||
|         static void SetSkipThread(bool skip); | ||||
|  | ||||
|         static bool EphemeronArrayAdd(Il2CppObject* obj); | ||||
|     }; | ||||
| } /* namespace vm */ | ||||
| } /* namespace il2cpp */ | ||||
							
								
								
									
										43
									
								
								Libraries/libil2cpp/include/gc/WriteBarrier.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								Libraries/libil2cpp/include/gc/WriteBarrier.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <type_traits> | ||||
|  | ||||
| struct Il2CppObject; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace gc | ||||
| { | ||||
|     class WriteBarrier | ||||
|     { | ||||
|     public: | ||||
|         static void GenericStore(void** ptr, void* value); | ||||
|  | ||||
|         template<typename TPtr, typename TValue> | ||||
|         static void GenericStore(TPtr** ptr, TValue* value) | ||||
|         { | ||||
|             static_assert((std::is_assignable<TPtr*&, TValue*>::value), "Pointers types are not assignment compatible"); | ||||
|             GenericStore((void**)ptr, (void*)value); | ||||
|         } | ||||
|  | ||||
|         template<typename TPtr> | ||||
|         static void GenericStoreNull(TPtr** ptr) | ||||
|         { | ||||
|             *ptr = NULL; | ||||
|         } | ||||
|     }; | ||||
| } /* gc */ | ||||
| } /* il2cpp */ | ||||
|  | ||||
| #define IL2CPP_OBJECT_SETREF(obj, fieldname, value) do {\ | ||||
|         il2cpp::gc::WriteBarrier::GenericStore(&(obj)->fieldname, (value));\ | ||||
|     } while (0) | ||||
|  | ||||
| /* This should be used if 's' can reside on the heap */ | ||||
| #define IL2CPP_STRUCT_SETREF(s, fieldname, value) do {\ | ||||
|         il2cpp::gc::WriteBarrier::GenericStore(&(s)->fieldname, (value));\ | ||||
|     } while (0) | ||||
|  | ||||
| #define IL2CPP_OBJECT_SETREF_NULL(obj, fieldname) do {\ | ||||
|         il2cpp::gc::WriteBarrier::GenericStoreNull(&(obj)->fieldname);\ | ||||
|     } while (0) | ||||
							
								
								
									
										22
									
								
								Libraries/libil2cpp/include/gc/WriteBarrierValidation.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Libraries/libil2cpp/include/gc/WriteBarrierValidation.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| #if IL2CPP_ENABLE_WRITE_BARRIER_VALIDATION | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace gc | ||||
| { | ||||
|     class WriteBarrierValidation | ||||
|     { | ||||
|     public: | ||||
|         typedef void(*ExternalAllocationTrackerFunction)(void*, size_t, int); | ||||
|         static void SetExternalAllocationTracker(ExternalAllocationTrackerFunction func); | ||||
|         typedef void(*ExternalWriteBarrierTrackerFunction)(void**); | ||||
|         static void SetExternalWriteBarrierTracker(ExternalWriteBarrierTrackerFunction func); | ||||
|  | ||||
|         static void Setup(); | ||||
|         static void Run(); | ||||
|     }; | ||||
| } /* gc */ | ||||
| } /* il2cpp */ | ||||
| #endif | ||||
							
								
								
									
										28
									
								
								Libraries/libil2cpp/include/gc/gc_wrapper.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								Libraries/libil2cpp/include/gc/gc_wrapper.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| #if IL2CPP_GC_BOEHM | ||||
|  | ||||
| /* here is the defines we build Boehm with */ | ||||
|     #define IGNORE_DYNAMIC_LOADING 1 | ||||
|     #define GC_DONT_REGISTER_MAIN_STATIC_DATA 1 | ||||
|     #if IL2CPP_HAS_GC_DESCRIPTORS | ||||
|     #define GC_GCJ_SUPPORT 1 | ||||
|     #endif | ||||
|     #if IL2CPP_SUPPORT_THREADS | ||||
|         #define GC_THREADS 1 | ||||
|     #endif | ||||
|  | ||||
|     #include "gc.h" | ||||
|     #include "gc_typed.h" | ||||
|     #include "gc_mark.h" | ||||
|     #include "gc_gcj.h" | ||||
|     #include "gc_vector.h" | ||||
|  | ||||
|     #define GC_NO_DESCRIPTOR ((void*)(0 | GC_DS_LENGTH)) | ||||
|  | ||||
| #else | ||||
|     #define GC_NO_DESCRIPTOR ((void*)0) | ||||
|  | ||||
| #endif | ||||
| @@ -0,0 +1,36 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Core | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace IO | ||||
| { | ||||
| namespace MemoryMappedFiles | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API MemoryMapImpl | ||||
|     { | ||||
|     public: | ||||
|         static bool Unmap(intptr_t mmap_handle); | ||||
|         static int32_t MapInternal(intptr_t handle, int64_t offset, int64_t* size, int32_t access, intptr_t* mmap_handle, intptr_t* base_address); | ||||
|         static intptr_t OpenFileInternal(Il2CppChar* path, int32_t path_length, int32_t mode, Il2CppChar* mapName, int32_t mapName_length, int64_t* capacity, int32_t access, int32_t options, int32_t* error); | ||||
|         static intptr_t OpenHandleInternal(intptr_t handle, Il2CppChar* mapName, int32_t mapName_length, int64_t* capacity, int32_t access, int32_t options, int32_t* error); | ||||
|         static void CloseMapping(intptr_t handle); | ||||
|         static void ConfigureHandleInheritability(intptr_t handle, int32_t inheritability); | ||||
|         static void Flush(intptr_t file_handle); | ||||
|     }; | ||||
| } // namespace MemoryMappedFiles | ||||
| } // namespace IO | ||||
| } // namespace System | ||||
| } // namespace Core | ||||
| } // namespace System | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,34 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Microsoft | ||||
| { | ||||
| namespace Win32 | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API NativeMethods | ||||
|     { | ||||
|     public: | ||||
|         static bool CloseProcess(intptr_t handle); | ||||
|         static bool GetExitCodeProcess(intptr_t processHandle, int32_t* exitCode); | ||||
|         static bool GetProcessTimes(intptr_t handle, int64_t* creation, int64_t* exit, int64_t* kernel, int64_t* user); | ||||
|         static bool GetProcessWorkingSetSize(intptr_t handle, intptr_t* min, intptr_t* max); | ||||
|         static bool SetPriorityClass(intptr_t handle, int32_t priorityClass); | ||||
|         static bool SetProcessWorkingSetSize(intptr_t handle, intptr_t min, intptr_t max); | ||||
|         static bool TerminateProcess(intptr_t processHandle, int32_t exitCode); | ||||
|         static int32_t GetCurrentProcessId(); | ||||
|         static int32_t GetPriorityClass(intptr_t handle); | ||||
|         static int32_t WaitForInputIdle(intptr_t handle, int32_t milliseconds); | ||||
|         static intptr_t GetCurrentProcess(); | ||||
|     }; | ||||
| } // namespace Win32 | ||||
| } // namespace Microsoft | ||||
| } // namespace System | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,28 @@ | ||||
| #pragma once | ||||
|  | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
| namespace Net | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API MonoTlsProviderFactory | ||||
|     { | ||||
|     public: | ||||
|         static bool IsBtlsSupported(); | ||||
|         static Il2CppString* GetDefaultProviderForPlatform(); | ||||
|     }; | ||||
| } // namespace Security | ||||
| } // namespace Net | ||||
| } // namespace Mono | ||||
| } // namespace System | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,38 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API DefaultTraceListener | ||||
|     { | ||||
|     public: | ||||
|         static void WriteWindowsDebugString(Il2CppChar* message); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API FileVersionInfo | ||||
|     { | ||||
|     public: | ||||
|         static void GetVersionInfo_icall(Il2CppObject* thisPtr, Il2CppChar* fileName, int32_t fileName_length); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,33 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     struct ProcInfo; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API Process | ||||
|     { | ||||
|     public: | ||||
|         static bool CreateProcess_internal(Il2CppObject* startInfo, intptr_t _stdin, intptr_t _stdout, intptr_t _stderr, ProcInfo* procInfo); | ||||
|         static bool ShellExecuteEx_internal(Il2CppObject* startInfo, ProcInfo* procInfo); | ||||
|         static Il2CppArray* GetModules_icall(Il2CppObject* thisPtr, intptr_t handle); | ||||
|         static Il2CppArray* GetProcesses_internal(); | ||||
|         static int64_t GetProcessData(int32_t pid, int32_t data_type, int32_t* error); | ||||
|         static intptr_t GetProcess_internal(int32_t pid); | ||||
|         static Il2CppString* ProcessName_icall(intptr_t handle); | ||||
|         static intptr_t MainWindowHandle_icall(int32_t pid); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,25 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Stopwatch | ||||
|     { | ||||
|     public: | ||||
|         static int64_t GetTimestamp(); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,38 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace IO | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API FileSystemWatcher | ||||
|     { | ||||
|     public: | ||||
|         static int32_t InternalSupportsFSW(); | ||||
|     }; | ||||
| } /* namespace IO */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,25 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Net | ||||
| { | ||||
| namespace NetworkInformation | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API MacOsIPInterfaceProperties | ||||
|     { | ||||
|     public: | ||||
|         static bool ParseRouteInfo_icall(Il2CppString* iface, Il2CppArray** gw_addr_list); | ||||
|     }; | ||||
| } // namespace NetworkInformation | ||||
| } // namespace Net | ||||
| } // namespace System | ||||
| } // namespace System | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,251 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppArray; | ||||
| struct Il2CppObject; | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace os | ||||
| { | ||||
|     struct WSABuf; | ||||
| } | ||||
| } | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Net | ||||
| { | ||||
| namespace Sockets | ||||
| { | ||||
|     enum AddressFamily | ||||
|     { | ||||
|         kAddressFamilyUnknown           = -1, | ||||
|         kAddressFamilyUnspecified       = 0, | ||||
|         kAddressFamilyUnix              = 1, | ||||
|         kAddressFamilyInterNetwork      = 2, | ||||
|         kAddressFamilyImpLink           = 3, | ||||
|         kAddressFamilyPup               = 4, | ||||
|         kAddressFamilyChaos             = 5, | ||||
|         kAddressFamilyNS                = 6, | ||||
|         kAddressFamilyIpx               = 6, | ||||
|         kAddressFamilyIso               = 7, | ||||
|         kAddressFamilyOsi               = 7, | ||||
|         kAddressFamilyEcma              = 8, | ||||
|         kAddressFamilyDataKit           = 9, | ||||
|         kAddressFamilyCcitt             = 10, | ||||
|         kAddressFamilySna               = 11, | ||||
|         kAddressFamilyDecNet            = 12, | ||||
|         kAddressFamilyDataLink          = 13, | ||||
|         kAddressFamilyLat               = 14, | ||||
|         kAddressFamilyHyperChannel      = 15, | ||||
|         kAddressFamilyAppleTalk         = 16, | ||||
|         kAddressFamilyNetBios           = 17, | ||||
|         kAddressFamilyVoiceView         = 18, | ||||
|         kAddressFamilyFireFox           = 19, | ||||
|         kAddressFamilyBanyan            = 21, | ||||
|         kAddressFamilyAtm               = 22, | ||||
|         kAddressFamilyInterNetworkV6    = 23, | ||||
|         kAddressFamilyCluster           = 24, | ||||
|         kAddressFamilyIeee12844         = 25, | ||||
|         kAddressFamilyIrda              = 26, | ||||
|         kAddressFamilyNetworkDesigners  = 28, | ||||
|         kAddressFamilyMax               = 29, | ||||
|     }; | ||||
|  | ||||
|     enum SocketType | ||||
|     { | ||||
|         kSocketTypeUnknown  = -1, | ||||
|         kSocketTypeStream   = 1, | ||||
|         kSocketTypeDgram    = 2, | ||||
|         kSocketTypeRaw      = 3, | ||||
|         kSocketTypeRdm      = 4, | ||||
|         kSocketTypeSeqpacket = 5, | ||||
|     }; | ||||
|  | ||||
|     enum ProtocolType | ||||
|     { | ||||
|         kProtocolTypeUnknown                            = -1, | ||||
|         kProtocolTypeIP                                 = 0, | ||||
|         kProtocolTypeIcmp                               = 1, | ||||
|         kProtocolTypeIgmp                               = 2, | ||||
|         kProtocolTypeGgp                                = 3, | ||||
|         kProtocolTypeTcp                                = 6, | ||||
|         kProtocolTypePup                                = 12, | ||||
|         kProtocolTypeUdp                                = 17, | ||||
|         kProtocolTypeIdp                                = 22, | ||||
|         kProtocolTypeND                                 = 77, | ||||
|         kProtocolTypeRaw                                = 255, | ||||
|         kProtocolTypeUnspecified                        = 0, | ||||
|         kProtocolTypeIpx                                = 1000, | ||||
|         kProtocolTypeSpx                                = 1256, | ||||
|         kProtocolTypeSpxII                              = 1257, | ||||
|  | ||||
| // #if NET_1_1 | ||||
|         kProtocolTypeIPv6                               = 41, | ||||
| // #endif | ||||
|  | ||||
| // #if NET_2_0 | ||||
|         kProtocolTypeIPv4                               = 4, | ||||
|         kProtocolTypeIPv6RoutingHeader                  = 43, | ||||
|         kProtocolTypeIPv6FragmentHeader                 = 44, | ||||
|         kProtocolTypeIPSecEncapsulatingSecurityPayload  = 50, | ||||
|         kProtocolTypeIPSecAuthenticationHeader          = 51, | ||||
|         kProtocolTypeIcmpV6                             = 58, | ||||
|         kProtocolTypeIPv6NoNextHeader                   = 59, | ||||
|         kProtocolTypeIPv6DestinationOptions             = 60, | ||||
|         kProtocolTypeIPv6HopByHopOptions                = 0, | ||||
| // #endif | ||||
|     }; | ||||
|  | ||||
|     enum SocketOptionLevel | ||||
|     { | ||||
|         kSocketOptionLevelSocket    = 65535, | ||||
|         kSocketOptionLevelIP        = 0, | ||||
|         kSocketOptionLevelTcp       = 6, | ||||
|         kSocketOptionLevelUdp       = 17, | ||||
|  | ||||
| //#if NET_1_1 | ||||
|         kSocketOptionLevelIPv6      = 41, | ||||
| //#endif | ||||
|     }; | ||||
|  | ||||
|     enum SocketOptionName | ||||
|     { | ||||
|         kSocketOptionNameDebug                  = 1, | ||||
|         kSocketOptionNameAcceptConnection       = 2, | ||||
|         kSocketOptionNameReuseAddress           = 4, | ||||
|         kSocketOptionNameKeepAlive              = 8, | ||||
|         kSocketOptionNameDontRoute              = 16, | ||||
|         kSocketOptionNameBroadcast              = 32, | ||||
|         kSocketOptionNameUseLoopback            = 64, | ||||
|         kSocketOptionNameLinger                 = 128, | ||||
|         kSocketOptionNameOutOfBandInline        = 256, | ||||
|         kSocketOptionNameDontLinger             = -129, | ||||
|         kSocketOptionNameExclusiveAddressUse    = -5, | ||||
|         kSocketOptionNameSendBuffer             = 4097, | ||||
|         kSocketOptionNameReceiveBuffer          = 4098, | ||||
|         kSocketOptionNameSendLowWater           = 4099, | ||||
|         kSocketOptionNameReceiveLowWater        = 4100, | ||||
|         kSocketOptionNameSendTimeout            = 4101, | ||||
|         kSocketOptionNameReceiveTimeout         = 4102, | ||||
|         kSocketOptionNameError                  = 4103, | ||||
|         kSocketOptionNameType                   = 4104, | ||||
|         kSocketOptionNameMaxConnections         = 2147483647, | ||||
|         kSocketOptionNameIPOptions              = 1, | ||||
|         kSocketOptionNameHeaderIncluded         = 2, | ||||
|         kSocketOptionNameTypeOfService          = 3, | ||||
|         kSocketOptionNameIpTimeToLive           = 4, | ||||
|         kSocketOptionNameMulticastInterface     = 9, | ||||
|         kSocketOptionNameMulticastTimeToLive    = 10, | ||||
|         kSocketOptionNameMulticastLoopback      = 11, | ||||
|         kSocketOptionNameAddMembership          = 12, | ||||
|         kSocketOptionNameDropMembership         = 13, | ||||
|         kSocketOptionNameDontFragment           = 14, | ||||
|         kSocketOptionNameAddSourceMembership    = 15, | ||||
|         kSocketOptionNameDropSourceMembership   = 16, | ||||
|         kSocketOptionNameBlockSource            = 17, | ||||
|         kSocketOptionNameUnblockSource          = 18, | ||||
|         kSocketOptionNamePacketInformation      = 19, | ||||
|         kSocketOptionNameNoDelay                = 1, | ||||
|         kSocketOptionNameBsdUrgent              = 2, | ||||
|         kSocketOptionNameExpedited              = 2, | ||||
|         kSocketOptionNameNoChecksum             = 1, | ||||
|         kSocketOptionNameChecksumCoverage       = 20, | ||||
|  | ||||
| // #if NET_2_0 | ||||
|         kSocketOptionNameHopLimit               = 21, | ||||
|         kSocketOptionNameUpdateAcceptContext    = 28683, | ||||
|         kSocketOptionNameUpdateConnectContext   = 28688, | ||||
| // #endif | ||||
|     }; | ||||
|  | ||||
|     enum SelectMode | ||||
|     { | ||||
|         kSelectModeSelectRead   = 0, | ||||
|         kSelectModeSelectWrite  = 1, | ||||
|         kSelectModeSelectError  = 2, | ||||
|     }; | ||||
|  | ||||
|     enum SocketFlags | ||||
|     { | ||||
|         kSocketFlagsNone                    = 0x00000000, | ||||
|         kSocketFlagsOutOfBand               = 0x00000001, | ||||
|         kSocketFlagsPeek                    = 0x00000002, | ||||
|         kSocketFlagsDontRoute               = 0x00000004, | ||||
|         kSocketFlagsMaxIOVectorLength       = 0x00000010, | ||||
| // #if NET_2_0 | ||||
|         kSocketFlagsTruncated               = 0x00000100, | ||||
|         kSocketFlagsControlDataTruncated    = 0x00000200, | ||||
|         kSocketFlagsBroadcast               = 0x00000400, | ||||
|         kSocketFlagsMulticast               = 0x00000800, | ||||
| // #endif | ||||
|         kSocketFlagsPartial                 = 0x00008000, | ||||
|     }; | ||||
|  | ||||
|     enum TransmitFileOptions | ||||
|     { | ||||
|         kTransmitFileOptionsUseDefaultWorkerThread  = 0x00000000, | ||||
|         kTransmitFileOptionsDisconnect              = 0x00000001, | ||||
|         kTransmitFileOptionsReuseSocket             = 0x00000002, | ||||
|         kTransmitFileOptionsWriteBehind             = 0x00000004, | ||||
|         kTransmitFileOptionsUseSystemThread         = 0x00000010, | ||||
|         kTransmitFileOptionsUseKernelApc            = 0x00000020, | ||||
|     }; | ||||
|  | ||||
|     enum SocketShutdown | ||||
|     { | ||||
|         kSocketShutdownReceive  = 0, | ||||
|         kSocketShutdownSend     = 1, | ||||
|         kSocketShutdownBoth     = 2, | ||||
|     }; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API Socket | ||||
|     { | ||||
|     public: | ||||
|         static bool Duplicate_icall(intptr_t handle, int32_t targetProcessId, intptr_t* duplicateHandle, int32_t* error); | ||||
|         static bool IsProtocolSupported_internal(int32_t networkInterface); | ||||
|         static bool Poll_icall(intptr_t socket, SelectMode mode, int32_t timeout, int32_t* error); | ||||
|         static bool SendFile_icall(intptr_t socket, Il2CppString* filename, Il2CppArray* pre_buffer, Il2CppArray* post_buffer, TransmitFileOptions flags, int32_t* error, bool blocking); | ||||
|         static bool SupportsPortReuse(int32_t proto); | ||||
|         static int32_t Available_icall(intptr_t socket, int32_t* error); | ||||
|         static int32_t IOControl_icall(intptr_t socket, int32_t ioctl_code, Il2CppArray* input, Il2CppArray* output, int32_t* error); | ||||
|         static int32_t Receive_array_icall(intptr_t socket, os::WSABuf* bufarray, int32_t count, SocketFlags flags, int32_t *error, bool blocking); | ||||
|         static int32_t Receive_icall(intptr_t socket, uint8_t* buffer, int32_t count, SocketFlags flags, int32_t* error, bool blocking); | ||||
|         static int32_t ReceiveFrom_icall(intptr_t socket, uint8_t* buffer, int32_t count, SocketFlags flags, Il2CppSocketAddress** socket_address, int32_t* error, bool blocking); | ||||
|         static int32_t Send_array_icall(intptr_t socket, os::WSABuf* bufarray, int32_t count, SocketFlags flags, int32_t* error, bool blocking); | ||||
|         static int32_t Send_icall(intptr_t socket, uint8_t* buffer, int32_t count, SocketFlags flags, int32_t* error, bool blocking); | ||||
|         static int32_t SendTo_icall(intptr_t socket, uint8_t* buffer, int32_t count, SocketFlags flags, Il2CppSocketAddress* socket_address, int32_t* error, bool blocking); | ||||
|         static intptr_t Accept_icall(intptr_t socket, int32_t* error, bool blocking); | ||||
|         static intptr_t Socket_icall(AddressFamily family, SocketType type, ProtocolType proto, int32_t* error); | ||||
|         static Il2CppSocketAddress* LocalEndPoint_icall(intptr_t socket, int32_t family, int32_t* error); | ||||
|         static Il2CppSocketAddress* RemoteEndPoint_icall(intptr_t socket, int32_t family, int32_t* error); | ||||
|         static void Bind_icall(intptr_t socket, Il2CppSocketAddress* socket_address, int32_t* error); | ||||
|         static void Blocking_icall(intptr_t socket, bool block, int32_t* error); | ||||
|         static void cancel_blocking_socket_operation(Il2CppObject* thread); | ||||
|         static void Close_icall(intptr_t socket, int32_t* error); | ||||
|         static void Connect_icall(intptr_t socket, Il2CppSocketAddress* sa, int32_t* error, bool blocking); | ||||
|         static void Disconnect_icall(intptr_t socket, bool reuse, int32_t* error); | ||||
|         static void GetSocketOption_arr_icall(intptr_t socket, SocketOptionLevel level, SocketOptionName name, Il2CppArray** byte_val, int32_t *error); | ||||
|         static void GetSocketOption_obj_icall(intptr_t socket, SocketOptionLevel level, SocketOptionName name, Il2CppObject** obj_val, int32_t *error); | ||||
|         static void Listen_icall(intptr_t socket, int32_t backlog, int32_t* error); | ||||
|         static void Select_icall(Il2CppArray** sockets, int32_t microSeconds, int32_t* error); | ||||
|         static void SetSocketOption_icall(intptr_t socket, SocketOptionLevel level, SocketOptionName name, Il2CppObject* obj_val, Il2CppArray* byte_val, int32_t int_val, int32_t* error); | ||||
|         static void Shutdown_icall(intptr_t socket, SocketShutdown how, int32_t* error); | ||||
|     }; | ||||
| } /* namespace Sockets */ | ||||
| } /* namespace Net */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,31 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppArray; | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Net | ||||
| { | ||||
| namespace Sockets | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API SocketException | ||||
|     { | ||||
|     public: | ||||
|         static int32_t WSAGetLastError_icall(); | ||||
|     }; | ||||
| } /* namespace Sockets */ | ||||
| } /* namespace Net */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
							
								
								
									
										30
									
								
								Libraries/libil2cpp/include/icalls/System/System.Net/Dns.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								Libraries/libil2cpp/include/icalls/System/System.Net/Dns.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppArray; | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Net | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Dns | ||||
|     { | ||||
|     public: | ||||
|         static bool GetHostByAddr_icall(Il2CppString* addr, Il2CppString** h_name, Il2CppArray** h_aliases, Il2CppArray** h_addr_list, int32_t hint); | ||||
|         static bool GetHostByName_icall(Il2CppString* host, Il2CppString** h_name, Il2CppArray** h_aliases, Il2CppArray** h_addr_list, int32_t hint); | ||||
|         static bool GetHostName_icall(Il2CppString** h_name); | ||||
|     }; | ||||
| } /* namespace Net */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,26 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Semaphore | ||||
|     { | ||||
|     public: | ||||
|         static bool ReleaseSemaphore_internal(intptr_t handle, int32_t releaseCount, int32_t* previousCount); | ||||
|         static intptr_t CreateSemaphore_icall(int32_t initialCount, int32_t maximumCount, Il2CppChar* name, int32_t name_length, int32_t* errorCode); | ||||
|         static intptr_t OpenSemaphore_icall(Il2CppChar* name, int32_t name_length, int32_t rights, int32_t* errorCode); | ||||
|     }; | ||||
| } /* namespace Threading */ | ||||
| } /* namespace System */ | ||||
| } /* namespace System */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
							
								
								
									
										22
									
								
								Libraries/libil2cpp/include/icalls/mscorlib/Interop.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Libraries/libil2cpp/include/icalls/mscorlib/Interop.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| struct Il2CppMonoAssemblyName; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Interop | ||||
|     { | ||||
|     public: | ||||
|         class LIBIL2CPP_CODEGEN_API Sys | ||||
|         { | ||||
|         public: | ||||
|             static int32_t DoubleToString(double value, char* format, char* buffer, int32_t bufferLength); | ||||
|         }; | ||||
|     }; | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Microsoft | ||||
| { | ||||
| namespace Win32 | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API NativeMethods | ||||
|     { | ||||
|     public: | ||||
|         static int32_t GetCurrentProcessId(); | ||||
|     }; | ||||
| } // namespace Win32 | ||||
| } // namespace Microsoft | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,29 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
| namespace Cryptography | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API KeyPairPersistence | ||||
|     { | ||||
|     public: | ||||
|         static bool _CanSecure(Il2CppChar* root); | ||||
|         static bool _IsMachineProtected(Il2CppChar* path); | ||||
|         static bool _IsUserProtected(Il2CppChar* path); | ||||
|         static bool _ProtectMachine(Il2CppChar* path); | ||||
|         static bool _ProtectUser(Il2CppChar* path); | ||||
|     }; | ||||
| } /* namespace Cryptography */ | ||||
| } /* namespace Security */ | ||||
| } /* namespace Mono */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,23 @@ | ||||
| #pragma once | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
| namespace Unity | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API UnityTls | ||||
|     { | ||||
|     public: | ||||
|         static const void* GetUnityTlsInterface(); | ||||
|     }; | ||||
| } /* namespace Unity */ | ||||
| } /* namespace Mono */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
							
								
								
									
										32
									
								
								Libraries/libil2cpp/include/icalls/mscorlib/Mono/Runtime.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Libraries/libil2cpp/include/icalls/mscorlib/Mono/Runtime.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Runtime | ||||
|     { | ||||
|     public: | ||||
|         static int32_t CheckCrashReportLog_internal(intptr_t directory, bool clear); | ||||
|         static Il2CppString* DumpStateSingle_internal(uint64_t* portable_hash, uint64_t* unportable_hash); | ||||
|         static Il2CppString* DumpStateTotal_internal(uint64_t* portable_hash, uint64_t* unportable_hash); | ||||
|         static Il2CppString* ExceptionToState_internal(Il2CppException* exc, uint64_t* portable_hash, uint64_t* unportable_hash); | ||||
|         static Il2CppString* GetDisplayName(); | ||||
|         static Il2CppString* GetNativeStackTrace(Il2CppException* exception); | ||||
|         static void AnnotateMicrosoftTelemetry_internal(intptr_t key, intptr_t val); | ||||
|         static void EnableCrashReportLog_internal(intptr_t directory); | ||||
|         static void mono_runtime_cleanup_handlers(); | ||||
|         static void mono_runtime_install_handlers(); | ||||
|         static void RegisterReportingForAllNativeLibs_internal(); | ||||
|         static void RegisterReportingForNativeLib_internal(intptr_t modulePathSuffix, intptr_t moduleName); | ||||
|     }; | ||||
| } /* namespace Mono */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,21 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeClassHandle | ||||
|     { | ||||
|     public: | ||||
|         static intptr_t GetTypeFromClass(Il2CppClass* klass); | ||||
|     }; | ||||
| } // namespace Mono | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,19 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeGPtrArrayHandle | ||||
|     { | ||||
|     public: | ||||
|         static void GPtrArrayFree(void* value); | ||||
|     }; | ||||
| } // namespace Mono | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,21 @@ | ||||
| #pragma once | ||||
|  | ||||
| struct Il2CppMonoAssemblyName; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeMarshal | ||||
|     { | ||||
|     public: | ||||
|         static void FreeAssemblyName(Il2CppMonoAssemblyName* name, bool freeStruct); | ||||
|     }; | ||||
| } // namespace Mono | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace Mono | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API SafeStringMarshal | ||||
|     { | ||||
|     public: | ||||
|         static intptr_t StringToUtf8_icall(Il2CppString *volatile* str); | ||||
|         static void GFree(intptr_t ptr); | ||||
|     }; | ||||
| } // namespace Mono | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,24 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Debugger | ||||
|     { | ||||
|     public: | ||||
|         static bool IsAttached_internal(); | ||||
|         static bool IsLogging(); | ||||
|         static void Log_icall(int32_t level, Il2CppString** category, Il2CppString** message); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,36 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
| struct Il2CppReflectionMethod; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API StackFrame | ||||
|     { | ||||
|     public: | ||||
|         static bool get_frame_info( | ||||
|             int32_t skip, | ||||
|             bool needFileInfo, | ||||
|             Il2CppReflectionMethod ** method, | ||||
|             int32_t* iloffset, | ||||
|             int32_t* native_offset, | ||||
|             Il2CppString** file, | ||||
|             int32_t* line, | ||||
|             int32_t* column); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,28 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Diagnostics | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API StackTrace | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppArray* get_trace(Il2CppException *exc, int32_t skip, bool need_file_info); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,24 @@ | ||||
| #pragma once | ||||
|  | ||||
| struct Il2CppCalendarData; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Globalization | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API CalendarData | ||||
|     { | ||||
|     public: | ||||
|         static bool fill_calendar_data(Il2CppCalendarData* _this, Il2CppString* localeName, int32_t datetimeIndex); | ||||
|     }; | ||||
| } // namespace Globalization | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,23 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Globalization | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API CompareInfo | ||||
|     { | ||||
|     public: | ||||
|         static int32_t internal_compare_icall(Il2CppChar* str1, int32_t length1, Il2CppChar* str2, int32_t length2, int32_t options); | ||||
|         static int32_t internal_index_icall(Il2CppChar* source, int32_t sindex, int32_t count, Il2CppChar* value, int32_t value_length, bool first); | ||||
|     }; | ||||
| } /* namespace Globalization */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,32 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Globalization | ||||
| { | ||||
| // System.Globalization.CompareOptions | ||||
|     typedef enum | ||||
|     { | ||||
|         CompareOptions_None              = 0x00, | ||||
|         CompareOptions_IgnoreCase        = 0x01, | ||||
|         CompareOptions_IgnoreNonSpace    = 0x02, | ||||
|         CompareOptions_IgnoreSymbols     = 0x04, | ||||
|         CompareOptions_IgnoreKanaType    = 0x08, | ||||
|         CompareOptions_IgnoreWidth       = 0x10, | ||||
|         CompareOptions_StringSort        = 0x20000000, | ||||
|         CompareOptions_Ordinal           = 0x40000000, | ||||
|         CompareOptions_OrdinalIgnoreCase = 0x10000000 | ||||
|     } CompareOptions; | ||||
| } /* namespace Globalization */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,26 @@ | ||||
| #pragma once | ||||
|  | ||||
| struct NumberFormatEntryManaged; | ||||
| struct Il2CppCultureData; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Globalization | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API CultureData | ||||
|     { | ||||
|     public: | ||||
|         static const void* fill_number_data(int32_t number_index, NumberFormatEntryManaged* managed); | ||||
|         static void fill_culture_data(Il2CppCultureData* _this, int32_t datetimeIndex); | ||||
|     }; | ||||
| } // namespace Globalization | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,31 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
| struct Il2CppCultureInfo; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Globalization | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API CultureInfo | ||||
|     { | ||||
|     public: | ||||
|         static bool construct_internal_locale_from_lcid(Il2CppCultureInfo* cultureInfo, int lcid); | ||||
|         static bool construct_internal_locale_from_name(Il2CppCultureInfo* cultureInfo, Il2CppString* name); | ||||
|         static Il2CppArray* internal_get_cultures(bool neutral, bool specific, bool installed); | ||||
|         static Il2CppString* get_current_locale_name(); | ||||
|     }; | ||||
| } /* namespace Diagnostics */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,5 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
|  | ||||
| #include "Generated/CultureInfoInternalsNet_4_0.h" | ||||
| @@ -0,0 +1,5 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "CultureInfoInternals.h" | ||||
|  | ||||
| #include "Generated/CultureInfoTablesNet_4_0.h" | ||||
| @@ -0,0 +1,138 @@ | ||||
| //This is a Generated File.... Run CultureInfoUpdater tool to update | ||||
| /** | ||||
|  * \file | ||||
|  */ | ||||
|  | ||||
| #ifndef _MONO_METADATA_CULTURE_INFO_H_ | ||||
| #define _MONO_METADATA_CULTURE_INFO_H_ 1 | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| #define NUM_DAYS 7 | ||||
| #define NUM_MONTHS 13 | ||||
| #define GROUP_SIZE 2 | ||||
| #define NUM_CALENDARS 4 | ||||
|  | ||||
| #define NUM_SHORT_DATE_PATTERNS 14 | ||||
| #define NUM_LONG_DATE_PATTERNS 10 | ||||
| #define NUM_SHORT_TIME_PATTERNS 12 | ||||
| #define NUM_LONG_TIME_PATTERNS 9 | ||||
| #define NUM_YEAR_MONTH_PATTERNS 8 | ||||
|  | ||||
| #define idx2string(idx) (locale_strings + (idx)) | ||||
| #define pattern2string(idx) (patterns + (idx)) | ||||
| #define dtidx2string(idx) (datetime_strings + (idx)) | ||||
|  | ||||
| /* need to change this if the string data ends up to not fit in a 64KB array. */ | ||||
|  | ||||
|  | ||||
| typedef struct { | ||||
| 	const uint16_t month_day_pattern; | ||||
| 	const uint16_t am_designator; | ||||
| 	const uint16_t pm_designator; | ||||
|  | ||||
| 	const uint16_t day_names [NUM_DAYS];  | ||||
| 	const uint16_t abbreviated_day_names [NUM_DAYS]; | ||||
| 	const uint16_t shortest_day_names [NUM_DAYS]; | ||||
| 	const uint16_t month_names [NUM_MONTHS]; | ||||
| 	const uint16_t month_genitive_names [NUM_MONTHS]; | ||||
| 	const uint16_t abbreviated_month_names [NUM_MONTHS]; | ||||
| 	const uint16_t abbreviated_month_genitive_names [NUM_MONTHS]; | ||||
|  | ||||
| 	const int8_t calendar_week_rule; | ||||
| 	const int8_t first_day_of_week; | ||||
|  | ||||
| 	const uint16_t date_separator; | ||||
| 	const uint16_t time_separator;	 | ||||
|  | ||||
| 	const uint16_t short_date_patterns [NUM_SHORT_DATE_PATTERNS]; | ||||
| 	const uint16_t long_date_patterns [NUM_LONG_DATE_PATTERNS]; | ||||
| 	const uint16_t short_time_patterns [NUM_SHORT_TIME_PATTERNS]; | ||||
| 	const uint16_t long_time_patterns [NUM_LONG_TIME_PATTERNS]; | ||||
| 	const uint16_t year_month_patterns [NUM_YEAR_MONTH_PATTERNS]; | ||||
| } DateTimeFormatEntry; | ||||
|  | ||||
| typedef struct { | ||||
| 	const uint16_t currency_decimal_separator; | ||||
| 	const uint16_t currency_group_separator; | ||||
| 	const uint16_t number_decimal_separator; | ||||
| 	const uint16_t number_group_separator; | ||||
|  | ||||
| 	const uint16_t currency_symbol; | ||||
| 	const uint16_t percent_symbol; | ||||
| 	const uint16_t nan_symbol; | ||||
| 	const uint16_t per_mille_symbol; | ||||
| 	const uint16_t negative_infinity_symbol; | ||||
| 	const uint16_t positive_infinity_symbol; | ||||
|  | ||||
| 	const uint16_t negative_sign; | ||||
| 	const uint16_t positive_sign; | ||||
|  | ||||
| 	const int8_t currency_negative_pattern; | ||||
| 	const int8_t currency_positive_pattern; | ||||
| 	const int8_t percent_negative_pattern; | ||||
| 	const int8_t percent_positive_pattern; | ||||
| 	const int8_t number_negative_pattern; | ||||
|  | ||||
| 	const int8_t currency_decimal_digits; | ||||
| 	const int8_t number_decimal_digits; | ||||
|  | ||||
| 	const int currency_group_sizes [GROUP_SIZE]; | ||||
| 	const int number_group_sizes [GROUP_SIZE];	 | ||||
| } NumberFormatEntry; | ||||
|  | ||||
| typedef struct { | ||||
| 	int ansi; | ||||
| 	int ebcdic; | ||||
| 	int mac; | ||||
| 	int oem; | ||||
| 	bool is_right_to_left; | ||||
| 	char list_sep; | ||||
| } TextInfoEntry; | ||||
|  | ||||
| typedef struct { | ||||
| 	int16_t lcid; | ||||
| 	int16_t parent_lcid; | ||||
| 	int16_t calendar_type; | ||||
| 	int16_t region_entry_index; | ||||
| 	uint16_t name; | ||||
| 	uint16_t englishname; | ||||
| 	uint16_t nativename; | ||||
| 	uint16_t win3lang; | ||||
| 	uint16_t iso3lang; | ||||
| 	uint16_t iso2lang; | ||||
| 	uint16_t territory; | ||||
| 	uint16_t native_calendar_names [NUM_CALENDARS]; | ||||
|  | ||||
| 	int16_t datetime_format_index; | ||||
| 	int16_t number_format_index; | ||||
| 	 | ||||
| 	TextInfoEntry text_info; | ||||
| } CultureInfoEntry; | ||||
|  | ||||
| typedef struct { | ||||
| 	const uint16_t name; | ||||
| 	const int16_t culture_entry_index; | ||||
| } CultureInfoNameEntry; | ||||
|  | ||||
| typedef struct { | ||||
| 	const int16_t geo_id; | ||||
| 	const uint16_t iso2name; | ||||
| 	const uint16_t iso3name; | ||||
| 	const uint16_t win3name; | ||||
| 	const uint16_t english_name; | ||||
| 	const uint16_t native_name; | ||||
| 	const uint16_t currency_symbol; | ||||
| 	const uint16_t iso_currency_symbol; | ||||
| 	const uint16_t currency_english_name; | ||||
| 	const uint16_t currency_native_name; | ||||
| } RegionInfoEntry; | ||||
|  | ||||
| typedef struct { | ||||
| 	const uint16_t name; | ||||
| 	const int16_t region_entry_index; | ||||
| } RegionInfoNameEntry; | ||||
|  | ||||
| #endif | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -0,0 +1,38 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Globalization | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RegionInfo | ||||
|     { | ||||
|     public: | ||||
|         static bool construct_internal_region_from_name(Il2CppRegionInfo* regionInfo, Il2CppString* name); | ||||
|     }; | ||||
| } /* namespace Globalization */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,48 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-class-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace IO | ||||
| { | ||||
| #pragma pack(push, 4) | ||||
|     struct WIN32_FILE_ATTRBIUTE_DATA_MIRROR | ||||
|     { | ||||
|         int32_t attributes; | ||||
|         int64_t creation_time; | ||||
|         int64_t last_access_time; | ||||
|         int64_t last_write_time; | ||||
|         uint32_t length_high; | ||||
|         uint32_t length_low; | ||||
|     }; | ||||
| #pragma pack(pop) | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API BrokeredFileSystem | ||||
|     { | ||||
|     public: | ||||
|         static bool CreateDirectory(Il2CppString* path); | ||||
|         static bool RemoveDirectory(Il2CppString* path); | ||||
|         static bool GetFileAttributes(Il2CppString* path, WIN32_FILE_ATTRBIUTE_DATA_MIRROR* data); | ||||
|         static bool SetAttributes(Il2CppString* path, int32_t attributes); | ||||
|         static void* OpenFile(Il2CppString* path, int32_t desiredAccess, int32_t shareMode, int32_t creationDisposition, int32_t flagsAndAttributes); | ||||
|         static void CopyFile(Il2CppString* sourcePath, Il2CppString* destinationPath, bool overwrite, int32_t* error); | ||||
|         static bool MoveFile(Il2CppString* sourcePath, Il2CppString* destinationPath); | ||||
|         static bool DeleteFile(Il2CppString* path); | ||||
|         static void* FindFirstFile(Il2CppString* searchPath, Il2CppString** resultFileName, uint32_t* fileAttributes); | ||||
|         static bool FindNextFile(void* handle, Il2CppString** resultFileName, uint32_t* fileAttributes); | ||||
|         static void FindHandleClose(void* handle); | ||||
|     }; | ||||
| } /* namespace IO */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,24 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace IO | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API DriveInfo | ||||
|     { | ||||
|     public: | ||||
|         static bool GetDiskFreeSpaceInternal(Il2CppChar* pathName, int32_t pathName_length, uint64_t* freeBytesAvail, uint64_t* totalNumberOfBytes, uint64_t* totalNumberOfFreeBytes, int32_t* error); | ||||
|         static Il2CppString* GetDriveFormatInternal(Il2CppChar* rootPathName, int32_t rootPathName_length); | ||||
|         static uint32_t GetDriveTypeInternal(Il2CppChar* rootPathName, int32_t rootPathName_length); | ||||
|     }; | ||||
| } /* namespace IO */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,89 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| #undef CopyFile | ||||
| #undef DeleteFile | ||||
| #undef MoveFile | ||||
| #undef ReplaceFile | ||||
| #undef GetFileAttributes | ||||
| #undef SetFileAttributes | ||||
| #undef CreatePipe | ||||
| #undef GetTempPath | ||||
| #undef FindNextFile | ||||
| #undef FindFirstFile | ||||
|  | ||||
| struct Il2CppArray; | ||||
| struct Il2CppString; | ||||
|  | ||||
| typedef int32_t MonoIOError; | ||||
| typedef int32_t FileAttributes; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace IO | ||||
| { | ||||
|     struct FileStat | ||||
|     { | ||||
|         int32_t attributes; | ||||
|         int64_t length; | ||||
|         int64_t creation_time; | ||||
|         int64_t last_access_time; | ||||
|         int64_t last_write_time; | ||||
|     }; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API MonoIO | ||||
|     { | ||||
|     public: | ||||
|         static bool Cancel_internal(intptr_t handle, int32_t* error); | ||||
|         static bool Close(intptr_t handle, int32_t* error); | ||||
|         static bool CopyFile(Il2CppChar* path, Il2CppChar* dest, bool overwrite, int32_t* error); | ||||
|         static bool CreateDirectory(Il2CppChar* path, int32_t* error); | ||||
|         static bool CreatePipe(intptr_t* read_handle, intptr_t* write_handle, int32_t* error); | ||||
|         static bool DeleteFile(Il2CppChar* path, int32_t* error); | ||||
|         static bool DuplicateHandle(intptr_t source_process_handle, intptr_t source_handle, intptr_t target_process_handle, intptr_t* target_handle, int32_t access, int32_t inherit, int32_t options, int32_t* error); | ||||
|         static bool FindCloseFile(intptr_t hnd); | ||||
|         static bool FindNextFile(intptr_t hnd, Il2CppString** fileName, int32_t* fileAttr, int32_t* error); | ||||
|         static bool Flush(intptr_t handle, int32_t* error); | ||||
|         static bool GetFileStat(Il2CppChar* path, FileStat* stat, int32_t* error); | ||||
|         static bool MoveFile(Il2CppChar* path, Il2CppChar* dest, int32_t* error); | ||||
|         static bool RemapPath(Il2CppString* path, Il2CppString** newPath); | ||||
|         static bool RemoveDirectory(Il2CppChar* path, int32_t* error); | ||||
|         static bool ReplaceFile(Il2CppChar* sourceFileName, Il2CppChar* destinationFileName, Il2CppChar* destinationBackupFileName, bool ignoreMetadataErrors, int32_t* error); | ||||
|         static bool SetCurrentDirectory(Il2CppChar* path, int32_t* error); | ||||
|         static bool SetFileAttributes(Il2CppChar* path, int32_t attrs, int32_t* error); | ||||
|         static bool SetFileTime(intptr_t handle, int64_t creation_time, int64_t last_access_time, int64_t last_write_time, int32_t* error); | ||||
|         static bool SetLength(intptr_t handle, int64_t length, int32_t* error); | ||||
|         static Il2CppChar get_AltDirectorySeparatorChar(); | ||||
|         static Il2CppChar get_DirectorySeparatorChar(); | ||||
|         static Il2CppChar get_PathSeparator(); | ||||
|         static Il2CppChar get_VolumeSeparatorChar(); | ||||
|         static int32_t Read(intptr_t handle, Il2CppArray* dest, int32_t dest_offset, int32_t count, int32_t* error); | ||||
|         static int32_t Write(intptr_t handle, Il2CppArray* src, int32_t src_offset, int32_t count, int32_t* error); | ||||
|         static int64_t GetLength(intptr_t handle, int32_t* error); | ||||
|         static int64_t Seek(intptr_t handle, int64_t offset, int32_t origin, int32_t* error); | ||||
|         static intptr_t FindFirstFile(Il2CppChar* pathWithPattern, Il2CppString** fileName, int32_t* fileAttr, int32_t* error); | ||||
|         static intptr_t get_ConsoleError(); | ||||
|         static intptr_t get_ConsoleInput(); | ||||
|         static intptr_t get_ConsoleOutput(); | ||||
|         static intptr_t Open(Il2CppChar* filename, int32_t mode, int32_t access, int32_t share, int32_t options, int32_t* error); | ||||
|         static int32_t GetFileAttributes(Il2CppChar* path, int32_t* error); | ||||
|         static int32_t GetFileType(intptr_t handle, int32_t* error); | ||||
|         static Il2CppString* GetCurrentDirectory(int32_t* error); | ||||
|         static void DumpHandles(); | ||||
|         static void Lock(intptr_t handle, int64_t position, int64_t length, int32_t* error); | ||||
|         static void Unlock(intptr_t handle, int64_t position, int64_t length, int32_t* error); | ||||
|     }; | ||||
| } /* namespace IO */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
							
								
								
									
										38
									
								
								Libraries/libil2cpp/include/icalls/mscorlib/System.IO/Path.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								Libraries/libil2cpp/include/icalls/mscorlib/System.IO/Path.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace IO | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Path | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppString* get_temp_path(); | ||||
|     }; | ||||
| } /* namespace IO */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,43 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppReflectionAssembly; | ||||
| struct mscorlib_System_Reflection_Assembly; | ||||
| struct mscorlib_System_Reflection_Module; | ||||
| struct mscorlib_System_Security_Policy_Evidence; | ||||
| struct mscorlib_System_Reflection_AssemblyName; | ||||
| struct Il2CppMonoAssemblyName; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Assembly | ||||
|     { | ||||
|     public: | ||||
|         static intptr_t InternalGetReferencedAssemblies(Il2CppReflectionAssembly* module); | ||||
|         static Il2CppReflectionAssembly* GetCallingAssembly(); | ||||
|         static Il2CppObject* GetEntryAssembly(); | ||||
|         static Il2CppReflectionAssembly* GetExecutingAssembly(); | ||||
|         static Il2CppReflectionAssembly* load_with_partial_name(Il2CppString* name, Il2CppObject* e); | ||||
|         static Il2CppReflectionAssembly* LoadFile_internal(Il2CppString* assemblyFile, int32_t* stackMark); | ||||
|         static Il2CppReflectionAssembly* LoadFrom(Il2CppString* assemblyFile, bool refOnly, int32_t* stackMark); | ||||
|         static Il2CppReflectionType* InternalGetType(Il2CppReflectionAssembly* thisPtr, Il2CppObject* module, Il2CppString* name, bool throwOnError, bool ignoreCase); | ||||
|         static Il2CppArray* GetTypes(Il2CppReflectionAssembly* thisPtr, bool exportedOnly); | ||||
|         static void InternalGetAssemblyName(Il2CppString* assemblyFile, void* aname, Il2CppString** codebase); | ||||
|     }; | ||||
| } /* namespace Reflection */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,31 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
| struct Il2CppReflectionAssemblyName; | ||||
| struct Il2CppMonoAssemblyName; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API AssemblyName | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppMonoAssemblyName* GetNativeName(intptr_t assembly_ptr); | ||||
|         static bool ParseAssemblyName(intptr_t name, Il2CppMonoAssemblyName* aname, bool* is_version_definited, bool* is_token_defined); | ||||
|         static void get_public_token(uint8_t* token, uint8_t* pubkey, int32_t len); | ||||
|     }; | ||||
| } /* namespace Reflection */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,24 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API CustomAttributeData | ||||
|     { | ||||
|     public: | ||||
|         static void ResolveArgumentsInternal(Il2CppObject* ctor, Il2CppObject* assembly, intptr_t data, uint32_t data_length, Il2CppArray** ctorArgs, Il2CppArray** namedArgs); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,24 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API EventInfo | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppReflectionEvent* internal_from_handle_type(intptr_t event_handle, intptr_t type_handle); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,29 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppReflectionMarshal; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API FieldInfo | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppReflectionField* internal_from_handle_type(intptr_t field_handle, intptr_t type_handle); | ||||
|         static Il2CppObject* get_marshal_info(Il2CppObject* thisPtr); | ||||
|     }; | ||||
| } /* namespace Reflection */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API MethodBase | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppReflectionMethod* GetCurrentMethod(); | ||||
|     }; | ||||
| } /* namespace Reflection */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,30 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API MonoMethodInfo | ||||
|     { | ||||
|     public: | ||||
|         static void get_method_info(intptr_t methodPtr, Il2CppMethodInfo* info); | ||||
|         static void* /* System.Reflection.Emit.UnmanagedMarshal */ get_retval_marshal(intptr_t handle); | ||||
|         static Il2CppArray* get_parameter_info(intptr_t methodPtr, Il2CppReflectionMethod* member); | ||||
|  | ||||
|         static int32_t get_method_attributes(intptr_t methodPtr); | ||||
|     }; | ||||
| } /* namespace Reflection */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,37 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeAssembly | ||||
|     { | ||||
|     public: | ||||
|         static bool get_global_assembly_cache(Il2CppObject* thisPtr); | ||||
|         static bool get_ReflectionOnly(Il2CppObject* thisPtr); | ||||
|         static bool GetAotIdInternal(Il2CppArray* aotid); | ||||
|         static bool GetManifestResourceInfoInternal(Il2CppReflectionAssembly* assembly, Il2CppString* name, Il2CppManifestResourceInfo* info); | ||||
|         static intptr_t GetManifestResourceInternal(Il2CppReflectionAssembly* assembly, Il2CppString* name, int* size, Il2CppReflectionModule** module); | ||||
|         static Il2CppObject* GetFilesInternal(Il2CppObject* thisPtr, Il2CppString* name, bool getResourceModules); | ||||
|         static Il2CppReflectionMethod* get_EntryPoint(Il2CppReflectionAssembly* self); | ||||
|         static Il2CppObject* GetManifestModuleInternal(Il2CppObject* thisPtr); | ||||
|         static Il2CppArray* GetModulesInternal(Il2CppReflectionAssembly * thisPtr); | ||||
|         static Il2CppString* get_code_base(Il2CppReflectionAssembly* reflectionAssembly, bool escaped); | ||||
|         static Il2CppString* get_fullname(Il2CppReflectionAssembly* assembly); | ||||
|         static Il2CppString* get_location(Il2CppReflectionAssembly* assembly); | ||||
|         static Il2CppString* InternalImageRuntimeVersion(Il2CppObject* a); | ||||
|         static Il2CppArray* GetManifestResourceNames(Il2CppReflectionAssembly* assembly); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,23 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeConstructorInfo | ||||
|     { | ||||
|     public: | ||||
|         static int32_t get_metadata_token(Il2CppObject* method); | ||||
|         static Il2CppObject* InternalInvoke(Il2CppReflectionMethod* method, Il2CppObject* thisPtr, Il2CppArray* params, Il2CppException** exc); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,24 @@ | ||||
| #pragma once | ||||
| #include <il2cpp-object-internals.h> | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeEventInfo | ||||
|     { | ||||
|     public: | ||||
|         static int32_t get_metadata_token(Il2CppObject* monoEvent); | ||||
|         static void get_event_info(Il2CppReflectionMonoEvent* event, Il2CppReflectionMonoEventInfo* eventInfo); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,32 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeFieldInfo | ||||
|     { | ||||
|     public: | ||||
|         static int32_t get_metadata_token(Il2CppObject* monoField); | ||||
|         static int32_t GetFieldOffset(Il2CppReflectionField* field); | ||||
|         static Il2CppObject* GetRawConstantValue(Il2CppReflectionField* field); | ||||
|         static Il2CppObject* GetValueInternal(Il2CppReflectionField* field, Il2CppObject* obj); | ||||
|         static Il2CppObject* UnsafeGetValue(Il2CppReflectionField* field, Il2CppObject* obj); | ||||
|         static Il2CppReflectionType* GetParentType(Il2CppReflectionField* field, bool declaring); | ||||
|         static Il2CppObject* ResolveType(Il2CppObject* thisPtr); | ||||
|         static Il2CppArray* GetTypeModifiers(Il2CppObject* thisPtr, bool optional); | ||||
|         static void SetValueInternal(Il2CppReflectionField* fi, Il2CppObject* obj, Il2CppObject* value); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,35 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeMethodInfo | ||||
|     { | ||||
|     public: | ||||
|         static bool get_IsGenericMethod(Il2CppReflectionMethod* method); | ||||
|         static bool get_IsGenericMethodDefinition(Il2CppReflectionMethod* method); | ||||
|         static int32_t get_metadata_token(Il2CppObject* method); | ||||
|         static Il2CppObject* InternalInvoke(Il2CppReflectionMethod * method, Il2CppObject * thisPtr, Il2CppArray * params, Il2CppException * * exc); | ||||
|         static Il2CppReflectionMethod* GetMethodFromHandleInternalType_native(intptr_t method_handle, intptr_t type_handle, bool genericCheck); | ||||
|         static Il2CppObject* GetMethodBodyInternal(intptr_t handle); | ||||
|         static Il2CppReflectionMethod* GetGenericMethodDefinition_impl(Il2CppReflectionMethod* method); | ||||
|         static Il2CppReflectionMethod* MakeGenericMethod_impl(Il2CppReflectionMethod* method, Il2CppArray* genericArgumentTypes); | ||||
|         static Il2CppReflectionMethod* get_base_method(Il2CppReflectionMethod* method, bool definition); | ||||
|         static Il2CppString* get_name(Il2CppReflectionMethod* reflectionMethod); | ||||
|         static Il2CppArray* GetGenericArguments(Il2CppReflectionMethod* method); | ||||
|         static void GetPInvoke(Il2CppReflectionMethod* _this, int32_t* flags, Il2CppString** entryPoint, Il2CppString** dllName); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,36 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeModule | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppArray* ResolveSignature(intptr_t module, int32_t metadataToken, int32_t* error); | ||||
|         static int32_t get_MetadataToken(Il2CppReflectionModule* module); | ||||
|         static int32_t GetMDStreamVersion(intptr_t module); | ||||
|         static intptr_t GetHINSTANCE(intptr_t module); | ||||
|         static intptr_t ResolveFieldToken(intptr_t module, int32_t token, Il2CppArray* type_args, Il2CppArray* method_args, int32_t* error); | ||||
|         static intptr_t ResolveMethodToken(intptr_t module, int32_t token, Il2CppArray* type_args, Il2CppArray* method_args, int32_t* error); | ||||
|         static intptr_t ResolveTypeToken(intptr_t module, int32_t token, Il2CppArray* type_args, Il2CppArray* method_args, int32_t* error); | ||||
|         static Il2CppObject* ResolveMemberToken(intptr_t module, int32_t token, Il2CppArray* type_args, Il2CppArray* method_args, int32_t* error); | ||||
|         static Il2CppString* ResolveStringToken(intptr_t module, int32_t token, int32_t* error); | ||||
|         static Il2CppObject* GetGlobalType(intptr_t module); | ||||
|         static Il2CppArray* InternalGetTypes(const Il2CppImage* module); | ||||
|         static void GetGuidInternal(intptr_t module, Il2CppArray* guid); | ||||
|         static void GetPEKind(intptr_t module, int32_t* peKind, int32_t* machine); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,23 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeParameterInfo | ||||
|     { | ||||
|     public: | ||||
|         static int32_t GetMetadataToken(Il2CppObject* thisPtr); | ||||
|         static Il2CppArray* GetTypeModifiers(Il2CppObject* type, Il2CppObject* member, int32_t position, bool optional); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,38 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Reflection | ||||
| { | ||||
|     typedef enum | ||||
|     { | ||||
|         PInfo_Attributes = 1, | ||||
|         PInfo_GetMethod  = 1 << 1, | ||||
|         PInfo_SetMethod  = 1 << 2, | ||||
|         PInfo_ReflectedType = 1 << 3, | ||||
|         PInfo_DeclaringType = 1 << 4, | ||||
|         PInfo_Name = 1 << 5 | ||||
|     } PInfo; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimePropertyInfo | ||||
|     { | ||||
|     public: | ||||
|         static int32_t get_metadata_token(Il2CppObject* monoProperty); | ||||
|         static Il2CppObject* get_default_value(Il2CppObject* prop); | ||||
|         static Il2CppReflectionProperty* internal_from_handle_type(intptr_t handlePtr, intptr_t typePtr); | ||||
|         static Il2CppArray* GetTypeModifiers(Il2CppObject* prop, bool optional); | ||||
|         static void get_property_info(Il2CppReflectionProperty *property, Il2CppPropertyInfo *info, PInfo req_info); | ||||
|     }; | ||||
| } // namespace Reflection | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,34 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace CompilerServices | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeHelpers | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppObject* GetObjectValue(Il2CppObject* obj); | ||||
|         static void RunClassConstructor(intptr_t type); | ||||
|         static void RunModuleConstructor(intptr_t module); | ||||
|         static int get_OffsetToStringData(void); | ||||
|         static void InitializeArray(Il2CppArray* arr, intptr_t ptr); | ||||
|  | ||||
|         static bool SufficientExecutionStack(); | ||||
|     }; | ||||
| } /* namespace CompilerServices */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,35 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace InteropServices | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API GCHandle | ||||
|     { | ||||
|     public: | ||||
|         static bool CheckCurrentDomain(int32_t handle); | ||||
|         static void FreeHandle(int32_t handle); | ||||
|         static intptr_t GetAddrOfPinnedObject(int32_t handle); | ||||
|         static Il2CppObject * GetTarget(int32_t handle); | ||||
|         static int32_t GetTargetHandle(Il2CppObject * obj, int32_t handle, int32_t type); | ||||
|     }; | ||||
| } /* namespace InteropServices */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,97 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct mscorlib_System_Guid; | ||||
| struct mscorlib_System_Reflection_MemberInfo; | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace InteropServices | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Marshal | ||||
|     { | ||||
|     public: | ||||
|         static int32_t GetLastWin32Error(); | ||||
|         static void SetLastWin32Error(uint32_t); | ||||
|         static int32_t AddRefInternal(intptr_t pUnk); | ||||
|         static intptr_t AllocCoTaskMem(int32_t size); | ||||
|         static intptr_t AllocHGlobal(intptr_t size); | ||||
|         static void DestroyStructure(intptr_t ptr, Il2CppReflectionType* structureType); | ||||
|         static void FreeBSTR(intptr_t ptr); | ||||
|         static void FreeCoTaskMem(intptr_t ptr); | ||||
|         static void FreeHGlobal(intptr_t hglobal); | ||||
|         static intptr_t GetCCW(Il2CppObject* o, Il2CppReflectionType * T); | ||||
|         static int32_t GetComSlotForMethodInfoInternal(mscorlib_System_Reflection_MemberInfo * m); | ||||
|         static Il2CppDelegate* GetDelegateForFunctionPointerInternal(intptr_t ptr, Il2CppReflectionType* t); | ||||
|         static intptr_t GetFunctionPointerForDelegateInternal(Il2CppDelegate* d); | ||||
|         static intptr_t GetIDispatchForObjectInternal(Il2CppObject* o); | ||||
|         static intptr_t GetIUnknownForObjectInternal(Il2CppObject* o); | ||||
|         static Il2CppObject* GetObjectForCCW(intptr_t pUnk); | ||||
|         static bool IsComObject(Il2CppObject* o); | ||||
|         static intptr_t OffsetOf(Il2CppReflectionType* t, Il2CppString* fieldName); | ||||
|         static void Prelink(Il2CppReflectionMethod* m); | ||||
|         static void PrelinkAll(Il2CppReflectionType* c); | ||||
|         static Il2CppString* PtrToStringAnsi_mscorlib_System_String_mscorlib_System_IntPtr(intptr_t ptr); | ||||
|         static Il2CppString* PtrToStringAnsi_mscorlib_System_String_mscorlib_System_IntPtr_mscorlib_System_Int32(intptr_t ptr, int32_t len); | ||||
|         static Il2CppString* PtrToStringBSTR(intptr_t ptr); | ||||
|         static Il2CppString* PtrToStringUni_mscorlib_System_String_mscorlib_System_IntPtr(intptr_t ptr); | ||||
|         static Il2CppString* PtrToStringUni_mscorlib_System_String_mscorlib_System_IntPtr_mscorlib_System_Int32(intptr_t ptr, int32_t len); | ||||
|         static Il2CppObject* PtrToStructure(intptr_t ptr, Il2CppReflectionType * structureType); | ||||
|         static void PtrToStructureObject(intptr_t ptr, Il2CppObject* structure); | ||||
|         static int32_t QueryInterfaceInternal(intptr_t pUnk, mscorlib_System_Guid * iid, intptr_t* ppv); | ||||
|         static intptr_t ReAllocCoTaskMem(intptr_t ptr, int32_t size); | ||||
|         static intptr_t ReAllocHGlobal(intptr_t ptr, intptr_t size); | ||||
|         static uint8_t ReadByte(intptr_t ptr, int32_t ofs); | ||||
|         static int16_t ReadInt16(intptr_t ptr, int32_t ofs); | ||||
|         static int32_t ReadInt32(intptr_t ptr, int32_t ofs); | ||||
|         static int64_t ReadInt64(intptr_t ptr, int32_t ofs); | ||||
|         static intptr_t ReadIntPtr(intptr_t ptr, int32_t ofs); | ||||
|         static int32_t ReleaseComObjectInternal(Il2CppObject* co); | ||||
|         static int32_t ReleaseInternal(intptr_t pUnk); | ||||
|         static int SizeOf(Il2CppReflectionType * rtype); | ||||
|         static intptr_t StringToBSTR(Il2CppString* s); | ||||
|         static intptr_t StringToHGlobalAnsi(Il2CppChar* s, int32_t length); | ||||
|         static intptr_t StringToHGlobalUni(Il2CppChar* s, int32_t length); | ||||
|         static void StructureToPtr(Il2CppObject* structure, intptr_t ptr, bool deleteOld); | ||||
|         static intptr_t UnsafeAddrOfPinnedArrayElement(Il2CppArray* arr, int32_t index); | ||||
|         static void WriteByte(intptr_t ptr, int32_t ofs, uint8_t val); | ||||
|         static void WriteInt16(intptr_t ptr, int32_t ofs, int16_t val); | ||||
|         static void WriteInt32(intptr_t ptr, int32_t ofs, int32_t val); | ||||
|         static void WriteInt64(intptr_t ptr, int32_t ofs, int64_t val); | ||||
|         static void copy_from_unmanaged(intptr_t, int, Il2CppArray *, int); | ||||
|         static void copy_to_unmanaged(Il2CppArray * source, int32_t startIndex, intptr_t destination, int32_t length); | ||||
|         static void WriteIntPtr(intptr_t ptr, int32_t ofs, intptr_t val); | ||||
|  | ||||
|         static intptr_t BufferToBSTR(Il2CppChar* ptr, int32_t slen); | ||||
|  | ||||
|         static int32_t GetHRForException_WinRT(Il2CppException* e); | ||||
|         static intptr_t GetRawIUnknownForComObjectNoAddRef(Il2CppObject* o); | ||||
|         static Il2CppObject* GetNativeActivationFactory(Il2CppObject* type); | ||||
|  | ||||
|         static intptr_t AllocCoTaskMemSize(intptr_t sizet); | ||||
|  | ||||
|         static void copy_from_unmanaged_fixed(intptr_t source, int32_t startIndex, Il2CppArray* destination, int32_t length, void* fixed_destination_element); | ||||
|         static void copy_to_unmanaged_fixed(Il2CppArray* source, int32_t startIndex, intptr_t destination, int32_t length, void* fixed_source_element); | ||||
|     }; | ||||
| } /* namespace InteropServices */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,26 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace InteropServices | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeInformation | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppString* GetOSName(); | ||||
|         static Il2CppString* GetRuntimeArchitecture(); | ||||
|     }; | ||||
| } // namespace InteropServices | ||||
| } // namespace Runtime | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,33 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| struct Il2CppObject; | ||||
| struct Il2CppReflectionType; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Remoting | ||||
| { | ||||
| namespace Activation | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API ActivationServices | ||||
|     { | ||||
|     public: | ||||
|         static void EnableProxyActivation(Il2CppReflectionType*, bool); | ||||
|         static Il2CppObject * AllocateUninitializedClassInstance(Il2CppReflectionType*); | ||||
|     }; | ||||
| } /* namespace Activation */ | ||||
| } /* namespace Remoting */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,29 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Remoting | ||||
| { | ||||
| namespace Contexts | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Context | ||||
|     { | ||||
|     public: | ||||
|         static void RegisterContext(Il2CppObject* ctx); | ||||
|         static void ReleaseContext(Il2CppObject* ctx); | ||||
|     }; | ||||
| } // namespace Contexts | ||||
| } // namespace Remoting | ||||
| } // namespace Runtime | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,28 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Remoting | ||||
| { | ||||
| namespace Messaging | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API AsyncResult | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppObject* Invoke(Il2CppObject* _this); | ||||
|     }; | ||||
| } // namespace Messaging | ||||
| } // namespace Remoting | ||||
| } // namespace Runtime | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,33 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| struct Il2CppArray; | ||||
| struct Il2CppMethodMessage; | ||||
| struct Il2CppReflectionMethod; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Remoting | ||||
| { | ||||
| namespace Messaging | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API MonoMethodMessage | ||||
|     { | ||||
|     public: | ||||
|         static void InitMessage(Il2CppMethodMessage*, Il2CppReflectionMethod*, Il2CppArray*); | ||||
|     }; | ||||
| } /* namespace Messaging */ | ||||
| } /* namespace Remoting */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,34 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| struct Il2CppObject; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Remoting | ||||
| { | ||||
| namespace Proxies | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RealProxy | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppObject* InternalGetTransparentProxy(Il2CppObject*, Il2CppString*); | ||||
|         static Il2CppReflectionType* InternalGetProxyType(Il2CppObject*); | ||||
|     }; | ||||
| } /* namespace Proxies */ | ||||
| } /* namespace Remoting */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,32 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| struct Il2CppArray; | ||||
| struct Il2CppObject; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionType; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Remoting | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RemotingServices | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppReflectionMethod * GetVirtualMethod(Il2CppReflectionType*, Il2CppReflectionMethod*); | ||||
|         static Il2CppObject* InternalExecute(Il2CppReflectionMethod*, Il2CppObject*, Il2CppArray*, Il2CppArray**); | ||||
|     }; | ||||
| } /* namespace Remoting */ | ||||
| } /* namespace Runtime */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,25 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
| namespace Versioning | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API VersioningHelper | ||||
|     { | ||||
|     public: | ||||
|         static int32_t GetRuntimeId(); | ||||
|     }; | ||||
| } // namespace Versioning | ||||
| } // namespace Runtime | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,27 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Runtime | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RuntimeImports | ||||
|     { | ||||
|     public: | ||||
|         static void ecvt_s(char* buffer, int32_t sizeInBytes, double value, int32_t count, int32_t* dec, int32_t* sign); | ||||
|         static void Memmove(uint8_t* dest, uint8_t* src, uint32_t len); | ||||
|         static void Memmove_wbarrier(uint8_t* dest, uint8_t* src, uint32_t len, intptr_t type_handle); | ||||
|         static void ZeroMemory(void* p, uint32_t byteLength); | ||||
|     }; | ||||
| } // namespace Runtime | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,31 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
| namespace Cryptography | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API RNGCryptoServiceProvider | ||||
|     { | ||||
|     public: | ||||
|         static bool RngOpen(); | ||||
|         static intptr_t RngGetBytes(intptr_t handle, uint8_t* data, intptr_t data_length); | ||||
|         static intptr_t RngInitialize(uint8_t* seed, intptr_t seed_length); | ||||
|         static void RngClose(intptr_t handle); | ||||
|     }; | ||||
| } /* namespace Cryptography */ | ||||
| } /* namespace Security */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,41 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
| namespace Policy | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Evidence | ||||
|     { | ||||
|     public: | ||||
|         static bool IsAuthenticodePresent(Il2CppAssembly* a); | ||||
|     }; | ||||
| } /* namespace Policy */ | ||||
| } /* namespace Security */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,33 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
| namespace Principal | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API WindowsIdentity | ||||
|     { | ||||
|     public: | ||||
|         static intptr_t GetCurrentToken(); | ||||
|         static intptr_t GetUserToken(Il2CppString* username); | ||||
|         static Il2CppString* GetTokenName(intptr_t token); | ||||
|         static Il2CppArray* _GetRoles(intptr_t token); | ||||
|     }; | ||||
| } /* namespace Principal */ | ||||
| } /* namespace Security */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,44 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
| namespace Principal | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API WindowsImpersonationContext | ||||
|     { | ||||
|     public: | ||||
|         static bool CloseToken(intptr_t token); | ||||
|         static bool RevertToSelf(); | ||||
|         static bool SetCurrentToken(intptr_t token); | ||||
|         static intptr_t DuplicateToken(intptr_t token); | ||||
|     }; | ||||
| } /* namespace Principal */ | ||||
| } /* namespace Security */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,42 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppDelegate; | ||||
| struct Il2CppReflectionType; | ||||
| struct Il2CppReflectionMethod; | ||||
| struct Il2CppReflectionField; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppException; | ||||
| struct Il2CppReflectionModule; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAssemblyName; | ||||
| struct Il2CppAppDomain; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Security | ||||
| { | ||||
| namespace Principal | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API WindowsPrincipal | ||||
|     { | ||||
|     public: | ||||
|         static bool IsMemberOfGroupId(intptr_t user, intptr_t group); | ||||
|         static bool IsMemberOfGroupName(intptr_t user, intptr_t group); | ||||
|     }; | ||||
| } /* namespace Principal */ | ||||
| } /* namespace Security */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Text | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API EncodingHelper | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppString* InternalCodePage(int32_t* code_page); | ||||
|     }; | ||||
| } // namespace Text | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,23 @@ | ||||
| #pragma once | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Text | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Normalization | ||||
|     { | ||||
|     public: | ||||
|         static void load_normalization_resource(intptr_t* props, intptr_t* mappedChars, intptr_t* charMapIndex, intptr_t* helperIndex, intptr_t* mapIdxToComposite, intptr_t* combiningClass); | ||||
|     }; | ||||
| } // namespace Text | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,25 @@ | ||||
| #pragma once | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct Il2CppInternalThread; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API InternalThread | ||||
|     { | ||||
|     public: | ||||
|         static void Thread_free_internal(Il2CppInternalThread* _this); | ||||
|     }; | ||||
| } // namespace Threading | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,33 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| struct Il2CppObject; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Monitor | ||||
|     { | ||||
|     public: | ||||
|         static bool Monitor_test_owner(Il2CppObject* obj); | ||||
|         static bool Monitor_test_synchronised(Il2CppObject* obj); | ||||
|         static bool Monitor_wait(Il2CppObject* obj, int32_t ms); | ||||
|         static void Enter(Il2CppObject* obj); | ||||
|         static void Exit(Il2CppObject* obj); | ||||
|         static void Monitor_pulse(Il2CppObject* obj); | ||||
|         static void Monitor_pulse_all(Il2CppObject* obj); | ||||
|         static void try_enter_with_atomic_var(Il2CppObject* obj, int32_t millisecondsTimeout, bool* lockTaken); | ||||
|     }; | ||||
| } /* namespace Threading */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,34 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     struct MonoIOError; | ||||
|  | ||||
|     typedef int32_t MutexRights; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API Mutex | ||||
|     { | ||||
|     public: | ||||
|         static bool ReleaseMutex_internal(intptr_t handle); | ||||
|         static intptr_t CreateMutex_icall(bool initiallyOwned, Il2CppChar* name, int32_t name_length, bool* created); | ||||
|         static intptr_t OpenMutex_icall(Il2CppChar* name, int32_t name_length, int32_t rights, int32_t* error); | ||||
|     }; | ||||
| } /* namespace Threading */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,35 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     struct MonoIOError; | ||||
|  | ||||
|     typedef int32_t EventWaitHandleRights; | ||||
|  | ||||
|     class LIBIL2CPP_CODEGEN_API NativeEventCalls | ||||
|     { | ||||
|     public: | ||||
|         static bool ResetEvent_internal(intptr_t handle); | ||||
|         static bool SetEvent_internal(intptr_t handle); | ||||
|         static intptr_t CreateEvent_icall(bool manual, bool initial, Il2CppChar* name, int32_t name_length, int32_t* errorCode); | ||||
|         static void CloseEvent_internal(intptr_t handle); | ||||
|     }; | ||||
| } /* namespace Threading */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,23 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API OSSpecificSynchronizationContext | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppObject* GetOSContext(); | ||||
|         static void PostInternal(Il2CppObject* context, SynchronizationContextCallback callback, intptr_t arg); | ||||
|     }; | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| } | ||||
| @@ -0,0 +1,73 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-object-internals.h" | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct Il2CppString; | ||||
| struct Il2CppThread; | ||||
| struct mscorlib_System_Globalization_CultureInfo; | ||||
| struct Il2CppDelegate; | ||||
| struct mscorlib_System_Threading_Thread; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Thread | ||||
|     { | ||||
|     public: | ||||
|         static bool JoinInternal(Il2CppThread* thisPtr, int32_t millisecondsTimeout); | ||||
|         static bool Thread_internal(Il2CppThread* thisPtr, Il2CppDelegate* start); | ||||
|         static bool YieldInternal(); | ||||
|         static Il2CppArray* ByteArrayToCurrentDomain(Il2CppArray* arr); | ||||
|         static Il2CppArray* ByteArrayToRootDomain(Il2CppArray* arr); | ||||
|         static int32_t GetDomainID(); | ||||
|         static int32_t GetPriorityNative(Il2CppThread* thisPtr); | ||||
|         static int32_t SystemMaxStackStize(); | ||||
|         static int8_t VolatileRead_1(volatile void* address); | ||||
|         static double VolatileRead_Double(volatile double* address); | ||||
|         static int16_t VolatileRead_2(volatile void* address); | ||||
|         static int32_t VolatileRead_4(volatile void* address); | ||||
|         static int64_t VolatileRead_8(volatile void* address); | ||||
|         static intptr_t VolatileRead_IntPtr(volatile void* address); | ||||
|         static Il2CppObject* VolatileRead_Object(volatile void* address); | ||||
|         static float VolatileRead_Float(volatile float* address); | ||||
|         static Il2CppObject* GetAbortExceptionState(Il2CppThread* thisPtr); | ||||
|         static Il2CppString* GetName_internal(Il2CppInternalThread* thread); | ||||
|         static int32_t GetState(Il2CppInternalThread* thread); | ||||
|         static void Abort_internal(Il2CppInternalThread* thread, Il2CppObject* stateInfo); | ||||
|         static void ClrState(Il2CppInternalThread* thread, int32_t clr); | ||||
|         static void ConstructInternalThread(Il2CppThread* thisPtr); | ||||
|         static void GetCurrentThread_icall(volatile Il2CppThread** thread); | ||||
|         static void GetStackTraces(Il2CppArray** threads, Il2CppArray** stack_frames); | ||||
|         static void InterruptInternal(Il2CppThread* thisPtr); | ||||
|         static void MemoryBarrier(); | ||||
|         static void ResetAbortNative(Il2CppThread* thisPtr); | ||||
|         static void ResumeInternal(Il2CppThread* thisPtr); | ||||
|         static void SetName_icall(Il2CppInternalThread* thread, Il2CppChar* name, int32_t nameLength); | ||||
|         static void SetPriorityNative(Il2CppThread* thisPtr, int32_t priority); | ||||
|         static void SetState(Il2CppInternalThread* thread, int32_t set); | ||||
|         static void SleepInternal(int32_t millisecondsTimeout); | ||||
|         static void SpinWait_nop(); | ||||
|         static void SuspendInternal(Il2CppThread* thisPtr); | ||||
|         static void VolatileWrite_1(volatile void* address, int8_t value); | ||||
|         static void VolatileWrite_Double(volatile void* address, double value); | ||||
|         static void VolatileWrite_Float(volatile void* address, float value); | ||||
|         static void VolatileWrite_2(volatile void* address, int16_t value); | ||||
|         static void VolatileWrite_4(volatile void* address, int32_t value); | ||||
|         static void VolatileWrite_8(volatile void* address, int64_t value); | ||||
|         static void VolatileWrite_IntPtr(volatile void* address, intptr_t value); | ||||
|         static void VolatileWrite_Object(volatile void* address, Il2CppObject* value); | ||||
|     }; | ||||
| } /* namespace Threading */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,22 @@ | ||||
| #pragma once | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API Timer | ||||
|     { | ||||
|     public: | ||||
|         static int64_t GetTimeMonotonic(); | ||||
|     }; | ||||
| } // namespace Threading | ||||
| } // namespace System | ||||
| } // namespace mscorlib | ||||
| } // namespace icalls | ||||
| } // namespace il2cpp | ||||
| @@ -0,0 +1,25 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
| namespace Threading | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API WaitHandle | ||||
|     { | ||||
|     public: | ||||
|         static int32_t SignalAndWait_Internal(intptr_t toSignal, intptr_t toWaitOn, int32_t ms); | ||||
|         static int32_t Wait_internal(intptr_t* handles, int32_t numHandles, bool waitAll, int32_t ms); | ||||
|     }; | ||||
| } /* namespace Threading */ | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,59 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
|  | ||||
| struct mscorlib_System_AppDomain; | ||||
| struct mscorlib_System_AppDomainSetup; | ||||
| struct mscorlib_System_Runtime_Remoting_Contexts_Context; | ||||
| struct mscorlib_System_Security_Policy_Evidence; | ||||
| struct mscorlib_System_Reflection_Assembly; | ||||
|  | ||||
| struct Il2CppObject; | ||||
| struct Il2CppString; | ||||
| struct Il2CppArray; | ||||
| struct Il2CppAssembly; | ||||
| struct Il2CppAppDomain; | ||||
| struct Il2CppAppDomainSetup; | ||||
| struct Il2CppReflectionAssembly; | ||||
| struct Il2CppAppContext; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API AppDomain | ||||
|     { | ||||
|     public: | ||||
|         static Il2CppObject* createDomain(Il2CppString* friendlyName, Il2CppObject* info); | ||||
|         static Il2CppAppDomain* getCurDomain(); | ||||
|         static Il2CppAppDomain* getRootDomain(); | ||||
|         static Il2CppObject* InternalSetDomain(Il2CppObject* context); | ||||
|         static Il2CppObject* InternalSetDomainByID(int32_t domain_id); | ||||
|         static Il2CppAppDomainSetup* getSetup(Il2CppAppDomain* thisPtr); | ||||
|         static bool InternalIsFinalizingForUnload(int32_t domain_id); | ||||
|         static int32_t ExecuteAssembly(Il2CppObject* thisPtr, Il2CppObject* a, Il2CppArray* args); | ||||
|         static Il2CppObject* GetData(Il2CppAppDomain* thisPtr, Il2CppString* name); | ||||
|         static Il2CppReflectionAssembly* LoadAssembly(Il2CppAppDomain* thisPtr, Il2CppString* assemblyRef, Il2CppObject* securityEvidence, bool refOnly, int32_t* stackMark); | ||||
|         static Il2CppObject* LoadAssemblyRaw(Il2CppObject* thisPtr, Il2CppArray* rawAssembly, Il2CppArray* rawSymbolStore, Il2CppObject* securityEvidence, bool refonly); | ||||
|         static Il2CppArray* GetAssemblies(Il2CppObject* thisPtr, bool refOnly); | ||||
|         static Il2CppAppContext* InternalGetContext(); | ||||
|         static Il2CppAppContext* InternalGetDefaultContext(); | ||||
|         static Il2CppObject* InternalSetContext(Il2CppObject* context); | ||||
|         static Il2CppString* getFriendlyName(Il2CppAppDomain* thisPtr); | ||||
|         static Il2CppString* InternalGetProcessGuid(Il2CppString* newguid); | ||||
|         static void DoUnhandledException(Il2CppObject* thisPtr, Il2CppException* e); | ||||
|         static void InternalPopDomainRef(); | ||||
|         static void InternalPushDomainRef(Il2CppObject* domain); | ||||
|         static void InternalPushDomainRefByID(int32_t domain_id); | ||||
|         static void InternalUnload(int32_t domain_id); | ||||
|         static void SetData(Il2CppAppDomain* thisPtr, Il2CppString* name, Il2CppObject* data); | ||||
|     }; | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
| @@ -0,0 +1,28 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <stdint.h> | ||||
| #include "il2cpp-config.h" | ||||
| #include "il2cpp-object-internals.h" | ||||
|  | ||||
| struct mscorlib_System_ArgIterator; | ||||
|  | ||||
| namespace il2cpp | ||||
| { | ||||
| namespace icalls | ||||
| { | ||||
| namespace mscorlib | ||||
| { | ||||
| namespace System | ||||
| { | ||||
|     class LIBIL2CPP_CODEGEN_API ArgIterator | ||||
|     { | ||||
|     public: | ||||
|         static intptr_t IntGetNextArgType(mscorlib_System_ArgIterator* thisPtr); | ||||
|         static void IntGetNextArg(mscorlib_System_ArgIterator* thisPtr, void* res); | ||||
|         static void IntGetNextArgWithType(mscorlib_System_ArgIterator* thisPtr, void* res, intptr_t rth); | ||||
|         static void Setup(mscorlib_System_ArgIterator* thisPtr, intptr_t argsp, intptr_t start); | ||||
|     }; | ||||
| } /* namespace System */ | ||||
| } /* namespace mscorlib */ | ||||
| } /* namespace icalls */ | ||||
| } /* namespace il2cpp */ | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user