|
|
@ -62,7 +62,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
{ |
|
|
|
{ |
|
|
|
FlagsBeingMoved |= predecessor.Flags; |
|
|
|
FlagsBeingMoved |= predecessor.Flags; |
|
|
|
MoveActions.Add(delegate { |
|
|
|
MoveActions.Add(delegate { |
|
|
|
var type = context.TypeSystem.FindType(predecessor.ResultType.ToKnownTypeCode()); |
|
|
|
var type = context.TypeSystem.FindType(predecessor.ResultType); |
|
|
|
var v = Function.RegisterVariable(VariableKind.StackSlot, type); |
|
|
|
var v = Function.RegisterVariable(VariableKind.StackSlot, type); |
|
|
|
predecessor.ReplaceWith(new LdLoc(v)); |
|
|
|
predecessor.ReplaceWith(new LdLoc(v)); |
|
|
|
return new StLoc(v, predecessor); |
|
|
|
return new StLoc(v, predecessor); |
|
|
@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
{ |
|
|
|
{ |
|
|
|
// We've reached the target block, and extraction is possible all the way.
|
|
|
|
// We've reached the target block, and extraction is possible all the way.
|
|
|
|
int insertIndex = inst.ChildIndex; |
|
|
|
int insertIndex = inst.ChildIndex; |
|
|
|
var type = context.TypeSystem.FindType(instToExtract.ResultType.ToKnownTypeCode()); |
|
|
|
var type = context.TypeSystem.FindType(instToExtract.ResultType); |
|
|
|
// Move instToExtract itself:
|
|
|
|
// Move instToExtract itself:
|
|
|
|
var v = function.RegisterVariable(VariableKind.StackSlot, type); |
|
|
|
var v = function.RegisterVariable(VariableKind.StackSlot, type); |
|
|
|
instToExtract.ReplaceWith(new LdLoc(v)); |
|
|
|
instToExtract.ReplaceWith(new LdLoc(v)); |
|
|
|