少年修仙传客户端基础资源
hch
2024-04-11 4c71d74b77c9eb62a0323698c9a0db3b641a917e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
 
#include "os/ThreadLocalValue.h"
 
#include "../CommonDef.h"
#include "MethodBridge.h"
#include "Engine.h"
#include "../metadata/Image.h"
 
namespace hybridclr
{
namespace interpreter
{
 
    class InterpreterModule
    {
    public:
        static void Initialize();
 
 
        static MachineState& GetCurrentThreadMachineState();
        static void FreeThreadLocalMachineState();
 
        static InterpMethodInfo* GetInterpMethodInfo(const MethodInfo* methodInfo);
 
        static Il2CppMethodPointer GetMethodPointer(const Il2CppMethodDefinition* method);
        static Il2CppMethodPointer GetMethodPointer(const MethodInfo* method);
        static Il2CppMethodPointer GetAdjustThunkMethodPointer(const Il2CppMethodDefinition* method);
        static Il2CppMethodPointer GetAdjustThunkMethodPointer(const MethodInfo* method);
        static Managed2NativeCallMethod GetManaged2NativeMethodPointer(const MethodInfo* method, bool forceStatic);
        static Managed2NativeCallMethod GetManaged2NativeMethodPointer(const metadata::ResolveStandAloneMethodSig& methodSig);
 
        static InvokerMethod GetMethodInvoker(const Il2CppMethodDefinition* method);
        static InvokerMethod GetMethodInvoker(const MethodInfo* method);
 
        static bool IsImplementsByInterpreter(const MethodInfo* method);
 
        static bool HasImplementCallNative2Managed(const MethodInfo* method)
        {
            IL2CPP_ASSERT(method->methodPointerCallByInterp != NotSupportAdjustorThunk);
            return method->methodPointerCallByInterp != (Il2CppMethodPointer)NotSupportNative2Managed;
        }
 
        static bool HasImplementCallVirtualNative2Managed(const MethodInfo* method)
        {
            IL2CPP_ASSERT(method->virtualMethodPointerCallByInterp != NotSupportNative2Managed);
            return method->virtualMethodPointerCallByInterp != (Il2CppMethodPointer)NotSupportAdjustorThunk;
        }
 
        static void Managed2NativeCallByReflectionInvoke(const MethodInfo* method, uint16_t* argVarIndexs, StackObject* localVarBase, void* ret);
 
        static void NotSupportNative2Managed();
        static void NotSupportAdjustorThunk();
 
        static const char* GetValueTypeSignature(const char* fullName);
    private:
 
        static il2cpp::os::ThreadLocalValue s_machineState;
    };
}
}