|
|
@@ -14,14 +14,14 @@ using ILRuntime.CLR.Utils;
|
|
|
|
|
|
namespace ILRuntime.Runtime.Generated
|
|
|
{
|
|
|
- unsafe class System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding
|
|
|
+ unsafe class ETModel_AsyncETVoidMethodBuilder_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.Runtime.CompilerServices.AsyncVoidMethodBuilder);
|
|
|
+ Type type = typeof(ETModel.AsyncETVoidMethodBuilder);
|
|
|
args = new Type[]{};
|
|
|
method = type.GetMethod("Create", flag, null, args, null);
|
|
|
app.RegisterCLRMethodRedirection(method, Create_0);
|
|
|
@@ -53,7 +53,10 @@ namespace ILRuntime.Runtime.Generated
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- args = new Type[]{typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
|
|
|
+ args = new Type[]{};
|
|
|
+ method = type.GetMethod("get_Task", flag, null, args, null);
|
|
|
+ app.RegisterCLRMethodRedirection(method, get_Task_2);
|
|
|
+ args = new Type[]{typeof(ETModel.ETTask<Google.Protobuf.Adapt_IMessage.Adaptor>.Awaiter), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
|
|
|
if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
|
|
|
{
|
|
|
foreach(var m in lst)
|
|
|
@@ -61,7 +64,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
if(m.GetParameters().Length == 2)
|
|
|
{
|
|
|
method = m.MakeGenericMethod(args);
|
|
|
- app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_2);
|
|
|
+ app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_3);
|
|
|
|
|
|
break;
|
|
|
}
|
|
|
@@ -69,14 +72,11 @@ namespace ILRuntime.Runtime.Generated
|
|
|
}
|
|
|
args = new Type[]{typeof(System.Exception)};
|
|
|
method = type.GetMethod("SetException", flag, null, args, null);
|
|
|
- app.RegisterCLRMethodRedirection(method, SetException_3);
|
|
|
+ app.RegisterCLRMethodRedirection(method, SetException_4);
|
|
|
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<ETModel.IResponse>), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
|
|
|
+ app.RegisterCLRMethodRedirection(method, SetResult_5);
|
|
|
+ args = new Type[]{typeof(ETModel.ETTask.Awaiter), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
|
|
|
if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
|
|
|
{
|
|
|
foreach(var m in lst)
|
|
|
@@ -90,13 +90,27 @@ namespace ILRuntime.Runtime.Generated
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ args = new Type[]{typeof(ETModel.ETTask<ETModel.IResponse>.Awaiter), typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)};
|
|
|
+ if (genericMethods.TryGetValue("AwaitUnsafeOnCompleted", out lst))
|
|
|
+ {
|
|
|
+ foreach(var m in lst)
|
|
|
+ {
|
|
|
+ if(m.GetParameters().Length == 2)
|
|
|
+ {
|
|
|
+ method = m.MakeGenericMethod(args);
|
|
|
+ app.RegisterCLRMethodRedirection(method, AwaitUnsafeOnCompleted_7);
|
|
|
|
|
|
- app.RegisterCLRCreateDefaultInstance(type, () => new System.Runtime.CompilerServices.AsyncVoidMethodBuilder());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ app.RegisterCLRCreateDefaultInstance(type, () => new ETModel.AsyncETVoidMethodBuilder());
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
- static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref System.Runtime.CompilerServices.AsyncVoidMethodBuilder instance_of_this_method)
|
|
|
+ static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref ETModel.AsyncETVoidMethodBuilder instance_of_this_method)
|
|
|
{
|
|
|
ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
|
|
|
switch(ptr_of_this_method->ObjectType)
|
|
|
@@ -135,7 +149,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
break;
|
|
|
case ObjectTypes.ArrayReference:
|
|
|
{
|
|
|
- var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.AsyncVoidMethodBuilder[];
|
|
|
+ var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ETModel.AsyncETVoidMethodBuilder[];
|
|
|
instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
|
|
|
}
|
|
|
break;
|
|
|
@@ -148,7 +162,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
StackObject* __ret = ILIntepreter.Minus(__esp, 0);
|
|
|
|
|
|
|
|
|
- var result_of_this_method = System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Create();
|
|
|
+ var result_of_this_method = ETModel.AsyncETVoidMethodBuilder.Create();
|
|
|
|
|
|
return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
|
|
|
}
|
|
|
@@ -164,7 +178,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
|
|
|
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));
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
|
|
|
instance_of_this_method.Start<ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @stateMachine);
|
|
|
|
|
|
@@ -230,7 +244,26 @@ namespace ILRuntime.Runtime.Generated
|
|
|
return __ret;
|
|
|
}
|
|
|
|
|
|
- static StackObject* AwaitUnsafeOnCompleted_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ static StackObject* get_Task_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ {
|
|
|
+ ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
+ StackObject* ptr_of_this_method;
|
|
|
+ StackObject* __ret = ILIntepreter.Minus(__esp, 1);
|
|
|
+
|
|
|
+ ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
+ ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
+
|
|
|
+ var result_of_this_method = instance_of_this_method.Task;
|
|
|
+
|
|
|
+ ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
+ WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);
|
|
|
+
|
|
|
+ __intp.Free(ptr_of_this_method);
|
|
|
+ return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
|
|
|
+ }
|
|
|
+
|
|
|
+ static StackObject* AwaitUnsafeOnCompleted_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|
|
|
@@ -240,13 +273,13 @@ namespace ILRuntime.Runtime.Generated
|
|
|
ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
|
|
|
- System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor> @awaiter = (System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>)typeof(System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
+ ETModel.ETTask<Google.Protobuf.Adapt_IMessage.Adaptor>.Awaiter @awaiter = (ETModel.ETTask<Google.Protobuf.Adapt_IMessage.Adaptor>.Awaiter)typeof(ETModel.ETTask<Google.Protobuf.Adapt_IMessage.Adaptor>.Awaiter).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
|
|
|
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));
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
|
|
|
- instance_of_this_method.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
|
|
|
+ instance_of_this_method.AwaitUnsafeOnCompleted<ETModel.ETTask<Google.Protobuf.Adapt_IMessage.Adaptor>.Awaiter, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
switch(ptr_of_this_method->ObjectType)
|
|
|
@@ -351,7 +384,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
break;
|
|
|
case ObjectTypes.ArrayReference:
|
|
|
{
|
|
|
- var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter<Google.Protobuf.Adapt_IMessage.Adaptor>[];
|
|
|
+ var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ETModel.ETTask<Google.Protobuf.Adapt_IMessage.Adaptor>.Awaiter[];
|
|
|
instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
|
|
|
}
|
|
|
break;
|
|
|
@@ -365,7 +398,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
return __ret;
|
|
|
}
|
|
|
|
|
|
- static StackObject* SetException_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ static StackObject* SetException_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|
|
|
@@ -377,7 +410,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
|
|
|
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));
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
|
|
|
instance_of_this_method.SetException(@exception);
|
|
|
|
|
|
@@ -388,7 +421,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
return __ret;
|
|
|
}
|
|
|
|
|
|
- static StackObject* SetResult_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ static StackObject* SetResult_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|
|
|
@@ -396,7 +429,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
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));
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
|
|
|
instance_of_this_method.SetResult();
|
|
|
|
|
|
@@ -407,30 +440,142 @@ namespace ILRuntime.Runtime.Generated
|
|
|
return __ret;
|
|
|
}
|
|
|
|
|
|
- static StackObject* SetStateMachine_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ static StackObject* AwaitUnsafeOnCompleted_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|
|
|
- StackObject* __ret = ILIntepreter.Minus(__esp, 2);
|
|
|
+ StackObject* __ret = ILIntepreter.Minus(__esp, 3);
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
- System.Runtime.CompilerServices.IAsyncStateMachine @stateMachine = (System.Runtime.CompilerServices.IAsyncStateMachine)typeof(System.Runtime.CompilerServices.IAsyncStateMachine).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
- __intp.Free(ptr_of_this_method);
|
|
|
+ ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
|
|
|
+ ETModel.ETTask.Awaiter @awaiter = (ETModel.ETTask.Awaiter)typeof(ETModel.ETTask.Awaiter).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
+
|
|
|
+ ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
|
|
|
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));
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
+
|
|
|
+ instance_of_this_method.AwaitUnsafeOnCompleted<ETModel.ETTask.Awaiter, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
|
|
|
|
|
|
- instance_of_this_method.SetStateMachine(@stateMachine);
|
|
|
+ ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
+ switch(ptr_of_this_method->ObjectType)
|
|
|
+ {
|
|
|
+ case ObjectTypes.StackObjectReference:
|
|
|
+ {
|
|
|
+ var ___dst = *(StackObject**)&ptr_of_this_method->Value;
|
|
|
+ object ___obj = @stateMachine;
|
|
|
+ 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] = @stateMachine;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var ___type = __domain.GetType(___obj.GetType()) as CLRType;
|
|
|
+ ___type.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, @stateMachine);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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] = @stateMachine;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ((CLRType)___type).SetStaticFieldValue(ptr_of_this_method->ValueLow, @stateMachine);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case ObjectTypes.ArrayReference:
|
|
|
+ {
|
|
|
+ var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor[];
|
|
|
+ instance_of_arrayReference[ptr_of_this_method->ValueLow] = @stateMachine;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
|
|
|
+ __intp.Free(ptr_of_this_method);
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
|
|
|
+ switch(ptr_of_this_method->ObjectType)
|
|
|
+ {
|
|
|
+ case ObjectTypes.StackObjectReference:
|
|
|
+ {
|
|
|
+ var ___dst = *(StackObject**)&ptr_of_this_method->Value;
|
|
|
+ object ___obj = @awaiter;
|
|
|
+ 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] = @awaiter;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var ___type = __domain.GetType(___obj.GetType()) as CLRType;
|
|
|
+ ___type.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, @awaiter);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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] = @awaiter;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ((CLRType)___type).SetStaticFieldValue(ptr_of_this_method->ValueLow, @awaiter);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case ObjectTypes.ArrayReference:
|
|
|
+ {
|
|
|
+ var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ETModel.ETTask.Awaiter[];
|
|
|
+ instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ __intp.Free(ptr_of_this_method);
|
|
|
+ ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
|
|
|
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<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
+ static StackObject* AwaitUnsafeOnCompleted_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
|
|
|
{
|
|
|
ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
|
|
|
StackObject* ptr_of_this_method;
|
|
|
@@ -440,13 +585,13 @@ namespace ILRuntime.Runtime.Generated
|
|
|
ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor @stateMachine = (ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor)typeof(ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
|
|
|
- System.Runtime.CompilerServices.TaskAwaiter<ETModel.IResponse> @awaiter = (System.Runtime.CompilerServices.TaskAwaiter<ETModel.IResponse>)typeof(System.Runtime.CompilerServices.TaskAwaiter<ETModel.IResponse>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
+ ETModel.ETTask<ETModel.IResponse>.Awaiter @awaiter = (ETModel.ETTask<ETModel.IResponse>.Awaiter)typeof(ETModel.ETTask<ETModel.IResponse>.Awaiter).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
|
|
|
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));
|
|
|
+ ETModel.AsyncETVoidMethodBuilder instance_of_this_method = (ETModel.AsyncETVoidMethodBuilder)typeof(ETModel.AsyncETVoidMethodBuilder).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
|
|
|
|
|
|
- instance_of_this_method.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<ETModel.IResponse>, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
|
|
|
+ instance_of_this_method.AwaitUnsafeOnCompleted<ETModel.ETTask<ETModel.IResponse>.Awaiter, ETModel.IAsyncStateMachineClassInheritanceAdaptor.IAsyncStateMachineAdaptor>(ref @awaiter, ref @stateMachine);
|
|
|
|
|
|
ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
|
|
|
switch(ptr_of_this_method->ObjectType)
|
|
|
@@ -551,7 +696,7 @@ namespace ILRuntime.Runtime.Generated
|
|
|
break;
|
|
|
case ObjectTypes.ArrayReference:
|
|
|
{
|
|
|
- var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Runtime.CompilerServices.TaskAwaiter<ETModel.IResponse>[];
|
|
|
+ var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ETModel.ETTask<ETModel.IResponse>.Awaiter[];
|
|
|
instance_of_arrayReference[ptr_of_this_method->ValueLow] = @awaiter;
|
|
|
}
|
|
|
break;
|