Browse Source

Remove redundant StatementTransform pass.

This duplicate pass only made sense back when we ran CopyPropagation as part of the BlockILTransform.
pull/2069/head
Daniel Grunwald 5 years ago
parent
commit
f93ea325d4
  1. 6
      ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

6
ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

@ -120,18 +120,12 @@ namespace ICSharpCode.Decompiler.CSharp @@ -120,18 +120,12 @@ namespace ICSharpCode.Decompiler.CSharp
new DetectExitPoints(canIntroduceExitForReturn: true),
new BlockILTransform { // per-block transforms
PostOrderTransforms = {
//new UseExitPoints(),
new ConditionDetection(),
new LockTransform(),
new UsingTransform(),
// CachedDelegateInitialization must run after ConditionDetection and before/in LoopingBlockTransform
// and must run before NullCoalescingTransform
new CachedDelegateInitialization(),
// Run the assignment transform both before and after copy propagation.
// Before is necessary because inline assignments of constants are otherwise
// copy-propated (turned into two separate assignments of the constant).
// After is necessary because the assigned value might involve null coalescing/etc.
new StatementTransform(new ILInlining(), new TransformAssignment()),
new StatementTransform(
// per-block transforms that depend on each other, and thus need to
// run interleaved (statement by statement).

Loading…
Cancel
Save