From 90480d438e68b81096aa1aeb4475ab941ec5f565 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 26 Aug 2019 21:34:20 +0200 Subject: [PATCH] Minor code refactoring --- .../Translation/MethodDecompiler.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs b/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs index f73ee23c..b96e6d2e 100644 --- a/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs +++ b/src/ComputeSharp.Shaders/Translation/MethodDecompiler.cs @@ -38,16 +38,6 @@ namespace ComputeSharp.Shaders.Translation /// private readonly Dictionary Decompilers = new Dictionary(); - /// - /// The available instances for the loaded assemblies - /// - private readonly IReadOnlyList PEFiles; - - /// - /// The mapping of and values for the discovered instances - /// - private readonly Dictionary TypeDefinitions = new Dictionary(); - /// /// The incremental instance for the shader assembly /// @@ -80,9 +70,6 @@ namespace ComputeSharp.Shaders.Translation }).ToArray(); } - // Load and store all the available PEFile instances - PEFiles = assemblyPaths.Select(p => new PEFile(p)).ToArray(); - // Ceate an incremental shader assembly with the available references IEnumerable metadataReferences = assemblyPaths.Select(p => MetadataReference.CreateFromFile(p)); _Compilation = CSharpCompilation.Create("ShaderAssembly").WithReferences(metadataReferences); @@ -211,10 +198,10 @@ namespace ComputeSharp.Shaders.Translation List parsedFields = new List(); // Local function to recursively extract all the nested fields - void ParseNestedFields(string source) + void ParseNestedFields(string typeSource) { // Find the field declarations - Match match = NestedClosureFieldRegex.Match(source); + Match match = NestedClosureFieldRegex.Match(typeSource); if (!match.Success) return; // Load the nested closure type