terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
UnitySynchronizationContext.cs
Go to the documentation of this file.
1using System;
7
8namespace UnityEngine
9{
10 // Token: 0x020000C5 RID: 197
12 {
13 // Token: 0x0600036F RID: 879 RVA: 0x00006FD0 File Offset: 0x000051D0
18
19 // Token: 0x06000370 RID: 880 RVA: 0x00006FEC File Offset: 0x000051EC
25
26 // Token: 0x06000371 RID: 881 RVA: 0x000021B3 File Offset: 0x000003B3
27 public override void Send(SendOrPostCallback callback, object state)
28 {
29 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
30 }
31
32 // Token: 0x06000372 RID: 882 RVA: 0x00007010 File Offset: 0x00005210
33 public override void OperationStarted()
34 {
35 }
36
37 // Token: 0x06000373 RID: 883 RVA: 0x00007020 File Offset: 0x00005220
38 public override void OperationCompleted()
39 {
40 }
41
42 // Token: 0x06000374 RID: 884 RVA: 0x000021B3 File Offset: 0x000003B3
43 public override void Post(SendOrPostCallback callback, object state)
44 {
45 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
46 }
47
48 // Token: 0x06000375 RID: 885 RVA: 0x00007030 File Offset: 0x00005230
50 {
51 /*
52An exception occurred when decompiling this method (06000375)
53
54ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Threading.SynchronizationContext UnityEngine.UnitySynchronizationContext::CreateCopy()
55
56 ---> System.Exception: Basic block has to end with unconditional control flow.
57{
58 Block_0:
59 stloc:class [mscorlib]System.Collections.Generic.List`1<valuetype UnityEngine.UnitySynchronizationContext/WorkRequest>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.List`1<valuetype UnityEngine.UnitySynchronizationContext/WorkRequest>(UnitySynchronizationContext::m_AsyncWorkQueue, ldloc:UnitySynchronizationContext(this)))
60 stloc:int32(var_1_0D, ldfld:int32(UnitySynchronizationContext::m_MainThreadID, ldloc:UnitySynchronizationContext(this)))
61}
62
63 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
64 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
65 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
66 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
67 --- End of inner exception stack trace ---
68 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
69 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
70*/;
71 }
72
73 // Token: 0x06000376 RID: 886 RVA: 0x000021B3 File Offset: 0x000003B3
74 private void Exec()
75 {
76 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
77 }
78
79 // Token: 0x06000377 RID: 887 RVA: 0x0000704C File Offset: 0x0000524C
80 private bool HasPendingTasks()
81 {
82 if (this.m_AsyncWorkQueue._size != 0)
83 {
84 return true;
85 }
87 return true;
88 }
89
90 // Token: 0x06000378 RID: 888 RVA: 0x00007070 File Offset: 0x00005270
93 {
94 int managedThreadId = Thread.CurrentThread.ManagedThreadId;
95 }
96
97 // Token: 0x06000379 RID: 889 RVA: 0x0000708C File Offset: 0x0000528C
99 private static void ExecuteTasks()
100 {
102 {
103 }
104 }
105
106 // Token: 0x0600037A RID: 890 RVA: 0x000070A4 File Offset: 0x000052A4
108 private static bool ExecutePendingTasks(long millisecondsTimeout)
109 {
111 {
112 Thread.Sleep(1);
113 return true;
114 }
115 return true;
116 }
117
118 // Token: 0x04000376 RID: 886
120
121 // Token: 0x04000377 RID: 887
123
124 // Token: 0x04000378 RID: 888
126
127 // Token: 0x04000379 RID: 889
128 private int m_TrackedCount;
129
130 // Token: 0x020000C6 RID: 198
131 private struct WorkRequest
132 {
133 // Token: 0x0600037B RID: 891 RVA: 0x000070C8 File Offset: 0x000052C8
134 public WorkRequest(SendOrPostCallback callback, object state, [Optional] ManualResetEvent waitHandle)
135 {
136 this.m_DelagateCallback = callback;
138 this.m_WaitHandle = waitHandle;
139 }
140
141 // Token: 0x0600037C RID: 892 RVA: 0x000070EC File Offset: 0x000052EC
142 public void Invoke()
143 {
145 object delagateState = this.m_DelagateState;
146 IntPtr method_code = delagateCallback.method_code;
147 IntPtr invoke_impl = delagateCallback.invoke_impl;
148 IntPtr method = delagateCallback.method;
149 long num = 0L;
150 ManualResetEvent waitHandle = this.m_WaitHandle;
151 if (waitHandle != null)
152 {
153 bool flag = waitHandle.Set();
154 }
155 if (num == 0L)
156 {
157 return;
158 }
159 throw new OutOfMemoryException();
160 }
161
162 // Token: 0x0400037A RID: 890
164
165 // Token: 0x0400037B RID: 891
166 private readonly object m_DelagateState;
167
168 // Token: 0x0400037C RID: 892
170 }
171 }
172}
class f__AnonymousType0<< Count > j__TPar
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:207
static Thread CurrentThread
Definition Thread.cs:381
override void Send(SendOrPostCallback callback, object state)
static bool ExecutePendingTasks(long millisecondsTimeout)
UnitySynchronizationContext(List< UnitySynchronizationContext.WorkRequest > queue, int mainThreadID)
readonly List< UnitySynchronizationContext.WorkRequest > m_CurrentFrameWork
readonly List< UnitySynchronizationContext.WorkRequest > m_AsyncWorkQueue
override void Post(SendOrPostCallback callback, object state)
WorkRequest(SendOrPostCallback callback, object state, [Optional] ManualResetEvent waitHandle)