|
|
@ -60,6 +60,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
if (!(body.FinallyBlock is BlockContainer finallyContainer) || !MatchExitBlock(finallyContainer.EntryPoint, null, objectStore.Variable)) |
|
|
|
if (!(body.FinallyBlock is BlockContainer finallyContainer) || !MatchExitBlock(finallyContainer.EntryPoint, null, objectStore.Variable)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
if (objectStore.Variable.LoadCount > 1) |
|
|
|
|
|
|
|
return false; |
|
|
|
context.Step("LockTransformV2", block); |
|
|
|
context.Step("LockTransformV2", block); |
|
|
|
block.Instructions.RemoveAt(i - 1); |
|
|
|
block.Instructions.RemoveAt(i - 1); |
|
|
|
block.Instructions.RemoveAt(i - 2); |
|
|
|
block.Instructions.RemoveAt(i - 2); |
|
|
@ -102,6 +104,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
if (!(body.FinallyBlock is BlockContainer finallyContainer) || !MatchExitBlock(finallyContainer.EntryPoint, flagStore.Variable, objectStore.Variable)) |
|
|
|
if (!(body.FinallyBlock is BlockContainer finallyContainer) || !MatchExitBlock(finallyContainer.EntryPoint, flagStore.Variable, objectStore.Variable)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
if (objectStore.Variable.LoadCount > 1) |
|
|
|
|
|
|
|
return false; |
|
|
|
context.Step("LockTransformV4", block); |
|
|
|
context.Step("LockTransformV4", block); |
|
|
|
block.Instructions.RemoveAt(i - 1); |
|
|
|
block.Instructions.RemoveAt(i - 1); |
|
|
|
tryContainer.EntryPoint.Instructions.RemoveAt(0); |
|
|
|
tryContainer.EntryPoint.Instructions.RemoveAt(0); |
|
|
@ -145,6 +149,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
if (!(body.FinallyBlock is BlockContainer finallyContainer) || !MatchExitBlock(finallyContainer.EntryPoint, flagStore.Variable, objectStore.Variable)) |
|
|
|
if (!(body.FinallyBlock is BlockContainer finallyContainer) || !MatchExitBlock(finallyContainer.EntryPoint, flagStore.Variable, objectStore.Variable)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
if (objectStore.Variable.LoadCount > 2) |
|
|
|
|
|
|
|
return false; |
|
|
|
context.Step("LockTransformRoslyn", block); |
|
|
|
context.Step("LockTransformRoslyn", block); |
|
|
|
block.Instructions.RemoveAt(i - 1); |
|
|
|
block.Instructions.RemoveAt(i - 1); |
|
|
|
block.Instructions.RemoveAt(i - 2); |
|
|
|
block.Instructions.RemoveAt(i - 2); |
|
|
|