|
|
|
@ -94,6 +94,12 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -94,6 +94,12 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
} |
|
|
|
|
return expr.WithRR(new ResolveResult(variable.Type)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ExpressionWithResolveResult ConvertField(IField field) |
|
|
|
|
{ |
|
|
|
|
Expression expr = new IdentifierExpression(field.Name); |
|
|
|
|
return expr.WithRR(new ResolveResult(field.ReturnType)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TranslatedExpression IsType(IsInst inst) |
|
|
|
|
{ |
|
|
|
@ -466,6 +472,16 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -466,6 +472,16 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
return Assignment(result, value).WithILInstruction(inst); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected internal override TranslatedExpression VisitLdFld(LdFld inst) |
|
|
|
|
{ |
|
|
|
|
return ConvertField(inst.Field).WithILInstruction(inst); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected internal override TranslatedExpression VisitStFld(StFld inst) |
|
|
|
|
{ |
|
|
|
|
return Assignment(ConvertField(inst.Field).WithoutILInstruction(), Translate(inst.Value)).WithILInstruction(inst); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected internal override TranslatedExpression VisitUnboxAny(UnboxAny inst) |
|
|
|
|
{ |
|
|
|
|
var arg = Translate(inst.Argument); |
|
|
|
|