This commit is contained in:
kudzu_cp 2009-09-13 14:02:59 +00:00
parent 40b895bffc
commit fa8dff887f

View file

@ -333,8 +333,17 @@ namespace Cosmos.IL2CPU {
var xParams = aMethod.GetParameters();
var xParamTypes = new Type[xParams.Length];
for (int i = 0; i < xParams.Length; i++) {
Queue(xParamTypes[i], aMethod, "Parameter");
xParamTypes[i] = xParams[i].ParameterType;
}
// Queue Types directly related to method
if (!aIsPlug) {
// Don't queue declaring types of plugs
Queue(aMethod.DeclaringType, aMethod, "Declaring Type");
}
if (aMethod is System.Reflection.MethodInfo) {
Queue(((System.Reflection.MethodInfo)aMethod).ReturnType, aMethod, "Return Type");
}
// We only need to look in ancestors and descendants if the method is virtual
if (aMethod.IsVirtual) {
@ -408,18 +417,6 @@ namespace Cosmos.IL2CPU {
}
}
}
// Queue Types directly related to method
if (!aIsPlug) {
// Don't queue declaring types of plugs
Queue(aMethod.DeclaringType, aMethod, "Declaring Type");
}
if (aMethod is System.Reflection.MethodInfo) {
Queue(((System.Reflection.MethodInfo)aMethod).ReturnType, aMethod, "Return Type");
}
foreach (var xType in xParamTypes) {
Queue(xType, aMethod, "Parameter");
}
}
}