Browse Source

ILInlining: IStatementTransform.Run repeatedly inline all possible statements.

pull/2766/head
Siegfried Pammer 3 years ago
parent
commit
948da3f9ee
  1. 6
      ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

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

@ -60,7 +60,11 @@ namespace ICSharpCode.Decompiler.IL.Transforms
public void Run(Block block, int pos, StatementTransformContext context) public void Run(Block block, int pos, StatementTransformContext context)
{ {
InlineOneIfPossible(block, pos, this.options | OptionsForBlock(block, pos, context), context: context); var options = this.options | OptionsForBlock(block, pos, context);
while (InlineOneIfPossible(block, pos, options, context: context))
{
// repeat inlining until nothing changes.
}
} }
internal static InliningOptions OptionsForBlock(Block block, int pos, ILTransformContext context) internal static InliningOptions OptionsForBlock(Block block, int pos, ILTransformContext context)

Loading…
Cancel
Save