Code cleanup.

This commit is contained in:
Matthijs ter Woord 2015-05-05 10:44:54 +02:00
parent 7c8b0f732f
commit 277d87e3ef
2 changed files with 8 additions and 5 deletions

View file

@ -522,6 +522,7 @@ namespace Cosmos.IL2CPU
private void AfterEmitInstructions(MethodInfo aMethod, List<ILOpCode> aCurrentGroup)
{
// do optimizations
//if (Assembler.Stack.Count > 0)
//{
// if (mDebugStackErrors)
@ -966,10 +967,6 @@ namespace Cosmos.IL2CPU
}
}
if (!xType.IsInterface)
{
Push(aGetTypeID(xType));
}
int? xBaseIndex = null;
if (xType.BaseType == null)
{
@ -1001,6 +998,10 @@ namespace Cosmos.IL2CPU
}
if (!xType.IsInterface)
{
if (!xType.IsInterface)
{
Push(aGetTypeID(xType));
}
Move("VMT__TYPE_ID_HOLDER__" + DataMember.FilterStringForIncorrectChars(LabelName.GetFullName(xType) + " ASM_IS__" + xType.Assembly.GetName().Name), (int)aGetTypeID(xType));
Cosmos.Assembler.Assembler.CurrentInstance.DataMembers.Add(
new DataMember("VMT__TYPE_ID_HOLDER__" + DataMember.FilterStringForIncorrectChars(LabelName.GetFullName(xType) + " ASM_IS__" + xType.Assembly.GetName().Name), new int[] { (int)aGetTypeID(xType) }));

View file

@ -387,7 +387,9 @@ namespace Cosmos.IL2CPU
var xParamTypes = new Type[xParams.Length];
// Dont use foreach, enum generaly keeps order but
// isn't guaranteed.
string xMethodFullName = LabelName.GenerateFullName(aMethod);
//string xMethodFullName = LabelName.GenerateFullName(aMethod);
for (int i = 0; i < xParams.Length; i++)
{
xParamTypes[i] = xParams[i].ParameterType;