Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing remaining Mono.Cecil 0.9.3 migration bug, all translator tests…

… are passing again
  • Loading branch information...
commit a0c47ac0a2e1136e597f9b0cec1a64c967d109f7 1 parent 64628ce
@flaub authored
View
2  src/DotWeb.Decompiler/CodeModel/Expression/Reference/CodePropertyReference.cs
@@ -47,7 +47,7 @@ public enum RefType
public CodeExpression TargetObject { get { return Method.TargetObject; } }
public CodeMethodReference Method { get; set; }
- public PropertyReference Property { get; set; }
+ public PropertyDefinition Property { get; set; }
public RefType ReferenceType { get; set; }
}
}
View
4 src/DotWeb.Decompiler/Core/Interpreter.cs
@@ -596,7 +596,7 @@ public class Interpreter
}
}
- private void CallGetter(Instruction il, MethodDefinition method, PropertyReference pi, bool isVirtual) {
+ private void CallGetter(Instruction il, MethodDefinition method, PropertyDefinition pi, bool isVirtual) {
var args = method.Parameters;
if (args.Count == 0) {
var targetObject = GetTargetObject(method, isVirtual);
@@ -616,7 +616,7 @@ public class Interpreter
}
}
- private void CallSetter(Instruction il, MethodDefinition method, PropertyReference pi, bool isVirtual) {
+ private void CallSetter(Instruction il, MethodDefinition method, PropertyDefinition pi, bool isVirtual) {
var args = method.Parameters;
if (args.Count == 1) {
var rhs = RefinePrimitiveExpression(Pop(), pi.PropertyType);
View
15 src/DotWeb.Translator/AttributeHelper.cs
@@ -64,11 +64,11 @@ public static class AttributeHelper
return typeSystem.IsDefined(type.Resolve(), typeDef);
}
- public static bool IsIntrinsic(PropertyReference propertyRef, TypeSystem typeSystem) {
+ public static bool IsIntrinsic(PropertyDefinition propertyDef, TypeSystem typeSystem) {
var typeDef = typeSystem.GetTypeDefinition(JsInstrinsic);
return
- typeSystem.IsDefined(GetProvider(propertyRef), typeDef) ||
- typeSystem.IsDefined(propertyRef.DeclaringType.Resolve(), typeDef);
+ typeSystem.IsDefined(propertyDef, typeDef) ||
+ typeSystem.IsDefined(propertyDef.DeclaringType.Resolve(), typeDef);
}
private static string GetStringFromAttribute(ICustomAttributeProvider provider, string attributeName) {
@@ -112,12 +112,9 @@ public static class AttributeHelper
if (methodRef != null) {
return methodRef.Resolve();
}
- var propertyRef = memberRef as PropertyReference;
- if (propertyRef != null) {
- var genericParameter = propertyRef.PropertyType as GenericParameter;
- if (genericParameter != null)
- return genericParameter;
- return propertyRef.PropertyType.Resolve();
+ var propertyDef = memberRef as PropertyDefinition;
+ if (propertyDef != null) {
+ return propertyDef;
}
return null;
}
Please sign in to comment.
Something went wrong with that request. Please try again.