Browse Source

Fix performance issue due to aggressive debug checks that was causing AppVeyor to time-out.

pull/881/merge
Daniel Grunwald 8 years ago
parent
commit
cf5f3738a9
  1. 6
      ICSharpCode.Decompiler/IL/Transforms/StatementTransform.cs

6
ICSharpCode.Decompiler/IL/Transforms/StatementTransform.cs

@ -123,10 +123,12 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -123,10 +123,12 @@ namespace ICSharpCode.Decompiler.IL.Transforms
}
foreach (var transform in children) {
transform.Run(block, pos, ctx);
block.CheckInvariant(ILPhase.Normal);
#if DEBUG
block.Instructions[pos].CheckInvariant(ILPhase.Normal);
for (int i = 0; i < pos; ++i) {
Debug.Assert(!block.Instructions[i].IsDirty, $"{transform.GetType().Name} modified an instruction before pos");
if (block.Instructions[i].IsDirty) {
Debug.Fail($"{transform.GetType().Name} modified an instruction before pos");
}
}
#endif
if (ctx.rerunCurrentPosition) {

Loading…
Cancel
Save