Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/coreclr/tools/Common/TypeSystem/IL/ILDisassembler.cs')
-rw-r--r--src/coreclr/tools/Common/TypeSystem/IL/ILDisassembler.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/coreclr/tools/Common/TypeSystem/IL/ILDisassembler.cs b/src/coreclr/tools/Common/TypeSystem/IL/ILDisassembler.cs
index f11ed8cf5db..864850ecc9c 100644
--- a/src/coreclr/tools/Common/TypeSystem/IL/ILDisassembler.cs
+++ b/src/coreclr/tools/Common/TypeSystem/IL/ILDisassembler.cs
@@ -143,7 +143,7 @@ namespace Internal.IL
sb.Append(field.Name);
}
- private void AppendStringLiteral(StringBuilder sb, string s)
+ private static void AppendStringLiteral(StringBuilder sb, string s)
{
sb.Append('"');
for (int i = 0; i < s.Length; i++)
@@ -187,20 +187,21 @@ namespace Internal.IL
return _ilBytes[_currentOffset++];
}
- private UInt16 ReadILUInt16()
+ private ushort ReadILUInt16()
{
- UInt16 val = (UInt16)(_ilBytes[_currentOffset] + (_ilBytes[_currentOffset + 1] << 8));
+ ushort val = (ushort)(_ilBytes[_currentOffset] + (_ilBytes[_currentOffset + 1] << 8));
_currentOffset += 2;
return val;
}
- private UInt32 ReadILUInt32()
+ private uint ReadILUInt32()
{
- UInt32 val = (UInt32)(_ilBytes[_currentOffset] + (_ilBytes[_currentOffset + 1] << 8) + (_ilBytes[_currentOffset + 2] << 16) + (_ilBytes[_currentOffset + 3] << 24));
+ uint val = (uint)(_ilBytes[_currentOffset] + (_ilBytes[_currentOffset + 1] << 8) + (_ilBytes[_currentOffset + 2] << 16) + (_ilBytes[_currentOffset + 3] << 24));
_currentOffset += 4;
return val;
}
+
private int ReadILToken()
{
return (int)ReadILUInt32();
@@ -418,7 +419,7 @@ namespace Internal.IL
int delta = (int)ReadILUInt32();
AppendOffset(decodedInstruction, jmpBase + delta);
}
- decodedInstruction.Append(")");
+ decodedInstruction.Append(')');
return decodedInstruction.ToString();
}
@@ -493,7 +494,7 @@ namespace Internal.IL
public override void AppendName(StringBuilder sb, SignatureTypeVariable type)
{
- sb.Append("!");
+ sb.Append('!');
sb.Append(type.Index.ToStringInvariant());
}
@@ -514,7 +515,7 @@ namespace Internal.IL
if (i > 0)
sb.Append(", ");
AppendNameWithValueClassPrefix(sb, type.Instantiation[i]);
- }
+ }
sb.Append('>');
}