mirror of https://github.com/icsharpcode/ILSpy.git
207 changed files with 28753 additions and 3600 deletions
@ -0,0 +1,186 @@
@@ -0,0 +1,186 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.ComponentModel.DataAnnotations; |
||||
using System.IO; |
||||
using System.Linq; |
||||
using McMaster.Extensions.CommandLineUtils; |
||||
using ICSharpCode.Decompiler.CSharp; |
||||
using ICSharpCode.Decompiler.TypeSystem; |
||||
using ICSharpCode.Decompiler.Metadata; |
||||
using ICSharpCode.Decompiler.Disassembler; |
||||
using System.Threading; |
||||
using System.Reflection.Metadata; |
||||
using System.Reflection.PortableExecutable; |
||||
using ICSharpCode.Decompiler.DebugInfo; |
||||
// ReSharper disable All
|
||||
|
||||
namespace ICSharpCode.Decompiler.Console |
||||
{ |
||||
[Command(Name = "ilspycmd", Description = "dotnet tool for decompiling .NET assemblies and generating portable PDBs", |
||||
ExtendedHelpText = @"
|
||||
Remarks: |
||||
-o is valid with every option and required when using -p. |
||||
")]
|
||||
[HelpOption("-h|--help")] |
||||
[ProjectOptionRequiresOutputDirectoryValidationAttribute] |
||||
class ILSpyCmdProgram |
||||
{ |
||||
public static int Main(string[] args) => CommandLineApplication.Execute<ILSpyCmdProgram>(args); |
||||
|
||||
[FileExists] |
||||
[Required] |
||||
[Argument(0, "Assembly file name", "The assembly that is being decompiled. This argument is mandatory.")] |
||||
public string InputAssemblyName { get; } |
||||
|
||||
[DirectoryExists] |
||||
[Option("-o|--outputdir <directory>", "The output directory, if omitted decompiler output is written to standard out.", CommandOptionType.SingleValue)] |
||||
public string OutputDirectory { get; } |
||||
|
||||
[Option("-p|--project", "Decompile assembly as compilable project. This requires the output directory option.", CommandOptionType.NoValue)] |
||||
public bool CreateCompilableProjectFlag { get; } |
||||
|
||||
[Option("-t|--type <type-name>", "The fully qualified name of the type to decompile.", CommandOptionType.SingleValue)] |
||||
public string TypeName { get; } |
||||
|
||||
[Option("-il|--ilcode", "Show IL code.", CommandOptionType.NoValue)] |
||||
public bool ShowILCodeFlag { get; } |
||||
|
||||
[Option("-d|--debuginfo", "Generate PDB.", CommandOptionType.NoValue)] |
||||
public bool CreteDebugInfoFlag { get; } |
||||
|
||||
[Option("-l|--list <entity-type(s)>", "Lists all entities of the specified type(s). Valid types: c(lass), i(interface), s(truct), d(elegate), e(num)", CommandOptionType.MultipleValue)] |
||||
public string[] EntityTypes { get; } = new string[0]; |
||||
|
||||
[Option("-v|--version", "Show version of ICSharpCode.Decompiler used.", CommandOptionType.NoValue)] |
||||
public bool ShowVersion { get; } |
||||
|
||||
private int OnExecute(CommandLineApplication app) |
||||
{ |
||||
TextWriter output = System.Console.Out; |
||||
bool outputDirectorySpecified = !String.IsNullOrEmpty(OutputDirectory); |
||||
|
||||
try { |
||||
if (CreateCompilableProjectFlag) { |
||||
DecompileAsProject(InputAssemblyName, OutputDirectory); |
||||
} else if (EntityTypes.Any()) { |
||||
var values = EntityTypes.SelectMany(v => v.Split(',', ';')).ToArray(); |
||||
HashSet<TypeKind> kinds = TypesParser.ParseSelection(values); |
||||
if (outputDirectorySpecified) { |
||||
string outputName = Path.GetFileNameWithoutExtension(InputAssemblyName); |
||||
output = File.CreateText(Path.Combine(OutputDirectory, outputName) + ".list.txt"); |
||||
} |
||||
|
||||
ListContent(InputAssemblyName, output, kinds); |
||||
} else if (ShowILCodeFlag) { |
||||
if (outputDirectorySpecified) { |
||||
string outputName = Path.GetFileNameWithoutExtension(InputAssemblyName); |
||||
output = File.CreateText(Path.Combine(OutputDirectory, outputName) + ".il"); |
||||
} |
||||
|
||||
ShowIL(InputAssemblyName, output); |
||||
} else if (CreteDebugInfoFlag) { |
||||
string pdbFileName = null; |
||||
if (outputDirectorySpecified) { |
||||
string outputName = Path.GetFileNameWithoutExtension(InputAssemblyName); |
||||
pdbFileName = Path.Combine(OutputDirectory, outputName) + ".pdb"; |
||||
} else { |
||||
pdbFileName = Path.ChangeExtension(InputAssemblyName, ".pdb"); |
||||
} |
||||
|
||||
return GeneratePdbForAssembly(InputAssemblyName, pdbFileName, app); |
||||
} else if (ShowVersion) { |
||||
string vInfo = "ilspycmd: " + typeof(ILSpyCmdProgram).Assembly.GetName().Version.ToString() + |
||||
Environment.NewLine |
||||
+ "ICSharpCode.Decompiler: " + |
||||
typeof(FullTypeName).Assembly.GetName().Version.ToString(); |
||||
output.WriteLine(vInfo); |
||||
} else { |
||||
if (outputDirectorySpecified) { |
||||
string outputName = Path.GetFileNameWithoutExtension(InputAssemblyName); |
||||
output = File.CreateText(Path.Combine(OutputDirectory, |
||||
(String.IsNullOrEmpty(TypeName) ? outputName : TypeName) + ".decompiled.cs")); |
||||
} |
||||
|
||||
Decompile(InputAssemblyName, output, TypeName); |
||||
} |
||||
} catch (Exception ex) { |
||||
app.Error.WriteLine(ex.ToString()); |
||||
return ProgramExitCodes.EX_SOFTWARE; |
||||
} finally { |
||||
output.Close(); |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
||||
static CSharpDecompiler GetDecompiler(string assemblyFileName) |
||||
{ |
||||
return new CSharpDecompiler(assemblyFileName, new DecompilerSettings() { ThrowOnAssemblyResolveErrors = false }); |
||||
} |
||||
|
||||
static void ListContent(string assemblyFileName, TextWriter output, ISet<TypeKind> kinds) |
||||
{ |
||||
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName); |
||||
|
||||
foreach (var type in decompiler.TypeSystem.MainModule.TypeDefinitions) { |
||||
if (!kinds.Contains(type.Kind)) |
||||
continue; |
||||
output.WriteLine($"{type.Kind} {type.FullName}"); |
||||
} |
||||
} |
||||
|
||||
static void ShowIL(string assemblyFileName, TextWriter output) |
||||
{ |
||||
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName); |
||||
ITextOutput textOutput = new PlainTextOutput(); |
||||
ReflectionDisassembler disassembler = new ReflectionDisassembler(textOutput, CancellationToken.None); |
||||
|
||||
disassembler.DisassembleNamespace(decompiler.TypeSystem.MainModule.RootNamespace.Name, |
||||
decompiler.TypeSystem.MainModule.PEFile, |
||||
decompiler.TypeSystem.MainModule.TypeDefinitions.Select(x => (TypeDefinitionHandle)x.MetadataToken)); |
||||
|
||||
output.WriteLine($"// IL code: {decompiler.TypeSystem.MainModule.AssemblyName}"); |
||||
output.WriteLine(textOutput.ToString()); |
||||
} |
||||
|
||||
static void DecompileAsProject(string assemblyFileName, string outputDirectory) |
||||
{ |
||||
WholeProjectDecompiler decompiler = new WholeProjectDecompiler(); |
||||
var module = new PEFile(assemblyFileName); |
||||
decompiler.AssemblyResolver = new UniversalAssemblyResolver(assemblyFileName, false, module.Reader.DetectTargetFrameworkId()); |
||||
decompiler.DecompileProject(module, outputDirectory); |
||||
} |
||||
|
||||
static void Decompile(string assemblyFileName, TextWriter output, string typeName = null) |
||||
{ |
||||
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName); |
||||
|
||||
if (typeName == null) { |
||||
output.Write(decompiler.DecompileWholeModuleAsString()); |
||||
} else { |
||||
var name = new FullTypeName(typeName); |
||||
output.Write(decompiler.DecompileTypeAsString(name)); |
||||
} |
||||
} |
||||
|
||||
static int GeneratePdbForAssembly(string assemblyFileName, string pdbFileName, CommandLineApplication app) |
||||
{ |
||||
var module = new PEFile(assemblyFileName, |
||||
new FileStream(assemblyFileName, FileMode.Open, FileAccess.Read), |
||||
PEStreamOptions.PrefetchEntireImage, |
||||
metadataOptions: MetadataReaderOptions.None); |
||||
|
||||
if (!PortablePdbWriter.HasCodeViewDebugDirectoryEntry(module)) { |
||||
app.Error.WriteLine($"Cannot create PDB file for {assemblyFileName}, because it does not contain a PE Debug Directory Entry of type 'CodeView'."); |
||||
return ProgramExitCodes.EX_DATAERR; |
||||
} |
||||
|
||||
using (FileStream stream = new FileStream(pdbFileName, FileMode.OpenOrCreate, FileAccess.Write)) { |
||||
var decompiler = GetDecompiler(assemblyFileName); |
||||
PortablePdbWriter.WritePdb(module, decompiler, new DecompilerSettings() { ThrowOnAssemblyResolveErrors = false }, stream); |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
} |
||||
} |
@ -1,21 +0,0 @@
@@ -1,21 +0,0 @@
|
||||
MIT License |
||||
|
||||
Copyright (c) 2017 Christoph Wille |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
@ -1,143 +0,0 @@
@@ -1,143 +0,0 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using System.Linq; |
||||
using McMaster.Extensions.CommandLineUtils; |
||||
using ICSharpCode.Decompiler.CSharp; |
||||
using ICSharpCode.Decompiler.TypeSystem; |
||||
using ICSharpCode.Decompiler.Metadata; |
||||
using ICSharpCode.Decompiler.Disassembler; |
||||
using System.Threading; |
||||
using System.Reflection.Metadata; |
||||
|
||||
namespace ICSharpCode.Decompiler.Console |
||||
{ |
||||
class Program |
||||
{ |
||||
static int Main(string[] args) |
||||
{ |
||||
// https://github.com/natemcmaster/CommandLineUtils/
|
||||
// Older cmd line clients (for options reference): https://github.com/aerror2/ILSpy-For-MacOSX and https://github.com/andreif/ILSpyMono
|
||||
var app = new CommandLineApplication(); |
||||
|
||||
app.LongVersionGetter = () => "ilspycmd " + typeof(FullTypeName).Assembly.GetName().Version.ToString(); |
||||
app.HelpOption("-h|--help"); |
||||
var inputAssemblyFileName = app.Argument("Assembly filename name", "The assembly that is being decompiled. This argument is mandatory."); |
||||
var projectOption = app.Option("-p|--project", "Decompile assembly as compilable project. This requires the output directory option.", CommandOptionType.NoValue); |
||||
var outputOption = app.Option("-o|--outputdir <directory>", "The output directory, if omitted decompiler output is written to standard out.", CommandOptionType.SingleValue); |
||||
var typeOption = app.Option("-t|--type <type-name>", "The fully qualified name of the type to decompile.", CommandOptionType.SingleValue); |
||||
var listOption = app.Option("-l|--list <entity-type(s)>", "Lists all entities of the specified type(s). Valid types: c(lass), i(interface), s(truct), d(elegate), e(num)", CommandOptionType.MultipleValue); |
||||
var ilViewerOption = app.Option("-il|--ilcode", "Show IL code.", CommandOptionType.NoValue); |
||||
app.ExtendedHelpText = Environment.NewLine + "-o is valid with every option and required when using -p."; |
||||
|
||||
app.ThrowOnUnexpectedArgument = false; // Ignore invalid arguments / options
|
||||
|
||||
app.OnExecute(() => { |
||||
// HACK : the CommandLineUtils package does not allow us to specify an argument as mandatory.
|
||||
// Therefore we're implementing it as simple as possible.
|
||||
if (inputAssemblyFileName.Value == null) { |
||||
app.ShowVersion(); |
||||
app.ShowHint(); |
||||
return -1; |
||||
} |
||||
if (!File.Exists(inputAssemblyFileName.Value)) { |
||||
app.Error.WriteLine($"ERROR: Input file not found."); |
||||
return -1; |
||||
} |
||||
if (!outputOption.HasValue() && projectOption.HasValue()) { |
||||
app.Error.WriteLine($"ERROR: Output directory not speciified."); |
||||
return -1; |
||||
} |
||||
if (outputOption.HasValue() && !Directory.Exists(outputOption.Value())) { |
||||
app.Error.WriteLine($"ERROR: Output directory '{outputOption.Value()}' does not exist."); |
||||
return -1; |
||||
} |
||||
TextWriter output = System.Console.Out; |
||||
try { |
||||
if (projectOption.HasValue()) { |
||||
DecompileAsProject(inputAssemblyFileName.Value, outputOption.Value()); |
||||
} else if (listOption.HasValue()) { |
||||
var values = listOption.Values.SelectMany(v => v.Split(',', ';')).ToArray(); |
||||
HashSet<TypeKind> kinds = TypesParser.ParseSelection(values); |
||||
if (outputOption.HasValue()) { |
||||
string directory = outputOption.Value(); |
||||
string outputName = Path.GetFileNameWithoutExtension(inputAssemblyFileName.Value); |
||||
output = File.CreateText(Path.Combine(directory, outputName) + ".list.txt"); |
||||
} |
||||
ListContent(inputAssemblyFileName.Value, output, kinds); |
||||
} else if (ilViewerOption.HasValue()) { |
||||
if (outputOption.HasValue()) { |
||||
string directory = outputOption.Value(); |
||||
string outputName = Path.GetFileNameWithoutExtension(inputAssemblyFileName.Value); |
||||
output = File.CreateText(Path.Combine(directory, outputName) + ".il"); |
||||
} |
||||
ShowIL(inputAssemblyFileName.Value, output); |
||||
} else { |
||||
if (outputOption.HasValue()) { |
||||
string directory = outputOption.Value(); |
||||
string outputName = Path.GetFileNameWithoutExtension(inputAssemblyFileName.Value); |
||||
output = File.CreateText(Path.Combine(directory, (typeOption.Value() ?? outputName) + ".decompiled.cs")); |
||||
} |
||||
Decompile(inputAssemblyFileName.Value, output, typeOption.Value()); |
||||
} |
||||
} finally { |
||||
output.Close(); |
||||
} |
||||
// do not use Console here!
|
||||
return 0; |
||||
}); |
||||
|
||||
return app.Execute(args); |
||||
} |
||||
|
||||
static CSharpDecompiler GetDecompiler(string assemblyFileName) |
||||
{ |
||||
return new CSharpDecompiler(assemblyFileName, new DecompilerSettings() { ThrowOnAssemblyResolveErrors = false }); |
||||
} |
||||
|
||||
static void ListContent(string assemblyFileName, TextWriter output, ISet<TypeKind> kinds) |
||||
{ |
||||
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName); |
||||
|
||||
foreach (var type in decompiler.TypeSystem.MainModule.TypeDefinitions) { |
||||
if (!kinds.Contains(type.Kind)) |
||||
continue; |
||||
output.WriteLine($"{type.Kind} {type.FullName}"); |
||||
} |
||||
} |
||||
|
||||
static void ShowIL(string assemblyFileName, TextWriter output) |
||||
{ |
||||
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName); |
||||
ITextOutput textOutput = new PlainTextOutput(); |
||||
ReflectionDisassembler disassembler = new ReflectionDisassembler(textOutput, CancellationToken.None); |
||||
|
||||
disassembler.DisassembleNamespace(decompiler.TypeSystem.MainModule.RootNamespace.Name, |
||||
decompiler.TypeSystem.MainModule.PEFile, |
||||
decompiler.TypeSystem.MainModule.TypeDefinitions.Select(x => (TypeDefinitionHandle)x.MetadataToken)); |
||||
|
||||
output.WriteLine($"// IL code: {decompiler.TypeSystem.MainModule.AssemblyName}"); |
||||
output.WriteLine(textOutput.ToString()); |
||||
} |
||||
|
||||
static void DecompileAsProject(string assemblyFileName, string outputDirectory) |
||||
{ |
||||
WholeProjectDecompiler decompiler = new WholeProjectDecompiler(); |
||||
var module = new PEFile(assemblyFileName); |
||||
decompiler.AssemblyResolver = new UniversalAssemblyResolver(assemblyFileName, false, module.Reader.DetectTargetFrameworkId()); |
||||
decompiler.DecompileProject(module, outputDirectory); |
||||
} |
||||
|
||||
static void Decompile(string assemblyFileName, TextWriter output, string typeName = null) |
||||
{ |
||||
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName); |
||||
|
||||
if (typeName == null) { |
||||
output.Write(decompiler.DecompileWholeModuleAsString()); |
||||
} else { |
||||
var name = new FullTypeName(typeName); |
||||
output.Write(decompiler.DecompileTypeAsString(name)); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace ICSharpCode.Decompiler.Console |
||||
{ |
||||
public class ProgramExitCodes |
||||
{ |
||||
// https://www.freebsd.org/cgi/man.cgi?query=sysexits
|
||||
public const int EX_USAGE = 64; |
||||
public const int EX_DATAERR = 65; |
||||
public const int EX_NOINPUT = 66; |
||||
public const int EX_SOFTWARE = 70; |
||||
} |
||||
} |
@ -1,3 +0,0 @@
@@ -1,3 +0,0 @@
|
||||
dotnet publish -c release -r win7-x64 |
||||
dotnet publish -c release -r osx-x64 |
||||
dotnet publish -c release -r linux-x64 |
Before Width: | Height: | Size: 200 KiB |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
using System; |
||||
using System.ComponentModel.DataAnnotations; |
||||
|
||||
namespace ICSharpCode.Decompiler.Console |
||||
{ |
||||
[AttributeUsage(AttributeTargets.Class)] |
||||
public class ProjectOptionRequiresOutputDirectoryValidationAttribute : ValidationAttribute |
||||
{ |
||||
protected override ValidationResult IsValid(object value, ValidationContext context) |
||||
{ |
||||
if (value is ILSpyCmdProgram obj) { |
||||
if (obj.CreateCompilableProjectFlag && String.IsNullOrEmpty(obj.OutputDirectory)) { |
||||
return new ValidationResult("--project cannot be used unless --outputdir is also specified"); |
||||
} |
||||
} |
||||
return ValidationResult.Success; |
||||
} |
||||
} |
||||
} |
@ -1,133 +0,0 @@
@@ -1,133 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.IO; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests |
||||
{ |
||||
static class CodeSampleFileParser |
||||
{ |
||||
public static IEnumerable<string> ListSections(string s) |
||||
{ |
||||
var query = from line in ToLines(s) |
||||
let sectionName = ReadSectionName(line) |
||||
where sectionName != null |
||||
select sectionName; |
||||
return query; |
||||
} |
||||
|
||||
public static string GetSection(string sectionName, string s) |
||||
{ |
||||
var lines = ToLines(s); |
||||
|
||||
bool sectionFound = false; |
||||
var sectionText = new StringBuilder(); |
||||
|
||||
Action<string> parser = null; |
||||
|
||||
Action<string> commonSectionReader = line => |
||||
{ |
||||
if (IsCommonSectionEnd(line)) |
||||
parser = null; |
||||
else |
||||
sectionText.AppendLine(line); |
||||
}; |
||||
|
||||
Action<string> namedSectionReader = line => |
||||
{ |
||||
string name = ReadSectionName(line); |
||||
if (name == null) |
||||
sectionText.AppendLine(line); |
||||
else if (name != sectionName) |
||||
parser = null; |
||||
}; |
||||
|
||||
Action<string> defaultReader = line => |
||||
{ |
||||
if (IsCommonSectionStart(line)) |
||||
parser = commonSectionReader; |
||||
else if (ReadSectionName(line) == sectionName) |
||||
{ |
||||
parser = namedSectionReader; |
||||
sectionFound = true; |
||||
} |
||||
}; |
||||
|
||||
foreach(var line in lines) |
||||
{ |
||||
(parser ?? defaultReader)(line); |
||||
} |
||||
|
||||
if (sectionFound) |
||||
return sectionText.ToString(); |
||||
else |
||||
return ""; |
||||
} |
||||
|
||||
public static bool IsCommentOrBlank(string s) |
||||
{ |
||||
if(String.IsNullOrWhiteSpace(s)) |
||||
return true; |
||||
s = s.Trim(); |
||||
return s.StartsWith("//") || s.StartsWith("#"); // Also ignore #pragmas for warning suppression
|
||||
} |
||||
|
||||
public static string ConcatLines(IEnumerable<string> lines) |
||||
{ |
||||
var buffer = new StringBuilder(); |
||||
foreach (var line in lines) |
||||
{ |
||||
buffer.AppendLine(line); |
||||
} |
||||
return buffer.ToString(); |
||||
} |
||||
|
||||
static string ReadSectionName(string line) |
||||
{ |
||||
line = line.TrimStart(); |
||||
if (line.StartsWith("//$$")) |
||||
return line.Substring(4).Trim(); |
||||
else |
||||
return null; |
||||
} |
||||
|
||||
static bool IsCommonSectionStart(string line) |
||||
{ |
||||
return line.Trim() == "//$CS"; |
||||
} |
||||
|
||||
static bool IsCommonSectionEnd(string line) |
||||
{ |
||||
return line.Trim() == "//$CE"; |
||||
} |
||||
|
||||
static IEnumerable<string> ToLines(string s) |
||||
{ |
||||
var reader = new StringReader(s); |
||||
string line; |
||||
while ((line = reader.ReadLine()) != null) |
||||
{ |
||||
yield return line; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,165 +0,0 @@
@@ -1,165 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
|
||||
public static class Generics |
||||
{ |
||||
public class MyArray<T> |
||||
{ |
||||
public class NestedClass<Y> |
||||
{ |
||||
public T Item1; |
||||
public Y Item2; |
||||
} |
||||
|
||||
public enum NestedEnum |
||||
{ |
||||
A, |
||||
B |
||||
} |
||||
|
||||
private T[] arr; |
||||
|
||||
public MyArray(int capacity) |
||||
{ |
||||
this.arr = new T[capacity]; |
||||
} |
||||
|
||||
public void Size(int capacity) |
||||
{ |
||||
Array.Resize<T>(ref this.arr, capacity); |
||||
} |
||||
|
||||
public void Grow(int capacity) |
||||
{ |
||||
if (capacity >= this.arr.Length) |
||||
{ |
||||
this.Size(capacity); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public interface IInterface |
||||
{ |
||||
void Method1<T>() where T : class; |
||||
void Method2<T>() where T : class; |
||||
} |
||||
|
||||
public abstract class Base : Generics.IInterface |
||||
{ |
||||
// constraints must be repeated on implicit interface implementation
|
||||
public abstract void Method1<T>() where T : class; |
||||
|
||||
// constraints must not be specified on explicit interface implementation
|
||||
void Generics.IInterface.Method2<T>() |
||||
{ |
||||
} |
||||
} |
||||
|
||||
public class Derived : Generics.Base |
||||
{ |
||||
// constraints are inherited automatically and must not be specified
|
||||
public override void Method1<T>() |
||||
{ |
||||
} |
||||
} |
||||
|
||||
private const Generics.MyArray<string>.NestedEnum enumVal = Generics.MyArray<string>.NestedEnum.A; |
||||
private static Type type1 = typeof(List<>); |
||||
private static Type type2 = typeof(Generics.MyArray<>); |
||||
private static Type type3 = typeof(List<>.Enumerator); |
||||
private static Type type4 = typeof(Generics.MyArray<>.NestedClass<>); |
||||
private static Type type5 = typeof(List<int>[]); |
||||
private static Type type6 = typeof(Generics.MyArray<>.NestedEnum); |
||||
|
||||
public static void MethodWithConstraint<T, S>() where T : class, S where S : ICloneable, new() |
||||
{ |
||||
} |
||||
|
||||
public static void MethodWithStructConstraint<T>() where T : struct |
||||
{ |
||||
} |
||||
|
||||
private static void MultidimensionalArray<T>(T[,] array) |
||||
{ |
||||
array[0, 0] = array[0, 1]; |
||||
} |
||||
|
||||
public static Dictionary<string, string>.KeyCollection.Enumerator GetEnumerator(Dictionary<string, string> d, Generics.MyArray<string>.NestedClass<int> nc) |
||||
{ |
||||
// Tests references to inner classes in generic classes
|
||||
return d.Keys.GetEnumerator(); |
||||
} |
||||
|
||||
public static bool IsString<T>(T input) |
||||
{ |
||||
return input is string; |
||||
} |
||||
|
||||
public static string AsString<T>(T input) |
||||
{ |
||||
return input as string; |
||||
} |
||||
|
||||
public static string CastToString<T>(T input) |
||||
{ |
||||
return (string)((object)input); |
||||
} |
||||
|
||||
public static T CastFromString<T>(string input) |
||||
{ |
||||
return (T)((object)input); |
||||
} |
||||
|
||||
public static bool IsInt<T>(T input) |
||||
{ |
||||
return input is int; |
||||
} |
||||
|
||||
public static int CastToInt<T>(T input) |
||||
{ |
||||
return (int)((object)input); |
||||
} |
||||
|
||||
public static T CastFromInt<T>(int input) |
||||
{ |
||||
return (T)((object)input); |
||||
} |
||||
|
||||
public static bool IsNullableInt<T>(T input) |
||||
{ |
||||
return input is int?; |
||||
} |
||||
|
||||
public static int? AsNullableInt<T>(T input) |
||||
{ |
||||
return input as int?; |
||||
} |
||||
|
||||
public static int? CastToNullableInt<T>(T input) |
||||
{ |
||||
return (int?)((object)input); |
||||
} |
||||
|
||||
public static T CastFromNullableInt<T>(int? input) |
||||
{ |
||||
return (T)((object)input); |
||||
} |
||||
} |
@ -1,51 +0,0 @@
@@ -1,51 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.IO; |
||||
using ICSharpCode.Decompiler.Ast; |
||||
using ICSharpCode.Decompiler.Tests.Helpers; |
||||
using Mono.Cecil; |
||||
using NUnit.Framework; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests |
||||
{ |
||||
[TestFixture] |
||||
public class ILTests |
||||
{ |
||||
const string path = "../../Tests/IL"; |
||||
|
||||
[Test] |
||||
public void SequenceOfNestedIfs() |
||||
{ |
||||
Run("SequenceOfNestedIfs.dll", "SequenceOfNestedIfs.Output.cs"); |
||||
} |
||||
|
||||
void Run(string compiledFile, string expectedOutputFile) |
||||
{ |
||||
string expectedOutput = File.ReadAllText(Path.Combine(path, expectedOutputFile)); |
||||
var assembly = AssemblyDefinition.ReadAssembly(Path.Combine(path, compiledFile)); |
||||
AstBuilder decompiler = new AstBuilder(new DecompilerContext(assembly.MainModule)); |
||||
decompiler.AddAssembly(assembly); |
||||
new Helpers.RemoveCompilerAttribute().Run(decompiler.SyntaxTree); |
||||
StringWriter output = new StringWriter(); |
||||
decompiler.GenerateCode(new PlainTextOutput(output)); |
||||
CodeAssert.AreEqual(expectedOutput, output.ToString()); |
||||
} |
||||
} |
||||
} |
Binary file not shown.
Binary file not shown.
@ -1,254 +0,0 @@
@@ -1,254 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
public class IncrementDecrement |
||||
{ |
||||
[Flags] |
||||
private enum MyEnum |
||||
{ |
||||
None = 0, |
||||
One = 1, |
||||
Two = 2, |
||||
Four = 4 |
||||
} |
||||
|
||||
public class MutableClass |
||||
{ |
||||
public int Field; |
||||
|
||||
public int Property |
||||
{ |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
public uint this[string name] |
||||
{ |
||||
get |
||||
{ |
||||
return 0u; |
||||
} |
||||
set |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
|
||||
private IncrementDecrement.MyEnum enumField; |
||||
public static int StaticField; |
||||
|
||||
public static int StaticProperty |
||||
{ |
||||
get; |
||||
set; |
||||
} |
||||
|
||||
private IncrementDecrement.MutableClass M() |
||||
{ |
||||
return new IncrementDecrement.MutableClass(); |
||||
} |
||||
|
||||
private int[,] Array() |
||||
{ |
||||
return null; |
||||
} |
||||
|
||||
private unsafe int* GetPointer() |
||||
{ |
||||
return null; |
||||
} |
||||
|
||||
public int PreIncrementInAddition(int i, int j) |
||||
{ |
||||
return i + ++j; |
||||
} |
||||
|
||||
public int PreIncrementArrayElement(int[] array, int pos) |
||||
{ |
||||
return --array[pos]; |
||||
} |
||||
|
||||
public int PreIncrementInstanceField() |
||||
{ |
||||
return ++this.M().Field; |
||||
} |
||||
|
||||
public int PreIncrementInstanceField2(IncrementDecrement.MutableClass m) |
||||
{ |
||||
return ++m.Field; |
||||
} |
||||
|
||||
public int PreIncrementInstanceProperty() |
||||
{ |
||||
return ++this.M().Property; |
||||
} |
||||
|
||||
public int PreIncrementStaticField() |
||||
{ |
||||
return ++IncrementDecrement.StaticField; |
||||
} |
||||
|
||||
public int PreIncrementStaticProperty() |
||||
{ |
||||
return ++IncrementDecrement.StaticProperty; |
||||
} |
||||
|
||||
// public uint PreIncrementIndexer(string name)
|
||||
// {
|
||||
// return ++this.M()[name];
|
||||
// }
|
||||
|
||||
public int PreIncrementByRef(ref int i) |
||||
{ |
||||
return ++i; |
||||
} |
||||
|
||||
public unsafe int PreIncrementByPointer() |
||||
{ |
||||
return ++(*this.GetPointer()); |
||||
} |
||||
|
||||
public int PreIncrement2DArray() |
||||
{ |
||||
return ++this.Array()[1, 2]; |
||||
} |
||||
|
||||
public int CompoundAssignInstanceField() |
||||
{ |
||||
return this.M().Field *= 10; |
||||
} |
||||
|
||||
public int CompoundAssignInstanceProperty() |
||||
{ |
||||
return this.M().Property *= 10; |
||||
} |
||||
|
||||
public int CompoundAssignStaticField() |
||||
{ |
||||
return IncrementDecrement.StaticField ^= 100; |
||||
} |
||||
|
||||
public int CompoundAssignStaticProperty() |
||||
{ |
||||
return IncrementDecrement.StaticProperty &= 10; |
||||
} |
||||
|
||||
public int CompoundAssignArrayElement1(int[] array, int pos) |
||||
{ |
||||
return array[pos] *= 10; |
||||
} |
||||
|
||||
public int CompoundAssignArrayElement2(int[] array) |
||||
{ |
||||
return array[Environment.TickCount] *= 10; |
||||
} |
||||
|
||||
// public uint CompoundAssignIndexer(string name)
|
||||
// {
|
||||
// return this.M()[name] -= 2;
|
||||
// }
|
||||
|
||||
public int CompoundAssignIncrement2DArray() |
||||
{ |
||||
return this.Array()[1, 2] %= 10; |
||||
} |
||||
|
||||
public int CompoundAssignByRef(ref int i) |
||||
{ |
||||
return i <<= 2; |
||||
} |
||||
|
||||
public unsafe double CompoundAssignByPointer(double* ptr) |
||||
{ |
||||
return *ptr /= 1.5; |
||||
} |
||||
|
||||
public void CompoundAssignEnum() |
||||
{ |
||||
this.enumField |= IncrementDecrement.MyEnum.Two; |
||||
this.enumField &= ~IncrementDecrement.MyEnum.Four; |
||||
} |
||||
|
||||
public int PostIncrementInAddition(int i, int j) |
||||
{ |
||||
return i++ + j; |
||||
} |
||||
|
||||
public void PostIncrementInlineLocalVariable(Func<int, int> f) |
||||
{ |
||||
int num = 0; |
||||
f(num++); |
||||
} |
||||
|
||||
public int PostIncrementArrayElement(int[] array, int pos) |
||||
{ |
||||
return array[pos]--; |
||||
} |
||||
|
||||
public int PostIncrementStaticField() |
||||
{ |
||||
return IncrementDecrement.StaticField++; |
||||
} |
||||
|
||||
public int PostIncrementStaticProperty() |
||||
{ |
||||
return IncrementDecrement.StaticProperty++; |
||||
} |
||||
|
||||
public int PostIncrementInstanceField(IncrementDecrement.MutableClass m) |
||||
{ |
||||
return m.Field++; |
||||
} |
||||
|
||||
// public uint PostIncrementIndexer(string name)
|
||||
// {
|
||||
// return this.M()[name]++;
|
||||
// }
|
||||
|
||||
// public unsafe int PostIncrementOfPointer(int* ptr)
|
||||
// {
|
||||
// return *(ptr++);
|
||||
// }
|
||||
|
||||
public int PostIncrementInstanceField() |
||||
{ |
||||
return this.M().Field--; |
||||
} |
||||
|
||||
public int PostIncrementInstanceProperty() |
||||
{ |
||||
return this.M().Property--; |
||||
} |
||||
|
||||
public int PostIncrement2DArray() |
||||
{ |
||||
return this.Array()[IncrementDecrement.StaticField, IncrementDecrement.StaticProperty]++; |
||||
} |
||||
|
||||
public int PostIncrementByRef(ref int i) |
||||
{ |
||||
return i++; |
||||
} |
||||
|
||||
public unsafe int PostIncrementByPointer() |
||||
{ |
||||
return (*this.GetPointer())++; |
||||
} |
||||
} |
@ -0,0 +1,111 @@
@@ -0,0 +1,111 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using System.Linq; |
||||
using System.Reflection.PortableExecutable; |
||||
using System.Runtime.CompilerServices; |
||||
using System.Text; |
||||
using System.Xml.Linq; |
||||
using ICSharpCode.Decompiler.CSharp; |
||||
using ICSharpCode.Decompiler.CSharp.OutputVisitor; |
||||
using ICSharpCode.Decompiler.DebugInfo; |
||||
using ICSharpCode.Decompiler.Metadata; |
||||
using ICSharpCode.Decompiler.Tests.Helpers; |
||||
using ICSharpCode.Decompiler.TypeSystem; |
||||
using Microsoft.CodeAnalysis.CSharp; |
||||
using Microsoft.DiaSymReader.Tools; |
||||
using NUnit.Framework; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests |
||||
{ |
||||
[TestFixture] |
||||
public class PdbGenerationTestRunner |
||||
{ |
||||
static readonly string TestCasePath = Tester.TestCasePath + "/PdbGen"; |
||||
|
||||
[Test] |
||||
public void HelloWorld() |
||||
{ |
||||
TestGeneratePdb(); |
||||
} |
||||
|
||||
[Test] |
||||
[Ignore("Missing nested local scopes for loops, differences in IL ranges")] |
||||
public void ForLoopTests() |
||||
{ |
||||
TestGeneratePdb(); |
||||
} |
||||
|
||||
[Test] |
||||
[Ignore("Differences in IL ranges")] |
||||
public void LambdaCapturing() |
||||
{ |
||||
TestGeneratePdb(); |
||||
} |
||||
|
||||
private void TestGeneratePdb([CallerMemberName] string testName = null) |
||||
{ |
||||
const PdbToXmlOptions options = PdbToXmlOptions.IncludeEmbeddedSources | PdbToXmlOptions.ThrowOnError | PdbToXmlOptions.IncludeTokens | PdbToXmlOptions.ResolveTokens | PdbToXmlOptions.IncludeMethodSpans; |
||||
|
||||
string xmlFile = Path.Combine(TestCasePath, testName + ".xml"); |
||||
string xmlContent = File.ReadAllText(xmlFile); |
||||
XDocument document = XDocument.Parse(xmlContent); |
||||
var files = document.Descendants("file").ToDictionary(f => f.Attribute("name").Value, f => f.Value); |
||||
Tester.CompileCSharpWithPdb(Path.Combine(TestCasePath, testName + ".expected"), files, options); |
||||
|
||||
string peFileName = Path.Combine(TestCasePath, testName + ".expected.dll"); |
||||
string pdbFileName = Path.Combine(TestCasePath, testName + ".expected.pdb"); |
||||
var moduleDefinition = new PEFile(peFileName); |
||||
var resolver = new UniversalAssemblyResolver(peFileName, false, moduleDefinition.Reader.DetectTargetFrameworkId(), PEStreamOptions.PrefetchEntireImage); |
||||
var decompiler = new CSharpDecompiler(moduleDefinition, resolver, new DecompilerSettings()); |
||||
using (FileStream pdbStream = File.Open(Path.Combine(TestCasePath, testName + ".pdb"), FileMode.OpenOrCreate, FileAccess.ReadWrite)) { |
||||
pdbStream.SetLength(0); |
||||
PortablePdbWriter.WritePdb(moduleDefinition, decompiler, new DecompilerSettings(), pdbStream, noLogo: true); |
||||
pdbStream.Position = 0; |
||||
using (Stream peStream = File.OpenRead(peFileName)) |
||||
using (Stream expectedPdbStream = File.OpenRead(pdbFileName)) { |
||||
using (StreamWriter writer = new StreamWriter(Path.ChangeExtension(pdbFileName, ".xml"), false, Encoding.UTF8)) { |
||||
PdbToXmlConverter.ToXml(writer, expectedPdbStream, peStream, options); |
||||
} |
||||
peStream.Position = 0; |
||||
using (StreamWriter writer = new StreamWriter(Path.ChangeExtension(xmlFile, ".generated.xml"), false, Encoding.UTF8)) { |
||||
PdbToXmlConverter.ToXml(writer, pdbStream, peStream, options); |
||||
} |
||||
} |
||||
} |
||||
string expectedFileName = Path.ChangeExtension(xmlFile, ".expected.xml"); |
||||
ProcessXmlFile(expectedFileName); |
||||
string generatedFileName = Path.ChangeExtension(xmlFile, ".generated.xml"); |
||||
ProcessXmlFile(generatedFileName); |
||||
Assert.AreEqual(Normalize(expectedFileName), Normalize(generatedFileName)); |
||||
} |
||||
|
||||
private void ProcessXmlFile(string fileName) |
||||
{ |
||||
var document = XDocument.Load(fileName); |
||||
foreach (var file in document.Descendants("file")) { |
||||
file.Attribute("checksum").Remove(); |
||||
file.Attribute("embeddedSourceLength").Remove(); |
||||
file.ReplaceNodes(new XCData(file.Value.Replace("\uFEFF", ""))); |
||||
} |
||||
document.Save(fileName, SaveOptions.None); |
||||
} |
||||
|
||||
private string Normalize(string inputFileName) |
||||
{ |
||||
return File.ReadAllText(inputFileName).Replace("\r\n", "\n").Replace("\r", "\n"); |
||||
} |
||||
} |
||||
|
||||
class StringWriterWithEncoding : StringWriter |
||||
{ |
||||
readonly Encoding encoding; |
||||
|
||||
public StringWriterWithEncoding(Encoding encoding) |
||||
{ |
||||
this.encoding = encoding ?? throw new ArgumentNullException("encoding"); |
||||
} |
||||
|
||||
public override Encoding Encoding => encoding; |
||||
} |
||||
} |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
// Issue1389.Program
|
||||
using System; |
||||
|
||||
namespace Issue1389 |
||||
{ |
||||
public class Program |
||||
{ |
||||
private static object GetObject() |
||||
{ |
||||
throw null; |
||||
} |
||||
|
||||
private static void UnusedResultOfIsinst() |
||||
{ |
||||
bool flag = GetObject() is TypeCode; |
||||
} |
||||
|
||||
private static bool BoolResultOfIsinst() |
||||
{ |
||||
return GetObject() is TypeCode; |
||||
} |
||||
|
||||
private static object EnumResultOfIsinst(object A_0) |
||||
{ |
||||
return (A_0 is TypeCode) ? A_0 : null; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly Issue1389 |
||||
{ |
||||
.hash algorithm 0x00008004 |
||||
.ver 1:0:4059:39717 |
||||
} |
||||
.module Issue1389.dll |
||||
.imagebase 0x00400000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000003 // ILONLY 32BITREQUIRED |
||||
|
||||
.class public auto ansi beforefieldinit Issue1389.Program |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
// Methods |
||||
.method /* 06000001 */ private hidebysig static |
||||
object GetObject () cil managed |
||||
{ |
||||
// Method begins at RVA 0x2050 |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
|
||||
IL_0000: ldnull |
||||
IL_0001: throw |
||||
} // end of method Program::GetObject |
||||
|
||||
.method /* 06000002 */ private hidebysig static |
||||
void UnusedResultOfIsinst () cil managed |
||||
{ |
||||
// Method begins at RVA 0x2053 |
||||
// Code size 12 (0xc) |
||||
.maxstack 8 |
||||
|
||||
IL_0000: call object Issue1389.Program::GetObject() /* 06000001 */ |
||||
IL_0005: isinst [mscorlib]System.TypeCode /* 01000002 */ |
||||
IL_000a: pop |
||||
IL_000b: ret |
||||
} // end of method Program::UnusedResultOfIsinst |
||||
|
||||
.method /* 06000003 */ private hidebysig static |
||||
bool BoolResultOfIsinst () cil managed |
||||
{ |
||||
// Method begins at RVA 0x2060 |
||||
// Code size 14 (0xe) |
||||
.maxstack 8 |
||||
|
||||
IL_0000: call object Issue1389.Program::GetObject() /* 06000001 */ |
||||
IL_0005: isinst [mscorlib]System.TypeCode /* 01000002 */ |
||||
IL_000a: ldnull |
||||
IL_000b: cgt.un |
||||
IL_000d: ret |
||||
} // end of method Program::BoolResultOfIsinst |
||||
|
||||
.method /* 06000004 */ private hidebysig static |
||||
object EnumResultOfIsinst ( |
||||
object A_0 |
||||
) cil managed |
||||
{ |
||||
// Method begins at RVA 0x206f |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
|
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst [mscorlib]System.TypeCode /* 01000002 */ |
||||
IL_0006: ret |
||||
} // end of method Program::EnumResultOfIsinst |
||||
|
||||
} // end of class Issue1389.Program |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
/*.dll |
||||
/*.pdb |
||||
/*.expected.xml |
||||
/*.generated.xml |
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<symbols> |
||||
<files> |
||||
<file id="1" name="ICSharpCode\Decompiler\Tests\TestCases\PdbGen\ForLoopTests.cs" language="C#" checksumAlgorithm="SHA256"><![CDATA[using System; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.PdbGen |
||||
{ |
||||
public class ForLoopTests |
||||
{ |
||||
public static void SimplePrintLoop(string[] args) |
||||
{ |
||||
for (int i = 0; i < args.Length; i++) |
||||
{ |
||||
Console.WriteLine(args[i]); |
||||
} |
||||
} |
||||
|
||||
public static void SimplePrintLoopWithCondition(string[] args) |
||||
{ |
||||
for (int i = 0; i < args.Length; i++) |
||||
{ |
||||
if (i % 2 != 0) |
||||
{ |
||||
Console.WriteLine(args[i]); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
]]></file> |
||||
</files> |
||||
<methods> |
||||
<method containingType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.ForLoopTests" name="SimplePrintLoop" parameterNames="args" token="0x6000001"> |
||||
<sequencePoints> |
||||
<entry offset="0x0" startLine="9" startColumn="9" endLine="9" endColumn="18" document="1" /> |
||||
<entry offset="0x2" hidden="true" document="1" /> |
||||
<entry offset="0x4" startLine="11" startColumn="5" endLine="11" endColumn="32" document="1" /> |
||||
<entry offset="0xc" startLine="9" startColumn="37" endLine="9" endColumn="40" document="1" /> |
||||
<entry offset="0x10" startLine="9" startColumn="20" endLine="9" endColumn="35" document="1" /> |
||||
<entry offset="0x16" startLine="13" startColumn="3" endLine="13" endColumn="4" document="1" /> |
||||
</sequencePoints> |
||||
<scope startOffset="0x0" endOffset="0x17"> |
||||
<scope startOffset="0x0" endOffset="0x16"> |
||||
<local name="i" il_index="0" il_start="0x0" il_end="0x16" attributes="0" /> |
||||
</scope> |
||||
</scope> |
||||
</method> |
||||
<method containingType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.ForLoopTests" name="SimplePrintLoopWithCondition" parameterNames="args" token="0x6000002"> |
||||
<sequencePoints> |
||||
<entry offset="0x0" startLine="17" startColumn="9" endLine="17" endColumn="18" document="1" /> |
||||
<entry offset="0x2" hidden="true" document="1" /> |
||||
<entry offset="0x4" startLine="19" startColumn="5" endLine="19" endColumn="20" document="1" /> |
||||
<entry offset="0x9" startLine="21" startColumn="6" endLine="21" endColumn="33" document="1" /> |
||||
<entry offset="0x11" startLine="17" startColumn="37" endLine="17" endColumn="40" document="1" /> |
||||
<entry offset="0x15" startLine="17" startColumn="20" endLine="17" endColumn="35" document="1" /> |
||||
<entry offset="0x1b" startLine="24" startColumn="3" endLine="24" endColumn="4" document="1" /> |
||||
</sequencePoints> |
||||
<scope startOffset="0x0" endOffset="0x1c"> |
||||
<scope startOffset="0x0" endOffset="0x1b"> |
||||
<local name="i" il_index="0" il_start="0x0" il_end="0x1b" attributes="0" /> |
||||
</scope> |
||||
</scope> |
||||
</method> |
||||
</methods> |
||||
<method-spans> |
||||
<method declaringType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.ForLoopTests" methodName="SimplePrintLoop" parameterNames="args" token="0x6000001"> |
||||
<document startLine="9" endLine="13" /> |
||||
</method> |
||||
<method declaringType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.ForLoopTests" methodName="SimplePrintLoopWithCondition" parameterNames="args" token="0x6000002"> |
||||
<document startLine="17" endLine="24" /> |
||||
</method> |
||||
</method-spans> |
||||
</symbols> |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<symbols> |
||||
<files> |
||||
<file id="1" name="ICSharpCode\Decompiler\Tests\TestCases\PdbGen\HelloWorld.cs" language="C#" checksumAlgorithm="SHA256"><![CDATA[using System; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.PdbGen |
||||
{ |
||||
public class HelloWorld |
||||
{ |
||||
public static void Main(string[] args) |
||||
{ |
||||
Console.ReadKey(); |
||||
Console.WriteLine("Hello World!"); |
||||
Console.ReadKey(); |
||||
} |
||||
} |
||||
} |
||||
]]></file> |
||||
</files> |
||||
<methods> |
||||
<method containingType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.HelloWorld" name="Main" parameterNames="args" token="0x6000001"> |
||||
<sequencePoints> |
||||
<entry offset="0x0" startLine="9" startColumn="4" endLine="9" endColumn="22" document="1" /> |
||||
<entry offset="0x6" startLine="10" startColumn="4" endLine="10" endColumn="38" document="1" /> |
||||
<entry offset="0x10" startLine="11" startColumn="4" endLine="11" endColumn="22" document="1" /> |
||||
<entry offset="0x16" startLine="12" startColumn="3" endLine="12" endColumn="4" document="1" /> |
||||
</sequencePoints> |
||||
<scope startOffset="0x0" endOffset="0x17" /> |
||||
</method> |
||||
</methods> |
||||
<method-spans> |
||||
<method declaringType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.HelloWorld" methodName="Main" parameterNames="args" token="0x6000001"> |
||||
<document startLine="9" endLine="12" /> |
||||
</method> |
||||
</method-spans> |
||||
</symbols> |
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<symbols> |
||||
<files> |
||||
<file id="1" name="ICSharpCode\Decompiler\Tests\TestCases\PdbGen\LambdaCapturing.cs" language="C#" checksumAlgorithm="SHA256"><![CDATA[using System; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.PdbGen |
||||
{ |
||||
public class LambdaCapturing |
||||
{ |
||||
public static void Main(string[] args) |
||||
{ |
||||
int num = 4; |
||||
int captured = Environment.TickCount + num; |
||||
Test((int a, int b) => a + b + captured); |
||||
} |
||||
|
||||
private static void Test(Func<int, int, int> p) |
||||
{ |
||||
p(1, 2); |
||||
} |
||||
} |
||||
} |
||||
]]></file> |
||||
</files> |
||||
<methods> |
||||
<method containingType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.LambdaCapturing" name="Main" parameterNames="args" token="0x6000001"> |
||||
<sequencePoints> |
||||
<entry offset="0x0" hidden="true" document="1" /> |
||||
<entry offset="0x5" startLine="9" startColumn="13" endLine="9" endColumn="27" document="1" /> |
||||
<entry offset="0x7" startLine="10" startColumn="13" endLine="10" endColumn="58" document="1" /> |
||||
<entry offset="0x14" startLine="11" startColumn="13" endLine="11" endColumn="46" document="1" /> |
||||
<entry offset="0x24" startLine="12" startColumn="9" endLine="12" endColumn="10" document="1" /> |
||||
</sequencePoints> |
||||
<scope startOffset="0x0" endOffset="0x25"> |
||||
<local name="local" il_index="0" il_start="0x0" il_end="0x25" attributes="0" /> |
||||
</scope> |
||||
</method> |
||||
<method containingType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.LambdaCapturing" name="Test" parameterNames="p" token="0x6000002"> |
||||
<sequencePoints> |
||||
<entry offset="0x0" startLine="16" startColumn="13" endLine="16" endColumn="21" document="1" /> |
||||
<entry offset="0x9" startLine="17" startColumn="9" endLine="17" endColumn="10" document="1" /> |
||||
</sequencePoints> |
||||
<scope startOffset="0x0" endOffset="0xa" /> |
||||
</method> |
||||
<method containingType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.LambdaCapturing+<>c__DisplayClass0_0" name="<Main>b__0" parameterNames="a, b" token="0x6000005"> |
||||
<sequencePoints> |
||||
<entry offset="0x0" startLine="11" startColumn="28" endLine="11" endColumn="44" document="1" /> |
||||
</sequencePoints> |
||||
<scope startOffset="0x0" endOffset="0xb" /> |
||||
</method> |
||||
</methods> |
||||
<method-spans> |
||||
<method declaringType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.LambdaCapturing" methodName="Main" parameterNames="args" token="0x6000001"> |
||||
<document startLine="9" endLine="12" /> |
||||
</method> |
||||
<method declaringType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.LambdaCapturing" methodName="Test" parameterNames="p" token="0x6000002"> |
||||
<document startLine="16" endLine="17" /> |
||||
</method> |
||||
<method declaringType="ICSharpCode.Decompiler.Tests.TestCases.PdbGen.LambdaCapturing+<>c__DisplayClass0_0" methodName="<Main>b__0" parameterNames="a, b" token="0x6000005"> |
||||
<document startLine="11" endLine="11" /> |
||||
</method> |
||||
</method-spans> |
||||
</symbols> |
@ -1,32 +1,47 @@
@@ -1,32 +1,47 @@
|
||||
using System; |
||||
namespace aa |
||||
namespace CustomAttributes2 |
||||
{ |
||||
public static class CustomAtributes |
||||
{ |
||||
[Flags] |
||||
public enum EnumWithFlag |
||||
{ |
||||
All = 15, |
||||
None = 0, |
||||
Item1 = 1, |
||||
Item2 = 2, |
||||
Item3 = 4, |
||||
Item4 = 8 |
||||
All = 0xF, |
||||
None = 0x0, |
||||
Item1 = 0x1, |
||||
Item2 = 0x2, |
||||
Item3 = 0x4, |
||||
Item4 = 0x8 |
||||
} |
||||
[AttributeUsage(AttributeTargets.All)] |
||||
public class MyAttribute : Attribute |
||||
{ |
||||
public MyAttribute(CustomAtributes.EnumWithFlag en) |
||||
public MyAttribute(EnumWithFlag en) |
||||
{ |
||||
} |
||||
} |
||||
[CustomAtributes.MyAttribute(CustomAtributes.EnumWithFlag.Item1 | CustomAtributes.EnumWithFlag.Item2)] |
||||
[My(EnumWithFlag.Item1 | EnumWithFlag.Item2)] |
||||
private static int field; |
||||
[CustomAtributes.MyAttribute(CustomAtributes.EnumWithFlag.All)] |
||||
public static string Property |
||||
{ |
||||
get |
||||
{ |
||||
[My(EnumWithFlag.All)] |
||||
#if ROSLYN
|
||||
public static string Property => "aa"; |
||||
#else
|
||||
public static string Property { |
||||
get { |
||||
return "aa"; |
||||
} |
||||
} |
||||
#endif
|
||||
public static string GetterOnlyPropertyWithAttributeOnGetter { |
||||
[My(EnumWithFlag.Item1)] |
||||
get { |
||||
return "aa"; |
||||
} |
||||
} |
||||
[My(EnumWithFlag.All)] |
||||
public static string GetterOnlyPropertyWithAttributeOnGetter2 { |
||||
[My(EnumWithFlag.Item1)] |
||||
get { |
||||
return "aa"; |
||||
} |
||||
} |
@ -0,0 +1,166 @@
@@ -0,0 +1,166 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly CustomAttributes2 |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module CustomAttributes2.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit CustomAttributes2.CustomAtributes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public EnumWithFlag |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag All = int32(0x0000000F) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag None = int32(0x00000000) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item1 = int32(0x00000001) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item2 = int32(0x00000002) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item3 = int32(0x00000004) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item4 = int32(0x00000008) |
||||
} // end of class EnumWithFlag |
||||
|
||||
.class auto ansi nested public beforefieldinit MyAttribute |
||||
extends [mscorlib]System.Attribute |
||||
{ |
||||
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag en) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: nop |
||||
IL_0008: nop |
||||
IL_0009: ret |
||||
} // end of method MyAttribute::.ctor |
||||
|
||||
} // end of class MyAttribute |
||||
|
||||
.field private static int32 'field' |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 03 00 00 00 00 00 ) |
||||
.method public hidebysig specialname static |
||||
string get_Property() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (string V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "aa" |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method CustomAtributes::get_Property |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (string V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "aa" |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter2() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (string V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "aa" |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2 |
||||
|
||||
.method public hidebysig static void ObsoletedMethod() cil managed |
||||
{ |
||||
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. |
||||
00 ) |
||||
// Code size 66 (0x42) |
||||
.maxstack 3 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "{0} $$$ {1}" |
||||
IL_0006: ldc.i4 0x400 |
||||
IL_000b: box [mscorlib]System.AttributeTargets |
||||
IL_0010: ldc.i4 0x180 |
||||
IL_0015: box [mscorlib]System.AttributeTargets |
||||
IL_001a: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_001f: nop |
||||
IL_0020: ldc.i4 0x180 |
||||
IL_0025: stloc.0 |
||||
IL_0026: ldstr "{0} $$$ {1}" |
||||
IL_002b: ldc.i4 0x400 |
||||
IL_0030: box [mscorlib]System.AttributeTargets |
||||
IL_0035: ldloc.0 |
||||
IL_0036: box [mscorlib]System.AttributeTargets |
||||
IL_003b: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_0040: nop |
||||
IL_0041: ret |
||||
} // end of method CustomAtributes::ObsoletedMethod |
||||
|
||||
.property string Property() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_Property() |
||||
} // end of property CustomAtributes::Property |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter() |
||||
{ |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter2() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter2 |
||||
} // end of class CustomAttributes2.CustomAtributes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,142 @@
@@ -0,0 +1,142 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly CustomAttributes2.opt |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module CustomAttributes2.opt.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit CustomAttributes2.CustomAtributes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public EnumWithFlag |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag All = int32(0x0000000F) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag None = int32(0x00000000) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item1 = int32(0x00000001) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item2 = int32(0x00000002) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item3 = int32(0x00000004) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item4 = int32(0x00000008) |
||||
} // end of class EnumWithFlag |
||||
|
||||
.class auto ansi nested public beforefieldinit MyAttribute |
||||
extends [mscorlib]System.Attribute |
||||
{ |
||||
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag en) cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||
IL_0006: ret |
||||
} // end of method MyAttribute::.ctor |
||||
|
||||
} // end of class MyAttribute |
||||
|
||||
.field private static int32 'field' |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 03 00 00 00 00 00 ) |
||||
.method public hidebysig specialname static |
||||
string get_Property() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_Property |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter2() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2 |
||||
|
||||
.method public hidebysig static void ObsoletedMethod() cil managed |
||||
{ |
||||
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. |
||||
00 ) |
||||
// Code size 63 (0x3f) |
||||
.maxstack 3 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: ldstr "{0} $$$ {1}" |
||||
IL_0005: ldc.i4 0x400 |
||||
IL_000a: box [mscorlib]System.AttributeTargets |
||||
IL_000f: ldc.i4 0x180 |
||||
IL_0014: box [mscorlib]System.AttributeTargets |
||||
IL_0019: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_001e: ldc.i4 0x180 |
||||
IL_0023: stloc.0 |
||||
IL_0024: ldstr "{0} $$$ {1}" |
||||
IL_0029: ldc.i4 0x400 |
||||
IL_002e: box [mscorlib]System.AttributeTargets |
||||
IL_0033: ldloc.0 |
||||
IL_0034: box [mscorlib]System.AttributeTargets |
||||
IL_0039: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_003e: ret |
||||
} // end of method CustomAtributes::ObsoletedMethod |
||||
|
||||
.property string Property() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_Property() |
||||
} // end of property CustomAtributes::Property |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter() |
||||
{ |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter2() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter2 |
||||
} // end of class CustomAttributes2.CustomAtributes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,146 @@
@@ -0,0 +1,146 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly CustomAttributes2 |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module CustomAttributes2.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit CustomAttributes2.CustomAtributes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public EnumWithFlag |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag All = int32(0x0000000F) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag None = int32(0x00000000) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item1 = int32(0x00000001) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item2 = int32(0x00000002) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item3 = int32(0x00000004) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item4 = int32(0x00000008) |
||||
} // end of class EnumWithFlag |
||||
|
||||
.class auto ansi nested public beforefieldinit MyAttribute |
||||
extends [mscorlib]System.Attribute |
||||
{ |
||||
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag en) cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||
IL_0006: ret |
||||
} // end of method MyAttribute::.ctor |
||||
|
||||
} // end of class MyAttribute |
||||
|
||||
.field private static int32 'field' |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 03 00 00 00 00 00 ) |
||||
.method public hidebysig specialname static |
||||
string get_Property() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_Property |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter2() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2 |
||||
|
||||
.method public hidebysig static void ObsoletedMethod() cil managed |
||||
{ |
||||
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. |
||||
00 ) |
||||
// Code size 63 (0x3f) |
||||
.maxstack 3 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: ldstr "{0} $$$ {1}" |
||||
IL_0005: ldc.i4 0x400 |
||||
IL_000a: box [mscorlib]System.AttributeTargets |
||||
IL_000f: ldc.i4 0x180 |
||||
IL_0014: box [mscorlib]System.AttributeTargets |
||||
IL_0019: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_001e: ldc.i4 0x180 |
||||
IL_0023: stloc.0 |
||||
IL_0024: ldstr "{0} $$$ {1}" |
||||
IL_0029: ldc.i4 0x400 |
||||
IL_002e: box [mscorlib]System.AttributeTargets |
||||
IL_0033: ldloc.0 |
||||
IL_0034: box [mscorlib]System.AttributeTargets |
||||
IL_0039: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_003e: ret |
||||
} // end of method CustomAtributes::ObsoletedMethod |
||||
|
||||
.property string Property() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_Property() |
||||
} // end of property CustomAtributes::Property |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter() |
||||
{ |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter2() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter2 |
||||
} // end of class CustomAttributes2.CustomAtributes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,163 @@
@@ -0,0 +1,163 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly CustomAttributes2 |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module CustomAttributes2.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit CustomAttributes2.CustomAtributes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public EnumWithFlag |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag All = int32(0x0000000F) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag None = int32(0x00000000) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item1 = int32(0x00000001) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item2 = int32(0x00000002) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item3 = int32(0x00000004) |
||||
.field public static literal valuetype CustomAttributes2.CustomAtributes/EnumWithFlag Item4 = int32(0x00000008) |
||||
} // end of class EnumWithFlag |
||||
|
||||
.class auto ansi nested public beforefieldinit MyAttribute |
||||
extends [mscorlib]System.Attribute |
||||
{ |
||||
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 ) |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag en) cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: nop |
||||
IL_0008: ret |
||||
} // end of method MyAttribute::.ctor |
||||
|
||||
} // end of class MyAttribute |
||||
|
||||
.field private static int32 'field' |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 03 00 00 00 00 00 ) |
||||
.method public hidebysig specialname static |
||||
string get_Property() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldstr "aa" |
||||
IL_0005: ret |
||||
} // end of method CustomAtributes::get_Property |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (string V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "aa" |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter |
||||
|
||||
.method public hidebysig specialname static |
||||
string get_GetterOnlyPropertyWithAttributeOnGetter2() cil managed |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 01 00 00 00 00 00 ) |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (string V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "aa" |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2 |
||||
|
||||
.method public hidebysig static void ObsoletedMethod() cil managed |
||||
{ |
||||
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message. |
||||
00 ) |
||||
// Code size 66 (0x42) |
||||
.maxstack 3 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldstr "{0} $$$ {1}" |
||||
IL_0006: ldc.i4 0x400 |
||||
IL_000b: box [mscorlib]System.AttributeTargets |
||||
IL_0010: ldc.i4 0x180 |
||||
IL_0015: box [mscorlib]System.AttributeTargets |
||||
IL_001a: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_001f: nop |
||||
IL_0020: ldc.i4 0x180 |
||||
IL_0025: stloc.0 |
||||
IL_0026: ldstr "{0} $$$ {1}" |
||||
IL_002b: ldc.i4 0x400 |
||||
IL_0030: box [mscorlib]System.AttributeTargets |
||||
IL_0035: ldloc.0 |
||||
IL_0036: box [mscorlib]System.AttributeTargets |
||||
IL_003b: call void [mscorlib]System.Console::WriteLine(string, |
||||
object, |
||||
object) |
||||
IL_0040: nop |
||||
IL_0041: ret |
||||
} // end of method CustomAtributes::ObsoletedMethod |
||||
|
||||
.property string Property() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_Property() |
||||
} // end of property CustomAtributes::Property |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter() |
||||
{ |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter |
||||
.property string GetterOnlyPropertyWithAttributeOnGetter2() |
||||
{ |
||||
.custom instance void CustomAttributes2.CustomAtributes/MyAttribute::.ctor(valuetype CustomAttributes2.CustomAtributes/EnumWithFlag) = ( 01 00 0F 00 00 00 00 00 ) |
||||
.get string CustomAttributes2.CustomAtributes::get_GetterOnlyPropertyWithAttributeOnGetter2() |
||||
} // end of property CustomAtributes::GetterOnlyPropertyWithAttributeOnGetter2 |
||||
} // end of class CustomAttributes2.CustomAtributes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty |
||||
{ |
||||
internal class Discards |
||||
{ |
||||
public class @_ |
||||
{ |
||||
|
||||
} |
||||
|
||||
public void GetOut(out int value) |
||||
{ |
||||
value = 0; |
||||
} |
||||
|
||||
public void MakeValue(Func<object, string, int> func) |
||||
{ |
||||
|
||||
} |
||||
|
||||
public void MakeValue(Func<@_, int> func) |
||||
{ |
||||
|
||||
} |
||||
|
||||
public void SimpleParameter(@_ _) |
||||
{ |
||||
} |
||||
|
||||
public void ParameterHiddenByLocal(@_ _) |
||||
{ |
||||
GetOut(out int _); |
||||
} |
||||
|
||||
public void DiscardedOutVsLambdaParameter() |
||||
{ |
||||
GetOut(out int _); |
||||
MakeValue((@_ _) => 5); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,178 @@
@@ -0,0 +1,178 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly Discards |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module Discards.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi nested public beforefieldinit _ |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method _::.ctor |
||||
|
||||
} // end of class _ |
||||
|
||||
.class auto ansi serializable sealed nested private beforefieldinit '<>c' |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c' '<>9' |
||||
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> '<>9__6_0' |
||||
.method private hidebysig specialname rtspecialname static |
||||
void .cctor() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 8 |
||||
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::.ctor() |
||||
IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9' |
||||
IL_000a: ret |
||||
} // end of method '<>c'::.cctor |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method '<>c'::.ctor |
||||
|
||||
.method assembly hidebysig instance int32 |
||||
'<DiscardedOutVsLambdaParameter>b__6_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_ _) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.5 |
||||
IL_0001: ret |
||||
} // end of method '<>c'::'<DiscardedOutVsLambdaParameter>b__6_0' |
||||
|
||||
} // end of class '<>c' |
||||
|
||||
.method public hidebysig instance void |
||||
GetOut([out] int32& 'value') cil managed |
||||
{ |
||||
// Code size 4 (0x4) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: stind.i4 |
||||
IL_0003: ret |
||||
} // end of method Discards::GetOut |
||||
|
||||
.method public hidebysig instance void |
||||
MakeValue(class [mscorlib]System.Func`3<object,string,int32> func) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method Discards::MakeValue |
||||
|
||||
.method public hidebysig instance void |
||||
MakeValue(class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> func) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method Discards::MakeValue |
||||
|
||||
.method public hidebysig instance void |
||||
SimpleParameter(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_ _) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method Discards::SimpleParameter |
||||
|
||||
.method public hidebysig instance void |
||||
ParameterHiddenByLocal(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_ _) cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 2 |
||||
.locals init (int32 V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards::GetOut(int32&) |
||||
IL_0008: ret |
||||
} // end of method Discards::ParameterHiddenByLocal |
||||
|
||||
.method public hidebysig instance void |
||||
DiscardedOutVsLambdaParameter() cil managed |
||||
{ |
||||
// Code size 46 (0x2e) |
||||
.maxstack 3 |
||||
.locals init (int32 V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards::GetOut(int32&) |
||||
IL_0008: ldarg.0 |
||||
IL_0009: ldsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9__6_0' |
||||
IL_000e: dup |
||||
IL_000f: brtrue.s IL_0028 |
||||
|
||||
IL_0011: pop |
||||
IL_0012: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9' |
||||
IL_0017: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<DiscardedOutVsLambdaParameter>b__6_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_) |
||||
IL_001d: newobj instance void class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32>::.ctor(object, |
||||
native int) |
||||
IL_0022: dup |
||||
IL_0023: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9__6_0' |
||||
IL_0028: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards::MakeValue(class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32>) |
||||
IL_002d: ret |
||||
} // end of method Discards::DiscardedOutVsLambdaParameter |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method Discards::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,190 @@
@@ -0,0 +1,190 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly Discards |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module Discards.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi nested public beforefieldinit _ |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: ret |
||||
} // end of method _::.ctor |
||||
|
||||
} // end of class _ |
||||
|
||||
.class auto ansi serializable sealed nested private beforefieldinit '<>c' |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c' '<>9' |
||||
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> '<>9__6_0' |
||||
.method private hidebysig specialname rtspecialname static |
||||
void .cctor() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 8 |
||||
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::.ctor() |
||||
IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9' |
||||
IL_000a: ret |
||||
} // end of method '<>c'::.cctor |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: ret |
||||
} // end of method '<>c'::.ctor |
||||
|
||||
.method assembly hidebysig instance int32 |
||||
'<DiscardedOutVsLambdaParameter>b__6_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_ _) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.5 |
||||
IL_0001: ret |
||||
} // end of method '<>c'::'<DiscardedOutVsLambdaParameter>b__6_0' |
||||
|
||||
} // end of class '<>c' |
||||
|
||||
.method public hidebysig instance void |
||||
GetOut([out] int32& 'value') cil managed |
||||
{ |
||||
// Code size 5 (0x5) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldc.i4.0 |
||||
IL_0003: stind.i4 |
||||
IL_0004: ret |
||||
} // end of method Discards::GetOut |
||||
|
||||
.method public hidebysig instance void |
||||
MakeValue(class [mscorlib]System.Func`3<object,string,int32> func) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method Discards::MakeValue |
||||
|
||||
.method public hidebysig instance void |
||||
MakeValue(class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> func) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method Discards::MakeValue |
||||
|
||||
.method public hidebysig instance void |
||||
SimpleParameter(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_ _) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method Discards::SimpleParameter |
||||
|
||||
.method public hidebysig instance void |
||||
ParameterHiddenByLocal(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_ _) cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 2 |
||||
.locals init (int32 V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldloca.s V_0 |
||||
IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards::GetOut(int32&) |
||||
IL_0009: nop |
||||
IL_000a: ret |
||||
} // end of method Discards::ParameterHiddenByLocal |
||||
|
||||
.method public hidebysig instance void |
||||
DiscardedOutVsLambdaParameter() cil managed |
||||
{ |
||||
// Code size 49 (0x31) |
||||
.maxstack 3 |
||||
.locals init (int32 V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldloca.s V_0 |
||||
IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards::GetOut(int32&) |
||||
IL_0009: nop |
||||
IL_000a: ldarg.0 |
||||
IL_000b: ldsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9__6_0' |
||||
IL_0010: dup |
||||
IL_0011: brtrue.s IL_002a |
||||
|
||||
IL_0013: pop |
||||
IL_0014: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9' |
||||
IL_0019: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<DiscardedOutVsLambdaParameter>b__6_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_) |
||||
IL_001f: newobj instance void class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32>::.ctor(object, |
||||
native int) |
||||
IL_0024: dup |
||||
IL_0025: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/'<>c'::'<>9__6_0' |
||||
IL_002a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards::MakeValue(class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards/_,int32>) |
||||
IL_002f: nop |
||||
IL_0030: ret |
||||
} // end of method Discards::DiscardedOutVsLambdaParameter |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: ret |
||||
} // end of method Discards::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Discards |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,119 @@
@@ -0,0 +1,119 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty |
||||
{ |
||||
internal class EnumTests |
||||
{ |
||||
public enum SimpleEnum |
||||
{ |
||||
Item1, |
||||
Item2 |
||||
} |
||||
|
||||
public enum LongBasedEnum : long |
||||
{ |
||||
Item1, |
||||
Item2 |
||||
} |
||||
|
||||
public enum LongWithInitializers : long |
||||
{ |
||||
Item1 = 0L, |
||||
Item2 = 20L, |
||||
Item3 = 21L |
||||
} |
||||
|
||||
public enum ShortWithInitializers : short |
||||
{ |
||||
Item1 = 0, |
||||
Item2 = 20, |
||||
Item3 = 21 |
||||
} |
||||
|
||||
public enum ByteWithInitializers : byte |
||||
{ |
||||
Item1 = 0, |
||||
Item2 = 20, |
||||
Item3 = 21 |
||||
} |
||||
|
||||
[Flags] |
||||
public enum SimpleFlagsEnum |
||||
{ |
||||
None = 0x0, |
||||
Item1 = 0x1, |
||||
Item2 = 0x2, |
||||
Item3 = 0x4, |
||||
All = 0x7 |
||||
} |
||||
|
||||
[Flags] |
||||
public enum NegativeValueWithFlags |
||||
{ |
||||
Value = -2147483647 |
||||
} |
||||
|
||||
public enum NegativeValueWithoutFlags |
||||
{ |
||||
Value = -2147483647 |
||||
} |
||||
|
||||
public AttributeTargets SingleEnumValue() |
||||
{ |
||||
return AttributeTargets.Class; |
||||
} |
||||
|
||||
public AttributeTargets TwoEnumValuesOr() |
||||
{ |
||||
return AttributeTargets.Class | AttributeTargets.Method; |
||||
} |
||||
|
||||
public AttributeTargets ThreeEnumValuesOr() |
||||
{ |
||||
return AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Parameter; |
||||
} |
||||
|
||||
public AttributeTargets UnknownEnumValue() |
||||
{ |
||||
return (AttributeTargets)1000000; |
||||
} |
||||
|
||||
public AttributeTargets EnumAllValue() |
||||
{ |
||||
return AttributeTargets.All; |
||||
} |
||||
|
||||
public AttributeTargets EnumZeroValue() |
||||
{ |
||||
return (AttributeTargets)0; |
||||
} |
||||
|
||||
public object PreservingTypeWhenBoxed() |
||||
{ |
||||
return AttributeTargets.Delegate; |
||||
} |
||||
|
||||
public object PreservingTypeWhenBoxedTwoEnum() |
||||
{ |
||||
return AttributeTargets.Class | AttributeTargets.Delegate; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,242 @@
@@ -0,0 +1,242 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly EnumTests |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module EnumTests.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public SimpleEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item1 = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item2 = int32(0x00000001) |
||||
} // end of class SimpleEnum |
||||
|
||||
.class auto ansi sealed nested public LongBasedEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item2 = int64(0x1) |
||||
} // end of class LongBasedEnum |
||||
|
||||
.class auto ansi sealed nested public LongWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item2 = int64(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item3 = int64(0x15) |
||||
} // end of class LongWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ShortWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int16 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item1 = int16(0x0000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item2 = int16(0x0014) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item3 = int16(0x0015) |
||||
} // end of class ShortWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ByteWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname uint8 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item1 = uint8(0x00) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item2 = uint8(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item3 = uint8(0x15) |
||||
} // end of class ByteWithInitializers |
||||
|
||||
.class auto ansi sealed nested public SimpleFlagsEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum None = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item1 = int32(0x00000001) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item2 = int32(0x00000002) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item3 = int32(0x00000004) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum All = int32(0x00000007) |
||||
} // end of class SimpleFlagsEnum |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithFlags |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithoutFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithoutFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithoutFlags |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
SingleEnumValue() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.4 |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method EnumTests::SingleEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
TwoEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.s 68 |
||||
IL_0003: stloc.0 |
||||
IL_0004: br.s IL_0006 |
||||
|
||||
IL_0006: ldloc.0 |
||||
IL_0007: ret |
||||
} // end of method EnumTests::TwoEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
ThreeEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x844 |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method EnumTests::ThreeEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
UnknownEnumValue() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0xf4240 |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method EnumTests::UnknownEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumAllValue() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x7fff |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method EnumTests::EnumAllValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumZeroValue() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method EnumTests::EnumZeroValue |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxed() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 1 |
||||
.locals init (object V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x1000 |
||||
IL_0006: box [mscorlib]System.AttributeTargets |
||||
IL_000b: stloc.0 |
||||
IL_000c: br.s IL_000e |
||||
|
||||
IL_000e: ldloc.0 |
||||
IL_000f: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxed |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxedTwoEnum() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 1 |
||||
.locals init (object V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x1004 |
||||
IL_0006: box [mscorlib]System.AttributeTargets |
||||
IL_000b: stloc.0 |
||||
IL_000c: br.s IL_000e |
||||
|
||||
IL_000e: ldloc.0 |
||||
IL_000f: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxedTwoEnum |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method EnumTests::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,194 @@
@@ -0,0 +1,194 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly EnumTests.opt |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module EnumTests.opt.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public SimpleEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item1 = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item2 = int32(0x00000001) |
||||
} // end of class SimpleEnum |
||||
|
||||
.class auto ansi sealed nested public LongBasedEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item2 = int64(0x1) |
||||
} // end of class LongBasedEnum |
||||
|
||||
.class auto ansi sealed nested public LongWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item2 = int64(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item3 = int64(0x15) |
||||
} // end of class LongWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ShortWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int16 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item1 = int16(0x0000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item2 = int16(0x0014) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item3 = int16(0x0015) |
||||
} // end of class ShortWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ByteWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname uint8 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item1 = uint8(0x00) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item2 = uint8(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item3 = uint8(0x15) |
||||
} // end of class ByteWithInitializers |
||||
|
||||
.class auto ansi sealed nested public SimpleFlagsEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum None = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item1 = int32(0x00000001) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item2 = int32(0x00000002) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item3 = int32(0x00000004) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum All = int32(0x00000007) |
||||
} // end of class SimpleFlagsEnum |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithFlags |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithoutFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithoutFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithoutFlags |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
SingleEnumValue() cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.4 |
||||
IL_0001: ret |
||||
} // end of method EnumTests::SingleEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
TwoEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 3 (0x3) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 68 |
||||
IL_0002: ret |
||||
} // end of method EnumTests::TwoEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
ThreeEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x844 |
||||
IL_0005: ret |
||||
} // end of method EnumTests::ThreeEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
UnknownEnumValue() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0xf4240 |
||||
IL_0005: ret |
||||
} // end of method EnumTests::UnknownEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumAllValue() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x7fff |
||||
IL_0005: ret |
||||
} // end of method EnumTests::EnumAllValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumZeroValue() cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.0 |
||||
IL_0001: ret |
||||
} // end of method EnumTests::EnumZeroValue |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxed() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x1000 |
||||
IL_0005: box [mscorlib]System.AttributeTargets |
||||
IL_000a: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxed |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxedTwoEnum() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x1004 |
||||
IL_0005: box [mscorlib]System.AttributeTargets |
||||
IL_000a: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxedTwoEnum |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method EnumTests::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,198 @@
@@ -0,0 +1,198 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly EnumTests |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module EnumTests.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public SimpleEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item1 = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item2 = int32(0x00000001) |
||||
} // end of class SimpleEnum |
||||
|
||||
.class auto ansi sealed nested public LongBasedEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item2 = int64(0x1) |
||||
} // end of class LongBasedEnum |
||||
|
||||
.class auto ansi sealed nested public LongWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item2 = int64(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item3 = int64(0x15) |
||||
} // end of class LongWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ShortWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int16 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item1 = int16(0x0000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item2 = int16(0x0014) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item3 = int16(0x0015) |
||||
} // end of class ShortWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ByteWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname uint8 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item1 = uint8(0x00) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item2 = uint8(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item3 = uint8(0x15) |
||||
} // end of class ByteWithInitializers |
||||
|
||||
.class auto ansi sealed nested public SimpleFlagsEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum None = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item1 = int32(0x00000001) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item2 = int32(0x00000002) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item3 = int32(0x00000004) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum All = int32(0x00000007) |
||||
} // end of class SimpleFlagsEnum |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithFlags |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithoutFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithoutFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithoutFlags |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
SingleEnumValue() cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.4 |
||||
IL_0001: ret |
||||
} // end of method EnumTests::SingleEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
TwoEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 3 (0x3) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 68 |
||||
IL_0002: ret |
||||
} // end of method EnumTests::TwoEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
ThreeEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x844 |
||||
IL_0005: ret |
||||
} // end of method EnumTests::ThreeEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
UnknownEnumValue() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0xf4240 |
||||
IL_0005: ret |
||||
} // end of method EnumTests::UnknownEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumAllValue() cil managed |
||||
{ |
||||
// Code size 6 (0x6) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x7fff |
||||
IL_0005: ret |
||||
} // end of method EnumTests::EnumAllValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumZeroValue() cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.0 |
||||
IL_0001: ret |
||||
} // end of method EnumTests::EnumZeroValue |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxed() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x1000 |
||||
IL_0005: box [mscorlib]System.AttributeTargets |
||||
IL_000a: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxed |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxedTwoEnum() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4 0x1004 |
||||
IL_0005: box [mscorlib]System.AttributeTargets |
||||
IL_000a: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxedTwoEnum |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method EnumTests::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,247 @@
@@ -0,0 +1,247 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly EnumTests |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module EnumTests.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi sealed nested public SimpleEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item1 = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleEnum Item2 = int32(0x00000001) |
||||
} // end of class SimpleEnum |
||||
|
||||
.class auto ansi sealed nested public LongBasedEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongBasedEnum Item2 = int64(0x1) |
||||
} // end of class LongBasedEnum |
||||
|
||||
.class auto ansi sealed nested public LongWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int64 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item1 = int64(0x0) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item2 = int64(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/LongWithInitializers Item3 = int64(0x15) |
||||
} // end of class LongWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ShortWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int16 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item1 = int16(0x0000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item2 = int16(0x0014) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ShortWithInitializers Item3 = int16(0x0015) |
||||
} // end of class ShortWithInitializers |
||||
|
||||
.class auto ansi sealed nested public ByteWithInitializers |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname uint8 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item1 = uint8(0x00) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item2 = uint8(0x14) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/ByteWithInitializers Item3 = uint8(0x15) |
||||
} // end of class ByteWithInitializers |
||||
|
||||
.class auto ansi sealed nested public SimpleFlagsEnum |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum None = int32(0x00000000) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item1 = int32(0x00000001) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item2 = int32(0x00000002) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum Item3 = int32(0x00000004) |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/SimpleFlagsEnum All = int32(0x00000007) |
||||
} // end of class SimpleFlagsEnum |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithFlags |
||||
|
||||
.class auto ansi sealed nested public NegativeValueWithoutFlags |
||||
extends [mscorlib]System.Enum |
||||
{ |
||||
.field public specialname rtspecialname int32 value__ |
||||
.field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests/NegativeValueWithoutFlags Value = int32(0x80000001) |
||||
} // end of class NegativeValueWithoutFlags |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
SingleEnumValue() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.4 |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method EnumTests::SingleEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
TwoEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.s 68 |
||||
IL_0003: stloc.0 |
||||
IL_0004: br.s IL_0006 |
||||
|
||||
IL_0006: ldloc.0 |
||||
IL_0007: ret |
||||
} // end of method EnumTests::TwoEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
ThreeEnumValuesOr() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x844 |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method EnumTests::ThreeEnumValuesOr |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
UnknownEnumValue() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0xf4240 |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method EnumTests::UnknownEnumValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumAllValue() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x7fff |
||||
IL_0006: stloc.0 |
||||
IL_0007: br.s IL_0009 |
||||
|
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method EnumTests::EnumAllValue |
||||
|
||||
.method public hidebysig instance valuetype [mscorlib]System.AttributeTargets |
||||
EnumZeroValue() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.AttributeTargets V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method EnumTests::EnumZeroValue |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxed() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 1 |
||||
.locals init (object V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x1000 |
||||
IL_0006: box [mscorlib]System.AttributeTargets |
||||
IL_000b: stloc.0 |
||||
IL_000c: br.s IL_000e |
||||
|
||||
IL_000e: ldloc.0 |
||||
IL_000f: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxed |
||||
|
||||
.method public hidebysig instance object |
||||
PreservingTypeWhenBoxedTwoEnum() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 1 |
||||
.locals init (object V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4 0x1004 |
||||
IL_0006: box [mscorlib]System.AttributeTargets |
||||
IL_000b: stloc.0 |
||||
IL_000c: br.s IL_000e |
||||
|
||||
IL_000e: ldloc.0 |
||||
IL_000f: ret |
||||
} // end of method EnumTests::PreservingTypeWhenBoxedTwoEnum |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: ret |
||||
} // end of method EnumTests::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.EnumTests |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,214 @@
@@ -0,0 +1,214 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly MultidimensionalArray |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module MultidimensionalArray.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi nested assembly beforefieldinit Generic`2<.ctor T,S> |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. |
||||
.field private !T[0...,0...] a |
||||
.field private !S[][0...,0...] b |
||||
.method public hidebysig specialname |
||||
instance !T get_Item(int32 i, |
||||
int32 j) cil managed |
||||
{ |
||||
// Code size 19 (0x13) |
||||
.maxstack 3 |
||||
.locals init (!T V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0007: ldarg.1 |
||||
IL_0008: ldarg.2 |
||||
IL_0009: call instance !T !T[0...,0...]::Get(int32, |
||||
int32) |
||||
IL_000e: stloc.0 |
||||
IL_000f: br.s IL_0011 |
||||
|
||||
IL_0011: ldloc.0 |
||||
IL_0012: ret |
||||
} // end of method Generic`2::get_Item |
||||
|
||||
.method public hidebysig specialname |
||||
instance void set_Item(int32 i, |
||||
int32 j, |
||||
!T 'value') cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0007: ldarg.1 |
||||
IL_0008: ldarg.2 |
||||
IL_0009: ldarg.3 |
||||
IL_000a: call instance void !T[0...,0...]::Set(int32, |
||||
int32, |
||||
!T) |
||||
IL_000f: ret |
||||
} // end of method Generic`2::set_Item |
||||
|
||||
.method public hidebysig instance void |
||||
TestB(!S x, |
||||
!S& y) cil managed |
||||
{ |
||||
// Code size 95 (0x5f) |
||||
.maxstack 4 |
||||
.locals init (!S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0007: ldc.i4.5 |
||||
IL_0008: ldc.i4.3 |
||||
IL_0009: ldc.i4.s 10 |
||||
IL_000b: newarr !S |
||||
IL_0010: call instance void !S[][0...,0...]::Set(int32, |
||||
int32, |
||||
!S[]) |
||||
IL_0015: ldarg.0 |
||||
IL_0016: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001b: ldc.i4.5 |
||||
IL_001c: ldc.i4.3 |
||||
IL_001d: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0022: ldc.i4.0 |
||||
IL_0023: ldloca.s V_0 |
||||
IL_0025: initobj !S |
||||
IL_002b: ldloc.0 |
||||
IL_002c: stelem !S |
||||
IL_0031: ldarg.0 |
||||
IL_0032: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0037: ldc.i4.5 |
||||
IL_0038: ldc.i4.3 |
||||
IL_0039: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_003e: ldc.i4.1 |
||||
IL_003f: ldarg.1 |
||||
IL_0040: stelem !S |
||||
IL_0045: ldarg.0 |
||||
IL_0046: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_004b: ldc.i4.5 |
||||
IL_004c: ldc.i4.3 |
||||
IL_004d: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0052: ldc.i4.2 |
||||
IL_0053: ldarg.2 |
||||
IL_0054: ldobj !S |
||||
IL_0059: stelem !S |
||||
IL_005e: ret |
||||
} // end of method Generic`2::TestB |
||||
|
||||
.method public hidebysig instance void |
||||
PassByReference(!T& arr) cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldarg.0 |
||||
IL_0003: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0008: ldc.i4.s 10 |
||||
IL_000a: ldc.i4.s 10 |
||||
IL_000c: call instance !T& !T[0...,0...]::Address(int32, |
||||
int32) |
||||
IL_0011: call instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::PassByReference(!0&) |
||||
IL_0016: nop |
||||
IL_0017: ret |
||||
} // end of method Generic`2::PassByReference |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 38 (0x26) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.s 20 |
||||
IL_0003: ldc.i4.s 20 |
||||
IL_0005: newobj instance void !T[0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_000a: stfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_000f: ldarg.0 |
||||
IL_0010: ldc.i4.s 20 |
||||
IL_0012: ldc.i4.s 20 |
||||
IL_0014: newobj instance void !S[][0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_0019: stfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001e: ldarg.0 |
||||
IL_001f: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0024: nop |
||||
IL_0025: ret |
||||
} // end of method Generic`2::.ctor |
||||
|
||||
.property instance !T Item(int32, |
||||
int32) |
||||
{ |
||||
.get instance !T ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::get_Item(int32, |
||||
int32) |
||||
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::set_Item(int32, |
||||
int32, |
||||
!T) |
||||
} // end of property Generic`2::Item |
||||
} // end of class Generic`2 |
||||
|
||||
.method public hidebysig instance int32[0...,0...][] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 13 (0xd) |
||||
.maxstack 1 |
||||
.locals init (int32[0...,0...][] V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.s 10 |
||||
IL_0003: newarr int32[0...,0...] |
||||
IL_0008: stloc.0 |
||||
IL_0009: br.s IL_000b |
||||
|
||||
IL_000b: ldloc.0 |
||||
IL_000c: ret |
||||
} // end of method MultidimensionalArray::MakeArray |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method MultidimensionalArray::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,197 @@
@@ -0,0 +1,197 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly MultidimensionalArray.opt |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module MultidimensionalArray.opt.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi nested assembly beforefieldinit Generic`2<.ctor T,S> |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. |
||||
.field private !T[0...,0...] a |
||||
.field private !S[][0...,0...] b |
||||
.method public hidebysig specialname |
||||
instance !T get_Item(int32 i, |
||||
int32 j) cil managed |
||||
{ |
||||
// Code size 14 (0xe) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0006: ldarg.1 |
||||
IL_0007: ldarg.2 |
||||
IL_0008: call instance !T !T[0...,0...]::Get(int32, |
||||
int32) |
||||
IL_000d: ret |
||||
} // end of method Generic`2::get_Item |
||||
|
||||
.method public hidebysig specialname |
||||
instance void set_Item(int32 i, |
||||
int32 j, |
||||
!T 'value') cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0006: ldarg.1 |
||||
IL_0007: ldarg.2 |
||||
IL_0008: ldarg.3 |
||||
IL_0009: call instance void !T[0...,0...]::Set(int32, |
||||
int32, |
||||
!T) |
||||
IL_000e: ret |
||||
} // end of method Generic`2::set_Item |
||||
|
||||
.method public hidebysig instance void |
||||
TestB(!S x, |
||||
!S& y) cil managed |
||||
{ |
||||
// Code size 94 (0x5e) |
||||
.maxstack 4 |
||||
.locals init (!S V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0006: ldc.i4.5 |
||||
IL_0007: ldc.i4.3 |
||||
IL_0008: ldc.i4.s 10 |
||||
IL_000a: newarr !S |
||||
IL_000f: call instance void !S[][0...,0...]::Set(int32, |
||||
int32, |
||||
!S[]) |
||||
IL_0014: ldarg.0 |
||||
IL_0015: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001a: ldc.i4.5 |
||||
IL_001b: ldc.i4.3 |
||||
IL_001c: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0021: ldc.i4.0 |
||||
IL_0022: ldloca.s V_0 |
||||
IL_0024: initobj !S |
||||
IL_002a: ldloc.0 |
||||
IL_002b: stelem !S |
||||
IL_0030: ldarg.0 |
||||
IL_0031: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0036: ldc.i4.5 |
||||
IL_0037: ldc.i4.3 |
||||
IL_0038: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_003d: ldc.i4.1 |
||||
IL_003e: ldarg.1 |
||||
IL_003f: stelem !S |
||||
IL_0044: ldarg.0 |
||||
IL_0045: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_004a: ldc.i4.5 |
||||
IL_004b: ldc.i4.3 |
||||
IL_004c: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0051: ldc.i4.2 |
||||
IL_0052: ldarg.2 |
||||
IL_0053: ldobj !S |
||||
IL_0058: stelem !S |
||||
IL_005d: ret |
||||
} // end of method Generic`2::TestB |
||||
|
||||
.method public hidebysig instance void |
||||
PassByReference(!T& arr) cil managed |
||||
{ |
||||
// Code size 22 (0x16) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0007: ldc.i4.s 10 |
||||
IL_0009: ldc.i4.s 10 |
||||
IL_000b: call instance !T& !T[0...,0...]::Address(int32, |
||||
int32) |
||||
IL_0010: call instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::PassByReference(!0&) |
||||
IL_0015: ret |
||||
} // end of method Generic`2::PassByReference |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 37 (0x25) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.s 20 |
||||
IL_0003: ldc.i4.s 20 |
||||
IL_0005: newobj instance void !T[0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_000a: stfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_000f: ldarg.0 |
||||
IL_0010: ldc.i4.s 20 |
||||
IL_0012: ldc.i4.s 20 |
||||
IL_0014: newobj instance void !S[][0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_0019: stfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001e: ldarg.0 |
||||
IL_001f: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0024: ret |
||||
} // end of method Generic`2::.ctor |
||||
|
||||
.property instance !T Item(int32, |
||||
int32) |
||||
{ |
||||
.get instance !T ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::get_Item(int32, |
||||
int32) |
||||
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::set_Item(int32, |
||||
int32, |
||||
!T) |
||||
} // end of property Generic`2::Item |
||||
} // end of class Generic`2 |
||||
|
||||
.method public hidebysig instance int32[0...,0...][] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 10 |
||||
IL_0002: newarr int32[0...,0...] |
||||
IL_0007: ret |
||||
} // end of method MultidimensionalArray::MakeArray |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method MultidimensionalArray::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,201 @@
@@ -0,0 +1,201 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly MultidimensionalArray |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module MultidimensionalArray.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi nested assembly beforefieldinit Generic`2<.ctor T,S> |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. |
||||
.field private !T[0...,0...] a |
||||
.field private !S[][0...,0...] b |
||||
.method public hidebysig specialname |
||||
instance !T get_Item(int32 i, |
||||
int32 j) cil managed |
||||
{ |
||||
// Code size 14 (0xe) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0006: ldarg.1 |
||||
IL_0007: ldarg.2 |
||||
IL_0008: call instance !T !T[0...,0...]::Get(int32, |
||||
int32) |
||||
IL_000d: ret |
||||
} // end of method Generic`2::get_Item |
||||
|
||||
.method public hidebysig specialname |
||||
instance void set_Item(int32 i, |
||||
int32 j, |
||||
!T 'value') cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0006: ldarg.1 |
||||
IL_0007: ldarg.2 |
||||
IL_0008: ldarg.3 |
||||
IL_0009: call instance void !T[0...,0...]::Set(int32, |
||||
int32, |
||||
!T) |
||||
IL_000e: ret |
||||
} // end of method Generic`2::set_Item |
||||
|
||||
.method public hidebysig instance void |
||||
TestB(!S x, |
||||
!S& y) cil managed |
||||
{ |
||||
// Code size 94 (0x5e) |
||||
.maxstack 4 |
||||
.locals init (!S V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0006: ldc.i4.5 |
||||
IL_0007: ldc.i4.3 |
||||
IL_0008: ldc.i4.s 10 |
||||
IL_000a: newarr !S |
||||
IL_000f: call instance void !S[][0...,0...]::Set(int32, |
||||
int32, |
||||
!S[]) |
||||
IL_0014: ldarg.0 |
||||
IL_0015: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001a: ldc.i4.5 |
||||
IL_001b: ldc.i4.3 |
||||
IL_001c: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0021: ldc.i4.0 |
||||
IL_0022: ldloca.s V_0 |
||||
IL_0024: initobj !S |
||||
IL_002a: ldloc.0 |
||||
IL_002b: stelem !S |
||||
IL_0030: ldarg.0 |
||||
IL_0031: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0036: ldc.i4.5 |
||||
IL_0037: ldc.i4.3 |
||||
IL_0038: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_003d: ldc.i4.1 |
||||
IL_003e: ldarg.1 |
||||
IL_003f: stelem !S |
||||
IL_0044: ldarg.0 |
||||
IL_0045: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_004a: ldc.i4.5 |
||||
IL_004b: ldc.i4.3 |
||||
IL_004c: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0051: ldc.i4.2 |
||||
IL_0052: ldarg.2 |
||||
IL_0053: ldobj !S |
||||
IL_0058: stelem !S |
||||
IL_005d: ret |
||||
} // end of method Generic`2::TestB |
||||
|
||||
.method public hidebysig instance void |
||||
PassByReference(!T& arr) cil managed |
||||
{ |
||||
// Code size 22 (0x16) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0007: ldc.i4.s 10 |
||||
IL_0009: ldc.i4.s 10 |
||||
IL_000b: call instance !T& !T[0...,0...]::Address(int32, |
||||
int32) |
||||
IL_0010: call instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::PassByReference(!0&) |
||||
IL_0015: ret |
||||
} // end of method Generic`2::PassByReference |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 37 (0x25) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.s 20 |
||||
IL_0003: ldc.i4.s 20 |
||||
IL_0005: newobj instance void !T[0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_000a: stfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_000f: ldarg.0 |
||||
IL_0010: ldc.i4.s 20 |
||||
IL_0012: ldc.i4.s 20 |
||||
IL_0014: newobj instance void !S[][0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_0019: stfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001e: ldarg.0 |
||||
IL_001f: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0024: ret |
||||
} // end of method Generic`2::.ctor |
||||
|
||||
.property instance !T Item(int32, |
||||
int32) |
||||
{ |
||||
.get instance !T ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::get_Item(int32, |
||||
int32) |
||||
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::set_Item(int32, |
||||
int32, |
||||
!T) |
||||
} // end of property Generic`2::Item |
||||
} // end of class Generic`2 |
||||
|
||||
.method public hidebysig instance int32[0...,0...][] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 10 |
||||
IL_0002: newarr int32[0...,0...] |
||||
IL_0007: ret |
||||
} // end of method MultidimensionalArray::MakeArray |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: ret |
||||
} // end of method MultidimensionalArray::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,219 @@
@@ -0,0 +1,219 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly MultidimensionalArray |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module MultidimensionalArray.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class auto ansi nested assembly beforefieldinit Generic`2<.ctor T,S> |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. |
||||
.field private !T[0...,0...] a |
||||
.field private !S[][0...,0...] b |
||||
.method public hidebysig specialname |
||||
instance !T get_Item(int32 i, |
||||
int32 j) cil managed |
||||
{ |
||||
// Code size 19 (0x13) |
||||
.maxstack 3 |
||||
.locals init (!T V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0007: ldarg.1 |
||||
IL_0008: ldarg.2 |
||||
IL_0009: call instance !T !T[0...,0...]::Get(int32, |
||||
int32) |
||||
IL_000e: stloc.0 |
||||
IL_000f: br.s IL_0011 |
||||
|
||||
IL_0011: ldloc.0 |
||||
IL_0012: ret |
||||
} // end of method Generic`2::get_Item |
||||
|
||||
.method public hidebysig specialname |
||||
instance void set_Item(int32 i, |
||||
int32 j, |
||||
!T 'value') cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0007: ldarg.1 |
||||
IL_0008: ldarg.2 |
||||
IL_0009: ldarg.3 |
||||
IL_000a: call instance void !T[0...,0...]::Set(int32, |
||||
int32, |
||||
!T) |
||||
IL_000f: ret |
||||
} // end of method Generic`2::set_Item |
||||
|
||||
.method public hidebysig instance void |
||||
TestB(!S x, |
||||
!S& y) cil managed |
||||
{ |
||||
// Code size 95 (0x5f) |
||||
.maxstack 4 |
||||
.locals init (!S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0007: ldc.i4.5 |
||||
IL_0008: ldc.i4.3 |
||||
IL_0009: ldc.i4.s 10 |
||||
IL_000b: newarr !S |
||||
IL_0010: call instance void !S[][0...,0...]::Set(int32, |
||||
int32, |
||||
!S[]) |
||||
IL_0015: ldarg.0 |
||||
IL_0016: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001b: ldc.i4.5 |
||||
IL_001c: ldc.i4.3 |
||||
IL_001d: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0022: ldc.i4.0 |
||||
IL_0023: ldloca.s V_0 |
||||
IL_0025: initobj !S |
||||
IL_002b: ldloc.0 |
||||
IL_002c: stelem !S |
||||
IL_0031: ldarg.0 |
||||
IL_0032: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_0037: ldc.i4.5 |
||||
IL_0038: ldc.i4.3 |
||||
IL_0039: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_003e: ldc.i4.1 |
||||
IL_003f: ldarg.1 |
||||
IL_0040: stelem !S |
||||
IL_0045: ldarg.0 |
||||
IL_0046: ldfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_004b: ldc.i4.5 |
||||
IL_004c: ldc.i4.3 |
||||
IL_004d: call instance !S[] !S[][0...,0...]::Get(int32, |
||||
int32) |
||||
IL_0052: ldc.i4.2 |
||||
IL_0053: ldarg.2 |
||||
IL_0054: ldobj !S |
||||
IL_0059: stelem !S |
||||
IL_005e: ret |
||||
} // end of method Generic`2::TestB |
||||
|
||||
.method public hidebysig instance void |
||||
PassByReference(!T& arr) cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldarg.0 |
||||
IL_0003: ldfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_0008: ldc.i4.s 10 |
||||
IL_000a: ldc.i4.s 10 |
||||
IL_000c: call instance !T& !T[0...,0...]::Address(int32, |
||||
int32) |
||||
IL_0011: call instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::PassByReference(!0&) |
||||
IL_0016: nop |
||||
IL_0017: ret |
||||
} // end of method Generic`2::PassByReference |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 38 (0x26) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.s 20 |
||||
IL_0003: ldc.i4.s 20 |
||||
IL_0005: newobj instance void !T[0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_000a: stfld !0[0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::a |
||||
IL_000f: ldarg.0 |
||||
IL_0010: ldc.i4.s 20 |
||||
IL_0012: ldc.i4.s 20 |
||||
IL_0014: newobj instance void !S[][0...,0...]::.ctor(int32, |
||||
int32) |
||||
IL_0019: stfld !1[][0...,0...] class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2<!T,!S>::b |
||||
IL_001e: ldarg.0 |
||||
IL_001f: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0024: nop |
||||
IL_0025: ret |
||||
} // end of method Generic`2::.ctor |
||||
|
||||
.property instance !T Item(int32, |
||||
int32) |
||||
{ |
||||
.get instance !T ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::get_Item(int32, |
||||
int32) |
||||
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray/Generic`2::set_Item(int32, |
||||
int32, |
||||
!T) |
||||
} // end of property Generic`2::Item |
||||
} // end of class Generic`2 |
||||
|
||||
.method public hidebysig instance int32[0...,0...][] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 13 (0xd) |
||||
.maxstack 1 |
||||
.locals init (int32[0...,0...][] V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.s 10 |
||||
IL_0003: newarr int32[0...,0...] |
||||
IL_0008: stloc.0 |
||||
IL_0009: br.s IL_000b |
||||
|
||||
IL_000b: ldloc.0 |
||||
IL_000c: ret |
||||
} // end of method MultidimensionalArray::MakeArray |
||||
|
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||
IL_0006: nop |
||||
IL_0007: ret |
||||
} // end of method MultidimensionalArray::.ctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MultidimensionalArray |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,945 @@
@@ -0,0 +1,945 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty |
||||
{ |
||||
public class IndexerWithGetOnly |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int i] => i; |
||||
#else
|
||||
public int this[int i] { |
||||
get { |
||||
return i; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class IndexerWithSetOnly |
||||
{ |
||||
public int this[int i] { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
|
||||
public class IndexerWithMoreParameters |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int i, string s, Type t] => 0; |
||||
#else
|
||||
public int this[int i, string s, Type t] { |
||||
get { |
||||
return 0; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
|
||||
public class IndexerInGenericClass<T> |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[T t] => 0; |
||||
#else
|
||||
public int this[T t] { |
||||
get { |
||||
return 0; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class OverloadedIndexer |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int t] => 0; |
||||
#else
|
||||
public int this[int t] { |
||||
get { |
||||
return 0; |
||||
} |
||||
} |
||||
#endif
|
||||
public int this[string s] { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
Console.WriteLine(value + " " + s); |
||||
} |
||||
} |
||||
} |
||||
public interface IIndexerInInterface |
||||
{ |
||||
int this[string s, string s2] { |
||||
set; |
||||
} |
||||
} |
||||
public interface IMyInterface_IndexerInterfaceExplicitImplementation |
||||
{ |
||||
int this[string s] { |
||||
get; |
||||
} |
||||
} |
||||
public class MyClass_IndexerInterfaceExplicitImplementation : IMyInterface_IndexerInterfaceExplicitImplementation |
||||
{ |
||||
#if ROSLYN
|
||||
int IMyInterface_IndexerInterfaceExplicitImplementation.this[string s] => 3; |
||||
#else
|
||||
int IMyInterface_IndexerInterfaceExplicitImplementation.this[string s] { |
||||
get { |
||||
return 3; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public interface IMyInterface_IndexerInterfaceImplementation |
||||
{ |
||||
int this[string s] { |
||||
get; |
||||
} |
||||
} |
||||
public class MyClass_IndexerInterfaceImplementation : IMyInterface_IndexerInterfaceImplementation |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[string s] => 3; |
||||
#else
|
||||
public int this[string s] { |
||||
get { |
||||
return 3; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public abstract class MyClass_IndexerAbstract |
||||
{ |
||||
public abstract int this[string s, string s2] { |
||||
set; |
||||
} |
||||
protected abstract string this[int index] { |
||||
get; |
||||
} |
||||
} |
||||
public interface IMyInterface_MethodExplicit |
||||
{ |
||||
void MyMethod(); |
||||
} |
||||
public class MyClass_MethodExplicit : IMyInterface_MethodExplicit |
||||
{ |
||||
void IMyInterface_MethodExplicit.MyMethod() |
||||
{ |
||||
} |
||||
} |
||||
public interface IMyInterface_MethodFromInterfaceVirtual |
||||
{ |
||||
void MyMethod(); |
||||
} |
||||
public class MyClass : IMyInterface_MethodFromInterfaceVirtual |
||||
{ |
||||
public virtual void MyMethod() |
||||
{ |
||||
} |
||||
} |
||||
public interface IMyInterface_MethodFromInterface |
||||
{ |
||||
void MyMethod(); |
||||
} |
||||
public class MyClass_MethodFromInterface : IMyInterface_MethodFromInterface |
||||
{ |
||||
public void MyMethod() |
||||
{ |
||||
} |
||||
} |
||||
public interface IMyInterface_MethodFromInterfaceAbstract |
||||
{ |
||||
void MyMethod(); |
||||
} |
||||
public abstract class MyClass_MethodFromInterfaceAbstract : IMyInterface_MethodFromInterfaceAbstract |
||||
{ |
||||
public abstract void MyMethod(); |
||||
} |
||||
public interface IMyInterface_PropertyInterface |
||||
{ |
||||
int MyProperty { |
||||
get; |
||||
set; |
||||
} |
||||
} |
||||
public interface IMyInterface_PropertyInterfaceExplicitImplementation |
||||
{ |
||||
int MyProperty { |
||||
get; |
||||
set; |
||||
} |
||||
} |
||||
public class MyClass_PropertyInterfaceExplicitImplementation : IMyInterface_PropertyInterfaceExplicitImplementation |
||||
{ |
||||
int IMyInterface_PropertyInterfaceExplicitImplementation.MyProperty { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public interface IMyInterface_PropertyInterfaceImplementation |
||||
{ |
||||
int MyProperty { |
||||
get; |
||||
set; |
||||
} |
||||
} |
||||
public class MyClass_PropertyInterfaceImplementation : IMyInterface_PropertyInterfaceImplementation |
||||
{ |
||||
public int MyProperty { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class MyClass_PropertyPrivateGetPublicSet |
||||
{ |
||||
public int MyProperty { |
||||
private get { |
||||
return 3; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class MyClass_PropertyPublicGetProtectedSet |
||||
{ |
||||
public int MyProperty { |
||||
get { |
||||
return 3; |
||||
} |
||||
protected set { |
||||
} |
||||
} |
||||
} |
||||
public class MyClass_PropertyOverrideDefaultAccessorOnly |
||||
{ |
||||
public virtual int MyProperty { |
||||
get { |
||||
return 3; |
||||
} |
||||
protected set { |
||||
} |
||||
} |
||||
} |
||||
public class Derived_PropertyOverrideDefaultAccessorOnly : MyClass_PropertyOverrideDefaultAccessorOnly |
||||
{ |
||||
#if ROSLYN
|
||||
public override int MyProperty => 4; |
||||
#else
|
||||
public override int MyProperty { |
||||
get { |
||||
return 4; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class MyClass_PropertyOverrideRestrictedAccessorOnly |
||||
{ |
||||
public virtual int MyProperty { |
||||
get { |
||||
return 3; |
||||
} |
||||
protected set { |
||||
} |
||||
} |
||||
} |
||||
public class Derived_PropertyOverrideRestrictedAccessorOnly : MyClass_PropertyOverrideRestrictedAccessorOnly |
||||
{ |
||||
public override int MyProperty { |
||||
protected set { |
||||
} |
||||
} |
||||
} |
||||
public class MyClass_PropertyOverrideOneAccessor |
||||
{ |
||||
protected internal virtual int MyProperty { |
||||
get { |
||||
return 3; |
||||
} |
||||
protected set { |
||||
} |
||||
} |
||||
} |
||||
public class DerivedNew_PropertyOverrideOneAccessor : MyClass_PropertyOverrideOneAccessor |
||||
{ |
||||
public new virtual int MyProperty { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class DerivedOverride_PropertyOverrideOneAccessor : DerivedNew_PropertyOverrideOneAccessor |
||||
{ |
||||
public override int MyProperty { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class MyClass_IndexerOverrideRestrictedAccessorOnly |
||||
{ |
||||
public virtual int this[string s] { |
||||
get { |
||||
return 3; |
||||
} |
||||
protected set { |
||||
} |
||||
} |
||||
protected internal virtual int this[int i] { |
||||
protected get { |
||||
return 2; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class Derived_IndexerOverrideRestrictedAccessorOnly : MyClass_IndexerOverrideRestrictedAccessorOnly |
||||
{ |
||||
protected internal override int this[int i] { |
||||
protected get { |
||||
return 4; |
||||
} |
||||
} |
||||
} |
||||
public class A_HideProperty |
||||
{ |
||||
public virtual int P { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class B_HideProperty : A_HideProperty |
||||
{ |
||||
private new int P { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class C_HideProperty : B_HideProperty |
||||
{ |
||||
public override int P { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class A_HideMembers |
||||
{ |
||||
public int F; |
||||
#if ROSLYN
|
||||
public int Prop => 3; |
||||
public int G => 3; |
||||
#else
|
||||
public int Prop { |
||||
get { |
||||
return 3; |
||||
} |
||||
} |
||||
public int G { |
||||
get { |
||||
return 3; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class B_HideMembers : A_HideMembers |
||||
{ |
||||
#if ROSLYN
|
||||
public new int F => 3; |
||||
public new string Prop => "a"; |
||||
#else
|
||||
public new int F { |
||||
get { |
||||
return 3; |
||||
} |
||||
} |
||||
public new string Prop { |
||||
get { |
||||
return "a"; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class C_HideMembers : A_HideMembers |
||||
{ |
||||
public new int G; |
||||
} |
||||
public class D_HideMembers : A_HideMembers |
||||
{ |
||||
public new void F() |
||||
{ |
||||
} |
||||
} |
||||
public class D1_HideMembers : D_HideMembers |
||||
{ |
||||
public new int F; |
||||
} |
||||
public class E_HideMembers : A_HideMembers |
||||
{ |
||||
private new class F |
||||
{ |
||||
} |
||||
} |
||||
public class G_HideMembers2 |
||||
{ |
||||
#if ROSLYN
|
||||
public int Item => 1; |
||||
#else
|
||||
public int Item { |
||||
get { |
||||
return 1; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class G2_HideMembers2 : G_HideMembers2 |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int i] => 2; |
||||
#else
|
||||
public int this[int i] { |
||||
get { |
||||
return 2; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class G3_HideMembers2 : G2_HideMembers2 |
||||
{ |
||||
#if ROSLYN
|
||||
public new int Item => 4; |
||||
#else
|
||||
public new int Item { |
||||
get { |
||||
return 4; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class H_HideMembers2 |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int j] => 0; |
||||
#else
|
||||
public int this[int j] { |
||||
get { |
||||
return 0; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class H2_HideMembers2 : H_HideMembers2 |
||||
{ |
||||
#if ROSLYN
|
||||
public int Item => 2; |
||||
#else
|
||||
public int Item { |
||||
get { |
||||
return 2; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class H3_HideMembers2 : H2_HideMembers2 |
||||
{ |
||||
#if ROSLYN
|
||||
public new string this[int j] => null; |
||||
#else
|
||||
public new string this[int j] { |
||||
get { |
||||
return null; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public interface IA_HideMembers2a |
||||
{ |
||||
int this[int i] { |
||||
get; |
||||
} |
||||
} |
||||
public class A_HideMembers2a : IA_HideMembers2a |
||||
{ |
||||
int IA_HideMembers2a.this[int i] { |
||||
get { |
||||
throw new NotImplementedException(); |
||||
} |
||||
} |
||||
} |
||||
public class A1_HideMembers2a : A_HideMembers2a |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int i] => 3; |
||||
#else
|
||||
public int this[int i] { |
||||
get { |
||||
return 3; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class G_HideMembers3<T> |
||||
{ |
||||
public void M1(T p) |
||||
{ |
||||
} |
||||
public int M2(int t) |
||||
{ |
||||
return 3; |
||||
} |
||||
} |
||||
public class G1_HideMembers3<T> : G_HideMembers3<int> |
||||
{ |
||||
public new int M1(int i) |
||||
{ |
||||
return 0; |
||||
} |
||||
public int M2(T i) |
||||
{ |
||||
return 2; |
||||
} |
||||
} |
||||
public class G2_HideMembers3<T> : G_HideMembers3<int> |
||||
{ |
||||
public int M1(T p) |
||||
{ |
||||
return 4; |
||||
} |
||||
} |
||||
public class J_HideMembers3 |
||||
{ |
||||
#if ROSLYN
|
||||
public int P => 2; |
||||
#else
|
||||
public int P { |
||||
get { |
||||
return 2; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class J2_HideMembers3 : J_HideMembers3 |
||||
{ |
||||
#pragma warning disable 0108
|
||||
// Deliberate bad code for test case
|
||||
public int get_P; |
||||
#pragma warning restore 0108
|
||||
} |
||||
public class A_HideMembers4 |
||||
{ |
||||
public void M<T>(T t) |
||||
{ |
||||
} |
||||
} |
||||
public class A1_HideMembers4 : A_HideMembers4 |
||||
{ |
||||
public new void M<K>(K t) |
||||
{ |
||||
} |
||||
public void M(int t) |
||||
{ |
||||
} |
||||
} |
||||
public class B_HideMembers4 |
||||
{ |
||||
public void M<T>() |
||||
{ |
||||
} |
||||
public void M1<T>() |
||||
{ |
||||
} |
||||
public void M2<T>(T t) |
||||
{ |
||||
} |
||||
} |
||||
public class B1_HideMembers4 : B_HideMembers4 |
||||
{ |
||||
public void M<T1, T2>() |
||||
{ |
||||
} |
||||
public new void M1<R>() |
||||
{ |
||||
} |
||||
public new void M2<R>(R r) |
||||
{ |
||||
} |
||||
} |
||||
public class C_HideMembers4<T> |
||||
{ |
||||
public void M<TT>(T t) |
||||
{ |
||||
} |
||||
} |
||||
public class C1_HideMembers4<K> : C_HideMembers4<K> |
||||
{ |
||||
public void M<TT>(TT t) |
||||
{ |
||||
} |
||||
} |
||||
public class A_HideMembers5 |
||||
{ |
||||
public void M(int t) |
||||
{ |
||||
} |
||||
} |
||||
public class A1_HideMembers5 : A_HideMembers5 |
||||
{ |
||||
public void M(ref int t) |
||||
{ |
||||
} |
||||
} |
||||
public class B_HideMembers5 |
||||
{ |
||||
public void M(ref int l) |
||||
{ |
||||
} |
||||
} |
||||
public class B1_HideMembers5 : B_HideMembers5 |
||||
{ |
||||
public void M(out int l) |
||||
{ |
||||
l = 2; |
||||
} |
||||
public void M(ref long l) |
||||
{ |
||||
} |
||||
} |
||||
public class A_HideMemberSkipNotVisible |
||||
{ |
||||
protected int F; |
||||
#if ROSLYN
|
||||
protected string P => null; |
||||
#else
|
||||
protected string P { |
||||
get { |
||||
return null; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class B_HideMemberSkipNotVisible : A_HideMemberSkipNotVisible |
||||
{ |
||||
private new string F; |
||||
private new int P { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class A_HideNestedClass |
||||
{ |
||||
public class N1 |
||||
{ |
||||
} |
||||
protected class N2 |
||||
{ |
||||
} |
||||
private class N3 |
||||
{ |
||||
} |
||||
internal class N4 |
||||
{ |
||||
} |
||||
protected internal class N5 |
||||
{ |
||||
} |
||||
} |
||||
public class B_HideNestedClass : A_HideNestedClass |
||||
{ |
||||
public new int N1; |
||||
public new int N2; |
||||
public int N3; |
||||
public new int N4; |
||||
public new int N5; |
||||
} |
||||
public class A_HidePropertyReservedMethod |
||||
{ |
||||
#if ROSLYN
|
||||
public int P => 1; |
||||
#else
|
||||
public int P { |
||||
get { |
||||
return 1; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class B_HidePropertyReservedMethod : A_HidePropertyReservedMethod |
||||
{ |
||||
public int get_P() |
||||
{ |
||||
return 2; |
||||
} |
||||
public void set_P(int value) |
||||
{ |
||||
} |
||||
} |
||||
public class A_HideIndexerDiffAccessor |
||||
{ |
||||
#if ROSLYN
|
||||
public int this[int i] => 2; |
||||
#else
|
||||
public int this[int i] { |
||||
get { |
||||
return 2; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class B_HideIndexerDiffAccessor : A_HideIndexerDiffAccessor |
||||
{ |
||||
public new int this[int j] { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class A_HideIndexerGeneric<T> |
||||
{ |
||||
public virtual int this[T r] { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class B_HideIndexerGeneric : A_HideIndexerGeneric<int> |
||||
{ |
||||
private new int this[int k] { |
||||
get { |
||||
return 0; |
||||
} |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class C_HideIndexerGeneric<T> : A_HideIndexerGeneric<T> |
||||
{ |
||||
public override int this[T s] { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class D_HideIndexerGeneric<T> : C_HideIndexerGeneric<T> |
||||
{ |
||||
public new virtual int this[T s] { |
||||
set { |
||||
} |
||||
} |
||||
} |
||||
public class A_HideMethod |
||||
{ |
||||
public virtual void F() |
||||
{ |
||||
} |
||||
} |
||||
public class B_HideMethod : A_HideMethod |
||||
{ |
||||
private new void F() |
||||
{ |
||||
base.F(); |
||||
} |
||||
} |
||||
public class C_HideMethod : B_HideMethod |
||||
{ |
||||
public override void F() |
||||
{ |
||||
base.F(); |
||||
} |
||||
} |
||||
public class A_HideMethodGeneric<T> |
||||
{ |
||||
public virtual void F(T s) |
||||
{ |
||||
} |
||||
public new static bool Equals(object o1, object o2) |
||||
{ |
||||
return true; |
||||
} |
||||
} |
||||
public class B_HideMethodGeneric : A_HideMethodGeneric<string> |
||||
{ |
||||
private new void F(string k) |
||||
{ |
||||
} |
||||
public void F(int i) |
||||
{ |
||||
} |
||||
} |
||||
public class C_HideMethodGeneric<T> : A_HideMethodGeneric<T> |
||||
{ |
||||
public override void F(T r) |
||||
{ |
||||
} |
||||
public void G(T t) |
||||
{ |
||||
} |
||||
} |
||||
public class D_HideMethodGeneric<T1> : C_HideMethodGeneric<T1> |
||||
{ |
||||
public new virtual void F(T1 k) |
||||
{ |
||||
} |
||||
public virtual void F<T2>(T2 k) |
||||
{ |
||||
} |
||||
public virtual void G<T2>(T2 t) |
||||
{ |
||||
} |
||||
} |
||||
public class A_HideMethodGenericSkipPrivate<T> |
||||
{ |
||||
public virtual void F(T t) |
||||
{ |
||||
} |
||||
} |
||||
public class B_HideMethodGenericSkipPrivate<T> : A_HideMethodGenericSkipPrivate<T> |
||||
{ |
||||
private new void F(T t) |
||||
{ |
||||
} |
||||
private void K() |
||||
{ |
||||
} |
||||
} |
||||
public class C_HideMethodGenericSkipPrivate<T> : B_HideMethodGenericSkipPrivate<T> |
||||
{ |
||||
public override void F(T tt) |
||||
{ |
||||
} |
||||
public void K() |
||||
{ |
||||
} |
||||
} |
||||
public class D_HideMethodGenericSkipPrivate : B_HideMethodGenericSkipPrivate<int> |
||||
{ |
||||
public override void F(int t) |
||||
{ |
||||
} |
||||
} |
||||
public class A_HideMethodGeneric2 |
||||
{ |
||||
public virtual void F(int i) |
||||
{ |
||||
} |
||||
public void K() |
||||
{ |
||||
} |
||||
} |
||||
public class B_HideMethodGeneric2<T> : A_HideMethodGeneric2 |
||||
{ |
||||
protected virtual void F(T t) |
||||
{ |
||||
} |
||||
public void K<T2>() |
||||
{ |
||||
} |
||||
} |
||||
public class C_HideMethodGeneric2 : B_HideMethodGeneric2<int> |
||||
{ |
||||
protected override void F(int k) |
||||
{ |
||||
} |
||||
public new void K<T3>() |
||||
{ |
||||
} |
||||
} |
||||
public class D_HideMethodGeneric2 : B_HideMethodGeneric2<string> |
||||
{ |
||||
public override void F(int k) |
||||
{ |
||||
} |
||||
public void L<T4>() |
||||
{ |
||||
} |
||||
} |
||||
public class E_HideMethodGeneric2<T> |
||||
{ |
||||
public void M<T2>(T t, T2 t2) |
||||
{ |
||||
} |
||||
} |
||||
public class F_HideMethodGeneric2<T> : E_HideMethodGeneric2<T> |
||||
{ |
||||
public void M(T t1, T t2) |
||||
{ |
||||
} |
||||
} |
||||
public class C1_HideMethodDiffSignatures<T> |
||||
{ |
||||
public virtual void M(T arg) |
||||
{ |
||||
} |
||||
} |
||||
public class C2_HideMethodDiffSignatures<T1, T2> : C1_HideMethodDiffSignatures<T2> |
||||
{ |
||||
public new virtual void M(T2 arg) |
||||
{ |
||||
} |
||||
} |
||||
public class C3_HideMethodDiffSignatures : C2_HideMethodDiffSignatures<int, bool> |
||||
{ |
||||
public new virtual void M(bool arg) |
||||
{ |
||||
} |
||||
} |
||||
public class A_HideMethodStatic |
||||
{ |
||||
#if ROSLYN
|
||||
public int N => 0; |
||||
#else
|
||||
public int N { |
||||
get { |
||||
return 0; |
||||
} |
||||
} |
||||
#endif
|
||||
} |
||||
public class B_HideMethodStatic |
||||
{ |
||||
public int N() |
||||
{ |
||||
return 0; |
||||
} |
||||
} |
||||
public class A_HideEvent |
||||
{ |
||||
public virtual event EventHandler E; |
||||
public event EventHandler F; |
||||
} |
||||
public class B_HideEvent : A_HideEvent |
||||
{ |
||||
public new virtual event EventHandler E; |
||||
public new event EventHandler F; |
||||
} |
||||
public class C_HideEvent : B_HideEvent |
||||
{ |
||||
public override event EventHandler E; |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,186 @@
@@ -0,0 +1,186 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty |
||||
{ |
||||
public static class ValueTypes |
||||
{ |
||||
public struct S |
||||
{ |
||||
public int Field; |
||||
|
||||
public S(int field) |
||||
{ |
||||
Field = field; |
||||
} |
||||
|
||||
public void SetField() |
||||
{ |
||||
Field = 5; |
||||
} |
||||
|
||||
public void MethodCalls() |
||||
{ |
||||
SetField(); |
||||
Test(this); |
||||
Test(ref this); |
||||
} |
||||
|
||||
private static void Test(S byVal) |
||||
{ |
||||
} |
||||
|
||||
private static void Test(ref S byRef) |
||||
{ |
||||
} |
||||
} |
||||
|
||||
private static readonly S ReadOnlyS = default(S); |
||||
private static S MutableS = default(S); |
||||
private static volatile int VolatileInt; |
||||
|
||||
public static void CallMethodViaField() |
||||
{ |
||||
ReadOnlyS.SetField(); |
||||
MutableS.SetField(); |
||||
S mutableS = MutableS; |
||||
mutableS.SetField(); |
||||
} |
||||
|
||||
public static S InitObj1() |
||||
{ |
||||
S result = default(S); |
||||
MakeArray(); |
||||
return result; |
||||
} |
||||
|
||||
public static S InitObj2() |
||||
{ |
||||
return default(S); |
||||
} |
||||
|
||||
public static void InitObj3(out S p) |
||||
{ |
||||
p = default(S); |
||||
} |
||||
|
||||
public static S CallValueTypeCtor1() |
||||
{ |
||||
return new S(10); |
||||
} |
||||
|
||||
public static S CallValueTypeCtor2() |
||||
{ |
||||
S result = new S(10); |
||||
return result; |
||||
} |
||||
|
||||
public static S Copy1(S p) |
||||
{ |
||||
return p; |
||||
} |
||||
|
||||
public static S Copy2(ref S p) |
||||
{ |
||||
return p; |
||||
} |
||||
|
||||
public static void Copy3(S p, out S o) |
||||
{ |
||||
o = p; |
||||
} |
||||
|
||||
public static void Copy4(ref S p, out S o) |
||||
{ |
||||
o = p; |
||||
} |
||||
|
||||
public static void Copy4b(ref S p, out S o) |
||||
{ |
||||
// test passing through by-ref arguments
|
||||
Copy4(ref p, out o); |
||||
} |
||||
|
||||
public static void Issue56(int i, out string str) |
||||
{ |
||||
str = "qq"; |
||||
str += i.ToString(); |
||||
} |
||||
|
||||
public static void CopyAroundAndModifyField(S s) |
||||
{ |
||||
S s2 = s; |
||||
s2.Field += 10; |
||||
s = s2; |
||||
} |
||||
|
||||
private static int[] MakeArray() |
||||
{ |
||||
return null; |
||||
} |
||||
|
||||
public static void IncrementArrayLocation() |
||||
{ |
||||
MakeArray()[Environment.TickCount]++; |
||||
} |
||||
|
||||
public static bool Is(object obj) |
||||
{ |
||||
return obj is S; |
||||
} |
||||
|
||||
public static bool IsNullable(object obj) |
||||
{ |
||||
return obj is S?; |
||||
} |
||||
|
||||
public static S? As(object obj) |
||||
{ |
||||
return obj as S?; |
||||
} |
||||
|
||||
public static S OnlyChangeTheCopy(S p) |
||||
{ |
||||
S s = p; |
||||
s.SetField(); |
||||
return p; |
||||
} |
||||
|
||||
public static void UseRefBoolInCondition(ref bool x) |
||||
{ |
||||
if (x) { |
||||
Console.WriteLine("true"); |
||||
} |
||||
} |
||||
|
||||
public static void CompareNotEqual0IsReallyNotEqual(IComparable<int> a) |
||||
{ |
||||
if (a.CompareTo(0) != 0) { |
||||
Console.WriteLine("true"); |
||||
} |
||||
} |
||||
|
||||
public static void CompareEqual0IsReallyEqual(IComparable<int> a) |
||||
{ |
||||
if (a.CompareTo(0) == 0) { |
||||
Console.WriteLine("true"); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,511 @@
@@ -0,0 +1,511 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly ValueTypes |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module ValueTypes.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class sequential ansi sealed nested public beforefieldinit S |
||||
extends [mscorlib]System.ValueType |
||||
{ |
||||
.field public int32 Field |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(int32 'field') cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldarg.1 |
||||
IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0008: ret |
||||
} // end of method S::.ctor |
||||
|
||||
.method public hidebysig instance void |
||||
SetField() cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldc.i4.5 |
||||
IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0008: ret |
||||
} // end of method S::SetField |
||||
|
||||
.method public hidebysig instance void |
||||
MethodCalls() cil managed |
||||
{ |
||||
// Code size 28 (0x1c) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0007: nop |
||||
IL_0008: ldarg.0 |
||||
IL_0009: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S) |
||||
IL_0013: nop |
||||
IL_0014: ldarg.0 |
||||
IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_001a: nop |
||||
IL_001b: ret |
||||
} // end of method S::MethodCalls |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S byVal) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method S::Test |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& byRef) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method S::Test |
||||
|
||||
} // end of class S |
||||
|
||||
.field private static initonly valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ReadOnlyS |
||||
.field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S MutableS |
||||
.field private static int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) VolatileInt |
||||
.method public hidebysig static void CallMethodViaField() cil managed |
||||
{ |
||||
// Code size 41 (0x29) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0006: stloc.1 |
||||
IL_0007: ldloca.s V_1 |
||||
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_000e: nop |
||||
IL_000f: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0019: nop |
||||
IL_001a: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_001f: stloc.0 |
||||
IL_0020: ldloca.s V_0 |
||||
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0027: nop |
||||
IL_0028: ret |
||||
} // end of method ValueTypes::CallMethodViaField |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj1() cil managed |
||||
{ |
||||
// Code size 21 (0x15) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0009: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_000e: pop |
||||
IL_000f: ldloc.0 |
||||
IL_0010: stloc.1 |
||||
IL_0011: br.s IL_0013 |
||||
|
||||
IL_0013: ldloc.1 |
||||
IL_0014: ret |
||||
} // end of method ValueTypes::InitObj1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj2() cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldloca.s V_1 |
||||
IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0009: ldloc.1 |
||||
IL_000a: stloc.0 |
||||
IL_000b: br.s IL_000d |
||||
|
||||
IL_000d: ldloc.0 |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::InitObj2 |
||||
|
||||
.method public hidebysig static void InitObj3([out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ret |
||||
} // end of method ValueTypes::InitObj3 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor1() cil managed |
||||
{ |
||||
// Code size 13 (0xd) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.s 10 |
||||
IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_0008: stloc.0 |
||||
IL_0009: br.s IL_000b |
||||
|
||||
IL_000b: ldloc.0 |
||||
IL_000c: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor2() cil managed |
||||
{ |
||||
// Code size 17 (0x11) |
||||
.maxstack 2 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: ldc.i4.s 10 |
||||
IL_0005: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_000a: nop |
||||
IL_000b: ldloc.0 |
||||
IL_000c: stloc.1 |
||||
IL_000d: br.s IL_000f |
||||
|
||||
IL_000f: ldloc.1 |
||||
IL_0010: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor2 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy1(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method ValueTypes::Copy1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy2(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 12 (0xc) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: stloc.0 |
||||
IL_0008: br.s IL_000a |
||||
|
||||
IL_000a: ldloc.0 |
||||
IL_000b: ret |
||||
} // end of method ValueTypes::Copy2 |
||||
|
||||
.method public hidebysig static void Copy3(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldarg.0 |
||||
IL_0003: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ret |
||||
} // end of method ValueTypes::Copy3 |
||||
|
||||
.method public hidebysig static void Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 14 (0xe) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldarg.0 |
||||
IL_0003: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000d: ret |
||||
} // end of method ValueTypes::Copy4 |
||||
|
||||
.method public hidebysig static void Copy4b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldarg.1 |
||||
IL_0003: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_0008: nop |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::Copy4b |
||||
|
||||
.method public hidebysig static void Issue56(int32 i, |
||||
[out] string& str) cil managed |
||||
{ |
||||
// Code size 25 (0x19) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldstr "qq" |
||||
IL_0007: stind.ref |
||||
IL_0008: ldarg.1 |
||||
IL_0009: dup |
||||
IL_000a: ldind.ref |
||||
IL_000b: ldarga.s i |
||||
IL_000d: call instance string [mscorlib]System.Int32::ToString() |
||||
IL_0012: call string [mscorlib]System.String::Concat(string, |
||||
string) |
||||
IL_0017: stind.ref |
||||
IL_0018: ret |
||||
} // end of method ValueTypes::Issue56 |
||||
|
||||
.method public hidebysig static void CopyAroundAndModifyField(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S s) cil managed |
||||
{ |
||||
// Code size 23 (0x17) |
||||
.maxstack 3 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: ldloca.s V_0 |
||||
IL_0005: dup |
||||
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_000b: ldc.i4.s 10 |
||||
IL_000d: add |
||||
IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0013: ldloc.0 |
||||
IL_0014: starg.s s |
||||
IL_0016: ret |
||||
} // end of method ValueTypes::CopyAroundAndModifyField |
||||
|
||||
.method private hidebysig static int32[] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (int32[] V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldnull |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method ValueTypes::MakeArray |
||||
|
||||
.method public hidebysig static void IncrementArrayLocation() cil managed |
||||
{ |
||||
// Code size 30 (0x1e) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_0006: call int32 [mscorlib]System.Environment::get_TickCount() |
||||
IL_000b: ldelema [mscorlib]System.Int32 |
||||
IL_0010: dup |
||||
IL_0011: ldobj [mscorlib]System.Int32 |
||||
IL_0016: ldc.i4.1 |
||||
IL_0017: add |
||||
IL_0018: stobj [mscorlib]System.Int32 |
||||
IL_001d: ret |
||||
} // end of method ValueTypes::IncrementArrayLocation |
||||
|
||||
.method public hidebysig static bool Is(object obj) cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: isinst ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: ldnull |
||||
IL_0008: cgt.un |
||||
IL_000a: stloc.0 |
||||
IL_000b: br.s IL_000d |
||||
|
||||
IL_000d: ldloc.0 |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::Is |
||||
|
||||
.method public hidebysig static bool IsNullable(object obj) cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0007: ldnull |
||||
IL_0008: cgt.un |
||||
IL_000a: stloc.0 |
||||
IL_000b: br.s IL_000d |
||||
|
||||
IL_000d: ldloc.0 |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::IsNullable |
||||
|
||||
.method public hidebysig static valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
As(object obj) cil managed |
||||
{ |
||||
// Code size 17 (0x11) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0007: unbox.any valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_000c: stloc.0 |
||||
IL_000d: br.s IL_000f |
||||
|
||||
IL_000f: ldloc.0 |
||||
IL_0010: ret |
||||
} // end of method ValueTypes::As |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
OnlyChangeTheCopy(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 17 (0x11) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: ldloca.s V_0 |
||||
IL_0005: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_000a: nop |
||||
IL_000b: ldarg.0 |
||||
IL_000c: stloc.1 |
||||
IL_000d: br.s IL_000f |
||||
|
||||
IL_000f: ldloc.1 |
||||
IL_0010: ret |
||||
} // end of method ValueTypes::OnlyChangeTheCopy |
||||
|
||||
.method public hidebysig static void UseRefBoolInCondition(bool& x) cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldind.i1 |
||||
IL_0003: ldc.i4.0 |
||||
IL_0004: ceq |
||||
IL_0006: stloc.0 |
||||
IL_0007: ldloc.0 |
||||
IL_0008: brtrue.s IL_0017 |
||||
|
||||
IL_000a: nop |
||||
IL_000b: ldstr "true" |
||||
IL_0010: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_0015: nop |
||||
IL_0016: nop |
||||
IL_0017: ret |
||||
} // end of method ValueTypes::UseRefBoolInCondition |
||||
|
||||
.method public hidebysig static void CompareNotEqual0IsReallyNotEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 29 (0x1d) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldc.i4.0 |
||||
IL_0003: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0008: ldc.i4.0 |
||||
IL_0009: ceq |
||||
IL_000b: stloc.0 |
||||
IL_000c: ldloc.0 |
||||
IL_000d: brtrue.s IL_001c |
||||
|
||||
IL_000f: nop |
||||
IL_0010: ldstr "true" |
||||
IL_0015: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_001a: nop |
||||
IL_001b: nop |
||||
IL_001c: ret |
||||
} // end of method ValueTypes::CompareNotEqual0IsReallyNotEqual |
||||
|
||||
.method public hidebysig static void CompareEqual0IsReallyEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 32 (0x20) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldc.i4.0 |
||||
IL_0003: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0008: ldc.i4.0 |
||||
IL_0009: ceq |
||||
IL_000b: ldc.i4.0 |
||||
IL_000c: ceq |
||||
IL_000e: stloc.0 |
||||
IL_000f: ldloc.0 |
||||
IL_0010: brtrue.s IL_001f |
||||
|
||||
IL_0012: nop |
||||
IL_0013: ldstr "true" |
||||
IL_0018: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_001d: nop |
||||
IL_001e: nop |
||||
IL_001f: ret |
||||
} // end of method ValueTypes::CompareEqual0IsReallyEqual |
||||
|
||||
.method private hidebysig specialname rtspecialname static |
||||
void .cctor() cil managed |
||||
{ |
||||
// Code size 23 (0x17) |
||||
.maxstack 8 |
||||
IL_0000: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0005: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000b: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0010: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0016: ret |
||||
} // end of method ValueTypes::.cctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,394 @@
@@ -0,0 +1,394 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly ValueTypes.opt |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module ValueTypes.opt.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class sequential ansi sealed nested public beforefieldinit S |
||||
extends [mscorlib]System.ValueType |
||||
{ |
||||
.field public int32 Field |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(int32 'field') cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldarg.1 |
||||
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0007: ret |
||||
} // end of method S::.ctor |
||||
|
||||
.method public hidebysig instance void |
||||
SetField() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.5 |
||||
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0007: ret |
||||
} // end of method S::SetField |
||||
|
||||
.method public hidebysig instance void |
||||
MethodCalls() cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0006: ldarg.0 |
||||
IL_0007: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S) |
||||
IL_0011: ldarg.0 |
||||
IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_0017: ret |
||||
} // end of method S::MethodCalls |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S byVal) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method S::Test |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& byRef) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method S::Test |
||||
|
||||
} // end of class S |
||||
|
||||
.field private static initonly valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ReadOnlyS |
||||
.field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S MutableS |
||||
.field private static int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) VolatileInt |
||||
.method public hidebysig static void CallMethodViaField() cil managed |
||||
{ |
||||
// Code size 37 (0x25) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0005: stloc.1 |
||||
IL_0006: ldloca.s V_1 |
||||
IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_000d: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0012: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0017: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_001c: stloc.0 |
||||
IL_001d: ldloca.s V_0 |
||||
IL_001f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0024: ret |
||||
} // end of method ValueTypes::CallMethodViaField |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj1() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldloca.s V_0 |
||||
IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_000d: pop |
||||
IL_000e: ldloc.0 |
||||
IL_000f: ret |
||||
} // end of method ValueTypes::InitObj1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj2() cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldloca.s V_0 |
||||
IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ldloc.0 |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::InitObj2 |
||||
|
||||
.method public hidebysig static void InitObj3([out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::InitObj3 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor1() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 10 |
||||
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor2() cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 2 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldloca.s V_0 |
||||
IL_0002: ldc.i4.s 10 |
||||
IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_0009: ldloc.0 |
||||
IL_000a: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor2 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy1(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ret |
||||
} // end of method ValueTypes::Copy1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy2(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0006: ret |
||||
} // end of method ValueTypes::Copy2 |
||||
|
||||
.method public hidebysig static void Copy3(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::Copy3 |
||||
|
||||
.method public hidebysig static void Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 13 (0xd) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000c: ret |
||||
} // end of method ValueTypes::Copy4 |
||||
|
||||
.method public hidebysig static void Copy4b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldarg.1 |
||||
IL_0002: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::Copy4b |
||||
|
||||
.method public hidebysig static void Issue56(int32 i, |
||||
[out] string& str) cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldstr "qq" |
||||
IL_0006: stind.ref |
||||
IL_0007: ldarg.1 |
||||
IL_0008: dup |
||||
IL_0009: ldind.ref |
||||
IL_000a: ldarga.s i |
||||
IL_000c: call instance string [mscorlib]System.Int32::ToString() |
||||
IL_0011: call string [mscorlib]System.String::Concat(string, |
||||
string) |
||||
IL_0016: stind.ref |
||||
IL_0017: ret |
||||
} // end of method ValueTypes::Issue56 |
||||
|
||||
.method public hidebysig static void CopyAroundAndModifyField(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S s) cil managed |
||||
{ |
||||
// Code size 22 (0x16) |
||||
.maxstack 3 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: stloc.0 |
||||
IL_0002: ldloca.s V_0 |
||||
IL_0004: dup |
||||
IL_0005: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_000a: ldc.i4.s 10 |
||||
IL_000c: add |
||||
IL_000d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0012: ldloc.0 |
||||
IL_0013: starg.s s |
||||
IL_0015: ret |
||||
} // end of method ValueTypes::CopyAroundAndModifyField |
||||
|
||||
.method private hidebysig static int32[] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldnull |
||||
IL_0001: ret |
||||
} // end of method ValueTypes::MakeArray |
||||
|
||||
.method public hidebysig static void IncrementArrayLocation() cil managed |
||||
{ |
||||
// Code size 29 (0x1d) |
||||
.maxstack 8 |
||||
IL_0000: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_0005: call int32 [mscorlib]System.Environment::get_TickCount() |
||||
IL_000a: ldelema [mscorlib]System.Int32 |
||||
IL_000f: dup |
||||
IL_0010: ldobj [mscorlib]System.Int32 |
||||
IL_0015: ldc.i4.1 |
||||
IL_0016: add |
||||
IL_0017: stobj [mscorlib]System.Int32 |
||||
IL_001c: ret |
||||
} // end of method ValueTypes::IncrementArrayLocation |
||||
|
||||
.method public hidebysig static bool Is(object obj) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0006: ldnull |
||||
IL_0007: cgt.un |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::Is |
||||
|
||||
.method public hidebysig static bool IsNullable(object obj) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0006: ldnull |
||||
IL_0007: cgt.un |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::IsNullable |
||||
|
||||
.method public hidebysig static valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
As(object obj) cil managed |
||||
{ |
||||
// Code size 12 (0xc) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0006: unbox.any valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_000b: ret |
||||
} // end of method ValueTypes::As |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
OnlyChangeTheCopy(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: stloc.0 |
||||
IL_0002: ldloca.s V_0 |
||||
IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0009: ldarg.0 |
||||
IL_000a: ret |
||||
} // end of method ValueTypes::OnlyChangeTheCopy |
||||
|
||||
.method public hidebysig static void UseRefBoolInCondition(bool& x) cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldind.i1 |
||||
IL_0002: brfalse.s IL_000e |
||||
|
||||
IL_0004: ldstr "true" |
||||
IL_0009: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::UseRefBoolInCondition |
||||
|
||||
.method public hidebysig static void CompareNotEqual0IsReallyNotEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 20 (0x14) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0007: brfalse.s IL_0013 |
||||
|
||||
IL_0009: ldstr "true" |
||||
IL_000e: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_0013: ret |
||||
} // end of method ValueTypes::CompareNotEqual0IsReallyNotEqual |
||||
|
||||
.method public hidebysig static void CompareEqual0IsReallyEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 20 (0x14) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0007: brtrue.s IL_0013 |
||||
|
||||
IL_0009: ldstr "true" |
||||
IL_000e: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_0013: ret |
||||
} // end of method ValueTypes::CompareEqual0IsReallyEqual |
||||
|
||||
.method private hidebysig specialname rtspecialname static |
||||
void .cctor() cil managed |
||||
{ |
||||
// Code size 23 (0x17) |
||||
.maxstack 8 |
||||
IL_0000: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0005: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000b: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0010: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0016: ret |
||||
} // end of method ValueTypes::.cctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,392 @@
@@ -0,0 +1,392 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly ValueTypes |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module ValueTypes.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class sequential ansi sealed nested public beforefieldinit S |
||||
extends [mscorlib]System.ValueType |
||||
{ |
||||
.field public int32 Field |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(int32 'field') cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldarg.1 |
||||
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0007: ret |
||||
} // end of method S::.ctor |
||||
|
||||
.method public hidebysig instance void |
||||
SetField() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.5 |
||||
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0007: ret |
||||
} // end of method S::SetField |
||||
|
||||
.method public hidebysig instance void |
||||
MethodCalls() cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0006: ldarg.0 |
||||
IL_0007: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000c: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S) |
||||
IL_0011: ldarg.0 |
||||
IL_0012: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_0017: ret |
||||
} // end of method S::MethodCalls |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S byVal) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method S::Test |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& byRef) cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method S::Test |
||||
|
||||
} // end of class S |
||||
|
||||
.field private static initonly valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ReadOnlyS |
||||
.field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S MutableS |
||||
.field private static int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) VolatileInt |
||||
.method public hidebysig static void CallMethodViaField() cil managed |
||||
{ |
||||
// Code size 37 (0x25) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0005: stloc.1 |
||||
IL_0006: ldloca.s V_1 |
||||
IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_000d: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0012: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0017: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_001c: stloc.0 |
||||
IL_001d: ldloca.s V_0 |
||||
IL_001f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0024: ret |
||||
} // end of method ValueTypes::CallMethodViaField |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj1() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 2 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldloca.s V_0 |
||||
IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ldloc.0 |
||||
IL_0009: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_000e: pop |
||||
IL_000f: ret |
||||
} // end of method ValueTypes::InitObj1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj2() cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldloca.s V_0 |
||||
IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ldloc.0 |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::InitObj2 |
||||
|
||||
.method public hidebysig static void InitObj3([out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::InitObj3 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor1() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 10 |
||||
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor2() cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldc.i4.s 10 |
||||
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor2 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy1(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ret |
||||
} // end of method ValueTypes::Copy1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy2(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0006: ret |
||||
} // end of method ValueTypes::Copy2 |
||||
|
||||
.method public hidebysig static void Copy3(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::Copy3 |
||||
|
||||
.method public hidebysig static void Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 13 (0xd) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000c: ret |
||||
} // end of method ValueTypes::Copy4 |
||||
|
||||
.method public hidebysig static void Copy4b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 8 (0x8) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldarg.1 |
||||
IL_0002: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_0007: ret |
||||
} // end of method ValueTypes::Copy4b |
||||
|
||||
.method public hidebysig static void Issue56(int32 i, |
||||
[out] string& str) cil managed |
||||
{ |
||||
// Code size 24 (0x18) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.1 |
||||
IL_0001: ldstr "qq" |
||||
IL_0006: stind.ref |
||||
IL_0007: ldarg.1 |
||||
IL_0008: ldarg.1 |
||||
IL_0009: ldind.ref |
||||
IL_000a: ldarga.s i |
||||
IL_000c: call instance string [mscorlib]System.Int32::ToString() |
||||
IL_0011: call string [mscorlib]System.String::Concat(string, |
||||
string) |
||||
IL_0016: stind.ref |
||||
IL_0017: ret |
||||
} // end of method ValueTypes::Issue56 |
||||
|
||||
.method public hidebysig static void CopyAroundAndModifyField(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S s) cil managed |
||||
{ |
||||
// Code size 19 (0x13) |
||||
.maxstack 3 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: stloc.0 |
||||
IL_0002: ldloca.s V_0 |
||||
IL_0004: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0009: dup |
||||
IL_000a: ldind.i4 |
||||
IL_000b: ldc.i4.s 10 |
||||
IL_000d: add |
||||
IL_000e: stind.i4 |
||||
IL_000f: ldloc.0 |
||||
IL_0010: starg.s s |
||||
IL_0012: ret |
||||
} // end of method ValueTypes::CopyAroundAndModifyField |
||||
|
||||
.method private hidebysig static int32[] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: ldnull |
||||
IL_0001: ret |
||||
} // end of method ValueTypes::MakeArray |
||||
|
||||
.method public hidebysig static void IncrementArrayLocation() cil managed |
||||
{ |
||||
// Code size 21 (0x15) |
||||
.maxstack 8 |
||||
IL_0000: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_0005: call int32 [mscorlib]System.Environment::get_TickCount() |
||||
IL_000a: ldelema [mscorlib]System.Int32 |
||||
IL_000f: dup |
||||
IL_0010: ldind.i4 |
||||
IL_0011: ldc.i4.1 |
||||
IL_0012: add |
||||
IL_0013: stind.i4 |
||||
IL_0014: ret |
||||
} // end of method ValueTypes::IncrementArrayLocation |
||||
|
||||
.method public hidebysig static bool Is(object obj) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0006: ldnull |
||||
IL_0007: cgt.un |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::Is |
||||
|
||||
.method public hidebysig static bool IsNullable(object obj) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0006: ldnull |
||||
IL_0007: cgt.un |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::IsNullable |
||||
|
||||
.method public hidebysig static valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
As(object obj) cil managed |
||||
{ |
||||
// Code size 12 (0xc) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0006: unbox.any valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_000b: ret |
||||
} // end of method ValueTypes::As |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
OnlyChangeTheCopy(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 11 (0xb) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: ldarg.0 |
||||
IL_0001: stloc.0 |
||||
IL_0002: ldloca.s V_0 |
||||
IL_0004: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0009: ldarg.0 |
||||
IL_000a: ret |
||||
} // end of method ValueTypes::OnlyChangeTheCopy |
||||
|
||||
.method public hidebysig static void UseRefBoolInCondition(bool& x) cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldind.u1 |
||||
IL_0002: brfalse.s IL_000e |
||||
|
||||
IL_0004: ldstr "true" |
||||
IL_0009: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::UseRefBoolInCondition |
||||
|
||||
.method public hidebysig static void CompareNotEqual0IsReallyNotEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 20 (0x14) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0007: brfalse.s IL_0013 |
||||
|
||||
IL_0009: ldstr "true" |
||||
IL_000e: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_0013: ret |
||||
} // end of method ValueTypes::CompareNotEqual0IsReallyNotEqual |
||||
|
||||
.method public hidebysig static void CompareEqual0IsReallyEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 20 (0x14) |
||||
.maxstack 8 |
||||
IL_0000: ldarg.0 |
||||
IL_0001: ldc.i4.0 |
||||
IL_0002: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0007: brtrue.s IL_0013 |
||||
|
||||
IL_0009: ldstr "true" |
||||
IL_000e: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_0013: ret |
||||
} // end of method ValueTypes::CompareEqual0IsReallyEqual |
||||
|
||||
.method private hidebysig specialname rtspecialname static |
||||
void .cctor() cil managed |
||||
{ |
||||
// Code size 1 (0x1) |
||||
.maxstack 8 |
||||
IL_0000: ret |
||||
} // end of method ValueTypes::.cctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,511 @@
@@ -0,0 +1,511 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// Metadata version: v4.0.30319 |
||||
.assembly extern mscorlib |
||||
{ |
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||
.ver 4:0:0:0 |
||||
} |
||||
.assembly ValueTypes |
||||
{ |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||
|
||||
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) |
||||
|
||||
.permissionset reqmin |
||||
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||
.hash algorithm 0x00008004 |
||||
.ver 0:0:0:0 |
||||
} |
||||
.module ValueTypes.dll |
||||
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||
.imagebase 0x10000000 |
||||
.file alignment 0x00000200 |
||||
.stackreserve 0x00100000 |
||||
.subsystem 0x0003 // WINDOWS_CUI |
||||
.corflags 0x00000001 // ILONLY |
||||
|
||||
|
||||
// =============== CLASS MEMBERS DECLARATION =================== |
||||
|
||||
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
extends [mscorlib]System.Object |
||||
{ |
||||
.class sequential ansi sealed nested public beforefieldinit S |
||||
extends [mscorlib]System.ValueType |
||||
{ |
||||
.field public int32 Field |
||||
.method public hidebysig specialname rtspecialname |
||||
instance void .ctor(int32 'field') cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldarg.1 |
||||
IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0008: ret |
||||
} // end of method S::.ctor |
||||
|
||||
.method public hidebysig instance void |
||||
SetField() cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldc.i4.5 |
||||
IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_0008: ret |
||||
} // end of method S::SetField |
||||
|
||||
.method public hidebysig instance void |
||||
MethodCalls() cil managed |
||||
{ |
||||
// Code size 28 (0x1c) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0007: nop |
||||
IL_0008: ldarg.0 |
||||
IL_0009: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000e: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S) |
||||
IL_0013: nop |
||||
IL_0014: ldarg.0 |
||||
IL_0015: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_001a: nop |
||||
IL_001b: ret |
||||
} // end of method S::MethodCalls |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S byVal) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method S::Test |
||||
|
||||
.method private hidebysig static void |
||||
Test(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& byRef) cil managed |
||||
{ |
||||
// Code size 2 (0x2) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ret |
||||
} // end of method S::Test |
||||
|
||||
} // end of class S |
||||
|
||||
.field private static initonly valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ReadOnlyS |
||||
.field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S MutableS |
||||
.field private static int32 modreq([mscorlib]System.Runtime.CompilerServices.IsVolatile) VolatileInt |
||||
.method public hidebysig static void CallMethodViaField() cil managed |
||||
{ |
||||
// Code size 41 (0x29) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0006: stloc.1 |
||||
IL_0007: ldloca.s V_1 |
||||
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_000e: nop |
||||
IL_000f: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0014: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0019: nop |
||||
IL_001a: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_001f: stloc.0 |
||||
IL_0020: ldloca.s V_0 |
||||
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_0027: nop |
||||
IL_0028: ret |
||||
} // end of method ValueTypes::CallMethodViaField |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj1() cil managed |
||||
{ |
||||
// Code size 21 (0x15) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0009: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_000e: pop |
||||
IL_000f: ldloc.0 |
||||
IL_0010: stloc.1 |
||||
IL_0011: br.s IL_0013 |
||||
|
||||
IL_0013: ldloc.1 |
||||
IL_0014: ret |
||||
} // end of method ValueTypes::InitObj1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
InitObj2() cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0009: ldloc.0 |
||||
IL_000a: stloc.1 |
||||
IL_000b: br.s IL_000d |
||||
|
||||
IL_000d: ldloc.1 |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::InitObj2 |
||||
|
||||
.method public hidebysig static void InitObj3([out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ret |
||||
} // end of method ValueTypes::InitObj3 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor1() cil managed |
||||
{ |
||||
// Code size 13 (0xd) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldc.i4.s 10 |
||||
IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_0008: stloc.0 |
||||
IL_0009: br.s IL_000b |
||||
|
||||
IL_000b: ldloc.0 |
||||
IL_000c: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
CallValueTypeCtor2() cil managed |
||||
{ |
||||
// Code size 16 (0x10) |
||||
.maxstack 2 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldloca.s V_0 |
||||
IL_0003: ldc.i4.s 10 |
||||
IL_0005: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::.ctor(int32) |
||||
IL_000a: ldloc.0 |
||||
IL_000b: stloc.1 |
||||
IL_000c: br.s IL_000e |
||||
|
||||
IL_000e: ldloc.1 |
||||
IL_000f: ret |
||||
} // end of method ValueTypes::CallValueTypeCtor2 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy1(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method ValueTypes::Copy1 |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
Copy2(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p) cil managed |
||||
{ |
||||
// Code size 12 (0xc) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: stloc.0 |
||||
IL_0008: br.s IL_000a |
||||
|
||||
IL_000a: ldloc.0 |
||||
IL_000b: ret |
||||
} // end of method ValueTypes::Copy2 |
||||
|
||||
.method public hidebysig static void Copy3(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 9 (0x9) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldarg.0 |
||||
IL_0003: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: ret |
||||
} // end of method ValueTypes::Copy3 |
||||
|
||||
.method public hidebysig static void Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 14 (0xe) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldarg.0 |
||||
IL_0003: ldobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0008: stobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000d: ret |
||||
} // end of method ValueTypes::Copy4 |
||||
|
||||
.method public hidebysig static void Copy4b(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& p, |
||||
[out] valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S& o) cil managed |
||||
{ |
||||
// Code size 10 (0xa) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldarg.1 |
||||
IL_0003: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::Copy4(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S&) |
||||
IL_0008: nop |
||||
IL_0009: ret |
||||
} // end of method ValueTypes::Copy4b |
||||
|
||||
.method public hidebysig static void Issue56(int32 i, |
||||
[out] string& str) cil managed |
||||
{ |
||||
// Code size 25 (0x19) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: ldarg.1 |
||||
IL_0002: ldstr "qq" |
||||
IL_0007: stind.ref |
||||
IL_0008: ldarg.1 |
||||
IL_0009: ldarg.1 |
||||
IL_000a: ldind.ref |
||||
IL_000b: ldarga.s i |
||||
IL_000d: call instance string [mscorlib]System.Int32::ToString() |
||||
IL_0012: call string [mscorlib]System.String::Concat(string, |
||||
string) |
||||
IL_0017: stind.ref |
||||
IL_0018: ret |
||||
} // end of method ValueTypes::Issue56 |
||||
|
||||
.method public hidebysig static void CopyAroundAndModifyField(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S s) cil managed |
||||
{ |
||||
// Code size 20 (0x14) |
||||
.maxstack 3 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: ldloca.s V_0 |
||||
IL_0005: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::Field |
||||
IL_000a: dup |
||||
IL_000b: ldind.i4 |
||||
IL_000c: ldc.i4.s 10 |
||||
IL_000e: add |
||||
IL_000f: stind.i4 |
||||
IL_0010: ldloc.0 |
||||
IL_0011: starg.s s |
||||
IL_0013: ret |
||||
} // end of method ValueTypes::CopyAroundAndModifyField |
||||
|
||||
.method private hidebysig static int32[] |
||||
MakeArray() cil managed |
||||
{ |
||||
// Code size 7 (0x7) |
||||
.maxstack 1 |
||||
.locals init (int32[] V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldnull |
||||
IL_0002: stloc.0 |
||||
IL_0003: br.s IL_0005 |
||||
|
||||
IL_0005: ldloc.0 |
||||
IL_0006: ret |
||||
} // end of method ValueTypes::MakeArray |
||||
|
||||
.method public hidebysig static void IncrementArrayLocation() cil managed |
||||
{ |
||||
// Code size 22 (0x16) |
||||
.maxstack 8 |
||||
IL_0000: nop |
||||
IL_0001: call int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MakeArray() |
||||
IL_0006: call int32 [mscorlib]System.Environment::get_TickCount() |
||||
IL_000b: ldelema [mscorlib]System.Int32 |
||||
IL_0010: dup |
||||
IL_0011: ldind.i4 |
||||
IL_0012: ldc.i4.1 |
||||
IL_0013: add |
||||
IL_0014: stind.i4 |
||||
IL_0015: ret |
||||
} // end of method ValueTypes::IncrementArrayLocation |
||||
|
||||
.method public hidebysig static bool Is(object obj) cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: isinst ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0007: ldnull |
||||
IL_0008: cgt.un |
||||
IL_000a: stloc.0 |
||||
IL_000b: br.s IL_000d |
||||
|
||||
IL_000d: ldloc.0 |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::Is |
||||
|
||||
.method public hidebysig static bool IsNullable(object obj) cil managed |
||||
{ |
||||
// Code size 15 (0xf) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0007: ldnull |
||||
IL_0008: cgt.un |
||||
IL_000a: stloc.0 |
||||
IL_000b: br.s IL_000d |
||||
|
||||
IL_000d: ldloc.0 |
||||
IL_000e: ret |
||||
} // end of method ValueTypes::IsNullable |
||||
|
||||
.method public hidebysig static valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
As(object obj) cil managed |
||||
{ |
||||
// Code size 17 (0x11) |
||||
.maxstack 1 |
||||
.locals init (valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: isinst valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_0007: unbox.any valuetype [mscorlib]System.Nullable`1<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S> |
||||
IL_000c: stloc.0 |
||||
IL_000d: br.s IL_000f |
||||
|
||||
IL_000f: ldloc.0 |
||||
IL_0010: ret |
||||
} // end of method ValueTypes::As |
||||
|
||||
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
OnlyChangeTheCopy(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S p) cil managed |
||||
{ |
||||
// Code size 17 (0x11) |
||||
.maxstack 1 |
||||
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_0, |
||||
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S V_1) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: stloc.0 |
||||
IL_0003: ldloca.s V_0 |
||||
IL_0005: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S::SetField() |
||||
IL_000a: nop |
||||
IL_000b: ldarg.0 |
||||
IL_000c: stloc.1 |
||||
IL_000d: br.s IL_000f |
||||
|
||||
IL_000f: ldloc.1 |
||||
IL_0010: ret |
||||
} // end of method ValueTypes::OnlyChangeTheCopy |
||||
|
||||
.method public hidebysig static void UseRefBoolInCondition(bool& x) cil managed |
||||
{ |
||||
// Code size 21 (0x15) |
||||
.maxstack 1 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldind.u1 |
||||
IL_0003: stloc.0 |
||||
IL_0004: ldloc.0 |
||||
IL_0005: brfalse.s IL_0014 |
||||
|
||||
IL_0007: nop |
||||
IL_0008: ldstr "true" |
||||
IL_000d: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_0012: nop |
||||
IL_0013: nop |
||||
IL_0014: ret |
||||
} // end of method ValueTypes::UseRefBoolInCondition |
||||
|
||||
.method public hidebysig static void CompareNotEqual0IsReallyNotEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 29 (0x1d) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldc.i4.0 |
||||
IL_0003: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0008: ldc.i4.0 |
||||
IL_0009: cgt.un |
||||
IL_000b: stloc.0 |
||||
IL_000c: ldloc.0 |
||||
IL_000d: brfalse.s IL_001c |
||||
|
||||
IL_000f: nop |
||||
IL_0010: ldstr "true" |
||||
IL_0015: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_001a: nop |
||||
IL_001b: nop |
||||
IL_001c: ret |
||||
} // end of method ValueTypes::CompareNotEqual0IsReallyNotEqual |
||||
|
||||
.method public hidebysig static void CompareEqual0IsReallyEqual(class [mscorlib]System.IComparable`1<int32> a) cil managed |
||||
{ |
||||
// Code size 29 (0x1d) |
||||
.maxstack 2 |
||||
.locals init (bool V_0) |
||||
IL_0000: nop |
||||
IL_0001: ldarg.0 |
||||
IL_0002: ldc.i4.0 |
||||
IL_0003: callvirt instance int32 class [mscorlib]System.IComparable`1<int32>::CompareTo(!0) |
||||
IL_0008: ldc.i4.0 |
||||
IL_0009: ceq |
||||
IL_000b: stloc.0 |
||||
IL_000c: ldloc.0 |
||||
IL_000d: brfalse.s IL_001c |
||||
|
||||
IL_000f: nop |
||||
IL_0010: ldstr "true" |
||||
IL_0015: call void [mscorlib]System.Console::WriteLine(string) |
||||
IL_001a: nop |
||||
IL_001b: nop |
||||
IL_001c: ret |
||||
} // end of method ValueTypes::CompareEqual0IsReallyEqual |
||||
|
||||
.method private hidebysig specialname rtspecialname static |
||||
void .cctor() cil managed |
||||
{ |
||||
// Code size 23 (0x17) |
||||
.maxstack 8 |
||||
IL_0000: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::ReadOnlyS |
||||
IL_0005: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_000b: ldsflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes::MutableS |
||||
IL_0010: initobj ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes/S |
||||
IL_0016: ret |
||||
} // end of method ValueTypes::.cctor |
||||
|
||||
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ValueTypes |
||||
|
||||
|
||||
// ============================================================= |
||||
|
||||
// *********** DISASSEMBLY COMPLETE *********************** |
@ -1,18 +0,0 @@
@@ -1,18 +0,0 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using NUnit.Framework; |
||||
|
||||
namespace ICSharpCode.Decompiler.Tests.Types |
||||
{ |
||||
[TestFixture] |
||||
public class EnumTests : DecompilerTestBase |
||||
{ |
||||
[Test] |
||||
public void EnumSamples() |
||||
{ |
||||
ValidateFileRoundtrip(@"Types\S_EnumSamples.cs"); |
||||
} |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue