From d6e13686aaf16cdc775cdd816eeeb96e54d40a2a Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 4 Jun 2018 11:02:33 +0200 Subject: [PATCH] Remove DynamiceExpressions setting (use Dynamic setting instead) --- ICSharpCode.Decompiler/DecompilerSettings.cs | 15 --------------- .../IL/Transforms/DynamicCallSiteTransform.cs | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/ICSharpCode.Decompiler/DecompilerSettings.cs b/ICSharpCode.Decompiler/DecompilerSettings.cs index e11fdd198..d62664641 100644 --- a/ICSharpCode.Decompiler/DecompilerSettings.cs +++ b/ICSharpCode.Decompiler/DecompilerSettings.cs @@ -194,21 +194,6 @@ namespace ICSharpCode.Decompiler } } - bool dynamicExpressions = true; - - /// - /// Decompile expressions that use dynamic types. - /// - public bool DynamicExpressions { - get { return dynamicExpressions; } - set { - if (dynamicExpressions != value) { - dynamicExpressions = value; - OnPropertyChanged(); - } - } - } - bool fixedBuffers = true; /// diff --git a/ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs b/ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs index 3eaad9d6a..41e5a1f13 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs @@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms public void Run(ILFunction function, ILTransformContext context) { - if (!context.Settings.DynamicExpressions) + if (!context.Settings.Dynamic) return; this.context = context; @@ -48,7 +48,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms foreach (var block in function.Descendants.OfType()) { if (block.Instructions.Count < 2) continue; - // Check if, we deal with callsite cache field null check: + // Check if, we deal with a callsite cache field null check: // if (comp(ldsfld <>p__3 == ldnull)) br IL_000c // br IL_002b if (!(block.Instructions.SecondToLastOrDefault() is IfInstruction ifInst)) continue;