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
DecoderNLS.cs
Go to the documentation of this file.
1using System;
4
5namespace System.Text
6{
7 // Token: 0x02000266 RID: 614
8 internal class DecoderNLS : Decoder
9 {
10 // Token: 0x060014B1 RID: 5297 RVA: 0x0002B4B8 File Offset: 0x000296B8
11 internal DecoderNLS(Encoding encoding)
12 {
13 this._encoding = encoding;
14 DecoderFallback decoderFallback = encoding.decoderFallback;
15 this._fallback = decoderFallback;
16 }
17
18 // Token: 0x060014B2 RID: 5298 RVA: 0x0002B4E0 File Offset: 0x000296E0
19 public override void Reset()
20 {
21 if (this._fallbackBuffer != null)
22 {
23 return;
24 }
25 }
26
27 // Token: 0x060014B3 RID: 5299 RVA: 0x0000207A File Offset: 0x0000027A
28 public override int GetCharCount(byte[] bytes, int index, int count)
29 {
30 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
31 }
32
33 // Token: 0x060014B4 RID: 5300 RVA: 0x0002B4F8 File Offset: 0x000296F8
34 public override int GetCharCount(byte[] bytes, int index, int count, bool flush)
35 {
36 /*
37An exception occurred when decompiling this method (060014B4)
38
39ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Text.DecoderNLS::GetCharCount(System.Byte[],System.Int32,System.Int32,System.Boolean)
40
41 ---> System.Exception: Basic block has to end with unconditional control flow.
42{
43 Block_0:
44 stloc:!0(var_2_0B, call:!!0[exp:!0](MemoryMarshal::GetReference, ldloc:Span`1(var_1)))
45}
46
47 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
48 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
49 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
50 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
51 --- End of inner exception stack trace ---
52 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
53 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
54*/;
55 }
56
57 // Token: 0x060014B5 RID: 5301 RVA: 0x0002B510 File Offset: 0x00029710
58 public unsafe override int GetCharCount(byte* bytes, int count, bool flush)
59 {
60 /*
61An exception occurred when decompiling this method (060014B5)
62
63ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Text.DecoderNLS::GetCharCount(System.Byte*,System.Int32,System.Boolean)
64
65 ---> System.Exception: Basic block has to end with unconditional control flow.
66{
67 Block_0:
68 stloc:Encoding(var_0_09, ldfld:Encoding(DecoderNLS::_encoding, ldloc:DecoderNLS(this)))
69 stfld:bool(DecoderNLS::_throwOnOverflow, ldloc:DecoderNLS(this), ldc.i4:bool(1))
70}
71
72 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
73 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
74 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
75 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
76 --- End of inner exception stack trace ---
77 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
78 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
79*/;
80 }
81
82 // Token: 0x060014B6 RID: 5302 RVA: 0x0000207A File Offset: 0x0000027A
83 public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
84 {
85 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
86 }
87
88 // Token: 0x060014B7 RID: 5303 RVA: 0x0002B530 File Offset: 0x00029730
89 public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush)
90 {
91 if (chars != null && bytes != null)
92 {
93 Span span;
94 !0 reference = MemoryMarshal.GetReference(span);
95 }
96 return "Index was out of range. Must be non-negative and less than the size of the collection.";
97 }
98
99 // Token: 0x060014B8 RID: 5304 RVA: 0x0002B554 File Offset: 0x00029754
100 public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount, bool flush)
101 {
102 /*
103An exception occurred when decompiling this method (060014B8)
104
105ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Text.DecoderNLS::GetChars(System.Byte*,System.Int32,System.Char*,System.Int32,System.Boolean)
106
107 ---> System.Exception: Basic block has to end with unconditional control flow.
108{
109 Block_1:
110 stloc:Encoding(var_0_0C, ldfld:Encoding(DecoderNLS::_encoding, ldloc:DecoderNLS(this)))
111 stfld:bool(DecoderNLS::_throwOnOverflow, ldloc:DecoderNLS(this), ldc.i4:bool(1))
112}
113
114 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
115 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
116 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
117 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
118 --- End of inner exception stack trace ---
119 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
120 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
121*/;
122 }
123
124 // Token: 0x060014B9 RID: 5305 RVA: 0x0002B574 File Offset: 0x00029774
125 public override void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, [Out] int bytesUsed, [Out] int charsUsed, [Out] bool completed)
126 {
127 if (chars != null && bytes != null)
128 {
129 Span span;
130 !0 reference = MemoryMarshal.GetReference(span);
131 return;
132 }
133 }
134
135 // Token: 0x060014BA RID: 5306 RVA: 0x0002B594 File Offset: 0x00029794
136 public unsafe override void Convert(byte* bytes, int byteCount, char* chars, int charCount, bool flush, [Out] int bytesUsed, [Out] int charsUsed, [Out] bool completed)
137 {
138 if (bytes != null && chars != null)
139 {
140 Encoding encoding = this._encoding;
141 charsUsed.m_value = encoding;
142 int bytesUsed2 = this._bytesUsed;
144 return;
145 }
146 }
147
148 // Token: 0x1700020B RID: 523
149 // (get) Token: 0x060014BB RID: 5307 RVA: 0x0002B5D0 File Offset: 0x000297D0
150 public bool MustFlush
151 {
152 get
153 {
154 return this._mustFlush;
155 }
156 }
157
158 // Token: 0x1700020C RID: 524
159 // (get) Token: 0x060014BC RID: 5308 RVA: 0x0002B5E4 File Offset: 0x000297E4
160 internal virtual bool HasState
161 {
162 get
163 {
164 }
165 }
166
167 // Token: 0x060014BD RID: 5309 RVA: 0x0002B5F4 File Offset: 0x000297F4
168 internal void ClearMustFlush()
169 {
170 }
171
172 // Token: 0x04000AF4 RID: 2804
174
175 // Token: 0x04000AF5 RID: 2805
176 private bool _mustFlush;
177
178 // Token: 0x04000AF6 RID: 2806
179 internal bool _throwOnOverflow;
180
181 // Token: 0x04000AF7 RID: 2807
182 internal int _bytesUsed;
183 }
184}
class f__AnonymousType0<< Count > j__TPar
override void Reset()
Definition DecoderNLS.cs:19
override int GetCharCount(byte[] bytes, int index, int count, bool flush)
Definition DecoderNLS.cs:34
unsafe override int GetCharCount(byte *bytes, int count, bool flush)
Definition DecoderNLS.cs:58
virtual bool HasState
override void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, [Out] int bytesUsed, [Out] int charsUsed, [Out] bool completed)
unsafe override void Convert(byte *bytes, int byteCount, char *chars, int charCount, bool flush, [Out] int bytesUsed, [Out] int charsUsed, [Out] bool completed)
override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
Definition DecoderNLS.cs:83
override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush)
Definition DecoderNLS.cs:89
DecoderNLS(Encoding encoding)
Definition DecoderNLS.cs:11
override int GetCharCount(byte[] bytes, int index, int count)
Definition DecoderNLS.cs:28
unsafe override int GetChars(byte *bytes, int byteCount, char *chars, int charCount, bool flush)
DecoderFallbackBuffer _fallbackBuffer
Definition Decoder.cs:189
DecoderFallback decoderFallback
Definition Encoding.cs:1033