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
ValueStringBuilder.cs
Go to the documentation of this file.
1using System;
3
4namespace System.Text
5{
6 // Token: 0x02000287 RID: 647
7 [Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
8 internal ref struct ValueStringBuilder
9 {
10 // Token: 0x0600161E RID: 5662 RVA: 0x0002E814 File Offset: 0x0002CA14
15
16 // Token: 0x17000233 RID: 563
17 // (get) Token: 0x0600161F RID: 5663 RVA: 0x0002E828 File Offset: 0x0002CA28
18 public int Length
19 {
20 get
21 {
22 return this._pos;
23 }
24 }
25
26 // Token: 0x17000234 RID: 564
27 public char this[int index]
28 {
29 get
30 {
31 /*
32An exception occurred when decompiling this method (06001620)
33
34ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Char System.Text.ValueStringBuilder::get_Item(System.Int32)
35
36 ---> System.Exception: Basic block has to end with unconditional control flow.
37{
38 Block_0:
39 stloc:valuetype System.Span`1<char>(var_0_06, ldfld:valuetype System.Span`1<char>(ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this)))
40}
41
42 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
43 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
44 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
45 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
46 --- End of inner exception stack trace ---
47 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
48 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
49*/;
50 }
51 }
52
53 // Token: 0x06001621 RID: 5665 RVA: 0x0002E850 File Offset: 0x0002CA50
54 public override string ToString()
55 {
56 int pos = this._pos;
57 int length = this._chars._length;
59 Span<char> chars = this._chars;
60 string text;
61 return text;
62 }
63
64 // Token: 0x06001622 RID: 5666 RVA: 0x0002E884 File Offset: 0x0002CA84
66 {
67 int pos = this._pos;
68 int length = this._chars._length;
70 Span<char> chars = this._chars;
71 int pos2 = this._pos;
72 return true;
73 }
74
75 // Token: 0x06001623 RID: 5667 RVA: 0x0002E8C0 File Offset: 0x0002CAC0
76 public void Append(char c)
77 {
78 int length = this._chars._length;
80 }
81
82 // Token: 0x06001624 RID: 5668 RVA: 0x0002E8F0 File Offset: 0x0002CAF0
83 public void Append(string s)
84 {
85 int stringLength = s._stringLength;
86 int length = this._chars._length;
87 Span<char> chars = this._chars;
88 long num = 0L;
89 char c = s[(int)num];
92 }
93
94 // Token: 0x06001625 RID: 5669 RVA: 0x0002E93C File Offset: 0x0002CB3C
95 private void AppendSlow(string s)
96 {
97 int length = this._chars._length;
98 int stringLength = s._stringLength;
99 this.Grow(stringLength);
100 char rawStringData = s.GetRawStringData();
101 int stringLength2 = s._stringLength;
102 int length2 = this._chars._length;
104 int length3 = this._chars._length;
105 Span<char> chars = this._chars;
106 int pos = this._pos;
107 int stringLength3 = s._stringLength;
108 this._pos = pos;
109 }
110
111 // Token: 0x06001626 RID: 5670 RVA: 0x0002E9B4 File Offset: 0x0002CBB4
112 public void Append(char c, int count)
113 {
114 int length = this._chars._length;
115 int pos = this._pos;
116 this.Grow(count);
117 int pos2 = this._pos;
118 int length2 = this._chars._length;
120 Span<char> chars = this._chars;
121 int pos3 = this._pos;
122 this._pos = pos3;
123 }
124
125 // Token: 0x06001627 RID: 5671 RVA: 0x0002EA10 File Offset: 0x0002CC10
126 public unsafe void Append(char* value, int length)
127 {
128 int length2 = this._chars._length;
129 int pos = this._pos;
130 this.Grow(length);
131 int pos2 = this._pos;
132 int length3 = this._chars._length;
134 Span<char> chars = this._chars;
135 int pos3 = this._pos;
136 this._pos = pos3;
137 }
138
139 // Token: 0x06001628 RID: 5672 RVA: 0x0002EA6C File Offset: 0x0002CC6C
141 {
142 /*
143An exception occurred when decompiling this method (06001628)
144
145ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Span`1<System.Char> System.Text.ValueStringBuilder::AppendSpan(System.Int32)
146
147 ---> System.Exception: Basic block has to end with unconditional control flow.
148{
149 Block_0:
150 stloc:int32(var_0_0B, ldfld:int32(Span`1::_length, ldfld:valuetype System.Span`1<char>[exp:valuetype System.Span`1&](ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this))))
151 call:void(ValueStringBuilder::Grow, ldloc:valuetype System.Text.ValueStringBuilder&(this), ldloc:int32(length))
152 stloc:int32(var_1_1E, ldfld:int32(Span`1::_length, ldfld:valuetype System.Span`1<char>[exp:valuetype System.Span`1&](ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this))))
153 call:void(ThrowHelper::ThrowArgumentOutOfRangeException)
154 stloc:valuetype System.Span`1<char>(var_3_2C, ldfld:valuetype System.Span`1<char>(ValueStringBuilder::_chars, ldloc:valuetype System.Text.ValueStringBuilder&(this)))
155}
156
157 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
158 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
159 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
160 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
161 --- End of inner exception stack trace ---
162 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
163 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
164*/;
165 }
166
167 // Token: 0x06001629 RID: 5673 RVA: 0x0002EAA8 File Offset: 0x0002CCA8
168 private void GrowAndAppend(char c)
169 {
170 int num = 1;
171 this.Grow(num);
172 int length = this._chars._length;
173 Span<char> chars = this._chars;
174 }
175
176 // Token: 0x0600162A RID: 5674 RVA: 0x0002EAD4 File Offset: 0x0002CCD4
178 {
179 int num = 1;
180 if (num == 0)
181 {
182 }
183 if (num == 0)
184 {
185 }
186 int pos = this._pos;
187 int length = this._chars._length;
188 if (num == 0)
189 {
190 }
192 }
193
194 // Token: 0x0600162B RID: 5675 RVA: 0x0002EB08 File Offset: 0x0002CD08
195 public void Dispose()
196 {
197 }
198
199 // Token: 0x04000B58 RID: 2904
200 private char[] _arrayToReturnToPool;
201
202 // Token: 0x04000B59 RID: 2905
204
205 // Token: 0x04000B5A RID: 2906
206 private int _pos;
207 }
208}
class f__AnonymousType0<< Count > j__TPar
static byte Max(byte val1, byte val2)
Definition Math.cs:111
static void ThrowArgumentOutOfRangeException()
readonly int _length
Definition Span.cs:240
bool TryCopyTo(Span< char > destination, [Out] int charsWritten)
ValueStringBuilder(Span< char > initialBuffer)
unsafe void Append(char *value, int length)
void Grow(int requiredAdditionalCapacity)
Span< char > AppendSpan(int length)