Browse Source

Aggressively inline in the whole catch-when block, not just on top-level.

pull/909/merge
Daniel Grunwald 8 years ago
parent
commit
faa0c8a805
  1. 5
      ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

5
ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

@ -64,8 +64,9 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -64,8 +64,9 @@ namespace ICSharpCode.Decompiler.IL.Transforms
static bool IsCatchWhenBlock(Block block)
{
return block.Parent is BlockContainer container && container.Parent is TryCatchHandler handler
&& handler.Filter == container && block == container.EntryPoint;
var container = BlockContainer.FindClosestContainer(block);
return container?.Parent is TryCatchHandler handler
&& handler.Filter == container;
}
/// <summary>

Loading…
Cancel
Save