diff --git a/Dependencies/ILRuntime.Mono.Cecil.dll b/Dependencies/ILRuntime.Mono.Cecil.dll index 46ec9f08..feeedade 100644 Binary files a/Dependencies/ILRuntime.Mono.Cecil.dll and b/Dependencies/ILRuntime.Mono.Cecil.dll differ diff --git a/Dependencies/ILRuntime.Mono.Cecil.pdb b/Dependencies/ILRuntime.Mono.Cecil.pdb index f565f937..4eace299 100644 Binary files a/Dependencies/ILRuntime.Mono.Cecil.pdb and b/Dependencies/ILRuntime.Mono.Cecil.pdb differ diff --git a/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.dll b/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.dll index 59aab548..99d6e587 100644 Binary files a/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.dll and b/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.dll differ diff --git a/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.pdb b/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.pdb index 7af1d4cc..051365c9 100644 Binary files a/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.pdb and b/Dependencies/netstandard2.0/ILRuntime.Mono.Cecil.pdb differ diff --git a/ILRuntime/CLR/Method/CLRMethod.cs b/ILRuntime/CLR/Method/CLRMethod.cs index 4ccda7ed..9c7b9901 100644 --- a/ILRuntime/CLR/Method/CLRMethod.cs +++ b/ILRuntime/CLR/Method/CLRMethod.cs @@ -6,9 +6,15 @@ using System; using System.Collections.Generic; using System.Reflection; + +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.CLR.Method { - public class CLRMethod : IMethod + public sealed class CLRMethod : IMethod { MethodInfo def; ConstructorInfo cDef; @@ -270,7 +276,7 @@ void InitParameters() return (StackObject*)((long)a - sizeof(StackObject) * b); } - public unsafe object Invoke(Runtime.Intepreter.ILIntepreter intepreter, StackObject* esp, IList mStack, bool isNewObj = false) + public unsafe object Invoke(Runtime.Intepreter.ILIntepreter intepreter, StackObject* esp, AutoList mStack, bool isNewObj = false) { if (parameters == null) { @@ -346,7 +352,7 @@ public unsafe object Invoke(Runtime.Intepreter.ILIntepreter intepreter, StackObj } } - unsafe void FixReference(int paramCount, StackObject* esp, object[] param, IList mStack, object instance, bool hasThis) + unsafe void FixReference(int paramCount, StackObject* esp, object[] param, AutoList mStack, object instance, bool hasThis) { var cnt = hasThis ? paramCount + 1 : paramCount; for (int i = cnt; i >= 1; i--) diff --git a/ILRuntime/CLR/Method/ILMethod.cs b/ILRuntime/CLR/Method/ILMethod.cs index 22177bdc..202e82fa 100644 --- a/ILRuntime/CLR/Method/ILMethod.cs +++ b/ILRuntime/CLR/Method/ILMethod.cs @@ -14,7 +14,7 @@ using ILRuntime.Reflection; namespace ILRuntime.CLR.Method { - public class ILMethod : IMethod + public sealed class ILMethod : IMethod { OpCode[] body; OpCodeR[] bodyRegister; @@ -27,8 +27,11 @@ public class ILMethod : IMethod ExceptionHandler[] exceptionHandler, exceptionHandlerR; KeyValuePair[] genericParameters; IType[] genericArguments; + ILMethod genericDefinition; Dictionary jumptables, jumptablesR; bool isDelegateInvoke; + bool isEventAdd, isEventRemove; + int eventFieldIndex; bool jitPending; ILRuntimeMethodInfo refletionMethodInfo; ILRuntimeConstructorInfo reflectionCtorInfo; @@ -157,6 +160,7 @@ public Mono.Collections.Generic.Collection Va public IType[] GenericArugmentsArray { get { return genericArguments; } } + public ILMethod GenericDefinition { get { return genericDefinition; } } public bool ShouldUseRegisterVM { get @@ -347,6 +351,27 @@ public bool IsDelegateInvoke } } + public bool IsEventAdd + { + get + { + return isEventAdd; + } + } + + public bool IsEventRemove + { + get + { + return isEventRemove; + } + } + + public int EventFieldIndex + { + get { return eventFieldIndex; } + } + public bool IsStatic { get { return def.IsStatic; } @@ -797,6 +822,13 @@ unsafe void InitToken(ref OpCode code, object token, Dictionary; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.CLR.TypeSystem { - public unsafe class CLRType : IType + public sealed unsafe class CLRType : IType { Type clrType; bool isPrimitive, isValueType, isEnum; @@ -404,7 +409,7 @@ public object GetFieldValue(int hash, object target) return null; } - public bool CopyFieldToStack(int hash, object target, Runtime.Intepreter.ILIntepreter intp, ref StackObject* esp, IList mStack) + public bool CopyFieldToStack(int hash, object target, Runtime.Intepreter.ILIntepreter intp, ref StackObject* esp, AutoList mStack) { if (fieldMapping == null) InitializeFields(); @@ -420,7 +425,7 @@ public bool CopyFieldToStack(int hash, object target, Runtime.Intepreter.ILIntep return false; } - public bool AssignFieldFromStack(int hash, ref object target, Runtime.Intepreter.ILIntepreter intp, StackObject* esp, IList mStack) + public bool AssignFieldFromStack(int hash, ref object target, Runtime.Intepreter.ILIntepreter intp, StackObject* esp, AutoList mStack) { if (fieldMapping == null) InitializeFields(); @@ -898,7 +903,7 @@ public bool CanAssignTo(IType type) if (type is ILType) return false; Type cT = type != null ? type.TypeForCLR : typeof(object); - return TypeForCLR.IsAssignableFrom(cT); + return cT.IsAssignableFrom(TypeForCLR); } } diff --git a/ILRuntime/CLR/TypeSystem/ILType.cs b/ILRuntime/CLR/TypeSystem/ILType.cs index 0aec10ca..bd2ad675 100644 --- a/ILRuntime/CLR/TypeSystem/ILType.cs +++ b/ILRuntime/CLR/TypeSystem/ILType.cs @@ -13,7 +13,7 @@ namespace ILRuntime.CLR.TypeSystem { - public class ILType : IType + public sealed class ILType : IType { Dictionary> methods; TypeReference typeRef; @@ -716,52 +716,70 @@ public IMethod GetMethod ( string name, int paramCount, bool declaredOnly = fals } } - void InitializeMethods () + void InitializeMethods() { - methods = new Dictionary> (); - constructors = new List (); - if ( definition == null ) + methods = new Dictionary>(); + constructors = new List(); + if (definition == null) return; - if ( definition.HasCustomAttributes ) + if (definition.HasCustomAttributes) { - for ( int i = 0; i < definition.CustomAttributes.Count; i++ ) + for (int i = 0; i < definition.CustomAttributes.Count; i++) { int f; - if ( definition.CustomAttributes [ i ].GetJITFlags ( AppDomain, out f ) ) + if (definition.CustomAttributes[i].GetJITFlags(AppDomain, out f)) { this.jitFlags = f; break; } } } - foreach ( var i in definition.Methods ) + foreach (var i in definition.Methods) { - if ( i.IsConstructor ) + if (i.IsConstructor) { - if ( i.IsStatic ) - staticConstructor = new ILMethod ( i, this, appdomain, jitFlags ); + if (i.IsStatic) + staticConstructor = new ILMethod(i, this, appdomain, jitFlags); else - constructors.Add ( new ILMethod ( i, this, appdomain, jitFlags ) ); + constructors.Add(new ILMethod(i, this, appdomain, jitFlags)); } else { List lst; - if ( !methods.TryGetValue ( i.Name, out lst ) ) + if (!methods.TryGetValue(i.Name, out lst)) { - lst = new List (); - methods [ i.Name ] = lst; + lst = new List(); + methods[i.Name] = lst; } - var m = new ILMethod ( i, this, appdomain, jitFlags ); - lst.Add ( m ); + var m = new ILMethod(i, this, appdomain, jitFlags); + lst.Add(m); + } + } + + foreach (var i in definition.Events) + { + int fieldIdx = -1; + InitializeFields(); + if(i.AddMethod.IsStatic) + staticFieldMapping.TryGetValue(i.Name,out fieldIdx); + else + fieldMapping.TryGetValue(i.Name, out fieldIdx); + if (methods.TryGetValue(i.AddMethod.Name, out var lst)) + { + lst[0].SetEventAddOrRemove(true, false, fieldIdx); + } + if (methods.TryGetValue(i.RemoveMethod.Name, out lst)) + { + lst[0].SetEventAddOrRemove(false, true, fieldIdx); } } - if ( !appdomain.SuppressStaticConstructor && !staticConstructorCalled ) + if (!appdomain.SuppressStaticConstructor && !staticConstructorCalled) { staticConstructorCalled = true; - if ( staticConstructor != null && ( !TypeReference.HasGenericParameters || IsGenericInstance ) ) + if (staticConstructor != null && (!TypeReference.HasGenericParameters || IsGenericInstance)) { - appdomain.Invoke ( staticConstructor, null, null ); + appdomain.Invoke(staticConstructor, null, null); } } } diff --git a/ILRuntime/Other/UncheckedList.cs b/ILRuntime/Other/UncheckedList.cs index d0ebb01d..71172b46 100644 --- a/ILRuntime/Other/UncheckedList.cs +++ b/ILRuntime/Other/UncheckedList.cs @@ -13,7 +13,7 @@ namespace ILRuntime.Other /// /// [Serializable] - public class UncheckedList : IList, ICollection, IEnumerable, IEnumerable, IList, ICollection + public sealed class UncheckedList : IList, ICollection, IEnumerable, IEnumerable, IList, ICollection { private const int _defaultCapacity = 4; diff --git a/ILRuntime/Reflection/ILRuntimeFieldInfo.cs b/ILRuntime/Reflection/ILRuntimeFieldInfo.cs index 021c5529..7c747000 100644 --- a/ILRuntime/Reflection/ILRuntimeFieldInfo.cs +++ b/ILRuntime/Reflection/ILRuntimeFieldInfo.cs @@ -165,6 +165,11 @@ public override object[] GetCustomAttributes(Type attributeType, bool inherit) return res.ToArray(); } + public override object GetRawConstantValue() + { + return definition.Constant; + } + public override object GetValue(object obj) { unsafe @@ -172,6 +177,8 @@ public override object GetValue(object obj) ILTypeInstance ins; if (isStatic) { + if (definition.HasConstant) + return definition.Constant; ins = ilType.StaticInstance; } else diff --git a/ILRuntime/Reflection/ILRuntimeMethodInfo.cs b/ILRuntime/Reflection/ILRuntimeMethodInfo.cs index 4709cd7b..22dc2960 100644 --- a/ILRuntime/Reflection/ILRuntimeMethodInfo.cs +++ b/ILRuntime/Reflection/ILRuntimeMethodInfo.cs @@ -163,6 +163,32 @@ public override ParameterInfo[] GetParameters() return parameters; } + public override bool IsGenericMethod + { + get + { + return method.IsGenericInstance || method.GenericParameterCount > 0; + } + } + + public override bool IsGenericMethodDefinition + { + get + { + return method.GenericParameterCount > 0; + } + } + + public override MethodInfo MakeGenericMethod(params Type[] typeArguments) + { + IType[] arg = new IType[typeArguments.Length]; + for (int i = 0; i < arg.Length; i++) + { + arg[i] = appdomain.GetType(typeArguments[i]); + } + return ((ILMethod)method.MakeGenericMethod(arg)).ReflectionMethodInfo; + } + public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) { if (method.HasThis) diff --git a/ILRuntime/Reflection/ILRuntimeParameterInfo.cs b/ILRuntime/Reflection/ILRuntimeParameterInfo.cs index bc137368..602988be 100644 --- a/ILRuntime/Reflection/ILRuntimeParameterInfo.cs +++ b/ILRuntime/Reflection/ILRuntimeParameterInfo.cs @@ -25,7 +25,7 @@ public ILRuntimeParameterInfo(Mono.Cecil.ParameterDefinition definition, IType t this.AppDomain = appdomain; AttrsImpl = (ParameterAttributes)definition.Attributes; - ClassImpl = type.ReflectionType; + ClassImpl = type is ILGenericParameterType ? typeof(ILGenericParameterType) : type.ReflectionType; DefaultValueImpl = definition.Constant; MemberImpl = member; NameImpl = definition.Name; diff --git a/ILRuntime/Reflection/ILRuntimeType.cs b/ILRuntime/Reflection/ILRuntimeType.cs index 3e97280f..8212c4d4 100644 --- a/ILRuntime/Reflection/ILRuntimeType.cs +++ b/ILRuntime/Reflection/ILRuntimeType.cs @@ -73,11 +73,11 @@ void InitializeProperties() properties[i] = pi; if (pd.GetMethod != null) { - pi.Getter = type.GetMethod(pd.GetMethod.Name, pd.GetMethod.Parameters.Select(p => type.AppDomain.GetType(p.ParameterType, null, null)).ToList(), null) as ILMethod; + pi.Getter = type.GetMethod(pd.GetMethod.Name, pd.GetMethod.Parameters.Select(p => type.AppDomain.GetType(p.ParameterType, type, null)).ToList(), null) as ILMethod; } if (pd.SetMethod != null) { - pi.Setter = type.GetMethod(pd.SetMethod.Name, pd.SetMethod.Parameters.Select(p => type.AppDomain.GetType(p.ParameterType, null, null)).ToList(), null) as ILMethod; + pi.Setter = type.GetMethod(pd.SetMethod.Name, pd.SetMethod.Parameters.Select(p => type.AppDomain.GetType(p.ParameterType, type, null)).ToList(), null) as ILMethod; } } } @@ -303,10 +303,22 @@ public override FieldInfo GetField(string name, BindingFlags bindingAttr) { if (fields == null) InitializeFields(); - foreach(var i in fields) + bool isPublic = (bindingAttr & BindingFlags.Public) == BindingFlags.Public; + bool isPrivate = (bindingAttr & BindingFlags.NonPublic) == BindingFlags.NonPublic; + bool isStatic = (bindingAttr & BindingFlags.Static) == BindingFlags.Static; + bool isInstance = (bindingAttr & BindingFlags.Instance) == BindingFlags.Instance; + bool isDeclaredOnly = (bindingAttr & BindingFlags.DeclaredOnly) == BindingFlags.DeclaredOnly; + for (int i = 0; i < fields.Length; i++) { - if (i.Name == name) - return i; + FieldInfo fi = fields[i]; + if (isPublic != fi.IsPublic && isPrivate != !fi.IsPublic) + continue; + if ((isStatic != fi.IsStatic) && (isInstance != !fi.IsStatic)) + continue; + if (isDeclaredOnly && i < type.FieldStartIndex) + continue; + if (fi.Name == name) + return fi; } if (BaseType != null && BaseType is ILRuntimeWrapperType) { @@ -323,14 +335,18 @@ public override FieldInfo[] GetFields(BindingFlags bindingAttr) bool isPrivate = (bindingAttr & BindingFlags.NonPublic) == BindingFlags.NonPublic; bool isStatic = (bindingAttr & BindingFlags.Static) == BindingFlags.Static; bool isInstance = (bindingAttr & BindingFlags.Instance) == BindingFlags.Instance; + bool isDeclaredOnly = (bindingAttr & BindingFlags.DeclaredOnly) == BindingFlags.DeclaredOnly; List res = new List(); - foreach(var i in fields) + for (int i = 0; i < fields.Length; i++) { - if (isPublic != i.IsPublic && isPrivate != !i.IsPublic) + FieldInfo fi = fields[i]; + if (isPublic != fi.IsPublic && isPrivate != !fi.IsPublic) continue; - if ((isStatic != i.IsStatic) && (isInstance != !i.IsStatic)) + if ((isStatic != fi.IsStatic) && (isInstance != !fi.IsStatic)) continue; - res.Add(i); + if (isDeclaredOnly && i < type.FieldStartIndex) + continue; + res.Add(fi); } if ((bindingAttr & BindingFlags.DeclaredOnly) != BindingFlags.DeclaredOnly) { diff --git a/ILRuntime/Runtime/CLRBinding/BindingCodeGenerator.cs b/ILRuntime/Runtime/CLRBinding/BindingCodeGenerator.cs index bb09c1f9..8aafdebb 100755 --- a/ILRuntime/Runtime/CLRBinding/BindingCodeGenerator.cs +++ b/ILRuntime/Runtime/CLRBinding/BindingCodeGenerator.cs @@ -50,6 +50,11 @@ public static void GenerateBindingCode(List types, string outputPath, using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { @@ -263,7 +268,11 @@ public static void GenerateBindingCode(ILRuntime.Runtime.Enviorment.AppDomain do using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class "); @@ -351,7 +360,11 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) sb.AppendLine(@"using System; using System.Collections.Generic; using System.Reflection; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { class CLRBindings @@ -635,8 +648,8 @@ internal static List GenerateDelegateBinding(List types, string ou { var mi = i.GetMethod("Invoke"); var miParameters = mi.GetParameters(); - if (mi.ReturnType == typeof(void) && miParameters.Length == 0) - continue; + //if (mi.ReturnType == typeof(void) && miParameters.Length == 0) + // continue; string clsName, realClsName, paramClsName, paramRealClsName; bool isByRef, paramIsByRef; @@ -657,7 +670,11 @@ internal static List GenerateDelegateBinding(List types, string ou using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class "); @@ -687,8 +704,9 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) mi.ReturnType.GetClassName(out paramClsName, out paramRealClsName, out paramIsByRef); sb.Append(paramRealClsName); sb.AppendLine("> ();"); + sb.AppendLine(); } - else + else if (miParameters.Length != 0) { sb.Append(" app.DelegateManager.RegisterMethodDelegate<"); first = true; @@ -704,8 +722,8 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) sb.Append(paramRealClsName); } sb.AppendLine("> ();"); + sb.AppendLine(); } - sb.AppendLine(); sb.Append(" app.DelegateManager.RegisterDelegateConvertor<"); sb.Append(realClsName); @@ -746,10 +764,14 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) sb.Append(", "); mi.ReturnType.GetClassName(out paramClsName, out paramRealClsName, out paramIsByRef); sb.Append(paramRealClsName); + sb.Append(">)act)("); } else { - sb.Append(" ((Action<"); + if (miParameters.Length != 0) + sb.Append(" ((Action<"); + else + sb.Append(" ((Action"); first = true; foreach (var j in miParameters) { @@ -762,8 +784,11 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) j.ParameterType.GetClassName(out paramClsName, out paramRealClsName, out paramIsByRef); sb.Append(paramRealClsName); } + if (miParameters.Length != 0) + sb.Append(">)act)("); + else + sb.Append(")act)("); } - sb.Append(">)act)("); first = true; foreach (var j in miParameters) { @@ -814,7 +839,11 @@ internal static void GenerateBindingInitializeScript(List clsNames, List sb.Append(@"using System; using System.Collections.Generic; using System.Reflection; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { class CLRBindings diff --git a/ILRuntime/Runtime/CLRBinding/BindingGeneratorExtensions.cs b/ILRuntime/Runtime/CLRBinding/BindingGeneratorExtensions.cs index e71588ed..934dd4af 100755 --- a/ILRuntime/Runtime/CLRBinding/BindingGeneratorExtensions.cs +++ b/ILRuntime/Runtime/CLRBinding/BindingGeneratorExtensions.cs @@ -39,8 +39,8 @@ internal static bool ShouldSkipMethod(this Type type, MethodBase i) if (i.IsSpecialName) { string[] t = i.Name.Split('_'); - //if (t[0] == "add" || t[0] == "remove") - // return true; + if (t[0] == "add" || t[0] == "remove") + return false; if (t[0] == "get" || t[0] == "set") { Type[] ts; diff --git a/ILRuntime/Runtime/CLRBinding/CommonBindingGenerator.cs b/ILRuntime/Runtime/CLRBinding/CommonBindingGenerator.cs index 62c8c399..784489b0 100644 --- a/ILRuntime/Runtime/CLRBinding/CommonBindingGenerator.cs +++ b/ILRuntime/Runtime/CLRBinding/CommonBindingGenerator.cs @@ -59,7 +59,7 @@ internal static string GenerateCommonCode(this Type type, string typeClsName) StringBuilder sb = new StringBuilder(); if (type.IsPrimitive) { - sb.AppendLine(string.Format(" static {0} GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack)", typeClsName)); + sb.AppendLine(string.Format(" static {0} GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack)", typeClsName)); sb.AppendLine(" {"); if (type.IsPrimitive || type.IsValueType) sb.AppendLine(" ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);"); @@ -128,7 +128,7 @@ internal static string GenerateCommonCode(this Type type, string typeClsName) } if (!type.IsPrimitive && !type.IsAbstract) { - sb.AppendLine(string.Format(" static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref {0} instance_of_this_method)", typeClsName)); + sb.AppendLine(string.Format(" static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref {0} instance_of_this_method)", typeClsName)); sb.AppendLine(" {"); sb.AppendLine(@" ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) diff --git a/ILRuntime/Runtime/CLRBinding/ConstructorBindingGenerator.cs b/ILRuntime/Runtime/CLRBinding/ConstructorBindingGenerator.cs index 69410774..9f6b8211 100644 --- a/ILRuntime/Runtime/CLRBinding/ConstructorBindingGenerator.cs +++ b/ILRuntime/Runtime/CLRBinding/ConstructorBindingGenerator.cs @@ -62,7 +62,7 @@ internal static string GenerateConstructorWraperCode(this Type type, Constructor continue; var param = i.GetParameters(); int paramCnt = param.Length; - sb.AppendLine(string.Format(" static StackObject* Ctor_{0}(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj)", idx)); + sb.AppendLine(string.Format(" static StackObject* Ctor_{0}(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj)", idx)); sb.AppendLine(" {"); sb.AppendLine(" ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;"); if (param.Length != 0) diff --git a/ILRuntime/Runtime/CLRBinding/FieldBindingGenerator.cs b/ILRuntime/Runtime/CLRBinding/FieldBindingGenerator.cs index 1da71f46..28b36357 100644 --- a/ILRuntime/Runtime/CLRBinding/FieldBindingGenerator.cs +++ b/ILRuntime/Runtime/CLRBinding/FieldBindingGenerator.cs @@ -62,7 +62,7 @@ internal static string GenerateFieldWraperCode(this Type type, FieldInfo[] field } sb.AppendLine(" }"); sb.AppendLine(); - sb.AppendLine(string.Format(" static StackObject* CopyToStack_{0}_{1}(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack)", i.Name, idx)); + sb.AppendLine(string.Format(" static StackObject* CopyToStack_{0}_{1}(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack)", i.Name, idx)); sb.AppendLine(" {"); if (i.IsStatic) { @@ -118,7 +118,7 @@ internal static string GenerateFieldWraperCode(this Type type, FieldInfo[] field } sb.AppendLine(" }"); sb.AppendLine(); - sb.AppendLine(string.Format(" static StackObject* AssignFromStack_{0}_{1}(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack)", i.Name, idx)); + sb.AppendLine(string.Format(" static StackObject* AssignFromStack_{0}_{1}(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack)", i.Name, idx)); sb.AppendLine(" {"); sb.AppendLine(" ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;"); i.FieldType.AppendArgumentCode(sb, 0, i.Name, valueTypeBinders, false, false, false); diff --git a/ILRuntime/Runtime/CLRBinding/MethodBindingGenerator.cs b/ILRuntime/Runtime/CLRBinding/MethodBindingGenerator.cs index 2c999070..7f4c253b 100644 --- a/ILRuntime/Runtime/CLRBinding/MethodBindingGenerator.cs +++ b/ILRuntime/Runtime/CLRBinding/MethodBindingGenerator.cs @@ -170,7 +170,7 @@ internal static string GenerateMethodWraperCode(this Type type, MethodInfo[] met int paramCnt = param.Length; if (!i.IsStatic) paramCnt++; - sb.AppendLine(string.Format(" static StackObject* {0}_{1}(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj)", i.Name, idx)); + sb.AppendLine(string.Format(" static StackObject* {0}_{1}(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj)", i.Name, idx)); sb.AppendLine(" {"); sb.AppendLine(" ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;"); if (param.Length != 0 || !i.IsStatic) @@ -331,6 +331,12 @@ internal static string GenerateMethodWraperCode(this Type type, MethodInfo[] met case "Modulus": sb.AppendLine(string.Format("{0} % {1};", param[0].Name, param[1].Name)); break; + case "LeftShift": + sb.AppendLine(string.Format("{0} << {1};", param[0].Name, param[1].Name)); + break; + case "RightShift": + sb.AppendLine(string.Format("{0} >> {1};", param[0].Name, param[1].Name)); + break; case "Implicit": case "Explicit": { diff --git a/ILRuntime/Runtime/Debugger/DebugService.cs b/ILRuntime/Runtime/Debugger/DebugService.cs index 6d1fe602..ade3fe80 100644 --- a/ILRuntime/Runtime/Debugger/DebugService.cs +++ b/ILRuntime/Runtime/Debugger/DebugService.cs @@ -16,6 +16,11 @@ #endif using System.Reflection; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Debugger { public class DebugService @@ -464,7 +469,7 @@ unsafe internal void CheckShouldBreak(ILMethod method, ILIntepreter intp, int ip } StackObject* basePointer = ResolveCurrentFrameBasePointer(intp, method, ip); - int methodHash = m.GetHashCode(); + int methodHash = m.IsGenericInstance ? m.GenericDefinition.GetHashCode() : m.GetHashCode(); BreakpointInfo[] lst = null; lock (activeBreakpoints) @@ -1554,7 +1559,7 @@ private static bool CheckParameters(ParameterInfo[] parameters, Type[] checkType return true; } - unsafe bool GetValueExpandable(ILIntepreter intp, StackObject* esp, IList mStack) + unsafe bool GetValueExpandable(ILIntepreter intp, StackObject* esp, AutoList mStack) { if (esp->ObjectType < ObjectTypes.ValueTypeObjectReference) return false; @@ -1726,7 +1731,7 @@ internal unsafe void DumpStack(StackObject* esp, RuntimeStack stack) #endif } - unsafe void GetStackObjectText(StringBuilder sb, StackObject* esp, IList mStack, StackObject* valueTypeEnd) + unsafe void GetStackObjectText(StringBuilder sb, StackObject* esp, AutoList mStack, StackObject* valueTypeEnd) { string text = "null"; switch (esp->ObjectType) diff --git a/ILRuntime/Runtime/Enviorment/AppDomain.cs b/ILRuntime/Runtime/Enviorment/AppDomain.cs index a9d9ed14..1d8583e5 100644 --- a/ILRuntime/Runtime/Enviorment/AppDomain.cs +++ b/ILRuntime/Runtime/Enviorment/AppDomain.cs @@ -17,11 +17,16 @@ using ILRuntime.Runtime.Intepreter.RegisterVM; using System.Threading; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Enviorment { - public unsafe delegate StackObject* CLRRedirectionDelegate(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj); + public unsafe delegate StackObject* CLRRedirectionDelegate(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj); public delegate object CLRFieldGetterDelegate(ref object target); - public unsafe delegate StackObject* CLRFieldBindingDelegate(ref object target, ILIntepreter __intp, StackObject* __esp, IList __mStack); + public unsafe delegate StackObject* CLRFieldBindingDelegate(ref object target, ILIntepreter __intp, StackObject* __esp, AutoList __mStack); public delegate void CLRFieldSetterDelegate(ref object target, object value); public delegate object CLRMemberwiseCloneDelegate(ref object target); public delegate object CLRCreateDefaultInstanceDelegate(); diff --git a/ILRuntime/Runtime/Enviorment/CLRRedirections.cs b/ILRuntime/Runtime/Enviorment/CLRRedirections.cs index 384b4865..5075c0ca 100644 --- a/ILRuntime/Runtime/Enviorment/CLRRedirections.cs +++ b/ILRuntime/Runtime/Enviorment/CLRRedirections.cs @@ -11,19 +11,23 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using System.Collections; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Enviorment { unsafe static class CLRRedirections { - public static StackObject* GetCurrentStackTrace(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* GetCurrentStackTrace(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { StackObject* ret = esp - 1 - 1; intp.Free(esp - 1); return ILIntepreter.PushObject(ret, mStack, intp.AppDomain.DebugService.GetStackTrace(intp)); } - public static StackObject* CreateInstance(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* CreateInstance(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { IType[] genericArguments = method.GenericArguments; if (genericArguments != null && genericArguments.Length == 1) @@ -69,7 +73,7 @@ unsafe static class CLRRedirections throw new EntryPointNotFoundException(); }*/ - public static StackObject* CreateInstance2(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* CreateInstance2(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var p = esp - 1; var t = mStack[p->Value] as Type; @@ -103,7 +107,7 @@ unsafe static class CLRRedirections return null; }*/ - public static StackObject* CreateInstance3(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* CreateInstance3(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var p = esp - 1 - 1; var t = mStack[p->Value] as Type; @@ -131,7 +135,7 @@ unsafe static class CLRRedirections return ILIntepreter.PushNull(p); } - public static StackObject* GetType(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* GetType(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var p = esp - 1; AppDomain dommain = intp.AppDomain; @@ -144,7 +148,7 @@ unsafe static class CLRRedirections return ILIntepreter.PushNull(p); } - public static StackObject* TypeEquals(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* TypeEquals(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = ILIntepreter.Minus(esp, 2); var p = esp - 1; @@ -184,7 +188,7 @@ unsafe static class CLRRedirections return null; }*/ - public static StackObject* IsAssignableFrom(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* IsAssignableFrom(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = ILIntepreter.Minus(esp, 2); var p = esp - 1; @@ -225,7 +229,7 @@ unsafe static class CLRRedirections } } - public unsafe static StackObject* InitializeArray(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* InitializeArray(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1 - 1; AppDomain domain = intp.AppDomain; @@ -499,7 +503,7 @@ unsafe static class CLRRedirections return null; }*/ - public unsafe static StackObject* DelegateCombine(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* DelegateCombine(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { //Don't ask me why not esp -2, unity won't return the right result var ret = esp - 1 - 1; @@ -606,7 +610,7 @@ unsafe static class CLRRedirections return dele2; }*/ - public unsafe static StackObject* DelegateRemove(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* DelegateRemove(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { //Don't ask me why not esp -2, unity won't return the right result var ret = esp - 1 - 1; @@ -691,7 +695,7 @@ unsafe static class CLRRedirections else return null; }*/ - public unsafe static StackObject* DelegateGetTarget(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* DelegateGetTarget(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1; AppDomain domain = intp.AppDomain; @@ -713,7 +717,7 @@ unsafe static class CLRRedirections throw new NullReferenceException(); } - public unsafe static StackObject* DelegateEqulity(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* DelegateEqulity(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { //Don't ask me why not esp -2, unity won't return the right result var ret = esp - 1 - 1; @@ -798,7 +802,7 @@ unsafe static class CLRRedirections return dele2 == null; }*/ - public unsafe static StackObject* DelegateInequlity(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* DelegateInequlity(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { //Don't ask me why not esp -2, unity won't return the right result var ret = esp - 1 - 1; @@ -878,7 +882,7 @@ unsafe static class CLRRedirections return dele2 != null; }*/ - public static StackObject* GetTypeFromHandle(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* GetTypeFromHandle(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { //Nothing to do return esp; @@ -889,7 +893,7 @@ unsafe static class CLRRedirections return param[0]; }*/ - public unsafe static StackObject* MethodInfoInvoke(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* MethodInfoInvoke(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { AppDomain domain = intp.AppDomain; //Don't ask me why not esp - 3, unity won't return the right result @@ -995,7 +999,7 @@ static object CheckCrossBindingAdapter(object obj) return ((MethodInfo)instance).Invoke(obj, (object[])p); }*/ - public unsafe static StackObject* ObjectGetType(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* ObjectGetType(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { AppDomain domain = intp.AppDomain; var ret = esp - 1; @@ -1022,7 +1026,7 @@ static object CheckCrossBindingAdapter(object obj) else return type; }*/ - public static StackObject* EnumParse(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumParse(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1 - 1; AppDomain domain = intp.AppDomain; @@ -1083,7 +1087,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Enum.Parse(t, name), true); } - public static StackObject* EnumGetValues(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumGetValues(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1; AppDomain domain = intp.AppDomain; @@ -1141,7 +1145,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Enum.GetValues(t), true); } - public static StackObject* EnumGetNames(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumGetNames(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1; AppDomain domain = intp.AppDomain; @@ -1176,7 +1180,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Enum.GetNames(t), true); } - public static StackObject* EnumGetName(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumGetName(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1 - 1; AppDomain domain = intp.AppDomain; @@ -1221,7 +1225,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Enum.GetName(t, val), true); } - public static StackObject* EnumToObject(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumToObject(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1 - 1; AppDomain domain = intp.AppDomain; @@ -1256,7 +1260,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Enum.GetName(t, val), true); } #if NET_4_6 || NET_STANDARD_2_0 - public static StackObject* EnumHasFlag(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumHasFlag(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1 - 1; AppDomain domain = intp.AppDomain; @@ -1287,7 +1291,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushZero(ret); } - public static StackObject* EnumCompareTo(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* EnumCompareTo(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 1 - 1; AppDomain domain = intp.AppDomain; @@ -1319,7 +1323,7 @@ static object CheckCrossBindingAdapter(object obj) } #endif - public static StackObject* DelegateCreateDelegate(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* DelegateCreateDelegate(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 2; AppDomain domain = intp.AppDomain; @@ -1378,7 +1382,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Delegate.CreateDelegate(t, mi), true); } - public static StackObject* DelegateCreateDelegate2(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* DelegateCreateDelegate2(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 3; AppDomain domain = intp.AppDomain; @@ -1445,7 +1449,7 @@ static object CheckCrossBindingAdapter(object obj) else return ILIntepreter.PushObject(ret, mStack, Delegate.CreateDelegate(t, obj, name), true); } - public static StackObject* DelegateCreateDelegate3(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* DelegateCreateDelegate3(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 3; AppDomain domain = intp.AppDomain; @@ -1525,7 +1529,7 @@ static object CheckCrossBindingAdapter(object obj) return ILIntepreter.PushObject(ret, mStack, Delegate.CreateDelegate(t, obj, mi), true); } - public static StackObject* TypeMakeGenericType(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public static StackObject* TypeMakeGenericType(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { var ret = esp - 2; AppDomain domain = intp.AppDomain; diff --git a/ILRuntime/Runtime/Enviorment/CrossBindingCodeGenerator.cs b/ILRuntime/Runtime/Enviorment/CrossBindingCodeGenerator.cs index 3cc0c1fe..73bde9d2 100644 --- a/ILRuntime/Runtime/Enviorment/CrossBindingCodeGenerator.cs +++ b/ILRuntime/Runtime/Enviorment/CrossBindingCodeGenerator.cs @@ -34,6 +34,11 @@ public static string GenerateCrossBindingAdapterCode(Type baseType, string nameS using ILRuntime.CLR.Method; using ILRuntime.Runtime.Enviorment; using ILRuntime.Runtime.Intepreter; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace "); sb.AppendLine(nameSpace); diff --git a/ILRuntime/Runtime/Enviorment/InvocationContext.cs b/ILRuntime/Runtime/Enviorment/InvocationContext.cs index 41bef847..6e69986e 100644 --- a/ILRuntime/Runtime/Enviorment/InvocationContext.cs +++ b/ILRuntime/Runtime/Enviorment/InvocationContext.cs @@ -7,7 +7,11 @@ using ILRuntime.CLR.Utils; using ILRuntime.Runtime.Intepreter; using ILRuntime.Runtime.Stack; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Enviorment { public static class PrimitiveConverter @@ -103,7 +107,7 @@ public unsafe struct InvocationContext : IDisposable AppDomain domain; ILIntepreter intp; ILMethod method; - IList mStack; + AutoList mStack; bool invocated; int paramCnt; bool hasReturn; @@ -233,7 +237,7 @@ internal ILIntepreter Intepreter } } - internal IList ManagedStack + internal AutoList ManagedStack { get { diff --git a/ILRuntime/Runtime/Enviorment/ValueTypeBinder.cs b/ILRuntime/Runtime/Enviorment/ValueTypeBinder.cs index 829450a8..79f83ab3 100644 --- a/ILRuntime/Runtime/Enviorment/ValueTypeBinder.cs +++ b/ILRuntime/Runtime/Enviorment/ValueTypeBinder.cs @@ -8,6 +8,11 @@ using ILRuntime.Runtime.Intepreter; using ILRuntime.Runtime.Stack; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Enviorment { public unsafe abstract class ValueTypeBinder @@ -123,7 +128,7 @@ public void ParseValue(ref T value, ILIntepreter intp, StackObject* ptr_of_this_ } else { - value = (T)StackObject.ToObject(a, intp.AppDomain, mStack); + value = (T)StackObject.ToObject(a, intp.AppDomain, (AutoList)mStack); if (shouldFree) intp.Free(ptr_of_this_method); } diff --git a/ILRuntime/Runtime/Intepreter/DelegateAdapter.cs b/ILRuntime/Runtime/Intepreter/DelegateAdapter.cs index 3795eca0..5764ef3e 100644 --- a/ILRuntime/Runtime/Intepreter/DelegateAdapter.cs +++ b/ILRuntime/Runtime/Intepreter/DelegateAdapter.cs @@ -8,7 +8,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Other; using ILRuntime.Runtime.Enviorment; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Intepreter { #region Functions @@ -925,14 +929,14 @@ unsafe protected InvocationContext BeginInvoke() return ctx; } - public unsafe StackObject* ILInvoke(ILIntepreter intp, StackObject* esp, IList mStack) + public unsafe StackObject* ILInvoke(ILIntepreter intp, StackObject* esp, AutoList mStack) { var ebp = esp; esp = ILInvokeSub(intp, esp, mStack); return ClearStack(intp, esp, ebp, mStack); } - unsafe StackObject* ILInvokeSub(ILIntepreter intp, StackObject* esp, IList mStack) + unsafe StackObject* ILInvokeSub(ILIntepreter intp, StackObject* esp, AutoList mStack) { var ebp = esp; bool unhandled; @@ -970,7 +974,7 @@ unsafe protected InvocationContext BeginInvoke() return ret; } - unsafe StackObject* ClearStack(ILIntepreter intp, StackObject* esp, StackObject* ebp, IList mStack) + unsafe StackObject* ClearStack(ILIntepreter intp, StackObject* esp, StackObject* ebp, AutoList mStack) { int paramCnt = method.ParameterCount; if (method.IsExtend && instance != null)//如果是拓展方法,退一位 @@ -1211,7 +1215,7 @@ unsafe interface IDelegateAdapter IDelegateAdapter Next { get; } ILTypeInstance Instance { get; } ILMethod Method { get; } - StackObject* ILInvoke(ILIntepreter intp, StackObject* esp, IList mStack); + StackObject* ILInvoke(ILIntepreter intp, StackObject* esp, AutoList mStack); IDelegateAdapter Instantiate(Enviorment.AppDomain appdomain, ILTypeInstance instance, ILMethod method); bool IsClone { get; } IDelegateAdapter Clone(); diff --git a/ILRuntime/Runtime/Intepreter/ILIntepreter.cs b/ILRuntime/Runtime/Intepreter/ILIntepreter.cs index 6e47c6d2..f02f95e5 100644 --- a/ILRuntime/Runtime/Intepreter/ILIntepreter.cs +++ b/ILRuntime/Runtime/Intepreter/ILIntepreter.cs @@ -12,7 +12,11 @@ using ILRuntime.Runtime.Debugger; using ILRuntime.CLR.Utils; using ILRuntime.Other; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Intepreter { public unsafe partial class ILIntepreter @@ -80,7 +84,7 @@ public void ClearDebugState() } public object Run(ILMethod method, object instance, object[] p) { - IList mStack = stack.ManagedStack; + AutoList mStack = stack.ManagedStack; int mStackBase = mStack.Count; StackObject* esp = stack.StackBase; stack.ResetValueTypePointer(); @@ -101,11 +105,7 @@ public object Run(ILMethod method, object instance, object[] p) esp = Execute(method, esp, out unhandledException); object result = method.ReturnType != domain.VoidType ? method.ReturnType.TypeForCLR.CheckCLRTypes(StackObject.ToObject((esp - 1), domain, mStack)) : null; //ClearStack -#if DEBUG && !DISABLE_ILRUNTIME_DEBUG - ((List)mStack).RemoveRange(mStackBase, mStack.Count - mStackBase); -#else - ((UncheckedList)mStack).RemoveRange(mStackBase, mStack.Count - mStackBase); -#endif + mStack.RemoveRange(mStackBase, mStack.Count - mStackBase); return result; } internal StackObject* Execute(ILMethod method, StackObject* esp, out bool unhandledException) @@ -138,7 +138,7 @@ public object Run(ILMethod method, object instance, object[] p) esp = frame.BasePointer; var arg = Minus(frame.LocalVarPointer, method.ParameterCount); - IList mStack = stack.ManagedStack; + AutoList mStack = stack.ManagedStack; int paramCnt = method.ParameterCount; if (method.HasThis)//this parameter is always object reference { @@ -158,7 +158,7 @@ public object Run(ILMethod method, object instance, object[] p) IType type; Type clrType; int intVal; - + ILTypeInstance instance; //Managed Stack reserved for arguments(In case of starg) for (int i = 0; i < paramCnt; i++) { @@ -314,7 +314,7 @@ public object Run(ILMethod method, object instance, object[] p) { a = Add(arg, ip->TokenInteger); val = esp - 1; - int idx = a->Value; + intVal = a->Value; bool isObj = a->ObjectType >= ObjectTypes.Object; if (val->ObjectType >= ObjectTypes.Object) { @@ -358,7 +358,7 @@ public object Run(ILMethod method, object instance, object[] p) *a = *val; if (isObj) { - a->Value = idx; + a->Value = intVal; if (val->ObjectType == ObjectTypes.Null) { mStack[a->Value] = null; @@ -374,8 +374,8 @@ public object Run(ILMethod method, object instance, object[] p) case OpCodeEnum.Stloc_0: { esp--; - int idx = locBase; - StLocSub(esp, v1, idx, mStack); + intVal = locBase; + StLocSub(esp, v1, intVal, mStack); } break; case OpCodeEnum.Ldloc_0: @@ -385,8 +385,8 @@ public object Run(ILMethod method, object instance, object[] p) case OpCodeEnum.Stloc_1: { esp--; - int idx = locBase + 1; - StLocSub(esp, v2, idx, mStack); + intVal = locBase + 1; + StLocSub(esp, v2, intVal, mStack); } break; case OpCodeEnum.Ldloc_1: @@ -396,8 +396,8 @@ public object Run(ILMethod method, object instance, object[] p) case OpCodeEnum.Stloc_2: { esp--; - int idx = locBase + 2; - StLocSub(esp, v3, idx, mStack); + intVal = locBase + 2; + StLocSub(esp, v3, intVal, mStack); break; } case OpCodeEnum.Ldloc_2: @@ -407,9 +407,9 @@ public object Run(ILMethod method, object instance, object[] p) case OpCodeEnum.Stloc_3: { esp--; - int idx = locBase + 3; + intVal = locBase + 3; - StLocSub(esp, v4, idx, mStack); + StLocSub(esp, v4, intVal, mStack); } break; case OpCodeEnum.Ldloc_3: @@ -421,8 +421,8 @@ public object Run(ILMethod method, object instance, object[] p) { esp--; var v = Add(frame.LocalVarPointer, ip->TokenInteger); - int idx = locBase + ip->TokenInteger; - StLocSub(esp, v, idx, mStack); + intVal = locBase + ip->TokenInteger; + StLocSub(esp, v, intVal, mStack); } break; case OpCodeEnum.Ldloc: @@ -451,9 +451,9 @@ public object Run(ILMethod method, object instance, object[] p) { var t = AppDomain.GetType(ip->TokenInteger); obj = mStack[objRef->Value]; - var idx = objRef->ValueLow; + intVal = objRef->ValueLow; Free(objRef); - LoadFromArrayReference(obj, idx, objRef, t, mStack); + LoadFromArrayReference(obj, intVal, objRef, t, mStack); } break; case ObjectTypes.StackObjectReference: @@ -544,7 +544,12 @@ public object Run(ILMethod method, object instance, object[] p) } else { - *objRef = *val; + if (val->ObjectType == ObjectTypes.Null && objRef->ObjectType == ObjectTypes.Object) + { + mStack[objRef->Value] = null; + } + else + *objRef = *val; } } } @@ -687,18 +692,18 @@ public object Run(ILMethod method, object instance, object[] p) { case ObjectTypes.FieldReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromFieldReference(instance, idx, dst, mStack); + LoadFromFieldReference(obj, intVal, dst, mStack); } break; case ObjectTypes.ArrayReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromArrayReference(instance, idx, dst, instance.GetType().GetElementType(), mStack); + LoadFromArrayReference(obj, intVal, dst, obj.GetType().GetElementType(), mStack); } break; case ObjectTypes.StaticFieldReference: @@ -738,34 +743,34 @@ public object Run(ILMethod method, object instance, object[] p) { case ObjectTypes.FieldReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromFieldReference(instance, idx, dst, mStack); + LoadFromFieldReference(obj, intVal, dst, mStack); } break; case ObjectTypes.ArrayReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromArrayReference(instance, idx, dst, instance.GetType().GetElementType(), mStack); + LoadFromArrayReference(obj, intVal, dst, obj.GetType().GetElementType(), mStack); } break; case ObjectTypes.StaticFieldReference: { var t = AppDomain.GetType(val->Value); - int idx = val->ValueLow; + intVal = val->ValueLow; Free(dst); if (t is ILType) { - ((ILType)t).StaticInstance.PushToStack(idx, dst, this, mStack); + ((ILType)t).StaticInstance.PushToStack(intVal, dst, this, mStack); } else { - if (!((CLRType)t).CopyFieldToStack(idx, null, this, ref dst, mStack)) + if (!((CLRType)t).CopyFieldToStack(intVal, null, this, ref dst, mStack)) { - obj = ((CLRType)t).GetFieldValue(idx, null); + obj = ((CLRType)t).GetFieldValue(intVal, null); PushObject(dst, mStack, obj); } } @@ -788,34 +793,34 @@ public object Run(ILMethod method, object instance, object[] p) { case ObjectTypes.FieldReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromFieldReference(instance, idx, dst, mStack); + LoadFromFieldReference(obj, intVal, dst, mStack); } break; case ObjectTypes.ArrayReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromArrayReference(instance, idx, dst, instance.GetType().GetElementType(), mStack); + LoadFromArrayReference(obj, intVal, dst, obj.GetType().GetElementType(), mStack); } break; case ObjectTypes.StaticFieldReference: { var t = AppDomain.GetType(val->Value); - int idx = val->ValueLow; + intVal = val->ValueLow; Free(dst); if (t is ILType) { - ((ILType)t).StaticInstance.PushToStack(idx, dst, this, mStack); + ((ILType)t).StaticInstance.PushToStack(intVal, dst, this, mStack); } else { - if (!((CLRType)t).CopyFieldToStack(idx, null, this, ref dst, mStack)) + if (!((CLRType)t).CopyFieldToStack(intVal, null, this, ref dst, mStack)) { - obj = ((CLRType)t).GetFieldValue(idx, null); + obj = ((CLRType)t).GetFieldValue(intVal, null); PushObject(dst, mStack, obj); } } @@ -839,34 +844,34 @@ public object Run(ILMethod method, object instance, object[] p) { case ObjectTypes.FieldReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromFieldReference(instance, idx, dst, mStack); + LoadFromFieldReference(obj, intVal, dst, mStack); } break; case ObjectTypes.ArrayReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromArrayReference(instance, idx, dst, instance.GetType().GetElementType(), mStack); + LoadFromArrayReference(obj, intVal, dst, obj.GetType().GetElementType(), mStack); } break; case ObjectTypes.StaticFieldReference: { var t = AppDomain.GetType(val->Value); - int idx = val->ValueLow; + intVal = val->ValueLow; Free(dst); if (t is ILType) { - ((ILType)t).StaticInstance.PushToStack(idx, dst, this, mStack); + ((ILType)t).StaticInstance.PushToStack(intVal, dst, this, mStack); } else { - if (!((CLRType)t).CopyFieldToStack(idx, null, this, ref dst, mStack)) + if (!((CLRType)t).CopyFieldToStack(intVal, null, this, ref dst, mStack)) { - obj = ((CLRType)t).GetFieldValue(idx, null); + obj = ((CLRType)t).GetFieldValue(intVal, null); PushObject(dst, mStack, obj); } } @@ -889,34 +894,34 @@ public object Run(ILMethod method, object instance, object[] p) { case ObjectTypes.FieldReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromFieldReference(instance, idx, dst, mStack); + LoadFromFieldReference(obj, intVal, dst, mStack); } break; case ObjectTypes.ArrayReference: { - var instance = mStack[val->Value]; - var idx = val->ValueLow; + obj = mStack[val->Value]; + intVal = val->ValueLow; Free(dst); - LoadFromArrayReference(instance, idx, dst, instance.GetType().GetElementType(), mStack); + LoadFromArrayReference(obj, intVal, dst, obj.GetType().GetElementType(), mStack); } break; case ObjectTypes.StaticFieldReference: { var t = AppDomain.GetType(val->Value); - int idx = val->ValueLow; + intVal = val->ValueLow; Free(dst); if (t is ILType) { - ((ILType)t).StaticInstance.PushToStack(idx, dst, this, mStack); + ((ILType)t).StaticInstance.PushToStack(intVal, dst, this, mStack); } else { - if (!((CLRType)t).CopyFieldToStack(idx, null, this, ref dst, mStack)) + if (!((CLRType)t).CopyFieldToStack(intVal, null, this, ref dst, mStack)) { - obj = ((CLRType)t).GetFieldValue(idx, null); + obj = ((CLRType)t).GetFieldValue(intVal, null); PushObject(dst, mStack, obj); } } @@ -957,21 +962,21 @@ public object Run(ILMethod method, object instance, object[] p) case ObjectTypes.StaticFieldReference: { type = AppDomain.GetType(dst->Value); - int idx = dst->ValueLow; + intVal = dst->ValueLow; if (type != null) { if (type is ILType) { ILType t = type as ILType; - t.StaticInstance.AssignFromStack(idx, val, AppDomain, mStack); + t.StaticInstance.AssignFromStack(intVal, val, AppDomain, mStack); } else { CLRType t = type as CLRType; - var f = t.GetField(idx); + var f = t.GetField(intVal); obj = null; - if (!((CLRType)t).AssignFieldFromStack(idx, ref obj, this, val, mStack)) - t.SetStaticFieldValue(idx, f.FieldType.CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); + if (!((CLRType)t).AssignFieldFromStack(intVal, ref obj, this, val, mStack)) + t.SetStaticFieldValue(intVal, f.FieldType.CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); } } else @@ -1010,20 +1015,20 @@ public object Run(ILMethod method, object instance, object[] p) case ObjectTypes.StaticFieldReference: { type = AppDomain.GetType(dst->Value); - int idx = dst->ValueLow; + intVal = dst->ValueLow; if (type != null) { if (type is ILType) { ILType t = type as ILType; - t.StaticInstance.AssignFromStack(idx, val, AppDomain, mStack); + t.StaticInstance.AssignFromStack(intVal, val, AppDomain, mStack); } else { CLRType t = type as CLRType; obj = null; - if (!((CLRType)t).AssignFieldFromStack(idx, ref obj, this, val, mStack)) - t.SetStaticFieldValue(idx, typeof(long).CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); + if (!((CLRType)t).AssignFieldFromStack(intVal, ref obj, this, val, mStack)) + t.SetStaticFieldValue(intVal, typeof(long).CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); } } else @@ -1064,20 +1069,20 @@ public object Run(ILMethod method, object instance, object[] p) case ObjectTypes.StaticFieldReference: { type = AppDomain.GetType(dst->Value); - int idx = dst->ValueLow; + intVal = dst->ValueLow; if (type != null) { if (type is ILType) { ILType t = type as ILType; - t.StaticInstance.AssignFromStack(idx, val, AppDomain, mStack); + t.StaticInstance.AssignFromStack(intVal, val, AppDomain, mStack); } else { CLRType t = type as CLRType; obj = null; - if (!((CLRType)t).AssignFieldFromStack(idx, ref obj, this, val, mStack)) - t.SetStaticFieldValue(idx, typeof(double).CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); + if (!((CLRType)t).AssignFieldFromStack(intVal, ref obj, this, val, mStack)) + t.SetStaticFieldValue(intVal, typeof(double).CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); } } else @@ -1118,21 +1123,21 @@ public object Run(ILMethod method, object instance, object[] p) case ObjectTypes.StaticFieldReference: { type = AppDomain.GetType(dst->Value); - int idx = dst->ValueLow; + intVal = dst->ValueLow; if (type != null) { if (type is ILType) { ILType t = type as ILType; - t.StaticInstance.AssignFromStack(idx, val, AppDomain, mStack); + t.StaticInstance.AssignFromStack(intVal, val, AppDomain, mStack); } else { CLRType t = type as CLRType; - var f = t.GetField(idx); + var f = t.GetField(intVal); obj = null; - if (!((CLRType)t).AssignFieldFromStack(idx, ref obj, this, val, mStack)) - t.SetStaticFieldValue(idx, f.FieldType.CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); + if (!((CLRType)t).AssignFieldFromStack(intVal, ref obj, this, val, mStack)) + t.SetStaticFieldValue(intVal, f.FieldType.CheckCLRTypes(CheckAndCloneValueType(StackObject.ToObject(val, domain, mStack), domain))); } } else @@ -1983,13 +1988,35 @@ public object Run(ILMethod method, object instance, object[] p) bool processed = false; if (m.IsDelegateInvoke) { - var instance = StackObject.ToObject((Minus(esp, m.ParameterCount + 1)), domain, mStack); - if (instance is IDelegateAdapter) + obj = StackObject.ToObject((Minus(esp, m.ParameterCount + 1)), domain, mStack); + if (obj is IDelegateAdapter) { - esp = ((IDelegateAdapter)instance).ILInvoke(this, esp, mStack); + esp = ((IDelegateAdapter)obj).ILInvoke(this, esp, mStack); processed = true; } } + else if (ilm.IsEventAdd) + { + objRef = PrepareEventHandler(esp, ilm, mStack, out instance); + + esp = CLRRedirections.DelegateCombine(this, objRef, mStack, null, false); + obj = StackObject.ToObject(esp - 1, domain, mStack); + instance[ilm.EventFieldIndex] = obj; + Free(esp - 1); + esp--; + processed = true; + } + else if (ilm.IsEventRemove) + { + objRef = PrepareEventHandler(esp, ilm, mStack, out instance); + + esp = CLRRedirections.DelegateRemove(this, objRef, mStack, null, false); + obj = StackObject.ToObject(esp - 1, domain, mStack); + instance[ilm.EventFieldIndex] = obj; + Free(esp - 1); + esp--; + processed = true; + } if (!processed) { if (code == OpCodeEnum.Callvirt) @@ -2029,8 +2056,8 @@ public object Run(ILMethod method, object instance, object[] p) bool processed = false; if (cm.IsDelegateInvoke) { - var instance = StackObject.ToObject((Minus(esp, cm.ParameterCount + 1)), domain, mStack); - if (instance is IDelegateAdapter) + obj = StackObject.ToObject((Minus(esp, cm.ParameterCount + 1)), domain, mStack); + if (obj is IDelegateAdapter) { if (cm.IsDelegateDynamicInvoke) { @@ -2048,7 +2075,7 @@ public object Run(ILMethod method, object instance, object[] p) } } } - esp = ((IDelegateAdapter)instance).ILInvoke(this, esp, mStack); + esp = ((IDelegateAdapter)obj).ILInvoke(this, esp, mStack); processed = true; } } @@ -2128,7 +2155,7 @@ public object Run(ILMethod method, object instance, object[] p) if (obj != null) { - ILTypeInstance instance = null; + instance = null; if (obj is ILTypeInstance) instance = obj as ILTypeInstance; else if (obj is CrossBindingAdaptorType) @@ -2264,7 +2291,7 @@ public object Run(ILMethod method, object instance, object[] p) Free(ret); if (obj != null) { - ILTypeInstance instance = null; + instance = null; if (obj is ILTypeInstance) instance = obj as ILTypeInstance; else if (obj is CrossBindingAdaptorType) @@ -2326,7 +2353,7 @@ public object Run(ILMethod method, object instance, object[] p) { if (obj is ILTypeInstance) { - ILTypeInstance instance = obj as ILTypeInstance; + instance = obj as ILTypeInstance; instance.PushFieldAddress((int)ip->TokenLong, esp - 1, mStack); } else @@ -2709,7 +2736,7 @@ public object Run(ILMethod method, object instance, object[] p) obj = null; bool isValueType = type.IsValueType; ILIntepreter tmpIntp; - IList tmStack; + AutoList tmStack; if (isValueType && intVal > 0) { tmpIntp = domain.RequestILIntepreter(); @@ -3421,7 +3448,7 @@ public object Run(ILMethod method, object instance, object[] p) { if (obj is ILTypeInstance) { - ILTypeInstance instance = obj as ILTypeInstance; + instance = obj as ILTypeInstance; instance.Clear(); } else @@ -3434,15 +3461,15 @@ public object Run(ILMethod method, object instance, object[] p) case ObjectTypes.ArrayReference: { var arr = mStack[objRef->Value] as Array; - var idx = objRef->ValueLow; - obj = arr.GetValue(idx); + intVal = objRef->ValueLow; + obj = arr.GetValue(intVal); if (obj == null) - arr.SetValue(it.Instantiate(), idx); + arr.SetValue(it.Instantiate(), intVal); else { if (obj is ILTypeInstance) { - ILTypeInstance instance = obj as ILTypeInstance; + instance = obj as ILTypeInstance; instance.Clear(); } else @@ -3457,7 +3484,7 @@ public object Run(ILMethod method, object instance, object[] p) { if (obj is ILTypeInstance) { - ILTypeInstance instance = obj as ILTypeInstance; + instance = obj as ILTypeInstance; var tar = instance[objRef->ValueLow] as ILTypeInstance; if (tar != null) tar.Clear(); @@ -3504,7 +3531,7 @@ public object Run(ILMethod method, object instance, object[] p) break; case ObjectTypes.FieldReference: { - var instance = mStack[objRef->Value] as ILTypeInstance; + instance = mStack[objRef->Value] as ILTypeInstance; instance.AssignFromStack(objRef->ValueLow, esp, AppDomain, mStack); } break; @@ -3527,7 +3554,7 @@ public object Run(ILMethod method, object instance, object[] p) } else if (objRef->ObjectType == ObjectTypes.FieldReference) { - var instance = mStack[objRef->Value] as ILTypeInstance; + instance = mStack[objRef->Value] as ILTypeInstance; if (instance != null) { instance.InitializeField(objRef->ValueLow); @@ -3865,7 +3892,8 @@ public object Run(ILMethod method, object instance, object[] p) var idx = esp - 1; arrRef = esp - 1 - 1; Array arr = mStack[arrRef->Value] as Array; - obj = arr.GetValue(idx->Value); + ILTypeInstance[] arr2 = arr as ILTypeInstance[]; + obj = arr2 != null ? arr2[idx->Value] : arr.GetValue(idx->Value); if (obj is CrossBindingAdaptorType) obj = ((CrossBindingAdaptorType)obj).ILInstance; Free(esp - 1); @@ -4652,6 +4680,30 @@ public object Run(ILMethod method, object instance, object[] p) //ClearStack return stack.PopFrame(ref frame, esp); } + + StackObject* PrepareEventHandler(StackObject* esp, ILMethod ilm, AutoList mStack, out ILTypeInstance instance) + { + instance = null; + StackObject* objRef; + var dele = StackObject.ToObject(esp - 1, domain, mStack); + Free(esp - 1); + if (ilm.IsStatic) + { + instance = ((ILType)ilm.DeclearingType).StaticInstance; + objRef = esp - 1; + } + else + { + objRef = esp - 2; + instance = StackObject.ToObject(objRef, domain, mStack) as ILTypeInstance; + Free(objRef); + } + var obj = instance[ilm.EventFieldIndex]; + + objRef = PushObject(objRef, mStack, obj); + objRef = PushObject(objRef, mStack, dele); + return objRef; + } ExceptionHandler FindExceptionHandlerByBranchTarget(int addr, int branchTarget, ExceptionHandler[] ehs) { ExceptionHandler eh = null; @@ -4666,11 +4718,33 @@ ExceptionHandler FindExceptionHandlerByBranchTarget(int addr, int branchTarget, } return eh; } - void PrepareRegisterCallStack(StackObject* esp, IList mStack, ILMethod method) + + void RelocateValueTypeManagedObj(StackObject* esp, AutoList mStack, ref int curIdx) + { + StackObject* descripter = ResolveReference(esp); + for (int i = descripter->ValueLow; i > 0; i--) + { + StackObject* cur = descripter - i; + if (cur->ObjectType >= ObjectTypes.Object) + { + mStack[curIdx] = mStack[cur->Value]; + cur->Value = curIdx; + curIdx--; + } + else + { + if (cur->ObjectType == ObjectTypes.ValueTypeObjectReference) + { + RelocateValueTypeManagedObj(cur, mStack, ref curIdx); + } + } + } + } + + void PrepareRegisterCallStack(StackObject* esp, AutoList mStack, ILMethod method) { var pCnt = method.HasThis ? method.ParameterCount + 1 : method.ParameterCount; StackObject* basePointer = esp - pCnt; - int mBase = mStack.Count; int existing = 0; for (int i = 0; i < pCnt; i++) { @@ -4684,24 +4758,29 @@ void PrepareRegisterCallStack(StackObject* esp, IList mStack, ILMethod m } if (existing > 0) { - mBase = mBase - existing; + int curIdx = mStack.Count - 1; for (int i = pCnt - 1; i >= 0; i--) { StackObject* cur = basePointer + i; if (cur->ObjectType >= ObjectTypes.Object) { - mStack[mBase + i] = mStack[cur->Value]; - cur->Value = mBase + i; + mStack[curIdx] = mStack[cur->Value]; + cur->Value = curIdx; } else { if (cur->ObjectType == ObjectTypes.Null) { cur->ObjectType = ObjectTypes.Object; - cur->Value = mBase + i; + cur->Value = curIdx; + } + else if (cur->ObjectType == ObjectTypes.ValueTypeObjectReference) + { + RelocateValueTypeManagedObj(cur, mStack, ref curIdx); } - mStack[mBase + i] = null; + mStack[curIdx] = null; } + curIdx--; } } } @@ -4711,7 +4790,7 @@ void DumpStack(StackObject* esp) AppDomain.DebugService.DumpStack(esp, stack); } - void CloneStackValueType(StackObject* src, StackObject* dst, IList mStack) + void CloneStackValueType(StackObject* src, StackObject* dst, AutoList mStack) { StackObject* descriptor = ILIntepreter.ResolveReference(src); stack.AllocValueType(dst, AppDomain.GetTypeByIndex(descriptor->Value)); @@ -4744,9 +4823,9 @@ bool CanCopyStackValueType(StackObject* src, StackObject* dst) return false; } #if DEBUG - public void CopyStackValueType(StackObject* src, StackObject* dst, IList mStack, bool noCheck = false) + public void CopyStackValueType(StackObject* src, StackObject* dst, AutoList mStack, bool noCheck = false) #else - public void CopyStackValueType(StackObject* src, StackObject* dst, IList mStack) + public void CopyStackValueType(StackObject* src, StackObject* dst, AutoList mStack) #endif { #if DEBUG @@ -4756,9 +4835,9 @@ public void CopyStackValueType(StackObject* src, StackObject* dst, IList #endif } #if DEBUG - public void CopyStackValueType(StackObject* src, StackObject* dst, IList mStack, IList dstmStack, bool noCheck = false) + public void CopyStackValueType(StackObject* src, StackObject* dst, AutoList mStack, AutoList dstmStack, bool noCheck = false) #else - public void CopyStackValueType(StackObject* src, StackObject* dst, IList mStack, IList dstmStack) + public void CopyStackValueType(StackObject* src, StackObject* dst, AutoList mStack, AutoList dstmStack) #endif { StackObject* descriptor = ILIntepreter.ResolveReference(src); @@ -4793,7 +4872,7 @@ public void CopyStackValueType(StackObject* src, StackObject* dst, IList } } - void CopyValueTypeToStack(StackObject* dst, object ins, IList mStack) + void CopyValueTypeToStack(StackObject* dst, object ins, AutoList mStack) { if (ins is ILTypeInstance) { @@ -4813,7 +4892,7 @@ void CopyValueTypeToStack(StackObject* dst, object ins, IList mStack) } } - void CopyToValueTypeField(StackObject* obj, int idx, StackObject* val, IList mStack) + void CopyToValueTypeField(StackObject* obj, int idx, StackObject* val, AutoList mStack) { StackObject* dst = Minus(obj, idx + 1); switch (val->ObjectType) @@ -4856,7 +4935,7 @@ void CopyToValueTypeField(StackObject* obj, int idx, StackObject* val, IList mStack) + void StLocSub(StackObject* esp, StackObject* v, int idx, AutoList mStack) { switch (esp->ObjectType) { @@ -4907,8 +4986,12 @@ void StLocSub(StackObject* esp, StackObject* v, int idx, IList mStack) break; } } - + [Obsolete] public object RetriveObject(StackObject* esp, IList mStack) + { + return RetriveObject(esp, (AutoList)mStack); + } + public object RetriveObject(StackObject* esp, AutoList mStack) { StackObject* objRef = GetObjectAndResolveReference(esp); if (objRef->ObjectType == ObjectTypes.Null) @@ -4964,7 +5047,7 @@ public object RetriveObject(StackObject* esp, IList mStack) return obj; } - public int RetriveInt32(StackObject* esp, IList mStack) + public int RetriveInt32(StackObject* esp, AutoList mStack) { StackObject* objRef = GetObjectAndResolveReference(esp); if (objRef->ObjectType == ObjectTypes.Null) @@ -5040,7 +5123,7 @@ public int RetriveInt32(StackObject* esp, IList mStack) return res; } - public long RetriveInt64(StackObject* esp, IList mStack) + public long RetriveInt64(StackObject* esp, AutoList mStack) { StackObject* objRef = GetObjectAndResolveReference(esp); if (objRef->ObjectType == ObjectTypes.Null) @@ -5118,7 +5201,7 @@ public long RetriveInt64(StackObject* esp, IList mStack) return res; } - public float RetriveFloat(StackObject* esp, IList mStack) + public float RetriveFloat(StackObject* esp, AutoList mStack) { StackObject* objRef = GetObjectAndResolveReference(esp); if (objRef->ObjectType == ObjectTypes.Null) @@ -5196,7 +5279,7 @@ public float RetriveFloat(StackObject* esp, IList mStack) return res; } - public double RetriveDouble(StackObject* esp, IList mStack) + public double RetriveDouble(StackObject* esp, AutoList mStack) { StackObject* objRef = GetObjectAndResolveReference(esp); if (objRef->ObjectType == ObjectTypes.Null) @@ -5379,7 +5462,7 @@ ExceptionHandler GetCorrespondingExceptionHandler(ExceptionHandler[] eh, object return res; } - void LoadFromFieldReference(object obj, int idx, StackObject* dst, IList mStack) + void LoadFromFieldReference(object obj, int idx, StackObject* dst, AutoList mStack) { if (obj is ILTypeInstance) { @@ -5393,7 +5476,7 @@ void LoadFromFieldReference(object obj, int idx, StackObject* dst, IList } } - void StoreValueToFieldReference(ref object obj, int idx, StackObject* val, IList mStack) + void StoreValueToFieldReference(ref object obj, int idx, StackObject* val, AutoList mStack) { if (obj is ILTypeInstance) { @@ -5411,13 +5494,13 @@ void StoreValueToFieldReference(ref object obj, int idx, StackObject* val, IList } } - void LoadFromArrayReference(object obj, int idx, StackObject* objRef, IType t, IList mStack, int managedIdx = -1) + void LoadFromArrayReference(object obj, int idx, StackObject* objRef, IType t, AutoList mStack, int managedIdx = -1) { var nT = t.TypeForCLR; LoadFromArrayReference(obj, idx, objRef, nT, mStack, managedIdx); } - void LoadFromArrayReference(object obj, int idx, StackObject* objRef, Type nT, IList mStack, int managedIdx = -1) + void LoadFromArrayReference(object obj, int idx, StackObject* objRef, Type nT, AutoList mStack, int managedIdx = -1) { if (nT.IsPrimitive) { @@ -5509,13 +5592,13 @@ void LoadFromArrayReference(object obj, int idx, StackObject* objRef, Type nT, I } } - void StoreValueToArrayReference(StackObject* objRef, StackObject* val, IType t, IList mStack) + void StoreValueToArrayReference(StackObject* objRef, StackObject* val, IType t, AutoList mStack) { var nT = t.TypeForCLR; StoreValueToArrayReference(objRef, val, nT, mStack); } - void StoreValueToArrayReference(StackObject* objRef, StackObject* val, Type nT, IList mStack) + void StoreValueToArrayReference(StackObject* objRef, StackObject* val, Type nT, AutoList mStack) { if (nT.IsPrimitive) { @@ -5612,7 +5695,7 @@ bool CheckExceptionType(IType catchType, object exception, bool explicitMatch) StackObject* PushParameters(IMethod method, StackObject* esp, object[] p, bool useRegister) { - IList mStack = stack.ManagedStack; + AutoList mStack = stack.ManagedStack; var plist = method.Parameters; int pCnt = plist != null ? plist.Count : 0; int pCnt2 = p != null ? p.Length : 0; @@ -5636,12 +5719,12 @@ bool CheckExceptionType(IType catchType, object exception, bool explicitMatch) } return esp; } - public void CopyToStack(StackObject* dst, StackObject* src, IList mStack) + public void CopyToStack(StackObject* dst, StackObject* src, AutoList mStack) { CopyToStack(dst, src, mStack, mStack); } - void CopyToStack(StackObject* dst, StackObject* src, IList mStack, IList dstmStack) + void CopyToStack(StackObject* dst, StackObject* src, AutoList mStack, AutoList dstmStack) { if (src->ObjectType == ObjectTypes.ValueTypeObjectReference) { @@ -5722,7 +5805,13 @@ internal static object CheckAndCloneValueType(object obj, Enviorment.AppDomain d return esp + 1; } + [Obsolete] public static void UnboxObject(StackObject* esp, object obj, IList mStack = null, Enviorment.AppDomain domain = null) + { + UnboxObject(esp, obj, (AutoList)mStack, domain); + } + + public static void UnboxObject(StackObject* esp, object obj, AutoList mStack = null, Enviorment.AppDomain domain = null) { if (esp->ObjectType == ObjectTypes.ValueTypeObjectReference && domain != null) { @@ -5819,7 +5908,12 @@ public static void UnboxObject(StackObject* esp, object obj, IList mStac throw new NotImplementedException(); } + [Obsolete] public static StackObject* PushObject(StackObject* esp, IList mStack, object obj, bool isBox = false) + { + return PushObject(esp, (AutoList)mStack, obj, isBox); + } + public static StackObject* PushObject(StackObject* esp, AutoList mStack, object obj, bool isBox = false) { if (obj != null) { diff --git a/ILRuntime/Runtime/Intepreter/ILTypeInstance.cs b/ILRuntime/Runtime/Intepreter/ILTypeInstance.cs index fc081a48..f36f7a8e 100644 --- a/ILRuntime/Runtime/Intepreter/ILTypeInstance.cs +++ b/ILRuntime/Runtime/Intepreter/ILTypeInstance.cs @@ -9,6 +9,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Runtime.Enviorment; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Intepreter { public class ILTypeStaticInstance : ILTypeInstance @@ -17,7 +22,7 @@ public unsafe ILTypeStaticInstance(ILType type) { this.type = type; fields = new StackObject[type.StaticFieldTypes.Length]; - managedObjs = new List(fields.Length); + managedObjs = new AutoList(fields.Length); for (int i = 0; i < fields.Length; i++) { var ft = type.StaticFieldTypes[i]; @@ -133,7 +138,7 @@ public class ILTypeInstance { protected ILType type; protected StackObject[] fields; - protected IList managedObjs; + protected AutoList managedObjs; object clrInstance; ulong valueTypeMask; Dictionary delegates; @@ -164,7 +169,7 @@ public virtual bool IsValueType /// public bool Boxed { get; set; } - public IList ManagedObjects { get { return managedObjs; } } + public AutoList ManagedObjects { get { return managedObjs; } } public object CLRInstance { get { return clrInstance; } set { clrInstance = value; } } @@ -177,7 +182,7 @@ public ILTypeInstance(ILType type, bool initializeCLRInstance = true) this.type = type; fields = new StackObject[type.TotalFieldCount]; var cnt = fields.Length; - managedObjs = new List(cnt); + managedObjs = new AutoList(cnt); for (int i = 0; i < cnt; i++) { managedObjs.Add(null); @@ -418,7 +423,7 @@ void InitializeFields(ILType type) InitializeFields((ILType)type.BaseType); } - internal unsafe void PushFieldAddress(int fieldIdx, StackObject* esp, IList managedStack) + internal unsafe void PushFieldAddress(int fieldIdx, StackObject* esp, AutoList managedStack) { esp->ObjectType = ObjectTypes.FieldReference; esp->Value = managedStack.Count; @@ -426,7 +431,7 @@ internal unsafe void PushFieldAddress(int fieldIdx, StackObject* esp, IListValueLow = fieldIdx; } - internal unsafe void PushToStack(int fieldIdx, StackObject* esp, ILIntepreter intp, IList managedStack) + internal unsafe void PushToStack(int fieldIdx, StackObject* esp, ILIntepreter intp, AutoList managedStack) { if (fieldIdx < fields.Length && fieldIdx >= 0) { @@ -472,12 +477,17 @@ internal unsafe void CopyToRegister(int fieldIdx,ref RegisterFrameInfo info, sho } } - unsafe void PushToStackSub(ref StackObject field, int fieldIdx, StackObject* esp, IList managedStack, ILIntepreter intp) + bool NeedCheckFieldValueType(int fieldIdx) + { + return fieldIdx >= 64 || ((valueTypeMask & ((ulong)1 << fieldIdx)) != 0); + } + + unsafe void PushToStackSub(ref StackObject field, int fieldIdx, StackObject* esp, AutoList managedStack, ILIntepreter intp) { if (field.ObjectType >= ObjectTypes.Object) { var obj = managedObjs[fieldIdx]; - if (obj != null && (fieldIdx >= 64 || ((valueTypeMask & ((ulong)1 << fieldIdx)) != 0))) + if (obj != null && NeedCheckFieldValueType(fieldIdx)) { if (obj is ILTypeInstance) { @@ -511,7 +521,7 @@ unsafe void PushToStackSub(ref StackObject field, int fieldIdx, StackObject* esp *esp = field; } - internal unsafe void CopyValueTypeToStack(StackObject* ptr, IList mStack) + internal unsafe void CopyValueTypeToStack(StackObject* ptr, AutoList mStack) { ptr->ObjectType = ObjectTypes.ValueTypeDescriptor; ptr->Value = type.TypeIndex; @@ -573,7 +583,7 @@ internal void InitializeField(int fieldIdx) throw new NotImplementedException(); } - internal unsafe void AssignFromStack(int fieldIdx, StackObject* esp, Enviorment.AppDomain appdomain, IList managedStack) + internal unsafe void AssignFromStack(int fieldIdx, StackObject* esp, Enviorment.AppDomain appdomain, AutoList managedStack) { if (fieldIdx < fields.Length && fieldIdx >= 0) AssignFromStackSub(ref fields[fieldIdx], fieldIdx, esp, managedStack); @@ -590,7 +600,7 @@ internal unsafe void AssignFromStack(int fieldIdx, StackObject* esp, Enviorment. } } - internal unsafe void AssignFromStack(StackObject* esp, Enviorment.AppDomain appdomain, IList managedStack) + internal unsafe void AssignFromStack(StackObject* esp, Enviorment.AppDomain appdomain, AutoList managedStack) { StackObject* val = ILIntepreter.ResolveReference(esp); int cnt = val->ValueLow; @@ -601,7 +611,7 @@ internal unsafe void AssignFromStack(StackObject* esp, Enviorment.AppDomain appd } } - unsafe void AssignFromStackSub(ref StackObject field, int fieldIdx, StackObject* esp, IList managedStack) + unsafe void AssignFromStackSub(ref StackObject field, int fieldIdx, StackObject* esp, AutoList managedStack) { esp = ILIntepreter.GetObjectAndResolveReference(esp); field = *esp; @@ -612,7 +622,10 @@ unsafe void AssignFromStackSub(ref StackObject field, int fieldIdx, StackObject* case ObjectTypes.FieldReference: field.ObjectType = ObjectTypes.Object; field.Value = fieldIdx; - managedObjs[fieldIdx] = ILIntepreter.CheckAndCloneValueType(managedStack[esp->Value], Type.AppDomain); + if (NeedCheckFieldValueType(fieldIdx)) + managedObjs[fieldIdx] = ILIntepreter.CheckAndCloneValueType(managedStack[esp->Value], Type.AppDomain); + else + managedObjs[fieldIdx] = managedStack[esp->Value]; break; case ObjectTypes.ValueTypeObjectReference: { diff --git a/ILRuntime/Runtime/Intepreter/OpCodes/OpCode.cs b/ILRuntime/Runtime/Intepreter/OpCodes/OpCode.cs index 0d4b0491..dcae1a3f 100644 --- a/ILRuntime/Runtime/Intepreter/OpCodes/OpCode.cs +++ b/ILRuntime/Runtime/Intepreter/OpCodes/OpCode.cs @@ -150,10 +150,12 @@ public string ToString(Enviorment.AppDomain domain) case OpCodeREnum.Stfld: case OpCodeREnum.Ldfld: + case OpCodeREnum.Ldflda: param = string.Format("r{0}, r{1}, 0x{2:X8}", Register1, Register2, OperandLong); break; case OpCodeREnum.Stsfld: case OpCodeREnum.Ldsfld: + case OpCodeREnum.Ldsflda: param = string.Format("r{0}, 0x{1:X8}", Register1, OperandLong); break; diff --git a/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs b/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs index a544b235..fc1bb130 100644 --- a/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs +++ b/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs @@ -12,6 +12,12 @@ using ILRuntime.Runtime.Enviorment; using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif + namespace ILRuntime.Runtime.Intepreter { unsafe struct RegisterFrameInfo @@ -23,7 +29,7 @@ unsafe struct RegisterFrameInfo public StackObject* RegisterStart; public StackObject* StackRegisterStart; public StackObject* RegisterEnd; - public IList ManagedStack; + public AutoList ManagedStack; } public unsafe partial class ILIntepreter { @@ -93,7 +99,7 @@ public unsafe partial class ILIntepreter var stackRegStart = frame.LocalVarPointer; StackObject* r = frame.LocalVarPointer - method.ParameterCount; - IList mStack = stack.ManagedStack; + AutoList mStack = stack.ManagedStack; int paramCnt = method.ParameterCount; if (method.HasThis)//this parameter is always object reference { @@ -2848,13 +2854,35 @@ public unsafe partial class ILIntepreter bool processed = false; if (m.IsDelegateInvoke) { - var instance = StackObject.ToObject((esp - (m.ParameterCount + 1)), domain, mStack); - if (instance is IDelegateAdapter) + obj = StackObject.ToObject((esp - (m.ParameterCount + 1)), domain, mStack); + if (obj is IDelegateAdapter) { - esp = ((IDelegateAdapter)instance).ILInvoke(this, esp, mStack); + esp = ((IDelegateAdapter)obj).ILInvoke(this, esp, mStack); processed = true; } } + else if (ilm.IsEventAdd) + { + objRef = PrepareEventHandler(esp, ilm, mStack, out var instance); + + esp = CLRRedirections.DelegateCombine(this, objRef, mStack, null, false); + obj = StackObject.ToObject(esp - 1, domain, mStack); + instance[ilm.EventFieldIndex] = obj; + Free(esp - 1); + esp--; + processed = true; + } + else if (ilm.IsEventRemove) + { + objRef = PrepareEventHandler(esp, ilm, mStack, out var instance); + + esp = CLRRedirections.DelegateRemove(this, objRef, mStack, null, false); + obj = StackObject.ToObject(esp - 1, domain, mStack); + instance[ilm.EventFieldIndex] = obj; + Free(esp - 1); + esp--; + processed = true; + } if (!processed) { if (code == OpCodeREnum.Callvirt) @@ -4208,7 +4236,7 @@ public unsafe partial class ILIntepreter } else { - if (objRef->ObjectType == ObjectTypes.ValueTypeObjectReference) + if (objRef->ObjectType == ObjectTypes.ValueTypeObjectReference && IsValueTypeReferenceValid(objRef, type)) { stack.ClearValueTypeObject(type, ILIntepreter.ResolveReference(objRef)); } @@ -5028,7 +5056,8 @@ public unsafe partial class ILIntepreter reg2 = (r + ip->Register2); reg3 = (r + ip->Register3); Array arr = mStack[reg2->Value] as Array; - obj = arr.GetValue(reg3->Value); + ILTypeInstance[] arr2 = arr as ILTypeInstance[]; + obj = arr2 != null ? arr2[reg3->Value] : arr.GetValue(reg3->Value); if (obj is CrossBindingAdaptorType) obj = ((CrossBindingAdaptorType)obj).ILInstance; @@ -5307,6 +5336,20 @@ public unsafe partial class ILIntepreter return stack.PopFrame(ref frame, esp); } + bool IsValueTypeReferenceValid(StackObject* ptr, IType type) + { + ptr = ResolveReference(ptr); + if (ptr->ObjectType == ObjectTypes.ValueTypeDescriptor) + { + if (ptr->Value == type.TypeIndex) + return true; + else + return false; + } + else + return false; + } + void LoadFromFieldReferenceToRegister(ref RegisterFrameInfo info, object obj, int idx, short reg) { if (obj is ILTypeInstance) @@ -5333,7 +5376,7 @@ void LoadFromFieldReferenceToRegister(ref RegisterFrameInfo info, object obj, in #if NET_4_6 || NET_STANDARD_2_0 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] #endif - internal void CopyToRegister(ref RegisterFrameInfo info, short reg, StackObject* val, IList mStackSrc = null) + internal void CopyToRegister(ref RegisterFrameInfo info, short reg, StackObject* val, AutoList mStackSrc = null) { var mStack = info.ManagedStack; diff --git a/ILRuntime/Runtime/Intepreter/RegisterVM/JITCompiler.cs b/ILRuntime/Runtime/Intepreter/RegisterVM/JITCompiler.cs index 55df12aa..3f47a2b1 100644 --- a/ILRuntime/Runtime/Intepreter/RegisterVM/JITCompiler.cs +++ b/ILRuntime/Runtime/Intepreter/RegisterVM/JITCompiler.cs @@ -1021,7 +1021,7 @@ int InitializeFunctionParam(ref OpCodes.OpCodeR op, object token, out bool hasRe bool noJIT = (ilm.JITFlags & ILRuntimeJITFlags.NoJIT) != ILRuntimeJITFlags.None; bool forceInline = (ilm.JITFlags & ILRuntimeJITFlags.ForceInline) != ILRuntimeJITFlags.None; bool hasExceptionHandler = ilm.Definition.HasBody && ilm.Definition.Body.HasExceptionHandlers; - if (!ilm.IsDelegateInvoke && !ilm.IsVirtual && !noJIT && !hasExceptionHandler && !ilm.Compiling) + if (!ilm.IsDelegateInvoke && !ilm.IsVirtual && !noJIT && !hasExceptionHandler && !ilm.Compiling && !ilm.IsEventAdd && !ilm.IsEventRemove) { var def = ilm.Definition; if (!def.HasBody || forceInline) diff --git a/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.FCP.cs b/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.FCP.cs index 97dce77d..76f28f8a 100644 --- a/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.FCP.cs +++ b/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.FCP.cs @@ -86,8 +86,16 @@ public static void ForwardCopyPropagation(List blocks, bool hasR ended = true; break; } - ReplaceOpcodeSource(ref Y, 0, xSrc); - replaced = true; + if (CanReplaceOpcodeSource(ref Y, 0)) + { + ReplaceOpcodeSource(ref Y, 0, xSrc); + replaced = true; + } + else + { + ended = true; + break; + } } if (ySrc2 >= 0 && ySrc2 == xDst) { @@ -102,8 +110,16 @@ public static void ForwardCopyPropagation(List blocks, bool hasR ended = true; break; } - ReplaceOpcodeSource(ref Y, 1, xSrc); - replaced = true; + if (CanReplaceOpcodeSource(ref Y, 1)) + { + ReplaceOpcodeSource(ref Y, 1, xSrc); + replaced = true; + } + else + { + ended = true; + break; + } } if (ySrc3 >= 0 && ySrc3 == xDst) { @@ -118,8 +134,16 @@ public static void ForwardCopyPropagation(List blocks, bool hasR ended = true; break; } - ReplaceOpcodeSource(ref Y, 2, xSrc); - replaced = true; + if (CanReplaceOpcodeSource(ref Y, 2)) + { + ReplaceOpcodeSource(ref Y, 2, xSrc); + replaced = true; + } + else + { + ended = true; + break; + } } if (replaced) @@ -215,8 +239,16 @@ public static void ForwardCopyPropagation(List blocks, bool hasR cannotRemove = true; break; } - replaced = true; - ReplaceOpcodeSource(ref Y, 0, xSrc); + if (CanReplaceOpcodeSource(ref Y, 0)) + { + replaced = true; + ReplaceOpcodeSource(ref Y, 0, xSrc); + } + else + { + cannotRemove = true; + break; + } } if (ySrc2 == xDst) { @@ -225,8 +257,16 @@ public static void ForwardCopyPropagation(List blocks, bool hasR cannotRemove = true; break; } - replaced = true; - ReplaceOpcodeSource(ref Y, 1, xSrc); + if (CanReplaceOpcodeSource(ref Y, 1)) + { + replaced = true; + ReplaceOpcodeSource(ref Y, 1, xSrc); + } + else + { + cannotRemove = true; + break; + } } if (ySrc3 == xDst) { @@ -235,8 +275,16 @@ public static void ForwardCopyPropagation(List blocks, bool hasR cannotRemove = true; break; } - replaced = true; - ReplaceOpcodeSource(ref Y, 2, xSrc); + if (CanReplaceOpcodeSource(ref Y, 2)) + { + replaced = true; + ReplaceOpcodeSource(ref Y, 2, xSrc); + } + else + { + cannotRemove = true; + break; + } } if (replaced) diff --git a/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.Utils.cs b/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.Utils.cs index 211dca53..599ea062 100644 --- a/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.Utils.cs +++ b/ILRuntime/Runtime/Intepreter/RegisterVM/Optimizer.Utils.cs @@ -869,6 +869,19 @@ public static bool GetOpcodeDestRegister(ref OpCodes.OpCodeR op, out short r1) } } + static bool CanReplaceOpcodeSource(ref OpCodes.OpCodeR op, int idx) + { + switch (op.Code) + { + case OpCodeREnum.Ldloca: + case OpCodeREnum.Ldloca_S: + case OpCodeREnum.Ldarga: + case OpCodeREnum.Ldarga_S: + return false; + } + return true; + } + static void ReplaceOpcodeSource(ref OpCodes.OpCodeR op, int idx, short src) { switch (op.Code) diff --git a/ILRuntime/Runtime/Stack/RuntimeStack.cs b/ILRuntime/Runtime/Stack/RuntimeStack.cs index 93874329..eec9e7b6 100644 --- a/ILRuntime/Runtime/Stack/RuntimeStack.cs +++ b/ILRuntime/Runtime/Stack/RuntimeStack.cs @@ -6,6 +6,12 @@ using ILRuntime.CLR.TypeSystem; using ILRuntime.Other; using ILRuntime.Runtime.Intepreter; + +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Stack { unsafe class RuntimeStack : IDisposable @@ -17,11 +23,7 @@ unsafe class RuntimeStack : IDisposable StackObjectAllocator allocator; IntPtr nativePointer; -#if DEBUG && !DISABLE_ILRUNTIME_DEBUG - IList managedStack = new List(32); -#else - IList managedStack = new UncheckedList(32); -#endif + AutoList managedStack = new AutoList(32); UncheckedStack frames = new UncheckedStack(); public const int MAXIMAL_STACK_OBJECTS = 1024 * 16; @@ -71,7 +73,7 @@ public StackObject* ValueTypeStackBase } } - public IList ManagedStack { get { return managedStack; } } + public AutoList ManagedStack { get { return managedStack; } } public void ResetValueTypePointer() { @@ -370,7 +372,9 @@ public void AllocValueTypeAndCopy(StackObject* ptr, StackObject* src) public void AllocValueType(StackObject* ptr, IType type, bool register = false, bool noInitialize = false) { +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG if (type.IsValueType) +#endif { StackObject* dst; int size, managedCount; @@ -398,16 +402,19 @@ public void AllocValueType(StackObject* ptr, IType type, bool register = false, *(long*)&ptr->Value = (long)dst; InitializeValueTypeObject(type, dst, register, ref managedIdx, noInitialize); } +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG else throw new ArgumentException(type.FullName + " is not a value type.", "type"); +#endif } internal void InitializeValueTypeObject(IType type, StackObject* ptr, bool register, ref int managedIdx, bool noInitialize) { + var tFCnt = type.TotalFieldCount; ptr->ObjectType = ObjectTypes.ValueTypeDescriptor; ptr->Value = type.TypeIndex; - ptr->ValueLow = type.TotalFieldCount; - StackObject* endPtr = ptr - (type.TotalFieldCount + 1); + ptr->ValueLow = tFCnt; + StackObject* endPtr = ptr - (tFCnt + 1); if (noInitialize) return; if (type is ILType) @@ -463,10 +470,11 @@ internal void InitializeValueTypeObject(IType type, StackObject* ptr, bool regis else { CLRType t = (CLRType)type; - var cnt = t.TotalFieldCount; + var cnt = tFCnt; + var arr = t.OrderedFieldTypes; for (int i = 0; i < cnt; i++) { - var it = t.OrderedFieldTypes[i] as CLRType; + var it = arr[i] as CLRType; StackObject* val = ILIntepreter.Minus(ptr, i + 1); if (it.IsPrimitive) *val = it.DefaultObject; @@ -588,16 +596,16 @@ internal void RemoveManagedStackRange(int start, int end) { if (start != int.MaxValue) { +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG if (end == managedStack.Count - 1) { -#if DEBUG && !DISABLE_ILRUNTIME_DEBUG ((List)managedStack).RemoveRange(start, managedStack.Count - start); -#else - ((UncheckedList)managedStack).RemoveRange(start, managedStack.Count - start); -#endif } else throw new NotSupportedException(); +#else + ((UncheckedList)managedStack).RemoveRange(start, managedStack.Count - start); +#endif } } @@ -627,7 +635,17 @@ public void FreeValueTypeObject(StackObject* esp) public void CountValueTypeManaged(StackObject* esp, ref int start, ref int end, StackObject** endAddr) { StackObject* descriptor = ILIntepreter.ResolveReference(esp); - int cnt = descriptor->ValueLow; + IType type = intepreter.AppDomain.GetTypeByIndex(descriptor->Value); + int cnt, mCnt; + type.GetValueTypeSize(out cnt, out mCnt); + StackObject* startAddr = descriptor; + *endAddr = descriptor - cnt; + if (mCnt > 0) + { + end = managedStack.Count - 1; + start = managedStack.Count - mCnt; + } + /*int cnt = descriptor->ValueLow; *endAddr = ILIntepreter.Minus(descriptor, cnt + 1); for (int i = 0; i < cnt; i++) { @@ -654,7 +672,7 @@ public void CountValueTypeManaged(StackObject* esp, ref int start, ref int end, break; } - } + }*/ } public void Dispose() diff --git a/ILRuntime/Runtime/Stack/StackObject.cs b/ILRuntime/Runtime/Stack/StackObject.cs index 73a988db..95d61ac6 100644 --- a/ILRuntime/Runtime/Stack/StackObject.cs +++ b/ILRuntime/Runtime/Stack/StackObject.cs @@ -6,6 +6,11 @@ using ILRuntime.CLR.TypeSystem; using ILRuntime.Runtime.Enviorment; using ILRuntime.Runtime.Intepreter; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Stack { #pragma warning disable CS0660 @@ -28,8 +33,13 @@ public struct StackObject return (a.ObjectType != b.ObjectType) || (a.Value != b.Value) || (a.ValueLow == b.ValueLow); } - //IL2CPP can't process esp->ToObject() properly, so I can only use static function for this + [Obsolete] public static unsafe object ToObject(StackObject* esp, ILRuntime.Runtime.Enviorment.AppDomain appdomain, IList mStack) + { + return ToObject(esp, appdomain, (AutoList)mStack); + } + //IL2CPP can't process esp->ToObject() properly, so I can only use static function for this + public static unsafe object ToObject(StackObject* esp, ILRuntime.Runtime.Enviorment.AppDomain appdomain, AutoList mStack) { switch (esp->ObjectType) { @@ -120,7 +130,7 @@ public static unsafe object ToObject(StackObject* esp, ILRuntime.Runtime.Enviorm } } - public unsafe static void Initialized(ref StackObject esp, int idx, IType fieldType, IList mStack) + public unsafe static void Initialized(ref StackObject esp, int idx, IType fieldType, AutoList mStack) { if (fieldType.IsPrimitive) { diff --git a/ILRuntimeTestBase/Adapters/TestVector3Binder.cs b/ILRuntimeTestBase/Adapters/TestVector3Binder.cs index 0c6dcece..6c26ce55 100644 --- a/ILRuntimeTestBase/Adapters/TestVector3Binder.cs +++ b/ILRuntimeTestBase/Adapters/TestVector3Binder.cs @@ -9,6 +9,205 @@ namespace ILRuntimeTest.TestFramework { + public unsafe class Fixed64Binder : ValueTypeBinder + { + public override unsafe void AssignFromStack(ref Fixed64 ins, StackObject* ptr, IList mStack) + { + var v = ILIntepreter.Minus(ptr, 1); + ins = new Fixed64(*(long*)&v->Value); + } + + public override unsafe void CopyValueTypeToStack(ref Fixed64 ins, StackObject* ptr, IList mStack) + { + var v = ILIntepreter.Minus(ptr, 1); + *(long*)&v->Value = ins.RawValue; + } + public override void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain appdomain) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; + Type type = typeof(Fixed64); + args = new Type[] { typeof(long) }; + method = type.GetConstructor(flag, null, args, null); + appdomain.RegisterCLRMethodRedirection(method, NewFixed64); + } + + StackObject* NewFixed64(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + { + StackObject* ret; + if (isNewObj) + { + ret = esp; + Fixed64 vec; + var ptr = ILIntepreter.Minus(esp, 1); + var val = *(long*)&ptr->Value; + vec = new Fixed64(val); + PushFixed64(ref vec, intp, ptr, mStack); + } + else + { + ret = ILIntepreter.Minus(esp, 2); + var instance = ILIntepreter.GetObjectAndResolveReference(ret); + var dst = *(StackObject**)&instance->Value; + var f = ILIntepreter.Minus(dst, 1); + var v = ILIntepreter.Minus(esp, 1); + var val = *(long*)&v->Value; + Fixed64 vec = new Fixed64(val); + *(long*)&f->Value = vec.RawValue; + } + return ret; + } + + public static void ParseFixed64(out Fixed64 vec, ILIntepreter intp, StackObject* ptr, IList mStack) + { + var a = ILIntepreter.GetObjectAndResolveReference(ptr); + if (a->ObjectType == ObjectTypes.ValueTypeObjectReference) + { + var src = *(StackObject**)&a->Value; + long value = *(long*)&ILIntepreter.Minus(src, 1)->Value; + vec = new Fixed64(value); + intp.FreeStackValueType(ptr); + } + else + { + vec = (Fixed64)StackObject.ToObject(a, intp.AppDomain, mStack); + intp.Free(ptr); + } + } + + public void PushFixed64(ref Fixed64 vec, ILIntepreter intp, StackObject* ptr, IList mStack) + { + intp.AllocValueType(ptr, CLRType); + var dst = *((StackObject**)&ptr->Value); + CopyValueTypeToStack(ref vec, dst, mStack); + } + } + + public unsafe class FixedVector2Binder : ValueTypeBinder + { + public override unsafe void AssignFromStack(ref Fixed64Vector2 ins, StackObject* ptr, IList mStack) + { + var v = ILIntepreter.Minus(ptr, 1); + ins.x = GetFixed64(v, mStack); + v = ILIntepreter.Minus(ptr, 2); + ins.y = GetFixed64(v, mStack); + } + + private Fixed64 GetFixed64(StackObject* ptr, IList mStack) + { + var a = ILIntepreter.GetObjectAndResolveReference(ptr); + Fixed64 res; + if (a->ObjectType == ObjectTypes.ValueTypeObjectReference) + { + var src = *(StackObject**)&a->Value; + var val = *(long*)&ILIntepreter.Minus(src, 1)->Value; + res = new Fixed64(val); + } + else + { + var raw = (Fixed64)StackObject.ToObject(a, domain, mStack); + res = raw; + } + return res; + } + + public override unsafe void CopyValueTypeToStack(ref Fixed64Vector2 ins, StackObject* ptr, IList mStack) + { + var v = ILIntepreter.Minus(ptr, 1); + var fix64Ptr = GetFix64Ptr(v, mStack); + *(long*)&fix64Ptr->Value = ins.x.RawValue; + + v = ILIntepreter.Minus(ptr, 2); + fix64Ptr = GetFix64Ptr(v, mStack); + *(long*)&fix64Ptr->Value = ins.y.RawValue; + } + + private StackObject* GetFix64Ptr(StackObject* ptr, IList mStack) + { + StackObject* res = null; + var a = ILIntepreter.GetObjectAndResolveReference(ptr); + if (a->ObjectType == ObjectTypes.ValueTypeObjectReference) + { + var src = *(StackObject**)&a->Value; + res = ILIntepreter.Minus(src, 1); + } + return res; + } + + public override void RegisterCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain appdomain) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; + Type type = typeof(Fixed64Vector2); + args = new Type[] { typeof(int), typeof(int) }; + method = type.GetConstructor(flag, null, args, null); + appdomain.RegisterCLRMethodRedirection(method, NewFixed64Vector2); + } + + StackObject* NewFixed64Vector2(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + { + StackObject* ret; + if (isNewObj) + { + ret = ILIntepreter.Minus(esp, 1); + Fixed64Vector2 vec; + var ptr = ILIntepreter.Minus(esp, 1); + var y = ptr->Value; + ptr = ILIntepreter.Minus(esp, 2); + var x = ptr->Value; + vec = new Fixed64Vector2(x, y); + + PushVector2(ref vec, intp, ptr, mStack); + } + else + { + ret = ILIntepreter.Minus(esp, 3); + var instance = ILIntepreter.GetObjectAndResolveReference(ret); + var dst = *(StackObject**)&instance->Value; + var ptr = ILIntepreter.Minus(dst, 1); + var f = GetFix64Ptr(ptr, mStack); + var v = ILIntepreter.Minus(esp, 2); + Fixed64 fix = new Fixed64(v->Value); + *(long*)&f->Value = fix.RawValue; + + ptr = ILIntepreter.Minus(dst, 2); + f = GetFix64Ptr(ptr, mStack); + v = ILIntepreter.Minus(esp, 1); + fix = new Fixed64(v->Value); + *(long*)&f->Value = fix.RawValue; + } + return ret; + } + + public void ParseFixed64Vector2(out Fixed64Vector2 vec, ILIntepreter intp, StackObject* ptr, IList mStack) + { + var a = ILIntepreter.GetObjectAndResolveReference(ptr); + if (a->ObjectType == ObjectTypes.ValueTypeObjectReference) + { + var src = *(StackObject**)&a->Value; + var fixPtr = ILIntepreter.Minus(src, 1); + vec.x = GetFixed64(fixPtr, mStack); + fixPtr = ILIntepreter.Minus(src, 2); + vec.y = GetFixed64(fixPtr, mStack); + + intp.FreeStackValueType(ptr); + } + else + { + vec = (Fixed64Vector2)StackObject.ToObject(a, intp.AppDomain, mStack); + intp.Free(ptr); + } + } + + public void PushVector2(ref Fixed64Vector2 vec, ILIntepreter intp, StackObject* ptr, IList mStack) + { + intp.AllocValueType(ptr, CLRType); + var dst = *((StackObject**)&ptr->Value); + CopyValueTypeToStack(ref vec, dst, mStack); + } + } public unsafe class TestStructABinder : ValueTypeBinder { public override unsafe void CopyValueTypeToStack(ref TestStructA ins, StackObject* ptr, IList stack) diff --git a/ILRuntimeTestBase/Adapters/helper.cs b/ILRuntimeTestBase/Adapters/helper.cs index 5377bd60..8ea9c76d 100644 --- a/ILRuntimeTestBase/Adapters/helper.cs +++ b/ILRuntimeTestBase/Adapters/helper.cs @@ -36,6 +36,8 @@ public static void Init(ILRuntime.Runtime.Enviorment.AppDomain app) app.RegisterValueTypeBinder(typeof(TestStructA), new TestStructABinder()); app.RegisterValueTypeBinder(typeof(TestStructB), new TestStructBBinder()); + app.RegisterValueTypeBinder(typeof(Fixed64), new Fixed64Binder()); + app.RegisterValueTypeBinder(typeof(Fixed64Vector2), new FixedVector2Binder()); // delegate register @@ -62,7 +64,17 @@ public static void Init(ILRuntime.Runtime.Enviorment.AppDomain app) app.DelegateManager.RegisterFunctionDelegate(); app.DelegateManager.RegisterFunctionDelegate(); app.DelegateManager.RegisterMethodDelegate(); + app.DelegateManager.RegisterFunctionDelegate(); + app.DelegateManager.RegisterFunctionDelegate(); + app.DelegateManager.RegisterMethodDelegate(); // delegate convertor + app.DelegateManager.RegisterDelegateConvertor>((act) => + { + return new System.Comparison((x, y) => + { + return ((Func)act)(x, y); + }); + }); app.DelegateManager.RegisterDelegateConvertor((act) => { return new ILRuntimeTest.TestFramework.TestValueTypeDelegate((vec) => diff --git a/ILRuntimeTestBase/AutoGenerate/CLRBindings.cs b/ILRuntimeTestBase/AutoGenerate/CLRBindings.cs index 74efe0d6..43c7054d 100644 --- a/ILRuntimeTestBase/AutoGenerate/CLRBindings.cs +++ b/ILRuntimeTestBase/AutoGenerate/CLRBindings.cs @@ -1,7 +1,11 @@ using System; using System.Collections.Generic; using System.Reflection; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { class CLRBindings @@ -22,6 +26,8 @@ static private void RegisterBindingAction() internal static ILRuntime.Runtime.Enviorment.ValueTypeBinder> s_System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInstance_Binding_Binder = null; internal static ILRuntime.Runtime.Enviorment.ValueTypeBinder s_ILRuntimeTest_TestFramework_TestStructA_Binding_Binder = null; internal static ILRuntime.Runtime.Enviorment.ValueTypeBinder s_ILRuntimeTest_TestFramework_TestStructB_Binding_Binder = null; + internal static ILRuntime.Runtime.Enviorment.ValueTypeBinder s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder = null; + internal static ILRuntime.Runtime.Enviorment.ValueTypeBinder s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder = null; /// /// Initialize the CLR binding, please invoke this AFTER CLR Redirection registration @@ -99,6 +105,8 @@ public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app) System_Reflection_ParameterInfo_Binding.Register(app); System_Reflection_MethodInfo_Binding.Register(app); ILRuntimeTest_TestFramework_BindableProperty_1_Int64_Binding.Register(app); + System_Threading_Interlocked_Binding.Register(app); + System_Action_3_Single_Double_Int32_Binding.Register(app); System_Action_Binding.Register(app); System_Collections_Generic_Dictionary_2_Int64_Int32_Binding.Register(app); System_Enum_Binding.Register(app); @@ -151,6 +159,7 @@ public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app) ILRuntimeTest_TestFramework_TestCLRAttribute_Binding.Register(app); System_Reflection_PropertyInfo_Binding.Register(app); System_Collections_Generic_List_1_String_Binding.Register(app); + System_Collections_Generic_List_1_FieldInfo_Binding.Register(app); ILRuntimeTest_TestFramework_TestCLREnumClass_Binding.Register(app); System_Nullable_1_Int32_Binding.Register(app); System_Collections_Generic_Dictionary_2_Int32_List_1_String_Binding.Register(app); @@ -188,8 +197,11 @@ public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app) System_AccessViolationException_Binding.Register(app); System_Func_1_TestVector3_Binding.Register(app); ILRuntimeTest_TestFramework_JInt_Binding.Register(app); + System_Collections_Generic_List_1_TestVector3NoBinding_Binding.Register(app); ILRuntimeTest_TestFramework_TestStructA_Binding.Register(app); ILRuntimeTest_TestFramework_TestStructB_Binding.Register(app); + ILRuntimeTest_TestFramework_Fixed64_Binding.Register(app); + ILRuntimeTest_TestFramework_Fixed64Vector2_Binding.Register(app); ILRuntime.CLR.TypeSystem.CLRType __clrType = null; __clrType = (ILRuntime.CLR.TypeSystem.CLRType)app.GetType (typeof(ILRuntimeTest.TestFramework.TestVector3)); @@ -204,6 +216,10 @@ public static void Initialize(ILRuntime.Runtime.Enviorment.AppDomain app) s_ILRuntimeTest_TestFramework_TestStructA_Binding_Binder = __clrType.ValueTypeBinder as ILRuntime.Runtime.Enviorment.ValueTypeBinder; __clrType = (ILRuntime.CLR.TypeSystem.CLRType)app.GetType (typeof(ILRuntimeTest.TestFramework.TestStructB)); s_ILRuntimeTest_TestFramework_TestStructB_Binding_Binder = __clrType.ValueTypeBinder as ILRuntime.Runtime.Enviorment.ValueTypeBinder; + __clrType = (ILRuntime.CLR.TypeSystem.CLRType)app.GetType (typeof(ILRuntimeTest.TestFramework.Fixed64)); + s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder = __clrType.ValueTypeBinder as ILRuntime.Runtime.Enviorment.ValueTypeBinder; + __clrType = (ILRuntime.CLR.TypeSystem.CLRType)app.GetType (typeof(ILRuntimeTest.TestFramework.Fixed64Vector2)); + s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder = __clrType.ValueTypeBinder as ILRuntime.Runtime.Enviorment.ValueTypeBinder; } /// @@ -217,6 +233,8 @@ public static void Shutdown(ILRuntime.Runtime.Enviorment.AppDomain app) s_System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInstance_Binding_Binder = null; s_ILRuntimeTest_TestFramework_TestStructA_Binding_Binder = null; s_ILRuntimeTest_TestFramework_TestStructB_Binding_Binder = null; + s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder = null; + s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder = null; } } } diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_1_Int32_Binding.cs index 508dda1d..b6e5ef93 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_ExtensionClass_1_Int32_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_Binding.cs index 26fb3fa8..396859df 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_ExtensionClass_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_ExtensionClass_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_GenericExtensions_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_GenericExtensions_Binding.cs index cbe278cd..19d8bea2 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_GenericExtensions_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_GenericExtensions_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_GenericExtensions_Binding @@ -257,7 +261,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Method1_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method1_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -277,7 +281,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method1_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method1_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -297,7 +301,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -317,7 +321,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -337,7 +341,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -357,7 +361,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -377,7 +381,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -397,7 +401,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -417,7 +421,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_8(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -437,7 +441,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method2_9(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method2_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -457,7 +461,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_10(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -477,7 +481,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_11(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -497,7 +501,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_12(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -517,7 +521,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_13(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -537,7 +541,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_14(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -557,7 +561,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_15(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_15(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -577,7 +581,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method3_16(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method3_16(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_StaticGenericMethods_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_StaticGenericMethods_Binding.cs index 66f0db45..46ea9af7 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_StaticGenericMethods_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_StaticGenericMethods_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_StaticGenericMethods_Binding @@ -140,7 +144,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* ArrayMethod_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ArrayMethod_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -156,7 +160,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* ArrayMethod_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ArrayMethod_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -172,7 +176,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -188,7 +192,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -204,7 +208,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -220,7 +224,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -236,7 +240,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -252,7 +256,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -268,7 +272,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_8(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -284,7 +288,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* StaticMethod_9(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StaticMethod_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -300,7 +304,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Method_10(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Method_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_1_Int32_Binding.cs index febe4f6e..0c5ec2d6 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_SubExtensionClass_1_Int32_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_Binding.cs index 760575ce..b08a664f 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_SubExtensionClass_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_SubExtensionClass_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_TestSession_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_TestSession_Binding.cs index 26e49f02..b181585b 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_TestSession_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestBase_TestSession_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestBase_TestSession_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_LastSession_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_LastSession_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -44,7 +48,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_Appdomain_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Appdomain_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BaseClassTest_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BaseClassTest_Binding.cs index 69fc0bdb..55b7f01f 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BaseClassTest_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BaseClassTest_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_BaseClassTest_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* DoTest_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* DoTest_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -53,7 +57,7 @@ static object get_testField_0(ref object o) return ((ILRuntimeTest.TestFramework.BaseClassTest)o).testField; } - static StackObject* CopyToStack_testField_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_testField_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.BaseClassTest)o).testField; __ret->ObjectType = ObjectTypes.Integer; @@ -66,7 +70,7 @@ static void set_testField_0(ref object o, object v) ((ILRuntimeTest.TestFramework.BaseClassTest)o).testField = (System.Boolean)v; } - static StackObject* AssignFromStack_testField_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_testField_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Boolean @testField = ptr_of_this_method->Value == 1; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BindableProperty_1_Int64_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BindableProperty_1_Int64_Binding.cs index 5bef2bf3..9a13a280 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BindableProperty_1_Int64_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_BindableProperty_1_Int64_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_BindableProperty_1_Int64_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Value_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Value_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -63,7 +67,7 @@ static object get_OnChangeWithOldVal_0(ref object o) return ((ILRuntimeTest.TestFramework.BindableProperty)o).OnChangeWithOldVal; } - static StackObject* CopyToStack_OnChangeWithOldVal_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_OnChangeWithOldVal_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.BindableProperty)o).OnChangeWithOldVal; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -74,7 +78,7 @@ static void set_OnChangeWithOldVal_0(ref object o, object v) ((ILRuntimeTest.TestFramework.BindableProperty)o).OnChangeWithOldVal = (ILRuntimeTest.TestFramework.BindableProperty.onChangeWithOldVal)v; } - static StackObject* AssignFromStack_OnChangeWithOldVal_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_OnChangeWithOldVal_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.BindableProperty.onChangeWithOldVal @OnChangeWithOldVal = (ILRuntimeTest.TestFramework.BindableProperty.onChangeWithOldVal)typeof(ILRuntimeTest.TestFramework.BindableProperty.onChangeWithOldVal).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -83,7 +87,7 @@ static void set_OnChangeWithOldVal_0(ref object o, object v) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest2_1_ILRuntim.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest2_1_ILRuntim.cs index 0b1744bc..48e5a5d2 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest2_1_ILRuntim.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest2_1_ILRuntim.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_ClassInheritanceTest2_1_ILRuntimeTest_TestFramework_ClassInheritanceTest2Adaptor_Binding_Adaptor_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* TestVirtual_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestVirtual_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest_Binding.cs index dc457413..17af4d0a 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_ClassInheritanceTest_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_ClassInheritanceTest_Binding @@ -52,7 +56,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* TestAbstract_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestAbstract_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -67,7 +71,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestVirtual_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestVirtual_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -82,7 +86,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestField_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestField_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -97,7 +101,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Test3_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Test3_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -113,7 +117,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestLongRef_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestLongRef_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -180,7 +184,7 @@ static object get_TestVal2_0(ref object o) return ((ILRuntimeTest.TestFramework.ClassInheritanceTest)o).TestVal2; } - static StackObject* CopyToStack_TestVal2_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_TestVal2_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.ClassInheritanceTest)o).TestVal2; __ret->ObjectType = ObjectTypes.Integer; @@ -193,7 +197,7 @@ static void set_TestVal2_0(ref object o, object v) ((ILRuntimeTest.TestFramework.ClassInheritanceTest)o).TestVal2 = (System.Int32)v; } - static StackObject* AssignFromStack_TestVal2_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_TestVal2_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Int32 @TestVal2 = ptr_of_this_method->Value; @@ -206,7 +210,7 @@ static object get_staticField_1(ref object o) return ILRuntimeTest.TestFramework.ClassInheritanceTest.staticField; } - static StackObject* CopyToStack_staticField_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_staticField_1(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.ClassInheritanceTest.staticField; object obj_result_of_this_method = result_of_this_method; @@ -222,7 +226,7 @@ static void set_staticField_1(ref object o, object v) ILRuntimeTest.TestFramework.ClassInheritanceTest.staticField = (System.IDisposable)v; } - static StackObject* AssignFromStack_staticField_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_staticField_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.IDisposable @staticField = (System.IDisposable)typeof(System.IDisposable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_DelegateTest_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_DelegateTest_Binding.cs index 9eae2a3f..412a3d34 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_DelegateTest_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_DelegateTest_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_DelegateTest_Binding @@ -47,6 +51,18 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("TestEnumDelegate2", flag, null, args, null); app.RegisterCLRMethodRedirection(method, TestEnumDelegate2_7); + args = new Type[]{typeof(System.Action)}; + method = type.GetMethod("add_OnIntEvent", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, add_OnIntEvent_8); + args = new Type[]{typeof(System.Single), typeof(System.Double), typeof(System.Int32)}; + method = type.GetMethod("TestEvent3", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, TestEvent3_9); + args = new Type[]{typeof(System.Action)}; + method = type.GetMethod("remove_OnIntEvent", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, remove_OnIntEvent_10); + args = new Type[]{}; + method = type.GetMethod("TestEvent4", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, TestEvent4_11); field = type.GetField("IntDelegateTest", flag); app.RegisterCLRFieldGetter(field, get_IntDelegateTest_0); @@ -80,7 +96,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* add_IntDelegateEventTest_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* add_IntDelegateEventTest_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -96,7 +112,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestEvent_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestEvent_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -107,7 +123,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* remove_IntDelegateEventTest_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* remove_IntDelegateEventTest_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -123,7 +139,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* add_IntDelegateEventTest2_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* add_IntDelegateEventTest2_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -142,7 +158,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestEvent2_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestEvent2_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -157,7 +173,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* remove_IntDelegateEventTest2_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* remove_IntDelegateEventTest2_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -176,7 +192,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestEnumDelegate_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestEnumDelegate_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -187,7 +203,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TestEnumDelegate2_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestEnumDelegate2_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -198,13 +214,79 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } + static StackObject* add_OnIntEvent_8(ILIntepreter __intp, StackObject* __esp, AutoList __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.Action @value = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + __intp.Free(ptr_of_this_method); + + + ILRuntimeTest.TestFramework.DelegateTest.OnIntEvent += value; + + return __ret; + } + + static StackObject* TestEvent3_9(ILIntepreter __intp, StackObject* __esp, AutoList __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.Int32 @c = ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Double @b = *(double*)&ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 3); + System.Single @a = *(float*)&ptr_of_this_method->Value; + + + ILRuntimeTest.TestFramework.DelegateTest.TestEvent3(@a, @b, @c); + + return __ret; + } + + static StackObject* remove_OnIntEvent_10(ILIntepreter __intp, StackObject* __esp, AutoList __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.Action @value = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + __intp.Free(ptr_of_this_method); + + + ILRuntimeTest.TestFramework.DelegateTest.OnIntEvent -= value; + + return __ret; + } + + static StackObject* TestEvent4_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) + { + ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; + StackObject* __ret = ILIntepreter.Minus(__esp, 0); + + + var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.TestEvent4(); + + __ret->ObjectType = ObjectTypes.Integer; + __ret->Value = result_of_this_method ? 1 : 0; + return __ret + 1; + } + static object get_IntDelegateTest_0(ref object o) { return ILRuntimeTest.TestFramework.DelegateTest.IntDelegateTest; } - static StackObject* CopyToStack_IntDelegateTest_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_IntDelegateTest_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.IntDelegateTest; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -215,7 +297,7 @@ static void set_IntDelegateTest_0(ref object o, object v) ILRuntimeTest.TestFramework.DelegateTest.IntDelegateTest = (ILRuntimeTest.TestFramework.IntDelegate)v; } - static StackObject* AssignFromStack_IntDelegateTest_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_IntDelegateTest_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.IntDelegate @IntDelegateTest = (ILRuntimeTest.TestFramework.IntDelegate)typeof(ILRuntimeTest.TestFramework.IntDelegate).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -228,7 +310,7 @@ static object get_IntDelegateTest2_1(ref object o) return ILRuntimeTest.TestFramework.DelegateTest.IntDelegateTest2; } - static StackObject* CopyToStack_IntDelegateTest2_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_IntDelegateTest2_1(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.IntDelegateTest2; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -239,7 +321,7 @@ static void set_IntDelegateTest2_1(ref object o, object v) ILRuntimeTest.TestFramework.DelegateTest.IntDelegateTest2 = (ILRuntimeTest.TestFramework.IntDelegate2)v; } - static StackObject* AssignFromStack_IntDelegateTest2_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_IntDelegateTest2_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.IntDelegate2 @IntDelegateTest2 = (ILRuntimeTest.TestFramework.IntDelegate2)typeof(ILRuntimeTest.TestFramework.IntDelegate2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -252,7 +334,7 @@ static object get_GenericDelegateTest_2(ref object o) return ILRuntimeTest.TestFramework.DelegateTest.GenericDelegateTest; } - static StackObject* CopyToStack_GenericDelegateTest_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_GenericDelegateTest_2(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.GenericDelegateTest; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -263,7 +345,7 @@ static void set_GenericDelegateTest_2(ref object o, object v) ILRuntimeTest.TestFramework.DelegateTest.GenericDelegateTest = (System.Action)v; } - static StackObject* AssignFromStack_GenericDelegateTest_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_GenericDelegateTest_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Action @GenericDelegateTest = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -276,7 +358,7 @@ static object get_EnumDelegateTest_3(ref object o) return ILRuntimeTest.TestFramework.DelegateTest.EnumDelegateTest; } - static StackObject* CopyToStack_EnumDelegateTest_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_EnumDelegateTest_3(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.EnumDelegateTest; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -287,7 +369,7 @@ static void set_EnumDelegateTest_3(ref object o, object v) ILRuntimeTest.TestFramework.DelegateTest.EnumDelegateTest = (System.Action)v; } - static StackObject* AssignFromStack_EnumDelegateTest_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_EnumDelegateTest_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Action @EnumDelegateTest = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -300,7 +382,7 @@ static object get_EnumDelegateTest2_4(ref object o) return ILRuntimeTest.TestFramework.DelegateTest.EnumDelegateTest2; } - static StackObject* CopyToStack_EnumDelegateTest2_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_EnumDelegateTest2_4(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.EnumDelegateTest2; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -311,7 +393,7 @@ static void set_EnumDelegateTest2_4(ref object o, object v) ILRuntimeTest.TestFramework.DelegateTest.EnumDelegateTest2 = (System.Func)v; } - static StackObject* AssignFromStack_EnumDelegateTest2_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_EnumDelegateTest2_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Func @EnumDelegateTest2 = (System.Func)typeof(System.Func).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -324,7 +406,7 @@ static object get_DelegatePerformanceTest_5(ref object o) return ILRuntimeTest.TestFramework.DelegateTest.DelegatePerformanceTest; } - static StackObject* CopyToStack_DelegatePerformanceTest_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_DelegatePerformanceTest_5(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.DelegateTest.DelegatePerformanceTest; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -335,7 +417,7 @@ static void set_DelegatePerformanceTest_5(ref object o, object v) ILRuntimeTest.TestFramework.DelegateTest.DelegatePerformanceTest = (System.Func)v; } - static StackObject* AssignFromStack_DelegatePerformanceTest_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_DelegatePerformanceTest_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Func @DelegatePerformanceTest = (System.Func)typeof(System.Func).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -344,7 +426,7 @@ static void set_DelegatePerformanceTest_5(ref object o, object v) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_Fixed64Vector2_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_Fixed64Vector2_Binding.cs new file mode 100644 index 00000000..d0e3c0c8 --- /dev/null +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_Fixed64Vector2_Binding.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using ILRuntime.CLR.TypeSystem; +using ILRuntime.CLR.Method; +using ILRuntime.Runtime.Enviorment; +using ILRuntime.Runtime.Intepreter; +using ILRuntime.Runtime.Stack; +using ILRuntime.Reflection; +using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif +namespace ILRuntime.Runtime.Generated +{ + unsafe class ILRuntimeTest_TestFramework_Fixed64Vector2_Binding + { + public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + FieldInfo field; + Type[] args; + Type type = typeof(ILRuntimeTest.TestFramework.Fixed64Vector2); + + field = type.GetField("x", flag); + app.RegisterCLRFieldGetter(field, get_x_0); + app.RegisterCLRFieldSetter(field, set_x_0); + app.RegisterCLRFieldBinding(field, CopyToStack_x_0, AssignFromStack_x_0); + + app.RegisterCLRMemberwiseClone(type, PerformMemberwiseClone); + + app.RegisterCLRCreateDefaultInstance(type, () => new ILRuntimeTest.TestFramework.Fixed64Vector2()); + + args = new Type[]{typeof(System.Int32), typeof(System.Int32)}; + method = type.GetConstructor(flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Ctor_0); + + } + + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.Fixed64Vector2 instance_of_this_method) + { + ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); + switch(ptr_of_this_method->ObjectType) + { + case ObjectTypes.Object: + { + __mStack[ptr_of_this_method->Value] = instance_of_this_method; + } + break; + case ObjectTypes.FieldReference: + { + var ___obj = __mStack[ptr_of_this_method->Value]; + if(___obj is ILTypeInstance) + { + ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method; + } + else + { + var t = __domain.GetType(___obj.GetType()) as CLRType; + t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method); + } + } + break; + case ObjectTypes.StaticFieldReference: + { + var t = __domain.GetType(ptr_of_this_method->Value); + if(t is ILType) + { + ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method; + } + else + { + ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method); + } + } + break; + case ObjectTypes.ArrayReference: + { + var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ILRuntimeTest.TestFramework.Fixed64Vector2[]; + instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method; + } + break; + } + } + + + static object get_x_0(ref object o) + { + return ((ILRuntimeTest.TestFramework.Fixed64Vector2)o).x; + } + + static StackObject* CopyToStack_x_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) + { + var result_of_this_method = ((ILRuntimeTest.TestFramework.Fixed64Vector2)o).x; + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.PushValue(ref result_of_this_method, __intp, __ret, __mStack); + return __ret + 1; + } else { + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + } + + static void set_x_0(ref object o, object v) + { + ILRuntimeTest.TestFramework.Fixed64Vector2 ins =(ILRuntimeTest.TestFramework.Fixed64Vector2)o; + ins.x = (ILRuntimeTest.TestFramework.Fixed64)v; + o = ins; + } + + static StackObject* AssignFromStack_x_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) + { + ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; + ILRuntimeTest.TestFramework.Fixed64 @x = new ILRuntimeTest.TestFramework.Fixed64(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.ParseValue(ref @x, __intp, ptr_of_this_method, __mStack, true); + } else { + @x = (ILRuntimeTest.TestFramework.Fixed64)typeof(ILRuntimeTest.TestFramework.Fixed64).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + } + ILRuntimeTest.TestFramework.Fixed64Vector2 ins =(ILRuntimeTest.TestFramework.Fixed64Vector2)o; + ins.x = @x; + o = ins; + return ptr_of_this_method; + } + + + static object PerformMemberwiseClone(ref object o) + { + var ins = new ILRuntimeTest.TestFramework.Fixed64Vector2(); + ins = (ILRuntimeTest.TestFramework.Fixed64Vector2)o; + return ins; + } + + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __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.Int32 @y = ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Int32 @x = ptr_of_this_method->Value; + + + var result_of_this_method = new ILRuntimeTest.TestFramework.Fixed64Vector2(@x, @y); + + if(!isNewObj) + { + __ret--; + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder.WriteBackValue(__domain, __ret, __mStack, ref result_of_this_method); + } else { + WriteBackInstance(__domain, __ret, __mStack, ref result_of_this_method); + } + return __ret; + } + + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64Vector2_Binding_Binder.PushValue(ref result_of_this_method, __intp, __ret, __mStack); + return __ret + 1; + } else { + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + } + + + } +} diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_Fixed64_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_Fixed64_Binding.cs new file mode 100644 index 00000000..99b4a854 --- /dev/null +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_Fixed64_Binding.cs @@ -0,0 +1,220 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using ILRuntime.CLR.TypeSystem; +using ILRuntime.CLR.Method; +using ILRuntime.Runtime.Enviorment; +using ILRuntime.Runtime.Intepreter; +using ILRuntime.Runtime.Stack; +using ILRuntime.Reflection; +using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif +namespace ILRuntime.Runtime.Generated +{ + unsafe class ILRuntimeTest_TestFramework_Fixed64_Binding + { + public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; + Type type = typeof(ILRuntimeTest.TestFramework.Fixed64); + args = new Type[]{}; + method = type.GetMethod("get_RawValue", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, get_RawValue_0); + args = new Type[]{typeof(ILRuntimeTest.TestFramework.Fixed64), typeof(ILRuntimeTest.TestFramework.Fixed64)}; + method = type.GetMethod("op_LessThan", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, op_LessThan_1); + args = new Type[]{typeof(ILRuntimeTest.TestFramework.Fixed64), typeof(ILRuntimeTest.TestFramework.Fixed64)}; + method = type.GetMethod("op_GreaterThan", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, op_GreaterThan_2); + + app.RegisterCLRCreateDefaultInstance(type, () => new ILRuntimeTest.TestFramework.Fixed64()); + + args = new Type[]{typeof(System.Int64)}; + method = type.GetConstructor(flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Ctor_0); + + } + + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.Fixed64 instance_of_this_method) + { + ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); + switch(ptr_of_this_method->ObjectType) + { + case ObjectTypes.Object: + { + __mStack[ptr_of_this_method->Value] = instance_of_this_method; + } + break; + case ObjectTypes.FieldReference: + { + var ___obj = __mStack[ptr_of_this_method->Value]; + if(___obj is ILTypeInstance) + { + ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method; + } + else + { + var t = __domain.GetType(___obj.GetType()) as CLRType; + t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method); + } + } + break; + case ObjectTypes.StaticFieldReference: + { + var t = __domain.GetType(ptr_of_this_method->Value); + if(t is ILType) + { + ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method; + } + else + { + ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method); + } + } + break; + case ObjectTypes.ArrayReference: + { + var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ILRuntimeTest.TestFramework.Fixed64[]; + instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method; + } + break; + } + } + + static StackObject* get_RawValue_0(ILIntepreter __intp, StackObject* __esp, AutoList __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); + ILRuntimeTest.TestFramework.Fixed64 instance_of_this_method = new ILRuntimeTest.TestFramework.Fixed64(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.ParseValue(ref instance_of_this_method, __intp, ptr_of_this_method, __mStack, false); + } else { + ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); + instance_of_this_method = (ILRuntimeTest.TestFramework.Fixed64)typeof(ILRuntimeTest.TestFramework.Fixed64).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + } + + var result_of_this_method = instance_of_this_method.RawValue; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 1); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.WriteBackValue(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); + } else { + WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); + } + + __intp.Free(ptr_of_this_method); + __ret->ObjectType = ObjectTypes.Long; + *(long*)&__ret->Value = result_of_this_method; + return __ret + 1; + } + + static StackObject* op_LessThan_1(ILIntepreter __intp, StackObject* __esp, AutoList __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); + ILRuntimeTest.TestFramework.Fixed64 @y = new ILRuntimeTest.TestFramework.Fixed64(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.ParseValue(ref @y, __intp, ptr_of_this_method, __mStack, true); + } else { + @y = (ILRuntimeTest.TestFramework.Fixed64)typeof(ILRuntimeTest.TestFramework.Fixed64).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + __intp.Free(ptr_of_this_method); + } + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + ILRuntimeTest.TestFramework.Fixed64 @x = new ILRuntimeTest.TestFramework.Fixed64(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.ParseValue(ref @x, __intp, ptr_of_this_method, __mStack, true); + } else { + @x = (ILRuntimeTest.TestFramework.Fixed64)typeof(ILRuntimeTest.TestFramework.Fixed64).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + __intp.Free(ptr_of_this_method); + } + + + var result_of_this_method = x < y; + + __ret->ObjectType = ObjectTypes.Integer; + __ret->Value = result_of_this_method ? 1 : 0; + return __ret + 1; + } + + static StackObject* op_GreaterThan_2(ILIntepreter __intp, StackObject* __esp, AutoList __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); + ILRuntimeTest.TestFramework.Fixed64 @y = new ILRuntimeTest.TestFramework.Fixed64(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.ParseValue(ref @y, __intp, ptr_of_this_method, __mStack, true); + } else { + @y = (ILRuntimeTest.TestFramework.Fixed64)typeof(ILRuntimeTest.TestFramework.Fixed64).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + __intp.Free(ptr_of_this_method); + } + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + ILRuntimeTest.TestFramework.Fixed64 @x = new ILRuntimeTest.TestFramework.Fixed64(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.ParseValue(ref @x, __intp, ptr_of_this_method, __mStack, true); + } else { + @x = (ILRuntimeTest.TestFramework.Fixed64)typeof(ILRuntimeTest.TestFramework.Fixed64).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + __intp.Free(ptr_of_this_method); + } + + + var result_of_this_method = x > y; + + __ret->ObjectType = ObjectTypes.Integer; + __ret->Value = result_of_this_method ? 1 : 0; + return __ret + 1; + } + + + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __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.Int64 @value = *(long*)&ptr_of_this_method->Value; + + + var result_of_this_method = new ILRuntimeTest.TestFramework.Fixed64(@value); + + if(!isNewObj) + { + __ret--; + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.WriteBackValue(__domain, __ret, __mStack, ref result_of_this_method); + } else { + WriteBackInstance(__domain, __ret, __mStack, ref result_of_this_method); + } + return __ret; + } + + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_Fixed64_Binding_Binder.PushValue(ref result_of_this_method, __intp, __ret, __mStack); + return __ret + 1; + } else { + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + } + + + } +} diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate2_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate2_Binding.cs index 603dd192..b66ef675 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate2_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate2_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_IntDelegate2_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate_Binding.cs index 17271edb..ff56e349 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_IntDelegate_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_IntDelegate_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_JInt_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_JInt_Binding.cs index 13bf364f..faafe929 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_JInt_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_JInt_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_JInt_Binding @@ -47,7 +51,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.JInt instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.JInt instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -93,7 +97,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* op_Increment_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Increment_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -109,7 +113,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Implicit_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Implicit_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -124,7 +128,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Inequality_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Inequality_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -146,7 +150,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* op_Decrement_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Decrement_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -162,7 +166,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Subtraction_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Subtraction_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -181,7 +185,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Implicit_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Implicit_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRAttribute_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRAttribute_Binding.cs index 964e7b2b..09ebe9eb 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRAttribute_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRAttribute_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestCLRAttribute_Binding @@ -38,7 +42,7 @@ static object get_Name_0(ref object o) return ((ILRuntimeTest.TestFramework.TestCLRAttribute)o).Name; } - static StackObject* CopyToStack_Name_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_Name_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestCLRAttribute)o).Name; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -49,7 +53,7 @@ static void set_Name_0(ref object o, object v) ((ILRuntimeTest.TestFramework.TestCLRAttribute)o).Name = (System.String)v; } - static StackObject* AssignFromStack_Name_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_Name_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.String @Name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRBinding_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRBinding_Binding.cs index fd86deb9..d65d54d1 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRBinding_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLRBinding_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestCLRBinding_Binding @@ -100,7 +104,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Emit_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Emit_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -119,7 +123,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* LoadAsset_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* LoadAsset_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -142,7 +146,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* LoadAsset_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* LoadAsset_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -165,7 +169,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* LoadAsset_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* LoadAsset_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -188,7 +192,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLREnumClass_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLREnumClass_Binding.cs index 5ad5d8d0..2a565765 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLREnumClass_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestCLREnumClass_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestCLREnumClass_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* TestCLREnumRef_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestCLREnumRef_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -149,7 +153,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Test2_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Test2_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -166,7 +170,7 @@ static object get_Test_0(ref object o) return ILRuntimeTest.TestFramework.TestCLREnumClass.Test; } - static StackObject* CopyToStack_Test_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_Test_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.TestCLREnumClass.Test; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -177,7 +181,7 @@ static void set_Test_0(ref object o, object v) ILRuntimeTest.TestFramework.TestCLREnumClass.Test = (ILRuntimeTest.TestFramework.TestCLREnum)v; } - static StackObject* AssignFromStack_Test_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_Test_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestCLREnum @Test = (ILRuntimeTest.TestFramework.TestCLREnum)typeof(ILRuntimeTest.TestFramework.TestCLREnum).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass2_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass2_Binding.cs index 5ac66e83..e0909287 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass2_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass2_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestClass2_Binding @@ -48,7 +52,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* VMethod1_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* VMethod1_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -63,7 +67,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* VMethod3_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* VMethod3_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -128,7 +132,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* AbMethod2_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AbMethod2_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -148,7 +152,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Register_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Register_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -164,7 +168,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Alloc_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Alloc_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -180,7 +184,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* VMethod2_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* VMethod2_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -197,7 +201,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Add_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass3_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass3_Binding.cs index 6e8c4ea0..cf84cc56 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass3_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass3_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestClass3_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* setBit_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* setBit_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -113,7 +117,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* getString_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* getString_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -185,7 +189,7 @@ static object get_Struct_0(ref object o) return ((ILRuntimeTest.TestFramework.TestClass3)o).Struct; } - static StackObject* CopyToStack_Struct_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_Struct_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestClass3)o).Struct; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -196,7 +200,7 @@ static void set_Struct_0(ref object o, object v) ((ILRuntimeTest.TestFramework.TestClass3)o).Struct = (ILRuntimeTest.TestFramework.TestStruct)v; } - static StackObject* AssignFromStack_Struct_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_Struct_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestStruct @Struct = (ILRuntimeTest.TestFramework.TestStruct)typeof(ILRuntimeTest.TestFramework.TestStruct).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); @@ -205,7 +209,7 @@ static void set_Struct_0(ref object o, object v) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass4_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass4_Binding.cs index f10b7a64..5b3cf153 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass4_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestClass4_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestClass4_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* TestArrayOut_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TestArrayOut_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -110,7 +114,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* KKK_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* KKK_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -126,7 +130,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_Int32_ILTypeInstan.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_Int32_ILTypeInstan.cs index f9678562..345513c5 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_Int32_ILTypeInstan.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_Int32_ILTypeInstan.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestHashMap_2_Int32_ILTypeInstance_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -60,7 +64,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -81,7 +85,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_String_ILTypeInsta.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_String_ILTypeInsta.cs index 0598b3b2..f7af7b28 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_String_ILTypeInsta.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestHashMap_2_String_ILTypeInsta.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestHashMap_2_String_ILTypeInstance_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -61,7 +65,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -82,7 +86,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructA_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructA_Binding.cs index 0280d0f6..ee1efffb 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructA_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructA_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestStructA_Binding @@ -35,7 +39,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestStructA instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestStructA instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -87,7 +91,7 @@ static object get_value_0(ref object o) return ((ILRuntimeTest.TestFramework.TestStructA)o).value; } - static StackObject* CopyToStack_value_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_value_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestStructA)o).value; __ret->ObjectType = ObjectTypes.Long; @@ -102,7 +106,7 @@ static void set_value_0(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_value_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_value_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Int64 @value = *(long*)&ptr_of_this_method->Value; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructB_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructB_Binding.cs index 054b1030..6fcf3369 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructB_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStructB_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestStructB_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestStructB instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestStructB instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -77,7 +81,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* GetOne_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetOne_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStruct_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStruct_Binding.cs index 64c3984d..4206b73b 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStruct_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestStruct_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestStruct_Binding @@ -49,7 +53,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestStruct instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestStruct instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -95,7 +99,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* DoTest_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* DoTest_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -165,7 +169,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* DoTest_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* DoTest_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -226,7 +230,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* DoTest2_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* DoTest2_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -248,7 +252,7 @@ static object get_value_0(ref object o) return ((ILRuntimeTest.TestFramework.TestStruct)o).value; } - static StackObject* CopyToStack_value_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_value_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestStruct)o).value; __ret->ObjectType = ObjectTypes.Integer; @@ -263,7 +267,7 @@ static void set_value_0(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_value_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_value_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Int32 @value = ptr_of_this_method->Value; @@ -278,7 +282,7 @@ static object get_instance_1(ref object o) return ILRuntimeTest.TestFramework.TestStruct.instance; } - static StackObject* CopyToStack_instance_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_instance_1(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.TestStruct.instance; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -289,7 +293,7 @@ static void set_instance_1(ref object o, object v) ILRuntimeTest.TestFramework.TestStruct.instance = (ILRuntimeTest.TestFramework.TestStruct)v; } - static StackObject* AssignFromStack_instance_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_instance_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestStruct @instance = (ILRuntimeTest.TestFramework.TestStruct)typeof(ILRuntimeTest.TestFramework.TestStruct).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3NoBinding_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3NoBinding_Binding.cs index f02c1820..bb3205f1 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3NoBinding_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3NoBinding_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestVector3NoBinding_Binding @@ -59,7 +63,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestVector3NoBinding instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestVector3NoBinding instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -105,7 +109,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_one_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_one_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -116,7 +120,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Multiply_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Multiply_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -135,7 +139,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Addition_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Addition_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -155,7 +159,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_zero_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_zero_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -172,7 +176,7 @@ static object get_x_0(ref object o) return ((ILRuntimeTest.TestFramework.TestVector3NoBinding)o).x; } - static StackObject* CopyToStack_x_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_x_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVector3NoBinding)o).x; __ret->ObjectType = ObjectTypes.Float; @@ -187,7 +191,7 @@ static void set_x_0(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_x_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_x_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Single @x = *(float*)&ptr_of_this_method->Value; @@ -202,7 +206,7 @@ static object get_y_1(ref object o) return ((ILRuntimeTest.TestFramework.TestVector3NoBinding)o).y; } - static StackObject* CopyToStack_y_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_y_1(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVector3NoBinding)o).y; __ret->ObjectType = ObjectTypes.Float; @@ -217,7 +221,7 @@ static void set_y_1(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_y_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_y_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Single @y = *(float*)&ptr_of_this_method->Value; @@ -232,7 +236,7 @@ static object get_z_2(ref object o) return ((ILRuntimeTest.TestFramework.TestVector3NoBinding)o).z; } - static StackObject* CopyToStack_z_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_z_2(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVector3NoBinding)o).z; __ret->ObjectType = ObjectTypes.Float; @@ -247,7 +251,7 @@ static void set_z_2(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_z_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_z_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Single @z = *(float*)&ptr_of_this_method->Value; @@ -265,7 +269,7 @@ static object PerformMemberwiseClone(ref object o) return ins; } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3_Binding.cs index e64ba8af..e5243d1c 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVector3_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestVector3_Binding @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestVector3 instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestVector3 instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -120,7 +124,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_One2_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_One2_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -136,7 +140,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* op_Multiply_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Multiply_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -165,7 +169,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* op_Addition_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Addition_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -200,7 +204,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* Test_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Test_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -345,7 +349,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* Normalize_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Normalize_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -373,7 +377,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* DoTest2_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* DoTest2_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -390,7 +394,7 @@ static object get_One_0(ref object o) return ILRuntimeTest.TestFramework.TestVector3.One; } - static StackObject* CopyToStack_One_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_One_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.TestVector3.One; if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder != null) { @@ -406,7 +410,7 @@ static void set_One_0(ref object o, object v) ILRuntimeTest.TestFramework.TestVector3.One = (ILRuntimeTest.TestFramework.TestVector3)v; } - static StackObject* AssignFromStack_One_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_One_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestVector3 @One = new ILRuntimeTest.TestFramework.TestVector3(); @@ -424,7 +428,7 @@ static object get_X_1(ref object o) return ((ILRuntimeTest.TestFramework.TestVector3)o).X; } - static StackObject* CopyToStack_X_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_X_1(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVector3)o).X; __ret->ObjectType = ObjectTypes.Float; @@ -439,7 +443,7 @@ static void set_X_1(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_X_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_X_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Single @X = *(float*)&ptr_of_this_method->Value; @@ -454,7 +458,7 @@ static object get_Y_2(ref object o) return ((ILRuntimeTest.TestFramework.TestVector3)o).Y; } - static StackObject* CopyToStack_Y_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_Y_2(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVector3)o).Y; __ret->ObjectType = ObjectTypes.Float; @@ -469,7 +473,7 @@ static void set_Y_2(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_Y_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_Y_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Single @Y = *(float*)&ptr_of_this_method->Value; @@ -484,7 +488,7 @@ static object get_Z_3(ref object o) return ((ILRuntimeTest.TestFramework.TestVector3)o).Z; } - static StackObject* CopyToStack_Z_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_Z_3(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVector3)o).Z; __ret->ObjectType = ObjectTypes.Float; @@ -499,7 +503,7 @@ static void set_Z_3(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_Z_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_Z_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Single @Z = *(float*)&ptr_of_this_method->Value; @@ -514,7 +518,7 @@ static object get_TestDelegate2_4(ref object o) return ILRuntimeTest.TestFramework.TestVector3.TestDelegate2; } - static StackObject* CopyToStack_TestDelegate2_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_TestDelegate2_4(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ILRuntimeTest.TestFramework.TestVector3.TestDelegate2; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); @@ -525,7 +529,7 @@ static void set_TestDelegate2_4(ref object o, object v) ILRuntimeTest.TestFramework.TestVector3.TestDelegate2 = (ILRuntimeTest.TestFramework.TestValueTypeDelegate)v; } - static StackObject* AssignFromStack_TestDelegate2_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_TestDelegate2_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestValueTypeDelegate @TestDelegate2 = (ILRuntimeTest.TestFramework.TestValueTypeDelegate)typeof(ILRuntimeTest.TestFramework.TestValueTypeDelegate).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); @@ -541,7 +545,7 @@ static object PerformMemberwiseClone(ref object o) return ins; } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorClass_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorClass_Binding.cs index 7ef5533b..be83489a 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorClass_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorClass_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestVectorClass_Binding @@ -29,15 +33,15 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(System.Int32), typeof(System.String), typeof(ILRuntimeTest.TestFramework.TestVector3), typeof(ILRuntimeTest.TestFramework.TestVectorClass)}; method = type.GetMethod("ValueTypePerfTest", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ValueTypePerfTest_1); + args = new Type[]{typeof(ILRuntimeTest.TestFramework.TestVector3)}; + method = type.GetMethod("set_Vector2", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, set_Vector2_2); args = new Type[]{}; method = type.GetMethod("get_Obj", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, get_Obj_2); + app.RegisterCLRMethodRedirection(method, get_Obj_3); args = new Type[]{typeof(System.Int32), typeof(System.String), typeof(ILRuntimeTest.TestFramework.TestVectorClass), typeof(ILRuntimeTest.TestFramework.TestVectorClass)}; method = type.GetMethod("ValueTypePerfTest2", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, ValueTypePerfTest2_3); - args = new Type[]{typeof(ILRuntimeTest.TestFramework.TestVector3)}; - method = type.GetMethod("set_Vector2", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, set_Vector2_4); + app.RegisterCLRMethodRedirection(method, ValueTypePerfTest2_4); field = type.GetField("vector", flag); app.RegisterCLRFieldGetter(field, get_vector_0); @@ -51,7 +55,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Vector2_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Vector2_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -71,7 +75,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } } - static StackObject* ValueTypePerfTest_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ValueTypePerfTest_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -103,7 +107,31 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Obj_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Vector2_2(ILIntepreter __intp, StackObject* __esp, AutoList __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); + ILRuntimeTest.TestFramework.TestVector3 @value = new ILRuntimeTest.TestFramework.TestVector3(); + if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder != null) { + ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder.ParseValue(ref @value, __intp, ptr_of_this_method, __mStack, true); + } else { + @value = (ILRuntimeTest.TestFramework.TestVector3)typeof(ILRuntimeTest.TestFramework.TestVector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + __intp.Free(ptr_of_this_method); + } + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + ILRuntimeTest.TestFramework.TestVectorClass instance_of_this_method = (ILRuntimeTest.TestFramework.TestVectorClass)typeof(ILRuntimeTest.TestFramework.TestVectorClass).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + instance_of_this_method.Vector2 = value; + + return __ret; + } + + static StackObject* get_Obj_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -118,7 +146,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ValueTypePerfTest2_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ValueTypePerfTest2_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -145,37 +173,13 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* set_Vector2_4(ILIntepreter __intp, StackObject* __esp, IList __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); - ILRuntimeTest.TestFramework.TestVector3 @value = new ILRuntimeTest.TestFramework.TestVector3(); - if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder != null) { - ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder.ParseValue(ref @value, __intp, ptr_of_this_method, __mStack, true); - } else { - @value = (ILRuntimeTest.TestFramework.TestVector3)typeof(ILRuntimeTest.TestFramework.TestVector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); - __intp.Free(ptr_of_this_method); - } - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - ILRuntimeTest.TestFramework.TestVectorClass instance_of_this_method = (ILRuntimeTest.TestFramework.TestVectorClass)typeof(ILRuntimeTest.TestFramework.TestVectorClass).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - instance_of_this_method.Vector2 = value; - - return __ret; - } - static object get_vector_0(ref object o) { return ((ILRuntimeTest.TestFramework.TestVectorClass)o).vector; } - static StackObject* CopyToStack_vector_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_vector_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVectorClass)o).vector; if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder != null) { @@ -191,7 +195,7 @@ static void set_vector_0(ref object o, object v) ((ILRuntimeTest.TestFramework.TestVectorClass)o).vector = (ILRuntimeTest.TestFramework.TestVector3)v; } - static StackObject* AssignFromStack_vector_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_vector_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestVector3 @vector = new ILRuntimeTest.TestFramework.TestVector3(); @@ -205,7 +209,7 @@ static void set_vector_0(ref object o, object v) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct2_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct2_Binding.cs index 00c40c9a..ad594c2c 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct2_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct2_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestVectorStruct2_Binding @@ -35,7 +39,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestVectorStruct2 instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestVectorStruct2 instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -87,7 +91,7 @@ static object get_Vector_0(ref object o) return ((ILRuntimeTest.TestFramework.TestVectorStruct2)o).Vector; } - static StackObject* CopyToStack_Vector_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_Vector_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVectorStruct2)o).Vector; if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder != null) { @@ -105,7 +109,7 @@ static void set_Vector_0(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_Vector_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_Vector_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestVector3 @Vector = new ILRuntimeTest.TestFramework.TestVector3(); diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct_Binding.cs index dc313774..32309226 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntimeTest_TestFramework_TestVectorStruct_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntimeTest_TestFramework_TestVectorStruct_Binding @@ -43,7 +47,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref ILRuntimeTest.TestFramework.TestVectorStruct instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref ILRuntimeTest.TestFramework.TestVectorStruct instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -95,7 +99,7 @@ static object get_C_0(ref object o) return ((ILRuntimeTest.TestFramework.TestVectorStruct)o).C; } - static StackObject* CopyToStack_C_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_C_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVectorStruct)o).C; if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVector3_Binding_Binder != null) { @@ -113,7 +117,7 @@ static void set_C_0(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_C_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_C_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestVector3 @C = new ILRuntimeTest.TestFramework.TestVector3(); @@ -133,7 +137,7 @@ static object get_B_1(ref object o) return ((ILRuntimeTest.TestFramework.TestVectorStruct)o).B; } - static StackObject* CopyToStack_B_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_B_1(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVectorStruct)o).B; if (ILRuntime.Runtime.Generated.CLRBindings.s_ILRuntimeTest_TestFramework_TestVectorStruct2_Binding_Binder != null) { @@ -151,7 +155,7 @@ static void set_B_1(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_B_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_B_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; ILRuntimeTest.TestFramework.TestVectorStruct2 @B = new ILRuntimeTest.TestFramework.TestVectorStruct2(); @@ -171,7 +175,7 @@ static object get_A_2(ref object o) return ((ILRuntimeTest.TestFramework.TestVectorStruct)o).A; } - static StackObject* CopyToStack_A_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList __mStack) + static StackObject* CopyToStack_A_2(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((ILRuntimeTest.TestFramework.TestVectorStruct)o).A; __ret->ObjectType = ObjectTypes.Integer; @@ -186,7 +190,7 @@ static void set_A_2(ref object o, object v) o = ins; } - static StackObject* AssignFromStack_A_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList __mStack) + static StackObject* AssignFromStack_A_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; System.Int32 @A = ptr_of_this_method->Value; diff --git a/ILRuntimeTestBase/AutoGenerate/ILRuntime_Runtime_Enviorment_AppDomain_Binding.cs b/ILRuntimeTestBase/AutoGenerate/ILRuntime_Runtime_Enviorment_AppDomain_Binding.cs index 16757217..48f1df5c 100644 --- a/ILRuntimeTestBase/AutoGenerate/ILRuntime_Runtime_Enviorment_AppDomain_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/ILRuntime_Runtime_Enviorment_AppDomain_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class ILRuntime_Runtime_Enviorment_AppDomain_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_AllowUnboundCLRMethod_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_AllowUnboundCLRMethod_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/LitJson_JsonMapper_Binding.cs b/ILRuntimeTestBase/AutoGenerate/LitJson_JsonMapper_Binding.cs index 38077abc..102e9b02 100644 --- a/ILRuntimeTestBase/AutoGenerate/LitJson_JsonMapper_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/LitJson_JsonMapper_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class LitJson_JsonMapper_Binding @@ -100,7 +104,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* ToObject_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToObject_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -116,7 +120,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToJson_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToJson_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -132,7 +136,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToObject_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToObject_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -148,7 +152,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToObject_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToObject_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -164,7 +168,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToObject_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToObject_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_AccessViolationException_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_AccessViolationException_Binding.cs index 0a98212f..a955d49d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_AccessViolationException_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_AccessViolationException_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_AccessViolationException_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_1_Boolean_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_1_Boolean_Binding.cs index 0d819c17..7b90b1f8 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_1_Boolean_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_1_Boolean_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_1_Boolean_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_1_ILTypeInstance_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_1_ILTypeInstance_Binding.cs index 092ecd94..267f4aa9 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_1_ILTypeInstance_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_1_ILTypeInstance_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_1_ILTypeInstance_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_1_Int32_Binding.cs index e694f2b0..d8918ecb 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_1_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_1_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_1_String_Binding.cs index 9fa9598c..13852618 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_1_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_1_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_1_String_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_2_String_Object_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_2_String_Object_Binding.cs index 6d531875..8c48009e 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_2_String_Object_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_2_String_Object_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_2_String_Object_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_3_Int32_String_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_3_Int32_String_String_Binding.cs index cf8a362c..d8f42e99 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_3_Int32_String_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_3_Int32_String_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_3_Int32_String_String_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_3_Single_Double_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_3_Single_Double_Int32_Binding.cs new file mode 100644 index 00000000..11a328c0 --- /dev/null +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_3_Single_Double_Int32_Binding.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using ILRuntime.CLR.TypeSystem; +using ILRuntime.CLR.Method; +using ILRuntime.Runtime.Enviorment; +using ILRuntime.Runtime.Intepreter; +using ILRuntime.Runtime.Stack; +using ILRuntime.Reflection; +using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif +namespace ILRuntime.Runtime.Generated +{ + unsafe class System_Action_3_Single_Double_Int32_Binding + { + public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; + Type type = typeof(System.Action); + args = new Type[]{typeof(System.Single), typeof(System.Double), typeof(System.Int32)}; + method = type.GetMethod("Invoke", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Invoke_0); + + + } + + + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) + { + ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; + StackObject* ptr_of_this_method; + StackObject* __ret = ILIntepreter.Minus(__esp, 4); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 1); + System.Int32 @arg3 = ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Double @arg2 = *(double*)&ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 3); + System.Single @arg1 = *(float*)&ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 4); + System.Action instance_of_this_method = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + __intp.Free(ptr_of_this_method); + + instance_of_this_method.Invoke(@arg1, @arg2, @arg3); + + return __ret; + } + + + + } +} diff --git a/ILRuntimeTestBase/AutoGenerate/System_Action_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Action_Binding.cs index 219e25f8..a5005b09 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Action_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Action_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Action_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Activator_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Activator_Binding.cs index fa96b498..83dd0c58 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Activator_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Activator_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Activator_Binding @@ -103,7 +107,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* CreateInstance_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -114,7 +118,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* CreateInstance_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -139,7 +143,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* CreateInstance_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -160,7 +164,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* CreateInstance_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -176,7 +180,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* CreateInstance_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -192,7 +196,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } } - static StackObject* CreateInstance_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_ArgumentException_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_ArgumentException_Binding.cs index 9c00036b..6afc9261 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_ArgumentException_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_ArgumentException_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_ArgumentException_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Array_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Array_Binding.cs index 9de6a25d..72c8ab95 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Array_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Array_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Array_Binding @@ -109,7 +113,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* CreateInstance_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateInstance_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -128,7 +132,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* SetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -150,7 +154,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Length_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Length_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -167,7 +171,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetEnumerator_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -182,7 +186,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Empty_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Empty_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -193,7 +197,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* IndexOf_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* IndexOf_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -214,7 +218,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* IndexOf_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* IndexOf_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -235,7 +239,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* IndexOf_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* IndexOf_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Attribute_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Attribute_Binding.cs index 1fa36781..917f122f 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Attribute_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Attribute_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Attribute_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetCustomAttribute_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetCustomAttribute_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Boolean_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Boolean_Binding.cs index 04953fa7..cd4be282 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Boolean_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Boolean_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Boolean_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static System.Boolean GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Boolean GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Boolean instance_of_this_method; @@ -77,7 +81,7 @@ static System.Boolean GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domai return instance_of_this_method; } - static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Byte_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Byte_Binding.cs index 0a856cd5..3dc09014 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Byte_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Byte_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Byte_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static System.Byte GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Byte GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Byte instance_of_this_method; @@ -77,7 +81,7 @@ static System.Byte GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, return instance_of_this_method; } - static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Char_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Char_Binding.cs index 9aa7bf91..be7727c5 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Char_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Char_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Char_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static System.Char GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Char GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Char instance_of_this_method; @@ -77,7 +81,7 @@ static System.Char GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, return instance_of_this_method; } - static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_ILTypeInstance_Int32.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_ILTypeInstance_Int32.cs index c1d078e6..81ce76bd 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_ILTypeInstance_Int32.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_ILTypeInstance_Int32.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_ILTypeInstance_Int32_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -80,7 +84,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Boolean_Bindin.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Boolean_Bindin.cs index 115d07f4..aa3ca48c 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Boolean_Bindin.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Boolean_Bindin.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_Boolean_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest_.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest_.cs index 63187655..fb1c6dd4 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest_.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest_.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest_TestFramework_TestClass3Adaptor_Binding_Adaptor_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -140,7 +144,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest__t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest__t1.cs index 1ed01340..9ff2b888 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest__t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest__t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_ILRuntimeTest_TestFramework_ClassInheritanceTestAdaptor_Binding_Adaptor_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -61,7 +65,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -84,7 +88,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -166,7 +170,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance.cs index db870158..26c952ac 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding @@ -48,7 +52,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -70,7 +74,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -88,7 +92,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -169,7 +173,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* ContainsKey_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ContainsKey_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -189,7 +193,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Add_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -211,7 +215,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Values_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Values_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -227,7 +231,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t1.cs index 9232dd62..4e63b0e6 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetEnumerator_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t2.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t2.cs index 03bc6ca9..f6a98e16 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t2.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_t2.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.Dictionary.ValueCollection.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.Dictionary.ValueCollection.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding.cs index 4f99555e..c271c4f9 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_Int32_Binding @@ -38,7 +42,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -59,7 +63,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -75,7 +79,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding_.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding_.cs index 7c5edf11..b1521a00 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding_.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_Int32_Binding_.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_Int32_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeI.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeI.cs index 6279d77f..c7702200 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeI.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeI.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_List_1_ILTypeInstance_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* ContainsKey_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ContainsKey_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -59,7 +63,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -81,7 +85,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -100,7 +104,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_Int32_B.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_Int32_B.cs index 80fc1809..ca810b84 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_Int32_B.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_Int32_B.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_List_1_Int32_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_String_.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_String_.cs index 5774a91b..89194202 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_String_.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_List_1_String_.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_List_1_String_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -140,7 +144,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A.cs index 84361d31..f6ce8b83 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_String_Array_Array_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A_t1.cs index f01548af..48720325 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int32_String_Array_A_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int32_String_Array_Array_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int32_Binding.cs index 95009c5c..b3ecf52d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int64_Int32_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -57,7 +61,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -130,7 +134,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int64_Array_Bi.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int64_Array_Bi.cs index dea7369d..fd40e678 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int64_Array_Bi.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Int64_Int64_Array_Bi.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Int64_Int64_Array_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -56,7 +60,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Object_Object_Bindin.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Object_Object_Bindin.cs index d023166b..cf9579e5 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Object_Object_Bindin.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Object_Object_Bindin.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Object_Object_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -62,7 +66,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* ContainsKey_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ContainsKey_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -83,7 +87,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* ContainsValue_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ContainsValue_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -105,7 +109,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc.cs index 77079c9a..bf08f408 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -65,7 +69,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -84,7 +88,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetEnumerator_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* TryGetValue_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -181,7 +185,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t1.cs index 57309db0..b590ee76 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t2.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t2.cs index 1f0a0827..19458c05 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t2.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_ILTypeInstanc_t2.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Array_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -62,7 +66,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -81,7 +85,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -163,7 +167,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding.cs index 4996507d..bfdc8765 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_Int32_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -64,7 +68,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -79,7 +83,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_Item_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -100,7 +104,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Add_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -123,7 +127,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding_t1.cs index 824f506d..a54e8bd4 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int32_Binding_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_Int32_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs index 466618bb..e026ce01 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Int64_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_Int64_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -131,7 +135,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Object_Bindin.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Object_Bindin.cs index 8579275c..c3cbb58d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Object_Bindin.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Object_Bindin.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_Object_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -57,7 +61,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Array_.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Array_.cs index 8a830fe0..04cf03c4 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Array_.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Array_.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_Single_Array_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* TryGetValue_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -115,7 +119,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Bindin.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Bindin.cs index 0895d431..0603a357 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Bindin.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_String_Single_Bindin.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_String_Single_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* TryGetValue_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -106,7 +110,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Type_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Type_Int32_Binding.cs index 0bc64676..929b8077 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Type_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_Type_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_Type_Int32_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* set_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* TryGetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -131,7 +135,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc.cs index 4623d0d0..b23be2ff 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstance_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc_t1.cs index 4e8d3757..c8e43761 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstanc_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_Dictionary_2_UInt32_ILTypeInstance_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.Dictionary.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -104,7 +108,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_ILTypeInstance.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_ILTypeInstance.cs index 126548c7..dd5150db 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_ILTypeInstance.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_ILTypeInstance.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_EqualityComparer_1_ILTypeInstance_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -44,7 +48,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Int32_Binding.cs index 1b1874ba..10e95ebb 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_EqualityComparer_1_Int32_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -47,7 +51,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -70,7 +74,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetHashCode_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetHashCode_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Single_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Single_Binding.cs index f49ff15a..ad3f7abd 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Single_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_Single_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_EqualityComparer_1_Single_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -44,7 +48,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_String_Binding.cs index 85e1de11..730b9097 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_EqualityComparer_1_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_EqualityComparer_1_String_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Default_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -44,7 +48,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_Int32_Binding.cs index 1391d747..4b7b276d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_IEnumerator_1_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3.cs index 811d8886..1f8baaf6 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int32_ILTypeInstance_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3_t1.cs index 11045435..b22d3d86 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int3_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Int32_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Stri.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Stri.cs index 695d91da..0433924e 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Stri.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_IEnumerator_1_KeyValuePair_2_Stri.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_IEnumerator_1_KeyValuePair_2_String_ILTypeInstance_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstan.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstan.cs index 6fe7474e..afc0e9fb 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstan.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstan.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_Int32_ILTypeInstance_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -77,7 +81,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Value_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Value_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_Int32_Bindin.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_Int32_Bindin.cs index a2472d91..c48fa236 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_Int32_Bindin.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_Int32_Bindin.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_Int32_Int32_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -101,7 +105,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* get_Value_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Value_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_List_1_Int32.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_List_1_Int32.cs index f1967e55..7d477e08 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_List_1_Int32.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_List_1_Int32.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_Int32_List_1_Int32_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair> instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair> instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -77,7 +81,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Value_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Value_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_String_Array.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_String_Array.cs index b06271b9..763e5f3a 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_String_Array.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_Int32_String_Array.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_Int32_String_Array_Array_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -101,7 +105,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* get_Value_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Value_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_ILTypeInsta.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_ILTypeInsta.cs index 8c2754f2..0067f5f6 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_ILTypeInsta.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_ILTypeInsta.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_String_ILTypeInstance_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -77,7 +81,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Value_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Value_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_Int32_Bindi.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_Int32_Bindi.cs index d50b580d..badd5fdd 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_Int32_Bindi.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_String_Int32_Bindi.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_String_Int32_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -77,7 +81,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInsta.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInsta.cs index 21aacaae..a5072a3f 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInsta.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInsta.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_KeyValuePair_2_UInt32_ILTypeInstance_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.KeyValuePair instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -77,7 +81,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Action_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Action_1_Int32_Binding.cs index 64ce9742..ce5ff8a8 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Action_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Action_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_Action_1_Int32_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Dictionary_2_String_Object.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Dictionary_2_String_Object.cs index 691f6f32..537efea0 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Dictionary_2_String_Object.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Dictionary_2_String_Object.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_Dictionary_2_String_Object_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Count_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Count_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -73,7 +77,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_FieldInfo_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_FieldInfo_Binding.cs new file mode 100644 index 00000000..b63811ca --- /dev/null +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_FieldInfo_Binding.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using ILRuntime.CLR.TypeSystem; +using ILRuntime.CLR.Method; +using ILRuntime.Runtime.Enviorment; +using ILRuntime.Runtime.Intepreter; +using ILRuntime.Runtime.Stack; +using ILRuntime.Reflection; +using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif +namespace ILRuntime.Runtime.Generated +{ + unsafe class System_Collections_Generic_List_1_FieldInfo_Binding + { + public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; + Type type = typeof(System.Collections.Generic.List); + args = new Type[]{}; + method = type.GetMethod("get_Count", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, get_Count_0); + + + } + + + static StackObject* get_Count_0(ILIntepreter __intp, StackObject* __esp, AutoList __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.Collections.Generic.List instance_of_this_method = (System.Collections.Generic.List)typeof(System.Collections.Generic.List).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.Count; + + __ret->ObjectType = ObjectTypes.Integer; + __ret->Value = result_of_this_method; + return __ret + 1; + } + + + + } +} diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Func_2_Int32_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Func_2_Int32_Int32_Binding.cs index 144ff8e0..09fb282e 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Func_2_Int32_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Func_2_Int32_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_Func_2_Int32_Int32_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor.cs index fcc7f049..c22282b3 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_ILRuntimeTest_TestFramework_ClassInheritanceTestAdaptor_Binding_Adaptor_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -79,7 +83,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor_t1.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor_t1.cs index c475bb52..79373143 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor_t1.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILRuntimeTest_TestFramewor_t1.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_ILRuntimeTest_TestFramework_TestClass3Adaptor_Binding_Adaptor_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding.cs index 894d8bdd..11efaa31 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_ILTypeInstance_Binding @@ -37,6 +41,9 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("GetEnumerator", flag, null, args, null); app.RegisterCLRMethodRedirection(method, GetEnumerator_4); + args = new Type[]{typeof(System.Comparison)}; + method = type.GetMethod("Sort", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Sort_5); args = new Type[]{}; method = type.GetConstructor(flag, null, args, null); @@ -48,7 +55,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -67,7 +74,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -85,7 +92,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* RemoveAll_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* RemoveAll_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -106,7 +113,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* get_Count_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Count_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -123,7 +130,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetEnumerator_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -138,8 +145,27 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } + static StackObject* Sort_5(ILIntepreter __intp, StackObject* __esp, AutoList __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.Comparison @comparison = (System.Comparison)typeof(System.Comparison).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Collections.Generic.List instance_of_this_method = (System.Collections.Generic.List)typeof(System.Collections.Generic.List).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + instance_of_this_method.Sort(@comparison); + + return __ret; + } + - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -149,7 +175,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Ctor_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding_Enu.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding_Enu.cs index 98d7df35..2b196386 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding_Enu.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_ILTypeInstance_Binding_Enu.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_ILTypeInstance_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.List.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.List.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Array_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Array_Binding.cs index cf68ed41..c8c89eec 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Array_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Array_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_Int32_Array_Binding @@ -35,7 +39,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Binding.cs index baa201e7..0248a0bc 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_Int32_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -60,7 +64,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* AsReadOnly_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AsReadOnly_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -75,7 +79,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_Count_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Count_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -92,7 +96,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* get_Item_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -113,7 +117,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_Int32_Binding.cs index b9ced0be..b3332198 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_List_1_Int32_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -53,7 +57,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_List_1_Int32_Bindin.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_List_1_Int32_Bindin.cs index d651c9a4..1fe73056 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_List_1_Int32_Bindin.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_List_1_List_1_Int32_Bindin.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_List_1_List_1_Int32_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -53,7 +57,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Object_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Object_Binding.cs index f235d353..4c3f675b 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Object_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_Object_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_Object_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Contains_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Contains_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -77,7 +81,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding.cs index 9aea228b..d885be4a 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_String_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -55,7 +59,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -71,7 +75,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding_Enumerator_.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding_Enumerator_.cs index 1f906a4b..1fe9fcf5 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding_Enumerator_.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_String_Binding_Enumerator_.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_String_Binding_Enumerator_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Collections.Generic.List.Enumerator instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Collections.Generic.List.Enumerator instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -99,7 +103,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3NoBinding_Bindi.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3NoBinding_Bindi.cs new file mode 100644 index 00000000..edbbe1f7 --- /dev/null +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3NoBinding_Bindi.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using ILRuntime.CLR.TypeSystem; +using ILRuntime.CLR.Method; +using ILRuntime.Runtime.Enviorment; +using ILRuntime.Runtime.Intepreter; +using ILRuntime.Runtime.Stack; +using ILRuntime.Reflection; +using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif +namespace ILRuntime.Runtime.Generated +{ + unsafe class System_Collections_Generic_List_1_TestVector3NoBinding_Binding + { + public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) + { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; + Type type = typeof(System.Collections.Generic.List); + args = new Type[]{typeof(ILRuntimeTest.TestFramework.TestVector3NoBinding)}; + method = type.GetMethod("Add", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Add_0); + args = new Type[]{typeof(System.Int32)}; + method = type.GetMethod("get_Item", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, get_Item_1); + + args = new Type[]{}; + method = type.GetConstructor(flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Ctor_0); + + } + + + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __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); + ILRuntimeTest.TestFramework.TestVector3NoBinding @item = (ILRuntimeTest.TestFramework.TestVector3NoBinding)typeof(ILRuntimeTest.TestFramework.TestVector3NoBinding).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Collections.Generic.List instance_of_this_method = (System.Collections.Generic.List)typeof(System.Collections.Generic.List).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + instance_of_this_method.Add(@item); + + return __ret; + } + + static StackObject* get_Item_1(ILIntepreter __intp, StackObject* __esp, AutoList __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.Int32 @index = ptr_of_this_method->Value; + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Collections.Generic.List instance_of_this_method = (System.Collections.Generic.List)typeof(System.Collections.Generic.List).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method[index]; + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) + { + ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; + StackObject* __ret = ILIntepreter.Minus(__esp, 0); + + var result_of_this_method = new System.Collections.Generic.List(); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + + } +} diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3_Binding.cs index b10ea63e..89f622e5 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_Generic_List_1_TestVector3_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_Generic_List_1_TestVector3_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Add_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_IDictionary_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_IDictionary_Binding.cs index 11a0a0bf..861bca9d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_IDictionary_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_IDictionary_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_IDictionary_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Item_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Item_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_IEnumerator_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_IEnumerator_Binding.cs index 992fffcc..39e26439 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_IEnumerator_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_IEnumerator_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_IEnumerator_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* MoveNext_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MoveNext_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -50,7 +54,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* get_Current_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Current_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Collections_ObjectModel_ReadOnlyCollection_1_Int32_Bi.cs b/ILRuntimeTestBase/AutoGenerate/System_Collections_ObjectModel_ReadOnlyCollection_1_Int32_Bi.cs index d39761b4..c0bf6025 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Collections_ObjectModel_ReadOnlyCollection_1_Int32_Bi.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Collections_ObjectModel_ReadOnlyCollection_1_Int32_Bi.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Collections_ObjectModel_ReadOnlyCollection_1_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetEnumerator_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetEnumerator_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Console_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Console_Binding.cs index d18f7f1e..c10e5405 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Console_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Console_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Console_Binding @@ -66,7 +70,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* WriteLine_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -82,7 +86,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -102,7 +106,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -122,7 +126,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -137,7 +141,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -152,7 +156,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -167,7 +171,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -182,7 +186,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -197,7 +201,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_8(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -213,7 +217,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_9(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -228,7 +232,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_10(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -243,7 +247,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* WriteLine_11(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* WriteLine_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -258,7 +262,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Write_12(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Write_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Convert_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Convert_Binding.cs index df6b7520..b04d36d5 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Convert_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Convert_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Convert_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* ToInt64_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToInt64_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -54,7 +58,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* ChangeType_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ChangeType_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_DateTime_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_DateTime_Binding.cs index 27855ad3..bf8183fe 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_DateTime_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_DateTime_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_DateTime_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.DateTime instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.DateTime instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_UtcNow_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_UtcNow_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -91,7 +95,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToString_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Diagnostics_Stopwatch_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Diagnostics_Stopwatch_Binding.cs index c4e07e35..86c019f9 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Diagnostics_Stopwatch_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Diagnostics_Stopwatch_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Diagnostics_Stopwatch_Binding @@ -45,7 +49,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Start_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Start_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -60,7 +64,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Stop_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Stop_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -75,7 +79,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_ElapsedMilliseconds_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_ElapsedMilliseconds_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -92,7 +96,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Restart_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Restart_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -107,7 +111,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Reset_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Reset_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -123,7 +127,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Double_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Double_Binding.cs index db36e79e..6a910f1a 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Double_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Double_Binding.cs @@ -11,21 +11,31 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Double_Binding { public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; Type type = typeof(System.Double); + args = new Type[]{}; + method = type.GetMethod("ToString", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, ToString_0); app.RegisterCLRCreateArrayInstance(type, s => new System.Double[s]); } - static System.Double GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Double GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Double instance_of_this_method; @@ -71,6 +81,20 @@ static System.Double GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain return instance_of_this_method; } + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __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.Double instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack); + + var result_of_this_method = instance_of_this_method.ToString(); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + } diff --git a/ILRuntimeTestBase/AutoGenerate/System_Enum_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Enum_Binding.cs index 911c1c6a..ff297479 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Enum_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Enum_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Enum_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetValues_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetValues_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -58,7 +62,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetNames_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetNames_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* HasFlag_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* HasFlag_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -95,7 +99,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* ToObject_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToObject_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -119,7 +123,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* CompareTo_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CompareTo_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Exception_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Exception_Binding.cs index 8b223fc6..b203b5fb 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Exception_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Exception_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Exception_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Message_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Message_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -57,7 +61,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_Data_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Data_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -72,7 +76,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_StackTrace_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_StackTrace_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -88,7 +92,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -103,7 +107,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Ctor_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); diff --git a/ILRuntimeTestBase/AutoGenerate/System_Func_1_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Func_1_String_Binding.cs index 1d3ea9f2..de19e3e1 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Func_1_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Func_1_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Func_1_String_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Func_1_TestVector3_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Func_1_TestVector3_Binding.cs index 34c2cc76..b8dbccbd 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Func_1_TestVector3_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Func_1_TestVector3_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Func_1_TestVector3_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Func_2_Int32_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Func_2_Int32_Int32_Binding.cs index 4ac6483f..58eb0b10 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Func_2_Int32_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Func_2_Int32_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Func_2_Int32_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Func_2_String_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Func_2_String_String_Binding.cs index 9bbecfdb..8969c85b 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Func_2_String_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Func_2_String_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Func_2_String_String_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Func_3_ILTypeInstance_String_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Func_3_ILTypeInstance_String_String_Binding.cs index 6814b4e5..da66841f 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Func_3_ILTypeInstance_String_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Func_3_ILTypeInstance_String_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Func_3_ILTypeInstance_String_String_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Func_4_Int32_Single_Int16_Double_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Func_4_Int32_Single_Int16_Double_Binding.cs index 6273ff37..ebb3c8b6 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Func_4_Int32_Single_Int16_Double_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Func_4_Int32_Single_Int16_Double_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Func_4_Int32_Single_Int16_Double_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_GC_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_GC_Binding.cs index a402bd7b..3f35681d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_GC_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_GC_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_GC_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* SuppressFinalize_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SuppressFinalize_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_IComparable_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_IComparable_1_Int32_Binding.cs index e440b1ac..13ed375f 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_IComparable_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_IComparable_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_IComparable_1_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* CompareTo_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CompareTo_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_IDisposable_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_IDisposable_Binding.cs index 438b509a..b561fe68 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_IDisposable_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_IDisposable_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_IDisposable_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Dispose_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Dispose_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array2_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array2_Binding.cs index 735f1a9f..54cfba2b 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array2_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array2_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Int32_Array2_Binding @@ -25,9 +29,6 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(System.Int32), typeof(System.Int32), typeof(System.Int32)}; method = type.GetMethod("Set", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Set_0); - args = new Type[]{typeof(System.Int32), typeof(System.Int32)}; - method = type.GetMethod("Get", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Get_1); args = new Type[]{typeof(System.Int32), typeof(System.Int32)}; method = type.GetConstructor(flag, null, args, null); @@ -36,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Set_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Set_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -60,31 +61,8 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* Get_1(ILIntepreter __intp, StackObject* __esp, IList __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.Int32 a2 = ptr_of_this_method->Value; - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - System.Int32 a1 = ptr_of_this_method->Value; - - ptr_of_this_method = ILIntepreter.Minus(__esp, 3); - System.Int32[,] instance_of_this_method = (System.Int32[,])typeof(System.Int32[,]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - var result_of_this_method = instance_of_this_method[a1, a2]; - - __ret->ObjectType = ObjectTypes.Integer; - __ret->Value = result_of_this_method; - return __ret + 1; - } - - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array3_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array3_Binding.cs index ce657e2b..fc42d1cd 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array3_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array3_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Int32_Array3_Binding @@ -33,7 +37,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Get_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Get_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -60,7 +64,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding.cs index 748ff350..a3682283 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Int32_Array_Binding diff --git a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding_Array_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding_Array_Binding.cs index 7a5f3ce6..2ab93e90 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding_Array_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Int32_Array_Binding_Array_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Int32_Array_Binding_Array_Binding diff --git a/ILRuntimeTestBase/AutoGenerate/System_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Int32_Binding.cs index 757ece1c..27f0c061 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Int32_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static System.Int32 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Int32 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Int32 instance_of_this_method; @@ -77,7 +81,7 @@ static System.Int32 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, return instance_of_this_method; } - static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Int64_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Int64_Binding.cs index 8c414b90..7b3c9222 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Int64_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Int64_Binding.cs @@ -11,21 +11,31 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Int64_Binding { public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) { + BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; + MethodBase method; + Type[] args; Type type = typeof(System.Int64); + args = new Type[]{}; + method = type.GetMethod("ToString", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, ToString_0); app.RegisterCLRCreateArrayInstance(type, s => new System.Int64[s]); } - static System.Int64 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Int64 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Int64 instance_of_this_method; @@ -71,6 +81,20 @@ static System.Int64 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, return instance_of_this_method; } + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __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.Int64 instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack); + + var result_of_this_method = instance_of_this_method.ToString(); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + } diff --git a/ILRuntimeTestBase/AutoGenerate/System_Linq_Enumerable_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Linq_Enumerable_Binding.cs index 2945667b..a3bed95d 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Linq_Enumerable_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Linq_Enumerable_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Linq_Enumerable_Binding @@ -105,6 +109,34 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } } } + args = new Type[]{typeof(System.Reflection.FieldInfo)}; + if (genericMethods.TryGetValue("ToList", out lst)) + { + foreach(var m in lst) + { + if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.List), typeof(System.Collections.Generic.IEnumerable))) + { + method = m.MakeGenericMethod(args); + app.RegisterCLRMethodRedirection(method, ToList_5); + + break; + } + } + } + args = new Type[]{typeof(System.Reflection.FieldInfo), typeof(System.String)}; + if (genericMethods.TryGetValue("Select", out lst)) + { + foreach(var m in lst) + { + if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.IEnumerable), typeof(System.Collections.Generic.IEnumerable), typeof(System.Func))) + { + method = m.MakeGenericMethod(args); + app.RegisterCLRMethodRedirection(method, Select_6); + + break; + } + } + } args = new Type[]{typeof(System.Int32[])}; if (genericMethods.TryGetValue("Contains", out lst)) { @@ -113,7 +145,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Boolean), typeof(System.Collections.Generic.IEnumerable), typeof(System.Int32[]))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Contains_5); + app.RegisterCLRMethodRedirection(method, Contains_7); break; } @@ -127,7 +159,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.IEnumerable), typeof(System.Collections.Generic.IEnumerable), typeof(System.Func))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Where_6); + app.RegisterCLRMethodRedirection(method, Where_8); break; } @@ -141,7 +173,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.IEnumerable>), typeof(System.Collections.Generic.IEnumerable), typeof(System.Func))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, GroupBy_7); + app.RegisterCLRMethodRedirection(method, GroupBy_9); break; } @@ -155,7 +187,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.IEnumerable), typeof(System.Collections.Generic.IEnumerable>), typeof(System.Func, ILRuntime.Runtime.Intepreter.ILTypeInstance>))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Select_8); + app.RegisterCLRMethodRedirection(method, Select_10); break; } @@ -169,7 +201,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Linq.IOrderedEnumerable), typeof(System.Collections.Generic.IEnumerable), typeof(System.Func))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, OrderBy_9); + app.RegisterCLRMethodRedirection(method, OrderBy_11); break; } @@ -183,7 +215,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance[]), typeof(System.Collections.Generic.IEnumerable))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, ToArray_10); + app.RegisterCLRMethodRedirection(method, ToArray_12); break; } @@ -197,7 +229,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Int32), typeof(System.Collections.Generic.IEnumerable))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Count_11); + app.RegisterCLRMethodRedirection(method, Count_13); break; } @@ -211,7 +243,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.Int32), typeof(System.Collections.Generic.IEnumerable))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Count_12); + app.RegisterCLRMethodRedirection(method, Count_14); break; } @@ -222,7 +254,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Where_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Where_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -242,7 +274,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Count_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Count_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -260,7 +292,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Sum_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Sum_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -282,7 +314,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* SelectMany_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SelectMany_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -302,7 +334,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToList_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToList_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -318,7 +350,43 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Contains_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToList_5(ILIntepreter __intp, StackObject* __esp, AutoList __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.Collections.Generic.IEnumerable @source = (System.Collections.Generic.IEnumerable)typeof(System.Collections.Generic.IEnumerable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + + var result_of_this_method = System.Linq.Enumerable.ToList(@source); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + static StackObject* Select_6(ILIntepreter __intp, StackObject* __esp, AutoList __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.Func @selector = (System.Func)typeof(System.Func).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Collections.Generic.IEnumerable @source = (System.Collections.Generic.IEnumerable)typeof(System.Collections.Generic.IEnumerable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + + var result_of_this_method = System.Linq.Enumerable.Select(@source, @selector); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + static StackObject* Contains_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -340,7 +408,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Where_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Where_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -360,7 +428,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GroupBy_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GroupBy_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -380,7 +448,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Select_8(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Select_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -400,7 +468,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* OrderBy_9(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* OrderBy_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -420,7 +488,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* ToArray_10(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToArray_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -436,7 +504,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Count_11(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Count_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -454,7 +522,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Count_12(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Count_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Linq_IGrouping_2_Byte_Byte_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Linq_IGrouping_2_Byte_Byte_Binding.cs index 9a7e6589..cc92e086 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Linq_IGrouping_2_Byte_Byte_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Linq_IGrouping_2_Byte_Byte_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Linq_IGrouping_2_Byte_Byte_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Key_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Math_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Math_Binding.cs index 20af8afd..6d4b8a02 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Math_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Math_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Math_Binding @@ -39,7 +43,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Abs_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Abs_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -56,7 +60,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Pow_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Pow_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -76,7 +80,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Abs_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Abs_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -93,7 +97,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Sqrt_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Sqrt_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_NotImplementedException_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_NotImplementedException_Binding.cs index 50bb4b69..b3304646 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_NotImplementedException_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_NotImplementedException_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_NotImplementedException_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_NotSupportedException_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_NotSupportedException_Binding.cs index 0fe15c04..172fd517 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_NotSupportedException_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_NotSupportedException_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_NotSupportedException_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Nullable_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Nullable_1_Int32_Binding.cs index ae5ee5b8..b7d77382 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Nullable_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Nullable_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Nullable_1_Int32_Binding @@ -37,7 +41,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Nullable instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Nullable instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -83,7 +87,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_HasValue_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_HasValue_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -104,7 +108,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* get_Value_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Value_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -126,7 +130,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } - static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Object_Array_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Object_Array_Binding.cs index 6249ee54..85d5a19c 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Object_Array_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Object_Array_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Object_Array_Binding diff --git a/ILRuntimeTestBase/AutoGenerate/System_Object_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Object_Binding.cs index 1cf869c2..a93e9f44 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Object_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Object_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Object_Binding @@ -44,7 +48,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -59,7 +63,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetType_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetType_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -74,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetHashCode_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetHashCode_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -91,7 +95,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Equals_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -112,7 +116,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Equals_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_CustomAttributeExtensions_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_CustomAttributeExtensions_Binding.cs index 0f9ca4fa..df8c4590 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_CustomAttributeExtensions_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_CustomAttributeExtensions_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_CustomAttributeExtensions_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetCustomAttribute_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetCustomAttribute_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_FieldInfo_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_FieldInfo_Binding.cs index d92d7e75..625643ae 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_FieldInfo_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_FieldInfo_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_FieldInfo_Binding @@ -36,7 +40,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetValue_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetValue_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -60,7 +64,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* SetValue_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetValue_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -83,7 +87,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_FieldType_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_FieldType_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_MemberInfo_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_MemberInfo_Binding.cs index f8f9890d..6dce09aa 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_MemberInfo_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_MemberInfo_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_MemberInfo_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_Name_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Name_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -57,7 +61,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetCustomAttributes_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetCustomAttributes_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -79,7 +83,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetCustomAttributes_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetCustomAttributes_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -97,7 +101,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* IsDefined_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* IsDefined_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -121,7 +125,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* get_DeclaringType_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_DeclaringType_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodBase_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodBase_Binding.cs index be9fe265..f7802efb 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodBase_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodBase_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_MethodBase_Binding @@ -31,12 +35,18 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("get_IsStatic", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_IsStatic_2); + args = new Type[]{}; + method = type.GetMethod("get_IsGenericMethodDefinition", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, get_IsGenericMethodDefinition_3); + args = new Type[]{}; + method = type.GetMethod("get_IsGenericMethod", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, get_IsGenericMethod_4); } - static StackObject* GetParameters_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetParameters_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -51,7 +61,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Invoke_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Invoke_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -79,7 +89,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* get_IsStatic_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_IsStatic_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -96,6 +106,40 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } + static StackObject* get_IsGenericMethodDefinition_3(ILIntepreter __intp, StackObject* __esp, AutoList __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.Reflection.MethodBase instance_of_this_method = (System.Reflection.MethodBase)typeof(System.Reflection.MethodBase).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.IsGenericMethodDefinition; + + __ret->ObjectType = ObjectTypes.Integer; + __ret->Value = result_of_this_method ? 1 : 0; + return __ret + 1; + } + + static StackObject* get_IsGenericMethod_4(ILIntepreter __intp, StackObject* __esp, AutoList __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.Reflection.MethodBase instance_of_this_method = (System.Reflection.MethodBase)typeof(System.Reflection.MethodBase).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.IsGenericMethod; + + __ret->ObjectType = ObjectTypes.Integer; + __ret->Value = result_of_this_method ? 1 : 0; + return __ret + 1; + } + } diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodInfo_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodInfo_Binding.cs index f6499103..f4f27091 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodInfo_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_MethodInfo_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_MethodInfo_Binding @@ -28,12 +32,15 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(System.Type)}; method = type.GetMethod("CreateDelegate", flag, null, args, null); app.RegisterCLRMethodRedirection(method, CreateDelegate_1); + args = new Type[]{typeof(System.Type[])}; + method = type.GetMethod("MakeGenericMethod", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, MakeGenericMethod_2); } - static StackObject* CreateDelegate_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateDelegate_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -56,7 +63,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* CreateDelegate_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* CreateDelegate_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -75,6 +82,25 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } + static StackObject* MakeGenericMethod_2(ILIntepreter __intp, StackObject* __esp, AutoList __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.Type[] @typeArguments = (System.Type[])typeof(System.Type[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Reflection.MethodInfo instance_of_this_method = (System.Reflection.MethodInfo)typeof(System.Reflection.MethodInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.MakeGenericMethod(@typeArguments); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + } diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_ParameterInfo_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_ParameterInfo_Binding.cs index 79d74ddb..93c64285 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_ParameterInfo_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_ParameterInfo_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_ParameterInfo_Binding @@ -42,7 +46,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* get_ParameterType_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_ParameterType_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -57,7 +61,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_Name_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Name_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -72,7 +76,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_DefaultValue_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_DefaultValue_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -92,7 +96,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* get_IsOut_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_IsOut_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -109,7 +113,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetCustomAttributes_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetCustomAttributes_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Reflection_PropertyInfo_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Reflection_PropertyInfo_Binding.cs index fd6eff1b..c3c2bfa6 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Reflection_PropertyInfo_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Reflection_PropertyInfo_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Reflection_PropertyInfo_Binding @@ -43,12 +47,18 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("get_PropertyType", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_PropertyType_6); + args = new Type[]{typeof(System.Object)}; + method = type.GetMethod("GetValue", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, GetValue_7); + args = new Type[]{typeof(System.Object), typeof(System.Object)}; + method = type.GetMethod("SetValue", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, SetValue_8); } - static StackObject* GetIndexParameters_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetIndexParameters_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -63,7 +73,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_GetMethod_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_GetMethod_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -78,7 +88,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetGetMethod_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetGetMethod_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -93,7 +103,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetValue_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetValue_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -121,7 +131,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); } - static StackObject* SetValue_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetValue_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -148,7 +158,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret; } - static StackObject* get_CanWrite_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_CanWrite_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -165,7 +175,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* get_PropertyType_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_PropertyType_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -180,6 +190,53 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } + static StackObject* GetValue_7(ILIntepreter __intp, StackObject* __esp, AutoList __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.Object @obj = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Reflection.PropertyInfo instance_of_this_method = (System.Reflection.PropertyInfo)typeof(System.Reflection.PropertyInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.GetValue(@obj); + + object obj_result_of_this_method = result_of_this_method; + if(obj_result_of_this_method is CrossBindingAdaptorType) + { + return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance, true); + } + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true); + } + + static StackObject* SetValue_8(ILIntepreter __intp, StackObject* __esp, AutoList __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), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Object @obj = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 3); + System.Reflection.PropertyInfo instance_of_this_method = (System.Reflection.PropertyInfo)typeof(System.Reflection.PropertyInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + instance_of_this_method.SetValue(@obj, @value); + + return __ret; + } + } diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_ILT.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_ILT.cs index 0a0c4183..46bd2a74 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_ILT.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_ILT.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_ILTypeInstance_Binding @@ -62,16 +66,13 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)}; method = type.GetMethod("SetResult", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SetResult_4); - args = new Type[]{typeof(System.Runtime.CompilerServices.IAsyncStateMachine)}; - method = type.GetMethod("SetStateMachine", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, SetStateMachine_5); app.RegisterCLRCreateDefaultInstance(type, () => new System.Runtime.CompilerServices.AsyncTaskMethodBuilder()); } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -117,7 +118,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -128,7 +129,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -203,7 +204,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -227,7 +228,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* SetException_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetException_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -250,7 +251,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetResult_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetResult_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -273,29 +274,6 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetStateMachine_5(ILIntepreter __intp, StackObject* __esp, IList __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.Runtime.CompilerServices.IAsyncStateMachine @stateMachine = (System.Runtime.CompilerServices.IAsyncStateMachine)typeof(System.Runtime.CompilerServices.IAsyncStateMachine).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); - System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method = (System.Runtime.CompilerServices.AsyncTaskMethodBuilder)typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); - - instance_of_this_method.SetStateMachine(@stateMachine); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); - - __intp.Free(ptr_of_this_method); - return __ret; - } - } diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_Int.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_Int.cs index 42de5a99..53e7ed26 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_Int.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_Int.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_AsyncTaskMethodBuilder_1_Int32_Binding @@ -76,9 +80,6 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(System.Int32)}; method = type.GetMethod("SetResult", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SetResult_5); - args = new Type[]{typeof(System.Runtime.CompilerServices.IAsyncStateMachine)}; - method = type.GetMethod("SetStateMachine", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, SetStateMachine_6); args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)}; if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst)) { @@ -87,7 +88,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(void), typeof(System.Runtime.CompilerServices.TaskAwaiter).MakeByRefType(), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType())) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_7); + app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_6); break; } @@ -99,7 +100,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -145,7 +146,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -156,7 +157,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -231,7 +232,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -255,7 +256,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* AwaitUnsafeOnCompleted_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -390,7 +391,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetException_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetException_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -413,7 +414,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetResult_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetResult_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -435,30 +436,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetStateMachine_6(ILIntepreter __intp, StackObject* __esp, IList __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.Runtime.CompilerServices.IAsyncStateMachine @stateMachine = (System.Runtime.CompilerServices.IAsyncStateMachine)typeof(System.Runtime.CompilerServices.IAsyncStateMachine).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); - System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method = (System.Runtime.CompilerServices.AsyncTaskMethodBuilder)typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); - - instance_of_this_method.SetStateMachine(@stateMachine); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); - - __intp.Free(ptr_of_this_method); - return __ret; - } - - static StackObject* AwaitUnsafeOnCompleted_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_Bindi.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_Bindi.cs index 52696f02..be3f8818 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_Bindi.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncTaskMethodBuilder_Bindi.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_AsyncTaskMethodBuilder_Binding @@ -76,9 +80,6 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("SetResult", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SetResult_5); - args = new Type[]{typeof(System.Runtime.CompilerServices.IAsyncStateMachine)}; - method = type.GetMethod("SetStateMachine", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, SetStateMachine_6); args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)}; if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst)) { @@ -87,7 +88,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(void), typeof(System.Runtime.CompilerServices.TaskAwaiter).MakeByRefType(), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType())) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_7); + app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_6); break; } @@ -99,7 +100,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -145,7 +146,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -156,7 +157,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -231,7 +232,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -255,7 +256,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* AwaitUnsafeOnCompleted_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -390,7 +391,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetException_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetException_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -413,7 +414,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetResult_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetResult_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -432,30 +433,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetStateMachine_6(ILIntepreter __intp, StackObject* __esp, IList __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.Runtime.CompilerServices.IAsyncStateMachine @stateMachine = (System.Runtime.CompilerServices.IAsyncStateMachine)typeof(System.Runtime.CompilerServices.IAsyncStateMachine).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); - System.Runtime.CompilerServices.AsyncTaskMethodBuilder instance_of_this_method = (System.Runtime.CompilerServices.AsyncTaskMethodBuilder)typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); - - instance_of_this_method.SetStateMachine(@stateMachine); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); - - __intp.Free(ptr_of_this_method); - return __ret; - } - - static StackObject* AwaitUnsafeOnCompleted_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Bindi.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Bindi.cs index 430d20cf..99406103 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Bindi.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Bindi.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding @@ -73,9 +77,6 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("SetResult", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SetResult_4); - args = new Type[]{typeof(System.Runtime.CompilerServices.IAsyncStateMachine)}; - method = type.GetMethod("SetStateMachine", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, SetStateMachine_5); args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)}; if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst)) { @@ -84,7 +85,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(void), typeof(System.Runtime.CompilerServices.TaskAwaiter).MakeByRefType(), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType())) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_6); + app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_5); break; } @@ -98,7 +99,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(void), typeof(System.Runtime.CompilerServices.TaskAwaiter).MakeByRefType(), typeof(ILRuntimeTest.TestFramework.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).MakeByRefType())) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_7); + app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_6); break; } @@ -110,7 +111,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.AsyncVoidMethodBuilder instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.AsyncVoidMethodBuilder instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -156,7 +157,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Create_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -167,7 +168,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Start_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -242,7 +243,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* AwaitUnsafeOnCompleted_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -377,7 +378,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetException_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetException_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -400,7 +401,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetResult_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* SetResult_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -419,30 +420,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* SetStateMachine_5(ILIntepreter __intp, StackObject* __esp, IList __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.Runtime.CompilerServices.IAsyncStateMachine @stateMachine = (System.Runtime.CompilerServices.IAsyncStateMachine)typeof(System.Runtime.CompilerServices.IAsyncStateMachine).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); - System.Runtime.CompilerServices.AsyncVoidMethodBuilder instance_of_this_method = (System.Runtime.CompilerServices.AsyncVoidMethodBuilder)typeof(System.Runtime.CompilerServices.AsyncVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16); - - instance_of_this_method.SetStateMachine(@stateMachine); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); - - __intp.Free(ptr_of_this_method); - return __ret; - } - - static StackObject* AwaitUnsafeOnCompleted_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -577,7 +555,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret; } - static StackObject* AwaitUnsafeOnCompleted_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* AwaitUnsafeOnCompleted_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance.cs index 25ee0ca2..524751aa 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.TaskAwaiter instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.TaskAwaiter instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_IsCompleted_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_IsCompleted_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -101,7 +105,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* GetResult_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetResult_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_Int32_Binding.cs index ea77e7c3..3f5c01a9 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_TaskAwaiter_1_Int32_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.TaskAwaiter instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.TaskAwaiter instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_IsCompleted_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_IsCompleted_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -101,7 +105,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* GetResult_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetResult_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_Binding.cs index 2897c8a2..5c1936b8 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Runtime_CompilerServices_TaskAwaiter_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Runtime_CompilerServices_TaskAwaiter_Binding @@ -34,7 +38,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack, ref System.Runtime.CompilerServices.TaskAwaiter instance_of_this_method) + static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack, ref System.Runtime.CompilerServices.TaskAwaiter instance_of_this_method) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); switch(ptr_of_this_method->ObjectType) @@ -80,7 +84,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S } } - static StackObject* get_IsCompleted_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_IsCompleted_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -101,7 +105,7 @@ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, S return __ret + 1; } - static StackObject* GetResult_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetResult_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Single_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Single_Binding.cs index daafe9a7..c4af6959 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Single_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Single_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Single_Binding @@ -31,7 +35,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static System.Single GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.Single GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.Single instance_of_this_method; @@ -77,7 +81,7 @@ static System.Single GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain return instance_of_this_method; } - static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* ToString_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_String_Array_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_String_Array_Binding.cs index aba9313a..82a73065 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_String_Array_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_String_Array_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_String_Array_Binding diff --git a/ILRuntimeTestBase/AutoGenerate/System_String_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_String_Binding.cs index 97b75c97..57bd1d5c 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_String_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_String_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_String_Binding @@ -37,27 +41,21 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(System.String), typeof(System.Object), typeof(System.Object), typeof(System.Object)}; method = type.GetMethod("Format", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Format_4); - args = new Type[]{typeof(System.Object), typeof(System.Object), typeof(System.Object)}; - method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_5); - args = new Type[]{typeof(System.Object), typeof(System.Object)}; - method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_6); args = new Type[]{typeof(System.String), typeof(System.String), typeof(System.String)}; method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_7); + app.RegisterCLRMethodRedirection(method, Concat_5); args = new Type[]{typeof(System.String), typeof(System.String)}; method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_8); + app.RegisterCLRMethodRedirection(method, Concat_6); args = new Type[]{typeof(System.String)}; method = type.GetMethod("Equals", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Equals_9); + app.RegisterCLRMethodRedirection(method, Equals_7); args = new Type[]{typeof(System.String), typeof(System.String), typeof(System.String), typeof(System.String)}; method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_10); + app.RegisterCLRMethodRedirection(method, Concat_8); args = new Type[]{typeof(System.String), typeof(System.Object), typeof(System.Object)}; method = type.GetMethod("Format", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Format_11); + app.RegisterCLRMethodRedirection(method, Format_9); Dictionary> genericMethods = new Dictionary>(); List lst = null; foreach(var m in type.GetMethods()) @@ -80,7 +78,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.String), typeof(System.String), typeof(System.Collections.Generic.IEnumerable))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Join_12); + app.RegisterCLRMethodRedirection(method, Join_10); break; } @@ -88,7 +86,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } args = new Type[]{typeof(System.String[])}; method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_13); + app.RegisterCLRMethodRedirection(method, Concat_11); args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)}; if (genericMethods.TryGetValue("Join", out lst)) { @@ -97,42 +95,36 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) if(m.MatchGenericParameters(args, typeof(System.String), typeof(System.String), typeof(System.Collections.Generic.IEnumerable))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Join_14); + app.RegisterCLRMethodRedirection(method, Join_12); break; } } } - args = new Type[]{typeof(System.Object)}; - method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_15); - args = new Type[]{typeof(System.Object[])}; - method = type.GetMethod("Concat", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Concat_16); args = new Type[]{typeof(System.Int32)}; method = type.GetMethod("get_Chars", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, get_Chars_17); + app.RegisterCLRMethodRedirection(method, get_Chars_13); args = new Type[]{typeof(System.String)}; method = type.GetMethod("StartsWith", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, StartsWith_18); + app.RegisterCLRMethodRedirection(method, StartsWith_14); args = new Type[]{typeof(System.Int32), typeof(System.Int32)}; method = type.GetMethod("Remove", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Remove_19); + app.RegisterCLRMethodRedirection(method, Remove_15); args = new Type[]{typeof(System.Int32), typeof(System.Int32)}; method = type.GetMethod("Substring", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Substring_20); + app.RegisterCLRMethodRedirection(method, Substring_16); args = new Type[]{}; method = type.GetMethod("get_Length", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, get_Length_21); + app.RegisterCLRMethodRedirection(method, get_Length_17); args = new Type[]{typeof(System.String), typeof(System.Collections.Generic.IEnumerable)}; method = type.GetMethod("Join", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Join_22); + app.RegisterCLRMethodRedirection(method, Join_18); args = new Type[]{typeof(System.String)}; method = type.GetMethod("IsNullOrEmpty", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, IsNullOrEmpty_23); + app.RegisterCLRMethodRedirection(method, IsNullOrEmpty_19); args = new Type[]{typeof(System.String), typeof(System.String)}; method = type.GetMethod("op_Equality", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, op_Equality_24); + app.RegisterCLRMethodRedirection(method, op_Equality_20); app.RegisterCLRCreateArrayInstance(type, s => new System.String[s]); @@ -140,7 +132,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Format_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Format_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -164,7 +156,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Format_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Format_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -184,7 +176,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Format_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Format_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -204,7 +196,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Inequality_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Inequality_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -226,7 +218,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Format_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Format_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -254,51 +246,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Concat_5(ILIntepreter __intp, StackObject* __esp, IList __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 @arg2 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - System.Object @arg1 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 3); - System.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - - var result_of_this_method = System.String.Concat(@arg0, @arg1, @arg2); - - return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); - } - - static StackObject* Concat_6(ILIntepreter __intp, StackObject* __esp, IList __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.Object @arg1 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - ptr_of_this_method = ILIntepreter.Minus(__esp, 2); - System.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - - var result_of_this_method = System.String.Concat(@arg0, @arg1); - - return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); - } - - static StackObject* Concat_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Concat_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -322,7 +270,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Concat_8(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Concat_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -342,7 +290,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Equals_9(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -363,7 +311,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Concat_10(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Concat_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -391,7 +339,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Format_11(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Format_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -415,7 +363,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Join_12(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Join_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -435,7 +383,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Concat_13(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Concat_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -451,7 +399,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Join_14(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Join_12(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -471,39 +419,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Concat_15(ILIntepreter __intp, StackObject* __esp, IList __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.Object @arg0 = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - - var result_of_this_method = System.String.Concat(@arg0); - - return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); - } - - static StackObject* Concat_16(ILIntepreter __intp, StackObject* __esp, IList __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.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); - __intp.Free(ptr_of_this_method); - - - var result_of_this_method = System.String.Concat(@args); - - return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); - } - - static StackObject* get_Chars_17(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Chars_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -523,7 +439,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* StartsWith_18(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* StartsWith_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -544,7 +460,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Remove_19(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Remove_15(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -565,7 +481,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Substring_20(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Substring_16(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -586,7 +502,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_Length_21(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_Length_17(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -603,7 +519,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* Join_22(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Join_18(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -623,7 +539,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* IsNullOrEmpty_23(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* IsNullOrEmpty_19(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -641,7 +557,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* op_Equality_24(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Equality_20(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Threading_Interlocked_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Threading_Interlocked_Binding.cs new file mode 100644 index 00000000..ff4b250c --- /dev/null +++ b/ILRuntimeTestBase/AutoGenerate/System_Threading_Interlocked_Binding.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; + +using ILRuntime.CLR.TypeSystem; +using ILRuntime.CLR.Method; +using ILRuntime.Runtime.Enviorment; +using ILRuntime.Runtime.Intepreter; +using ILRuntime.Runtime.Stack; +using ILRuntime.Reflection; +using ILRuntime.CLR.Utils; +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif +namespace ILRuntime.Runtime.Generated +{ + unsafe class System_Threading_Interlocked_Binding + { + public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) + { + MethodBase method; + Type[] args; + Type type = typeof(System.Threading.Interlocked); + Dictionary> genericMethods = new Dictionary>(); + List lst = null; + foreach(var m in type.GetMethods()) + { + if(m.IsGenericMethodDefinition) + { + if (!genericMethods.TryGetValue(m.Name, out lst)) + { + lst = new List(); + genericMethods[m.Name] = lst; + } + lst.Add(m); + } + } + args = new Type[]{typeof(System.Action)}; + if (genericMethods.TryGetValue("CompareExchange", out lst)) + { + foreach(var m in lst) + { + if(m.MatchGenericParameters(args, typeof(System.Action), typeof(System.Action).MakeByRefType(), typeof(System.Action), typeof(System.Action))) + { + method = m.MakeGenericMethod(args); + app.RegisterCLRMethodRedirection(method, CompareExchange_0); + + break; + } + } + } + + + } + + + static StackObject* CompareExchange_0(ILIntepreter __intp, StackObject* __esp, AutoList __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.Action @comparand = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Action @value = (System.Action)typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 3); + System.Action @location1 = (System.Action)typeof(System.Action).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + + + var result_of_this_method = System.Threading.Interlocked.CompareExchange>(ref @location1, @value, @comparand); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 1); + __intp.Free(ptr_of_this_method); + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + __intp.Free(ptr_of_this_method); + ptr_of_this_method = ILIntepreter.Minus(__esp, 3); + switch(ptr_of_this_method->ObjectType) + { + case ObjectTypes.StackObjectReference: + { + var ___dst = ILIntepreter.ResolveReference(ptr_of_this_method); + object ___obj = @location1; + if (___dst->ObjectType >= ObjectTypes.Object) + { + if (___obj is CrossBindingAdaptorType) + ___obj = ((CrossBindingAdaptorType)___obj).ILInstance; + __mStack[___dst->Value] = ___obj; + } + else + { + ILIntepreter.UnboxObject(___dst, ___obj, __mStack, __domain); + } + } + break; + case ObjectTypes.FieldReference: + { + var ___obj = __mStack[ptr_of_this_method->Value]; + if(___obj is ILTypeInstance) + { + ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = @location1; + } + else + { + var ___type = __domain.GetType(___obj.GetType()) as CLRType; + ___type.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, @location1); + } + } + break; + case ObjectTypes.StaticFieldReference: + { + var ___type = __domain.GetType(ptr_of_this_method->Value); + if(___type is ILType) + { + ((ILType)___type).StaticInstance[ptr_of_this_method->ValueLow] = @location1; + } + else + { + ((CLRType)___type).SetStaticFieldValue(ptr_of_this_method->ValueLow, @location1); + } + } + break; + case ObjectTypes.ArrayReference: + { + var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Action[]; + instance_of_arrayReference[ptr_of_this_method->ValueLow] = @location1; + } + break; + } + + __intp.Free(ptr_of_this_method); + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + + + } +} diff --git a/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_ILTypeInstance_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_ILTypeInstance_Binding.cs index d6fd20ba..52525b38 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_ILTypeInstance_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_ILTypeInstance_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Threading_Tasks_Task_1_ILTypeInstance_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetAwaiter_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetAwaiter_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_Int32_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_Int32_Binding.cs index 401f0151..4015cde7 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_Int32_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_1_Int32_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Threading_Tasks_Task_1_Int32_Binding @@ -30,7 +34,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetAwaiter_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetAwaiter_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_Binding.cs index 72e3a0b6..8a91e38b 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Threading_Tasks_Task_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Threading_Tasks_Task_Binding @@ -31,6 +35,9 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{}; method = type.GetMethod("GetAwaiter", flag, null, args, null); app.RegisterCLRMethodRedirection(method, GetAwaiter_2); + args = new Type[]{typeof(System.Int32)}; + method = type.GetMethod("Delay", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, Delay_3); Dictionary> genericMethods = new Dictionary>(); List lst = null; foreach(var m in type.GetMethods()) @@ -50,24 +57,21 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) { foreach(var m in lst) { - if(m.MatchGenericParameters(args, typeof(System.Threading.Tasks.Task), typeof(System.Func))) + if(m.MatchGenericParameters(args, typeof(System.Threading.Tasks.Task), typeof(System.Func>))) { method = m.MakeGenericMethod(args); - app.RegisterCLRMethodRedirection(method, Run_3); + app.RegisterCLRMethodRedirection(method, Run_4); break; } } } args = new Type[]{typeof(System.Int32)}; - method = type.GetMethod("Delay", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, Delay_4); - args = new Type[]{typeof(System.Int32)}; if (genericMethods.TryGetValue("Run", out lst)) { foreach(var m in lst) { - if(m.MatchGenericParameters(args, typeof(System.Threading.Tasks.Task), typeof(System.Func>))) + if(m.MatchGenericParameters(args, typeof(System.Threading.Tasks.Task), typeof(System.Func))) { method = m.MakeGenericMethod(args); app.RegisterCLRMethodRedirection(method, Run_5); @@ -95,7 +99,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* Run_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Run_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -116,7 +120,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_CompletedTask_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_CompletedTask_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); @@ -132,7 +136,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetAwaiter_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetAwaiter_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -147,18 +151,17 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Run_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Delay_3(ILIntepreter __intp, StackObject* __esp, AutoList __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.Func @function = (System.Func)typeof(System.Func).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); - __intp.Free(ptr_of_this_method); + System.Int32 @millisecondsDelay = ptr_of_this_method->Value; - var result_of_this_method = System.Threading.Tasks.Task.Run(@function); + var result_of_this_method = System.Threading.Tasks.Task.Delay(@millisecondsDelay); object obj_result_of_this_method = result_of_this_method; if(obj_result_of_this_method is CrossBindingAdaptorType) @@ -168,17 +171,18 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Delay_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Run_4(ILIntepreter __intp, StackObject* __esp, AutoList __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.Int32 @millisecondsDelay = ptr_of_this_method->Value; + System.Func> @function = (System.Func>)typeof(System.Func>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + __intp.Free(ptr_of_this_method); - var result_of_this_method = System.Threading.Tasks.Task.Delay(@millisecondsDelay); + var result_of_this_method = System.Threading.Tasks.Task.Run(@function); object obj_result_of_this_method = result_of_this_method; if(obj_result_of_this_method is CrossBindingAdaptorType) @@ -188,14 +192,14 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Run_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Run_5(ILIntepreter __intp, StackObject* __esp, AutoList __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.Func> @function = (System.Func>)typeof(System.Func>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); + System.Func @function = (System.Func)typeof(System.Func).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8); __intp.Free(ptr_of_this_method); @@ -209,7 +213,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* FromResult_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* FromResult_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_Type_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_Type_Binding.cs index 1ada79d6..af4505ae 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_Type_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_Type_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_Type_Binding @@ -52,27 +56,33 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) args = new Type[]{typeof(System.String)}; method = type.GetMethod("GetType", flag, null, args, null); app.RegisterCLRMethodRedirection(method, GetType_9); - args = new Type[]{typeof(System.String)}; + args = new Type[]{typeof(System.String), typeof(System.Reflection.BindingFlags)}; method = type.GetMethod("GetField", flag, null, args, null); app.RegisterCLRMethodRedirection(method, GetField_10); args = new Type[]{}; method = type.GetMethod("GetFields", flag, null, args, null); app.RegisterCLRMethodRedirection(method, GetFields_11); args = new Type[]{typeof(System.String)}; + method = type.GetMethod("GetField", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, GetField_12); + args = new Type[]{typeof(System.String)}; method = type.GetMethod("GetProperty", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, GetProperty_12); + app.RegisterCLRMethodRedirection(method, GetProperty_13); args = new Type[]{}; method = type.GetMethod("GetProperties", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, GetProperties_13); + app.RegisterCLRMethodRedirection(method, GetProperties_14); args = new Type[]{typeof(System.Reflection.BindingFlags)}; method = type.GetMethod("GetProperties", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, GetProperties_14); + app.RegisterCLRMethodRedirection(method, GetProperties_15); args = new Type[]{typeof(System.Type)}; method = type.GetMethod("IsAssignableFrom", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, IsAssignableFrom_15); + app.RegisterCLRMethodRedirection(method, IsAssignableFrom_16); + args = new Type[]{typeof(System.Reflection.BindingFlags)}; + method = type.GetMethod("GetFields", flag, null, args, null); + app.RegisterCLRMethodRedirection(method, GetFields_17); args = new Type[]{typeof(System.Type)}; method = type.GetMethod("IsSubclassOf", flag, null, args, null); - app.RegisterCLRMethodRedirection(method, IsSubclassOf_16); + app.RegisterCLRMethodRedirection(method, IsSubclassOf_18); app.RegisterCLRCreateArrayInstance(type, s => new System.Type[s]); @@ -80,7 +90,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static StackObject* GetTypeFromHandle_0(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetTypeFromHandle_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -96,7 +106,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* op_Equality_1(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Equality_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -118,7 +128,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetMethod_2(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetMethod_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -137,7 +147,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetMethods_3(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetMethods_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -156,7 +166,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* MakeGenericType_4(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* MakeGenericType_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -175,7 +185,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* get_FullName_5(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* get_FullName_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -190,7 +200,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetMethod_6(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetMethod_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -213,7 +223,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* Equals_7(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* Equals_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -234,7 +244,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* op_Inequality_8(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* op_Inequality_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -256,7 +266,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* GetType_9(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetType_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -272,26 +282,30 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetField_10(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetField_10(ILIntepreter __intp, StackObject* __esp, AutoList __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 @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + System.Reflection.BindingFlags @bindingAttr = (System.Reflection.BindingFlags)typeof(System.Reflection.BindingFlags).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.String @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Type instance_of_this_method = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); - var result_of_this_method = instance_of_this_method.GetField(@name); + var result_of_this_method = instance_of_this_method.GetField(@name, @bindingAttr); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetFields_11(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetFields_11(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -306,7 +320,26 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetProperty_12(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetField_12(ILIntepreter __intp, StackObject* __esp, AutoList __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.String @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Type instance_of_this_method = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.GetField(@name); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + static StackObject* GetProperty_13(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -325,7 +358,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetProperties_13(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetProperties_14(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -340,7 +373,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* GetProperties_14(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetProperties_15(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -359,7 +392,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } - static StackObject* IsAssignableFrom_15(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* IsAssignableFrom_16(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; @@ -380,7 +413,26 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) return __ret + 1; } - static StackObject* IsSubclassOf_16(ILIntepreter __intp, StackObject* __esp, IList __mStack, CLRMethod __method, bool isNewObj) + static StackObject* GetFields_17(ILIntepreter __intp, StackObject* __esp, AutoList __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.Reflection.BindingFlags @bindingAttr = (System.Reflection.BindingFlags)typeof(System.Reflection.BindingFlags).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20); + __intp.Free(ptr_of_this_method); + + ptr_of_this_method = ILIntepreter.Minus(__esp, 2); + System.Type instance_of_this_method = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); + __intp.Free(ptr_of_this_method); + + var result_of_this_method = instance_of_this_method.GetFields(@bindingAttr); + + return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); + } + + static StackObject* IsSubclassOf_18(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/ILRuntimeTestBase/AutoGenerate/System_UInt16_Binding.cs b/ILRuntimeTestBase/AutoGenerate/System_UInt16_Binding.cs index c1256838..f00d5879 100644 --- a/ILRuntimeTestBase/AutoGenerate/System_UInt16_Binding.cs +++ b/ILRuntimeTestBase/AutoGenerate/System_UInt16_Binding.cs @@ -11,7 +11,11 @@ using ILRuntime.Runtime.Stack; using ILRuntime.Reflection; using ILRuntime.CLR.Utils; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace ILRuntime.Runtime.Generated { unsafe class System_UInt16_Binding @@ -25,7 +29,7 @@ public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app) } - static System.UInt16 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList __mStack) + static System.UInt16 GetInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, AutoList __mStack) { ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); System.UInt16 instance_of_this_method; diff --git a/ILRuntimeTestBase/ILRuntimeTestBase.csproj b/ILRuntimeTestBase/ILRuntimeTestBase.csproj index c67e0823..2d3c2121 100644 --- a/ILRuntimeTestBase/ILRuntimeTestBase.csproj +++ b/ILRuntimeTestBase/ILRuntimeTestBase.csproj @@ -26,4 +26,8 @@ + + + + diff --git a/ILRuntimeTestBase/TestFramework/DelegateTest.cs b/ILRuntimeTestBase/TestFramework/DelegateTest.cs index 03ace12a..46c79eb3 100644 --- a/ILRuntimeTestBase/TestFramework/DelegateTest.cs +++ b/ILRuntimeTestBase/TestFramework/DelegateTest.cs @@ -92,6 +92,7 @@ public DelegateTest() public static Func DelegatePerformanceTest; public static Action EnumDelegateTest; public static Func EnumDelegateTest2; + public static event Action OnIntEvent; public static void TestEvent() { @@ -103,6 +104,16 @@ public void TestEvent2() IntDelegateEventTest2(22222); } + public static void TestEvent3(float a, double b, int c) + { + OnIntEvent(a, b, c); + } + + public static bool TestEvent4() + { + return OnIntEvent == null; + } + public static void TestEnumDelegate() { EnumDelegateTest(TestCLREnum.Test1); diff --git a/ILRuntimeTestBase/TestFramework/TestVector3.cs b/ILRuntimeTestBase/TestFramework/TestVector3.cs index 7d119707..0e3a96ce 100644 --- a/ILRuntimeTestBase/TestFramework/TestVector3.cs +++ b/ILRuntimeTestBase/TestFramework/TestVector3.cs @@ -247,6 +247,70 @@ public struct TestStructA { public long value; } + public struct Fixed64Vector2 + { + public Fixed64 x; + public Fixed64 y; + + public static readonly Fixed64Vector2 Zero2; + + public Fixed64Vector2(int x, int y) + { + this.x = new Fixed64(x); + this.y = new Fixed64(y); + } + + static Fixed64Vector2() + { + Zero2 = new Fixed64Vector2(0, 0); + } + } + + + public struct Fixed64 + { + private long m_rawValue; + + public static readonly Fixed64 Zero; + + public Fixed64(long value) + { + m_rawValue = value; + } + + public long RawValue + { + get + { + return m_rawValue; + } + } + + static Fixed64() + { + Zero = new Fixed64(0); + } + + public static bool operator <(Fixed64 x, Fixed64 y) + { + return x.m_rawValue < y.m_rawValue; + } + + public static bool operator >(Fixed64 x, Fixed64 y) + { + return x.m_rawValue > y.m_rawValue; + } + + public static bool operator ==(Fixed64 x, Fixed64 y) + { + return x.m_rawValue == y.m_rawValue; + } + + public static bool operator !=(Fixed64 x, Fixed64 y) + { + return x.m_rawValue != y.m_rawValue; + } + } public struct TestStructB { diff --git a/ILRuntimeTestBase/Unity/Vector3.cs b/ILRuntimeTestBase/Unity/Vector3.cs new file mode 100644 index 00000000..a746f1ee --- /dev/null +++ b/ILRuntimeTestBase/Unity/Vector3.cs @@ -0,0 +1,448 @@ +using System; +using System.Collections.Generic; +using System.Text; +namespace UnityEngine +{ + // + // Summary: + // Representation of 3D vectors and points. + public struct Vector3 : IEquatable + { + public const float kEpsilon = 1E-05F; + public const float kEpsilonNormalSqrt = 1E-15F; + // + // Summary: + // X component of the vector. + public float x; + // + // Summary: + // Y component of the vector. + public float y; + // + // Summary: + // Z component of the vector. + public float z; + + // + // Summary: + // Creates a new vector with given x, y components and sets z to zero. + // + // Parameters: + // x: + // + // y: + public Vector3(float x, float y) + { + this.x = x; + this.y = y; + z = 0; + } + // + // Summary: + // Creates a new vector with given x, y, z components. + // + // Parameters: + // x: + // + // y: + // + // z: + public Vector3(float x, float y, float z) + { + this.x = x; + this.y = y; + this.z = z; + } + + public float this[int index] + { + get + { + switch (index) + { + case 0: + return x; + case 1: + return y; + case 2: + return z; + default: + throw new ArgumentOutOfRangeException(); + } + } + set + { + switch (index) + { + case 0: + x = value; + break; + case 1: + y = value; + break; + case 2: + z = value; + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + } + + // + // Summary: + // Shorthand for writing Vector3(0, 0, 0). + public static Vector3 zero { get; } + // + // Summary: + // Shorthand for writing Vector3(1, 1, 1). + public static Vector3 one { get; } = new Vector3(1, 1, 1); + // + // Summary: + // Shorthand for writing Vector3(0, 0, 1). + public static Vector3 forward { get; } = new Vector3(0, 0, 1); + // + // Summary: + // Shorthand for writing Vector3(0, 0, -1). + public static Vector3 back { get; } = new Vector3(0, 0, -1); + // + // Summary: + // Shorthand for writing Vector3(1, 0, 0). + public static Vector3 right { get; } = new Vector3(1, 0, 0); + // + // Summary: + // Shorthand for writing Vector3(0, -1, 0). + public static Vector3 down { get; } + // + // Summary: + // Shorthand for writing Vector3(-1, 0, 0). + public static Vector3 left { get; } + // + // Summary: + // Shorthand for writing Vector3(float.PositiveInfinity, float.PositiveInfinity, + // float.PositiveInfinity). + public static Vector3 positiveInfinity { get; } + // + // Summary: + // Shorthand for writing Vector3(0, 1, 0). + public static Vector3 up { get; } + // + // Summary: + // Shorthand for writing Vector3(float.NegativeInfinity, float.NegativeInfinity, + // float.NegativeInfinity). + public static Vector3 negativeInfinity { get; } + [Obsolete("Use Vector3.forward instead.")] + public static Vector3 fwd { get; } + // + // Summary: + // Returns the squared length of this vector (Read Only). + public float sqrMagnitude { get => 0; } + // + // Summary: + // Returns this vector with a magnitude of 1 (Read Only). + public Vector3 normalized { get => this; } + // + // Summary: + // Returns the length of this vector (Read Only). + public float magnitude { get => 0; } + + // + // Summary: + // Returns the angle in degrees between from and to. + // + // Parameters: + // from: + // The vector from which the angular difference is measured. + // + // to: + // The vector to which the angular difference is measured. + // + // Returns: + // The angle in degrees between the two vectors. + public static float Angle(Vector3 from, Vector3 to) => 0; + [Obsolete("Use Vector3.Angle instead. AngleBetween uses radians instead of degrees and was deprecated for this reason")] + public static float AngleBetween(Vector3 from, Vector3 to) => 0; + // + // Summary: + // Returns a copy of vector with its magnitude clamped to maxLength. + // + // Parameters: + // vector: + // + // maxLength: + public static Vector3 ClampMagnitude(Vector3 vector, float maxLength) => vector; + // + // Summary: + // Cross Product of two vectors. + // + // Parameters: + // lhs: + // + // rhs: + public static Vector3 Cross(Vector3 lhs, Vector3 rhs) => lhs; + // + // Summary: + // Returns the distance between a and b. + // + // Parameters: + // a: + // + // b: + public static float Distance(Vector3 a, Vector3 b) => 0; + // + // Summary: + // Dot Product of two vectors. + // + // Parameters: + // lhs: + // + // rhs: + public static float Dot(Vector3 lhs, Vector3 rhs) => 0; + [Obsolete("Use Vector3.ProjectOnPlane instead.")] + public static Vector3 Exclude(Vector3 excludeThis, Vector3 fromThat) => default; + // + // Summary: + // Linearly interpolates between two vectors. + // + // Parameters: + // a: + // + // b: + // + // t: + public static Vector3 Lerp(Vector3 a, Vector3 b, float t) => default; + // + // Summary: + // Linearly interpolates between two vectors. + // + // Parameters: + // a: + // + // b: + // + // t: + public static Vector3 LerpUnclamped(Vector3 a, Vector3 b, float t) => default; + public static float Magnitude(Vector3 vector) => 0; + // + // Summary: + // Returns a vector that is made from the largest components of two vectors. + // + // Parameters: + // lhs: + // + // rhs: + public static Vector3 Max(Vector3 lhs, Vector3 rhs) => default; + // + // Summary: + // Returns a vector that is made from the smallest components of two vectors. + // + // Parameters: + // lhs: + // + // rhs: + public static Vector3 Min(Vector3 lhs, Vector3 rhs) => default; + // + // Summary: + // Calculate a position between the points specified by current and target, moving + // no farther than the distance specified by maxDistanceDelta. + // + // Parameters: + // current: + // The position to move from. + // + // target: + // The position to move towards. + // + // maxDistanceDelta: + // Distance to move current per call. + // + // Returns: + // The new position. + public static Vector3 MoveTowards(Vector3 current, Vector3 target, float maxDistanceDelta) => default; + // + // Summary: + // Makes this vector have a magnitude of 1. + // + // Parameters: + // value: + public static Vector3 Normalize(Vector3 value) => default; + public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent, ref Vector3 binormal) { } + public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent) { } + // + // Summary: + // Projects a vector onto another vector. + // + // Parameters: + // vector: + // + // onNormal: + public static Vector3 Project(Vector3 vector, Vector3 onNormal) => default; + // + // Summary: + // Projects a vector onto a plane defined by a normal orthogonal to the plane. + // + // Parameters: + // planeNormal: + // The direction from the vector towards the plane. + // + // vector: + // The location of the vector above the plane. + // + // Returns: + // The location of the vector on the plane. + public static Vector3 ProjectOnPlane(Vector3 vector, Vector3 planeNormal)=>default; + // + // Summary: + // Reflects a vector off the plane defined by a normal. + // + // Parameters: + // inDirection: + // + // inNormal: + public static Vector3 Reflect(Vector3 inDirection, Vector3 inNormal) => default; + // + // Summary: + // Rotates a vector current towards target. + // + // Parameters: + // current: + // The vector being managed. + // + // target: + // The vector. + // + // maxRadiansDelta: + // The distance between the two vectors in radians. + // + // maxMagnitudeDelta: + // The length of the radian. + // + // Returns: + // The location that RotateTowards generates. + public static Vector3 RotateTowards(Vector3 current, Vector3 target, float maxRadiansDelta, float maxMagnitudeDelta) => default; + // + // Summary: + // Multiplies two vectors component-wise. + // + // Parameters: + // a: + // + // b: + public static Vector3 Scale(Vector3 a, Vector3 b) => default; + // + // Summary: + // Returns the signed angle in degrees between from and to. + // + // Parameters: + // from: + // The vector from which the angular difference is measured. + // + // to: + // The vector to which the angular difference is measured. + // + // axis: + // A vector around which the other vectors are rotated. + public static float SignedAngle(Vector3 from, Vector3 to, Vector3 axis) => 0; + // + // Summary: + // Spherically interpolates between two vectors. + // + // Parameters: + // a: + // + // b: + // + // t: + public static Vector3 Slerp(Vector3 a, Vector3 b, float t) => default; + // + // Summary: + // Spherically interpolates between two vectors. + // + // Parameters: + // a: + // + // b: + // + // t: + public bool Equals(Vector3 other) => false; + // + // Summary: + // Returns true if the given vector is exactly equal to this vector. + // + // Parameters: + // other: + public override bool Equals(object other) => false; + public void Normalize() { } + // + // Summary: + // Multiplies every component of this vector by the same component of scale. + // + // Parameters: + // scale: + public void Scale(Vector3 scale) { } + // + // Summary: + // Set x, y and z components of an existing Vector3. + // + // Parameters: + // newX: + // + // newY: + // + // newZ: + public void Set(float newX, float newY, float newZ) { } + // + // Summary: + // Returns a nicely formatted string for this vector. + // + // Parameters: + // format: + public string ToString(string format) + { + return $"({x},{y},{z})"; + } + // + // Summary: + // Returns a nicely formatted string for this vector. + // + // Parameters: + // format: + public override string ToString() + { + return $"({x},{y},{z})"; + } + + public static Vector3 operator +(Vector3 a, Vector3 b) + { + return a; + } + public static Vector3 operator -(Vector3 a) + { + return a; + } + public static Vector3 operator -(Vector3 a, Vector3 b) + { + return a; + } + public static Vector3 operator *(Vector3 a, float d) + { + return a; + } + public static Vector3 operator *(float d, Vector3 a) + { + return a; + } + public static Vector3 operator /(Vector3 a, float d) + { + return a; + } + public static bool operator ==(Vector3 lhs, Vector3 rhs) + { + return false; + } + public static bool operator !=(Vector3 lhs, Vector3 rhs) + { + return true; + } + } +} \ No newline at end of file diff --git a/LitJson/JsonMapper.cs b/LitJson/JsonMapper.cs index 56608acc..7e176fe9 100644 --- a/LitJson/JsonMapper.cs +++ b/LitJson/JsonMapper.cs @@ -20,7 +20,11 @@ using ILRuntime.CLR.Method; using ILRuntime.CLR.Utils; using Object = System.Object; - +#if DEBUG && !DISABLE_ILRUNTIME_DEBUG +using AutoList = System.Collections.Generic.List; +#else +using AutoList = ILRuntime.Other.UncheckedList; +#endif namespace LitJson { /// @@ -1089,7 +1093,7 @@ public unsafe static void RegisterILRuntimeCLRRedirection(ILRuntime.Runtime.Envi } } - public unsafe static StackObject* JsonToObject(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* JsonToObject(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = intp.AppDomain; StackObject* ptr_of_this_method; @@ -1103,7 +1107,7 @@ public unsafe static void RegisterILRuntimeCLRRedirection(ILRuntime.Runtime.Envi return ILIntepreter.PushObject(__ret, mStack, result_of_this_method); } - public unsafe static StackObject* JsonToObject2(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* JsonToObject2(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = intp.AppDomain; StackObject* ptr_of_this_method; @@ -1117,7 +1121,7 @@ public unsafe static void RegisterILRuntimeCLRRedirection(ILRuntime.Runtime.Envi return ILIntepreter.PushObject(__ret, mStack, result_of_this_method); } - public unsafe static StackObject* JsonToObject3(ILIntepreter intp, StackObject* esp, IList mStack, CLRMethod method, bool isNewObj) + public unsafe static StackObject* JsonToObject3(ILIntepreter intp, StackObject* esp, AutoList mStack, CLRMethod method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = intp.AppDomain; StackObject* ptr_of_this_method; diff --git a/Mono.Cecil/Mono.Cecil/FieldReference.cs b/Mono.Cecil/Mono.Cecil/FieldReference.cs index befbe97e..05a95164 100644 --- a/Mono.Cecil/Mono.Cecil/FieldReference.cs +++ b/Mono.Cecil/Mono.Cecil/FieldReference.cs @@ -15,6 +15,8 @@ namespace ILRuntime.Mono.Cecil { public class FieldReference : MemberReference { TypeReference field_type; + int hashCode = -1; + static int instance_id = 0x2000000; public TypeReference FieldType { get { return field_type; } @@ -64,5 +66,12 @@ protected override IMemberDefinition ResolveDefinition () return module.Resolve (this); } + + public override int GetHashCode() + { + if (hashCode == -1) + hashCode = System.Threading.Interlocked.Add(ref instance_id, 1); + return hashCode; + } } } diff --git a/Mono.Cecil/Mono.Cecil/MethodReference.cs b/Mono.Cecil/Mono.Cecil/MethodReference.cs index 6de57ac7..4b97e5c5 100644 --- a/Mono.Cecil/Mono.Cecil/MethodReference.cs +++ b/Mono.Cecil/Mono.Cecil/MethodReference.cs @@ -17,7 +17,7 @@ namespace ILRuntime.Mono.Cecil { public class MethodReference : MemberReference, IMethodSignature, IGenericParameterProvider, IGenericContext { int hashCode = -1; - static int instance_id; + static int instance_id = 0x1000000; internal ParameterDefinitionCollection parameters; MethodReturnType return_type; diff --git a/ReadMe.md b/ReadMe.md index 0da1299f..e0c437c5 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,7 +1,7 @@ ILRuntime ========== [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Ourpalm/ILRuntime/blob/master/LICENSE.TXT) -[![release](https://img.shields.io/badge/release-v2.0.2-blue.svg)](https://github.com/Ourpalm/ILRuntime/releases) +[![release](https://img.shields.io/badge/release-v2.1.0-blue.svg)](https://github.com/Ourpalm/ILRuntime/releases) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/Ourpalm/ILRuntime/pulls) ![example workflow](https://github.com/Ourpalm/ILRuntime/actions/workflows/dotnet.yml/badge.svg) diff --git a/TestCases/DelegateTest.cs b/TestCases/DelegateTest.cs index 6e46a9ba..a8825610 100644 --- a/TestCases/DelegateTest.cs +++ b/TestCases/DelegateTest.cs @@ -666,11 +666,43 @@ public static void DelegateTest42() throw new Exception(); } + + static event Action OnIntEvent; static void Message(T oldVal, T newVal) { Console.WriteLine(typeof(T)); Console.WriteLine(oldVal); Console.WriteLine(newVal); } + + public static void DelegateTest43() + { + OnIntEvent += DelegateTest43Sub; + OnIntEvent(1, 2, 3); + OnIntEvent -= DelegateTest43Sub; + if (OnIntEvent != null) + throw new Exception(); + } + + static void DelegateTest43Sub(float a, double b, int c) + { + if (a != 1 || b != 2 || c != 3) + throw new Exception(); + Console.WriteLine($"a={a}, b={b}, c={c}"); + } + public static void DelegateTest44() + { + ILRuntimeTest.TestBase.TestSession.LastSession.Appdomain.AllowUnboundCLRMethod = false; + } + + public static void DelegateTest45() + { + ILRuntimeTest.TestFramework.DelegateTest.OnIntEvent += DelegateTest43Sub; + ILRuntimeTest.TestFramework.DelegateTest.TestEvent3(1, 2, 3); + ILRuntimeTest.TestFramework.DelegateTest.OnIntEvent -= DelegateTest43Sub; + ILRuntimeTest.TestBase.TestSession.LastSession.Appdomain.AllowUnboundCLRMethod = true; + if (!ILRuntimeTest.TestFramework.DelegateTest.TestEvent4()) + throw new Exception(); + } } } diff --git a/TestCases/LightTester2.cs b/TestCases/LightTester2.cs index ea27bbb2..9eb3c6f2 100644 --- a/TestCases/LightTester2.cs +++ b/TestCases/LightTester2.cs @@ -183,9 +183,9 @@ public static void UnitTest_TestFCP2() { var array = UnitTest_TestFCP2Sub(); int count = array.Count; - for(int i=0;i< count; ++i) + for (int i = 0; i < count; ++i) { - for(int j = 0; j < CachePosSnDic.Length; j++) + for (int j = 0; j < CachePosSnDic.Length; j++) { if (CachePosSnDic[j] == null) CachePosSnDic[j] = new Dictionary(); @@ -195,7 +195,7 @@ public static void UnitTest_TestFCP2() var tabarray = UnitTest_TestFCP2Sub2(); int tabCount = tabarray.Count; - for(int i = 0; i < tabCount; ++i) + for (int i = 0; i < tabCount; ++i) { tabHasItemDic.Add(tabarray[i].TestVal2, false); } @@ -238,13 +238,13 @@ static List UnitTest_TestFCP2Sub2() public static void UnitTest_TestFCP3() { - for(int i = 0; i < 100; i++) + for (int i = 0; i < 100; i++) { try { throw new Exception("test"); } - catch(Exception ex) + catch (Exception ex) { Console.WriteLine($"{ex.Message}\r\n{ex.Data["StackTrace"]}"); } @@ -317,5 +317,43 @@ public static void UnitTest_TestStackRegisterTransition2() } } + + struct TransitionTest + { + public int A; + public string B; + public float C; + public TransitionTestSub D; + } + struct TransitionTestSub + { + public string A; + public int B; + public float C; + } + class TransitionTest2 + { + public void Test(TransitionTest arg) + { + if (arg.A != 1 || arg.B != "2" || arg.C != 3) + throw new Exception(); + if(arg.D.A != "4" || arg.D.B != 5 || arg.D.C != 6) + throw new Exception(); + } + } + [ILRuntimeJIT(ILRuntimeJITFlags.NoJIT)] + public static void UnitTest_TestStackRegisterTransition3() + { + TransitionTest t = new TransitionTest(); + t.A = 1; + t.B = "2"; + t.C = 3; + t.D.A = "4"; + t.D.B = 5; + t.D.C = 6; + + TransitionTest2 cls = new TransitionTest2(); + cls.Test(t); + } } } diff --git a/TestCases/RefOutTest.cs b/TestCases/RefOutTest.cs index b714f8a4..f1bb25ba 100644 --- a/TestCases/RefOutTest.cs +++ b/TestCases/RefOutTest.cs @@ -63,6 +63,46 @@ public static void UnitTest_RefOutNull() if (aaa != null) throw new Exception(); } + class TestClass222 + { + public TestClass222() + { + t = s++; + } + public int t; + static int s = 1; + } + class TestRefOut2Cls + { + public TestRefOut2Cls() + { + p = null; + //非null就不会有问题 + //p = new TestClass(); + } + public bool TryGetObject(out T res) where T : TestClass222, new() + { + //用局部变量中转没问题 + //var tmp = p as T; + //res = null; + //res = tmp; + //这一句现在没什么用(比如用来if判断)但没有这一句不会报错。 + res = p as T; + res = new T();//这里解析器越界异常 + //res = p as T;//这样也会解析器越界异常 + Console.WriteLine("!!! new T"); + return true; + } + TestClass222 p; + } + public static void UnitTest_RefOutNull2() + { + TestClass222 res; + TestRefOut2Cls obj = new TestRefOut2Cls(); + obj.TryGetObject(out res); + if (res == null) + throw new Exception(); + } public static void UnitTest_Typeof() { object obj = 1; @@ -255,6 +295,24 @@ public static void UnitTest_RefTest3() Console.WriteLine(arr[1]); } + public static void Set(ref long x) + { + if (x != 10) + throw new Exception(); + x++; + } + + public static void UnitTest_RefTest4() + { + long srcX = 10; + + for (var index = 0; index < 10; index++) + { + long x = srcX; + Set(ref x); + } + } + static void Func(ref int[] arr) { arr[1] = 2; diff --git a/TestCases/ReflectionTest.cs b/TestCases/ReflectionTest.cs index 775a30e4..01ccc892 100644 --- a/TestCases/ReflectionTest.cs +++ b/TestCases/ReflectionTest.cs @@ -64,14 +64,20 @@ public static void ReflectionTest04() public static void ReflectionTest05() { - var fi = typeof(TestCls).GetField("aa"); - var fi2 = typeof(TestCls).GetField("bb"); + var fi = typeof(TestCls).GetField("aa", BindingFlags.NonPublic | BindingFlags.Instance); + var fi2 = typeof(TestCls).GetField("bb", BindingFlags.NonPublic | BindingFlags.Static); + var fi3 = typeof(TestCls).GetField("cc", BindingFlags.NonPublic | BindingFlags.Static); var a = new TestCls(); Console.WriteLine("aa=" + fi.GetValue(a)); Console.WriteLine("bb=" + fi2.GetValue(null)); + var cc = (int)fi3.GetValue(null); + Console.WriteLine("cc=" + cc); + if(cc!=444) + throw new Exception("worng value"); + fi.SetValue(a, 123); fi2.SetValue(null, 233); Console.WriteLine("aa=" + fi.GetValue(a)); @@ -198,6 +204,9 @@ public class TestCls int aa = 203; static int bb = 333; + + const int cc = 444; + public TestCls foo(int b) { Console.WriteLine("foo" + (aa + b)); @@ -579,5 +588,70 @@ class TestC { public string Name; } + + public class Base + { + public int BaseIntVal; + } + + public class Impl : Base + { + public bool ImplBoolVal; + } + + public static void ReflectionTest22() + { + var t = typeof(Impl); + var flag = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | + BindingFlags.SetProperty; + var fs = t.GetFields(flag).ToList(); + if (fs.Count != 1) + { + throw new Exception($"Field count mismatch,detail: {string.Join(",", fs.Select(f => f.Name))}"); + } + } + public class HotBehaviour + { + public T csObj { get; protected set; } + } + + class XX : HotBehaviour + { + + } + public class YY + { + public Type CurType { get; set; } + public object Value { get; set; } + public void a(int a, T t) + { + CurType = typeof(T); + Value = t; + } + } + public static void ReflectionTest23() + { + XX x = new XX(); + var type = typeof(XX); + var value = type.GetProperty("csObj").GetValue(x); + type.GetProperty("csObj").SetValue(x, 11); + if (x.csObj != 11) + throw new Exception(); + } + + public static void ReflectionTest24() + { + YY yy = new YY(); + var method = typeof(YY).GetMethod("a"); + if(!method.IsGenericMethodDefinition || !method.IsGenericMethod) + throw new Exception(); + var mi = method.MakeGenericMethod(typeof(int)); + mi.Invoke(yy,new object[] { 11 , 12}); + + if(yy.CurType != typeof(int) || (int)yy.Value != 12) + { + throw new Exception($"CurType = {yy.CurType}, Value = {yy.Value}"); + } + } } } diff --git a/TestCases/Test01.cs b/TestCases/Test01.cs index d9b4a0d6..6fc71cbf 100644 --- a/TestCases/Test01.cs +++ b/TestCases/Test01.cs @@ -250,6 +250,20 @@ public static void UnitTest_Performance10() Console.WriteLine(string.Format("time=" + sw.ElapsedMilliseconds + ", cps:{0:0}", (1000000 * 1000 / sw.ElapsedMilliseconds))); } + [ILRuntimeTest(IsPerformanceTest = true)] + public static void UnitTest_Performance10_2() + { + TestVectorClass a = new TestVectorClass(); + System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); + sw.Start(); + for (int i = 0; i < 1000000; i++) + { + a.Vector2 = a.Vector2; + } + sw.Stop(); + Console.WriteLine(string.Format("time=" + sw.ElapsedMilliseconds + ", cps:{0:0}", (1000000 * 1000 / sw.ElapsedMilliseconds))); + } + [ILRuntimeTest(IsPerformanceTest = true)] public static void UnitTest_Performance11() { diff --git a/TestCases/TestValueTypeBinding.cs b/TestCases/TestValueTypeBinding.cs index db52b08c..e358d9ee 100644 --- a/TestCases/TestValueTypeBinding.cs +++ b/TestCases/TestValueTypeBinding.cs @@ -551,5 +551,74 @@ public static void UnitTest_10050() } } } + + public static void UnitTest_10051() + { + var trts = new TestRunTimeStack(); + trts.Run(); + //Debug.LogFormat("RunTest4"); + } + + + public class BaseObj + { + private Fixed64Vector2 fv2; + + public void SetPos(int x, int y) + { + fv2.x = new ILRuntimeTest.TestFramework.Fixed64(x); + } + + public BaseObj() + { + int x, y; + x = 123; + y = 456; + fv2 = new Fixed64Vector2(x, y); + } + + public Fixed64Vector2 V2 + { + get + { + return fv2; + } + } + } + + public class TestObj : BaseObj + { + private int n; + } + + public class TestRunTimeStack + { + public TestRunTimeStack() + { + } + + public void Run() + { + List list = new List(); + for (int i = 0; i < 1000; i++) + { + var obj = new TestObj(); + obj.SetPos(i, i); + list.Add(obj); + } + + list.Sort((a, b) => { + if (a.V2.x < b.V2.x) + return 1; + else if (a.V2.x > b.V2.x) + return -1; + return 0; + }); + + if (list[0].V2.x.RawValue != 999) + throw new Exception(); + } + } + } } \ No newline at end of file diff --git a/docs/public/readme.html b/docs/public/readme.html index 4560abe2..7cc4b62b 100644 --- a/docs/public/readme.html +++ b/docs/public/readme.html @@ -21,7 +21,7 @@