Skip to content

Commit

Permalink
Remove obsolete code from DelegateConstruction.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Jul 7, 2019
1 parent c1ac461 commit 36355c4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
// 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.Diagnostics;
using System.Linq;
using System.Reflection.Metadata;
using ICSharpCode.Decompiler.CSharp;
Expand All @@ -37,8 +35,6 @@ void IILTransform.Run(ILFunction function, ILTransformContext context)
return;
this.context = context;
this.decompilationContext = new SimpleTypeResolveContext(function.Method);
var targetsToReplace = new List<IInstructionWithVariableOperand>();
var translatedDisplayClasses = new HashSet<ITypeDefinition>();
var cancellationToken = context.CancellationToken;
foreach (var inst in function.Descendants) {
cancellationToken.ThrowIfCancellationRequested();
Expand All @@ -55,16 +51,12 @@ void IILTransform.Run(ILFunction function, ILTransformContext context)
instWithVar.Variable.CaptureScope = BlockContainer.FindClosestContainer(store);
}
}
if (displayClassTypeDef != null)
translatedDisplayClasses.Add(displayClassTypeDef);
targetsToReplace.Add(instWithVar);
}
context.StepEndGroup();
}
}
}

#region TransformDelegateConstruction
internal static bool IsDelegateConstruction(NewObj inst, bool allowTransformed = false)
{
if (inst == null || inst.Arguments.Count != 2 || inst.Method.DeclaringType.Kind != TypeKind.Delegate)
Expand Down Expand Up @@ -213,6 +205,5 @@ protected internal override void VisitLdObj(LdObj inst)
base.VisitLdObj(inst);
}
}
#endregion
}
}

0 comments on commit 36355c4

Please sign in to comment.