|
|
|
|
@ -464,7 +464,16 @@ namespace ICSharpCode.Decompiler.ILAst
@@ -464,7 +464,16 @@ namespace ICSharpCode.Decompiler.ILAst
|
|
|
|
|
ILExpression condExpr; |
|
|
|
|
ILLabel trueLabel; |
|
|
|
|
ILLabel falseLabel; |
|
|
|
|
if(basicBlock.MatchBrTure(out condExpr, out trueLabel, out falseLabel)) { |
|
|
|
|
if(basicBlock.MatchBrTure(out condExpr, out trueLabel, out falseLabel)) |
|
|
|
|
{ |
|
|
|
|
ControlFlowNode trueTarget; |
|
|
|
|
labelToCfNode.TryGetValue(trueLabel, out trueTarget); |
|
|
|
|
ControlFlowNode falseTarget; |
|
|
|
|
labelToCfNode.TryGetValue(falseLabel, out falseTarget); |
|
|
|
|
|
|
|
|
|
if ((!loopContents.Contains(trueTarget) && loopContents.Contains(falseTarget)) || |
|
|
|
|
(loopContents.Contains(trueTarget) && !loopContents.Contains(falseTarget)) ) |
|
|
|
|
{ |
|
|
|
|
loopContents.RemoveOrThrow(node); |
|
|
|
|
scope.RemoveOrThrow(node); |
|
|
|
|
|
|
|
|
|
@ -494,7 +503,11 @@ namespace ICSharpCode.Decompiler.ILAst
@@ -494,7 +503,11 @@ namespace ICSharpCode.Decompiler.ILAst
|
|
|
|
|
}, |
|
|
|
|
FallthoughGoto = null |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Fallback method: while(true)
|
|
|
|
|
if (scope.Contains(node)) { |
|
|
|
|
result.Add(new ILBasicBlock() { |
|
|
|
|
EntryLabel = new ILLabel() { Name = "Loop_" + (nextLabelIndex++) }, |
|
|
|
|
Body = new List<ILNode>() { |
|
|
|
|
|