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
ObjectIDGenerator.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x020003DB RID: 987
8 [ComVisible(true)]
10 public class ObjectIDGenerator
11 {
12 // Token: 0x06001F1B RID: 7963 RVA: 0x00043F50 File Offset: 0x00042150
14 {
16 if (!true)
17 {
18 }
20 int currentSize = this.m_currentSize;
21 }
22
23 // Token: 0x06001F1C RID: 7964 RVA: 0x00043F80 File Offset: 0x00042180
24 private int FindElement(object obj, [Out] bool found)
25 {
26 int hashCode = RuntimeHelpers.GetHashCode(obj);
27 int currentSize = this.m_currentSize;
28 object[] objs = this.m_objs;
29 return hashCode;
30 }
31
32 // Token: 0x06001F1D RID: 7965 RVA: 0x00043FB8 File Offset: 0x000421B8
33 public virtual long GetId(object obj, [Out] bool firstTime)
34 {
35 if (obj != null)
36 {
37 int num = this.FindElement(obj, firstTime);
38 long[] ids = this.m_ids;
39 object[] objs = this.m_objs;
40 if (obj == null)
41 {
42 goto IL_0046;
43 }
44 long[] ids2 = this.m_ids;
45 int currentSize = this.m_currentSize;
46 this.Rehash();
47 firstTime.m_value = currentSize != 0;
48 }
49 string resourceString = Environment.GetResourceString("Object cannot be null.");
50 IL_0046:
52 }
53
54 // Token: 0x06001F1E RID: 7966 RVA: 0x00044010 File Offset: 0x00042210
55 public virtual long HasId(object obj, [Out] bool firstTime)
56 {
57 /*
58An exception occurred when decompiling this method (06001F1E)
59
60ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 System.Runtime.Serialization.ObjectIDGenerator::HasId(System.Object,System.Boolean)
61
62 ---> System.Exception: Basic block has to end with unconditional control flow.
63{
64 IL_0020:
65 stloc:string(var_4_2A, call:string(Environment::GetResourceString, ldstr:string("Object cannot be null.")))
66}
67
68 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
69 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
70 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
71 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
72 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
73 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
74 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
75 --- End of inner exception stack trace ---
76 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
77 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
78*/;
79 }
80
81 // Token: 0x06001F1F RID: 7967 RVA: 0x00044048 File Offset: 0x00042248
82 private void Rehash()
83 {
84 int num = 1;
85 int currentSize = this.m_currentSize;
86 if (num == 0)
87 {
88 }
89 }
90
91 // Token: 0x06001F20 RID: 7968 RVA: 0x000440A0 File Offset: 0x000422A0
92 // Note: this type is marked as 'beforefieldinit'.
94 {
95 }
96
97 // Token: 0x04000F95 RID: 3989
98 internal int m_currentCount;
99
100 // Token: 0x04000F96 RID: 3990
101 internal int m_currentSize;
102
103 // Token: 0x04000F97 RID: 3991
104 internal long[] m_ids;
105
106 // Token: 0x04000F98 RID: 3992
107 internal object[] m_objs;
108
109 // Token: 0x04000F99 RID: 3993
110 private static readonly int[] sizes;
111 }
112}
class f__AnonymousType0<< Count > j__TPar
static string GetResourceString(string key)
int FindElement(object obj, [Out] bool found)
virtual long GetId(object obj, [Out] bool firstTime)
virtual long HasId(object obj, [Out] bool firstTime)