Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonXuDeveloper committed Nov 8, 2020
1 parent 3d136d6 commit 33086aa
Show file tree
Hide file tree
Showing 24 changed files with 455 additions and 278 deletions.
Binary file modified Packages/Core.unitypackage
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Adaptor : MonoBehaviour, CrossBindingAdaptorType
AppDomain appdomain;

public bool isJBehaviour;
public bool isMonoBehaviour;
public bool isMonoBehaviour = true;

public Adaptor()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app)
JEngine_Core_ClassBind_Binding.Register(app);
System_Linq_Enumerable_Binding.Register(app);
System_Collections_Generic_List_1_MonoBehaviourAdapter_Binding_Adaptor_Binding.Register(app);
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
System_Collections_Generic_KeyValuePair_2_String_ILTypeInstance_Binding.Register(app);
System_Diagnostics_Stopwatch_Binding.Register(app);
System_Guid_Binding.Register(app);
UnityEngine_MonoBehaviour_Binding.Register(app);
System_Collections_Generic_KeyValuePair_2_String_ILTypeInstance_Binding.Register(app);
System_NotSupportedException_Binding.Register(app);
MonoBehaviourAdapter_Binding_Adaptor_Binding.Register(app);
System_Reflection_FieldInfo_Binding.Register(app);
JEngine_Core_GameStats_Binding.Register(app);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
args = new Type[]{typeof(System.String)};
method = type.GetMethod("get_Item", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, get_Item_0);
args = new Type[]{};
method = type.GetMethod("GetEnumerator", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, GetEnumerator_1);
args = new Type[]{typeof(System.String)};
method = type.GetMethod("Remove", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, Remove_2);
app.RegisterCLRMethodRedirection(method, Remove_1);
args = new Type[]{typeof(System.String), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
method = type.GetMethod("set_Item", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, set_Item_3);
app.RegisterCLRMethodRedirection(method, set_Item_2);
args = new Type[]{typeof(System.String), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
method = type.GetMethod("Add", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, Add_3);
args = new Type[]{typeof(System.String)};
method = type.GetMethod("ContainsKey", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, ContainsKey_4);
args = new Type[]{typeof(System.String), typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
method = type.GetMethod("Add", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, Add_5);
args = new Type[]{};
method = type.GetMethod("get_Count", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, get_Count_5);

args = new Type[]{typeof(System.Int32)};
method = type.GetConstructor(flag, null, args, null);
Expand Down Expand Up @@ -67,43 +67,51 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
}

static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* Remove_1(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, 1);
StackObject* __ret = ILIntepreter.Minus(__esp, 2);

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

ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

var result_of_this_method = instance_of_this_method.GetEnumerator();
var result_of_this_method = instance_of_this_method.Remove(@key);

return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
__ret->ObjectType = ObjectTypes.Integer;
__ret->Value = result_of_this_method ? 1 : 0;
return __ret + 1;
}

static StackObject* Remove_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* set_Item_2(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);
StackObject* __ret = ILIntepreter.Minus(__esp, 3);

ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
System.String @key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
ILRuntime.Runtime.Intepreter.ILTypeInstance @value = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.String @key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

var result_of_this_method = instance_of_this_method.Remove(@key);
instance_of_this_method[key] = value;

__ret->ObjectType = ObjectTypes.Integer;
__ret->Value = result_of_this_method ? 1 : 0;
return __ret + 1;
return __ret;
}

static StackObject* set_Item_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* Add_3(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 @@ -121,7 +129,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

instance_of_this_method[key] = value;
instance_of_this_method.Add(@key, @value);

return __ret;
}
Expand All @@ -147,27 +155,21 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
return __ret + 1;
}

static StackObject* Add_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
static StackObject* get_Count_5(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);
StackObject* __ret = ILIntepreter.Minus(__esp, 1);

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

ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
System.String @key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
__intp.Free(ptr_of_this_method);

instance_of_this_method.Add(@key, @value);
var result_of_this_method = instance_of_this_method.Count;

return __ret;
__ret->ObjectType = ObjectTypes.Integer;
__ret->Value = result_of_this_method;
return __ret + 1;
}


Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
MethodBase method;
Type[] args;
Type type = typeof(System.Exception);
args = new Type[]{};
method = type.GetMethod("get_Message", flag, null, args, null);
app.RegisterCLRMethodRedirection(method, get_Message_0);

args = new Type[]{typeof(System.String)};
method = type.GetConstructor(flag, null, args, null);
Expand All @@ -33,21 +30,6 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
}


static StackObject* get_Message_0(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, 1);

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

var result_of_this_method = instance_of_this_method.Message;

return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
}


static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
{
Expand Down
Loading

0 comments on commit 33086aa

Please sign in to comment.