Skip to content

Commit

Permalink
更新ILRuntime至寄存器版本 2021/4/30 16:21:35
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxiongbin committed May 1, 2021
1 parent f62065d commit a29a62f
Show file tree
Hide file tree
Showing 33 changed files with 2,120 additions and 873 deletions.
1 change: 1 addition & 0 deletions Assets/XIL/Auto/CLRBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace ILRuntime.Runtime.Generated
{
class CLRBindings
{

/// <summary>
/// Initialize the CLR binding, please invoke this AFTER CLR Redirection registration
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,27 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
args = new Type[]{typeof(System.Int32), typeof(System.Object)};
method = type.GetMethod("set_Item", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, set_Item_9);
args = new Type[]{typeof(System.Int32), typeof(System.Object)};
method = type.GetMethod("AssignFieldNoClone", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AssignFieldNoClone_10);
args = new Type[]{typeof(System.Collections.Generic.HashSet<System.Object>)};
method = type.GetMethod("GetSizeInMemory", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, GetSizeInMemory_10);
app.RegisterCLRMethodRedirection(method, GetSizeInMemory_11);
args = new Type[]{};
method = type.GetMethod("ToString", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, ToString_11);
app.RegisterCLRMethodRedirection(method, ToString_12);
args = new Type[]{typeof(System.Object)};
method = type.GetMethod("Equals", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, Equals_12);
app.RegisterCLRMethodRedirection(method, Equals_13);
args = new Type[]{};
method = type.GetMethod("GetHashCode", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, GetHashCode_13);
app.RegisterCLRMethodRedirection(method, GetHashCode_14);
args = new Type[]{typeof(ILRuntime.CLR.TypeSystem.IType)};
method = type.GetMethod("CanAssignTo", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, CanAssignTo_14);
app.RegisterCLRMethodRedirection(method, CanAssignTo_15);
args = new Type[]{};
method = type.GetMethod("Clone", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, Clone_15);
app.RegisterCLRMethodRedirection(method, Clone_16);



Expand Down Expand Up @@ -273,7 +276,29 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* GetSizeInMemory_10(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* AssignFieldNoClone_10(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 3);

ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Object @value = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Int32 @index = ptr_of_this_method->Value;

ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
ILRuntime.Runtime.Intepreter.ILTypeInstance instance_of_this_method = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

instance_of_this_method.AssignFieldNoClone(@index, @value);

return __ret;
}

static StackObject* GetSizeInMemory_11(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -294,7 +319,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* ToString_11(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* ToString_12(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -309,7 +334,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
}

static StackObject* Equals_12(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* Equals_13(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -330,7 +355,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* GetHashCode_13(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* GetHashCode_14(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -347,7 +372,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* CanAssignTo_14(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* CanAssignTo_15(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -368,7 +393,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* Clone_15(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* Clone_16(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand Down
66 changes: 44 additions & 22 deletions Assets/XIL/Auto/UnityEngine_Camera_Binding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,39 +485,42 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
args = new Type[]{};
method = type.GetMethod("RenderDontRestore", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, RenderDontRestore_153);
args = new Type[]{typeof(System.Collections.Generic.List<UnityEngine.Camera.RenderRequest>)};
method = type.GetMethod("SubmitRenderRequests", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, SubmitRenderRequests_154);
args = new Type[]{typeof(UnityEngine.Camera)};
method = type.GetMethod("SetupCurrent", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, SetupCurrent_154);
app.RegisterCLRMethodRedirection(method, SetupCurrent_155);
args = new Type[]{typeof(UnityEngine.Camera)};
method = type.GetMethod("CopyFrom", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, CopyFrom_155);
app.RegisterCLRMethodRedirection(method, CopyFrom_156);
args = new Type[]{};
method = type.GetMethod("get_commandBufferCount", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, get_commandBufferCount_156);
app.RegisterCLRMethodRedirection(method, get_commandBufferCount_157);
args = new Type[]{typeof(UnityEngine.Rendering.CameraEvent)};
method = type.GetMethod("RemoveCommandBuffers", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, RemoveCommandBuffers_157);
app.RegisterCLRMethodRedirection(method, RemoveCommandBuffers_158);
args = new Type[]{};
method = type.GetMethod("RemoveAllCommandBuffers", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, RemoveAllCommandBuffers_158);
app.RegisterCLRMethodRedirection(method, RemoveAllCommandBuffers_159);
args = new Type[]{typeof(UnityEngine.Rendering.CameraEvent), typeof(UnityEngine.Rendering.CommandBuffer)};
method = type.GetMethod("AddCommandBuffer", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AddCommandBuffer_159);
app.RegisterCLRMethodRedirection(method, AddCommandBuffer_160);
args = new Type[]{typeof(UnityEngine.Rendering.CameraEvent), typeof(UnityEngine.Rendering.CommandBuffer), typeof(UnityEngine.Rendering.ComputeQueueType)};
method = type.GetMethod("AddCommandBufferAsync", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, AddCommandBufferAsync_160);
app.RegisterCLRMethodRedirection(method, AddCommandBufferAsync_161);
args = new Type[]{typeof(UnityEngine.Rendering.CameraEvent), typeof(UnityEngine.Rendering.CommandBuffer)};
method = type.GetMethod("RemoveCommandBuffer", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, RemoveCommandBuffer_161);
app.RegisterCLRMethodRedirection(method, RemoveCommandBuffer_162);
args = new Type[]{typeof(UnityEngine.Rendering.CameraEvent)};
method = type.GetMethod("GetCommandBuffers", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, GetCommandBuffers_162);
app.RegisterCLRMethodRedirection(method, GetCommandBuffers_163);
args = new Type[]{typeof(UnityEngine.Rendering.ScriptableCullingParameters).MakeByRefType()};
method = type.GetMethod("TryGetCullingParameters", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, TryGetCullingParameters_163);
app.RegisterCLRMethodRedirection(method, TryGetCullingParameters_164);
args = new Type[]{typeof(System.Boolean), typeof(UnityEngine.Rendering.ScriptableCullingParameters).MakeByRefType()};
method = type.GetMethod("TryGetCullingParameters", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, TryGetCullingParameters_164);
app.RegisterCLRMethodRedirection(method, TryGetCullingParameters_165);

field = type.GetField("onPreCull", flag);
app.RegisterCLRFieldGetter(field, get_onPreCull_0);
Expand Down Expand Up @@ -3379,7 +3382,26 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* SetupCurrent_154(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* SubmitRenderRequests_154(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
StackObject* __ret = ILIntepreter.Minus(__esp, 2);

ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.Collections.Generic.List<UnityEngine.Camera.RenderRequest> @renderRequests = (System.Collections.Generic.List<UnityEngine.Camera.RenderRequest>)typeof(System.Collections.Generic.List<UnityEngine.Camera.RenderRequest>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
UnityEngine.Camera instance_of_this_method = (UnityEngine.Camera)typeof(UnityEngine.Camera).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

instance_of_this_method.SubmitRenderRequests(@renderRequests);

return __ret;
}

static StackObject* SetupCurrent_155(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3395,7 +3417,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* CopyFrom_155(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* CopyFrom_156(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3414,7 +3436,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* get_commandBufferCount_156(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* get_commandBufferCount_157(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3431,7 +3453,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* RemoveCommandBuffers_157(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* RemoveCommandBuffers_158(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3450,7 +3472,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* RemoveAllCommandBuffers_158(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* RemoveAllCommandBuffers_159(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3465,7 +3487,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* AddCommandBuffer_159(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* AddCommandBuffer_160(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3488,7 +3510,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* AddCommandBufferAsync_160(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* AddCommandBufferAsync_161(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3515,7 +3537,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* RemoveCommandBuffer_161(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* RemoveCommandBuffer_162(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3538,7 +3560,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret;
}

static StackObject* GetCommandBuffers_162(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* GetCommandBuffers_163(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand All @@ -3557,7 +3579,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
}

static StackObject* TryGetCullingParameters_163(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* TryGetCullingParameters_164(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand Down Expand Up @@ -3633,7 +3655,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* TryGetCullingParameters_164(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* TryGetCullingParameters_165(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
StackObject* ptr_of_this_method;
Expand Down
Loading

0 comments on commit a29a62f

Please sign in to comment.