Browse Source

introduce variables named "E_{StartOffset}" for exceptions

pull/728/head
Siegfried Pammer 9 years ago
parent
commit
0b18470157
  1. 4
      ICSharpCode.Decompiler/IL/ILReader.cs

4
ICSharpCode.Decompiler/IL/ILReader.cs

@ -186,7 +186,9 @@ namespace ICSharpCode.Decompiler.IL @@ -186,7 +186,9 @@ namespace ICSharpCode.Decompiler.IL
foreach (var eh in body.ExceptionHandlers) {
ImmutableStack<ILVariable> ehStack = null;
if (eh.HandlerType == Cil.ExceptionHandlerType.Catch || eh.HandlerType == Cil.ExceptionHandlerType.Filter) {
var v = new ILVariable(VariableKind.Exception, typeSystem.Resolve(eh.CatchType), eh.HandlerStart.Offset);
var v = new ILVariable(VariableKind.Exception, typeSystem.Resolve(eh.CatchType), eh.HandlerStart.Offset) {
Name = "E_" + eh.HandlerStart.Offset
};
variableByExceptionHandler.Add(eh, v);
ehStack = ImmutableStack.Create(v);
} else {

Loading…
Cancel
Save