This commit is contained in:
kudzu_cp 2009-09-05 02:14:35 +00:00
parent aebe65d321
commit abb4722da4
2 changed files with 27 additions and 28 deletions

View file

@ -1,4 +1,10 @@
using System;
// using System.Collections.Generic;
// using System.IO;
//
// using CPU = Indy.IL2CPU.Assembler;
// using System.Reflection;
// using Indy.IL2CPU.Compiler;
namespace Cosmos.IL2CPU.X86.IL
{
@ -13,15 +19,6 @@ namespace Cosmos.IL2CPU.X86.IL
throw new NotImplementedException();
}
// using System;
// using System.Collections.Generic;
// using System.IO;
//
//
// using CPU = Indy.IL2CPU.Assembler;
// using System.Reflection;
// using Indy.IL2CPU.Compiler;
//
// namespace Indy.IL2CPU.IL.X86 {
// [OpCode(OpCodeEnum.Ldfld)]

View file

@ -125,26 +125,28 @@ namespace Cosmos.IL2CPU
}
}
protected uint QueueMethod( MethodBase aMethod )
{
if( !mMethodsSet.Contains( aMethod ) )
{
mMethodsSet.Add( aMethod );
mMethods.Add( aMethod );
//TODO: Might still need this one, see after we get assembly output again
//Im hoping the operand walking we have now ill include this on its own.
//QueueType(aMethod.DeclaringType);
protected uint QueueMethod(MethodBase aMethod) {
uint xResult;
if (mMethodsSet.Contains(aMethod)) {
// todo: this is probably slow
xResult = (uint)(mMethods.IndexOf(aMethod));
} else {
mMethodsSet.Add(aMethod);
xResult = (uint)mMethods.Count;
mMethods.Add(aMethod);
//TODO: Might still need this one, see after we get assembly output again
//Im hoping the operand walking we have now ill include this on its own.
//QueueType(aMethod.DeclaringType);
//var xMethodInfo = aMethod as MethodInfo;
//if (xMethodInfo != null) {
// QueueType(xMethodInfo.ReturnType);
//}
//foreach (var xParam in aMethod.GetParameters()) {
// QueueType(xParam.ParameterType);
//}
}
// todo: this is probably slow
return (uint)mMethods.IndexOf(aMethod);
//var xMethodInfo = aMethod as MethodInfo;
//if (xMethodInfo != null) {
// QueueType(xMethodInfo.ReturnType);
//}
//foreach (var xParam in aMethod.GetParameters()) {
// QueueType(xParam.ParameterType);
//}
}
return xResult;
}
//protected void QueueStaticField(FieldInfo aFieldInfo) {