mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
Code cleanup.
This commit is contained in:
parent
7c8b0f732f
commit
277d87e3ef
2 changed files with 8 additions and 5 deletions
|
|
@ -522,6 +522,7 @@ namespace Cosmos.IL2CPU
|
||||||
private void AfterEmitInstructions(MethodInfo aMethod, List<ILOpCode> aCurrentGroup)
|
private void AfterEmitInstructions(MethodInfo aMethod, List<ILOpCode> aCurrentGroup)
|
||||||
{
|
{
|
||||||
// do optimizations
|
// do optimizations
|
||||||
|
|
||||||
//if (Assembler.Stack.Count > 0)
|
//if (Assembler.Stack.Count > 0)
|
||||||
//{
|
//{
|
||||||
// if (mDebugStackErrors)
|
// if (mDebugStackErrors)
|
||||||
|
|
@ -966,10 +967,6 @@ namespace Cosmos.IL2CPU
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xType.IsInterface)
|
|
||||||
{
|
|
||||||
Push(aGetTypeID(xType));
|
|
||||||
}
|
|
||||||
int? xBaseIndex = null;
|
int? xBaseIndex = null;
|
||||||
if (xType.BaseType == null)
|
if (xType.BaseType == null)
|
||||||
{
|
{
|
||||||
|
|
@ -1001,6 +998,10 @@ namespace Cosmos.IL2CPU
|
||||||
}
|
}
|
||||||
if (!xType.IsInterface)
|
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));
|
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(
|
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) }));
|
new DataMember("VMT__TYPE_ID_HOLDER__" + DataMember.FilterStringForIncorrectChars(LabelName.GetFullName(xType) + " ASM_IS__" + xType.Assembly.GetName().Name), new int[] { (int)aGetTypeID(xType) }));
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,9 @@ namespace Cosmos.IL2CPU
|
||||||
var xParamTypes = new Type[xParams.Length];
|
var xParamTypes = new Type[xParams.Length];
|
||||||
// Dont use foreach, enum generaly keeps order but
|
// Dont use foreach, enum generaly keeps order but
|
||||||
// isn't guaranteed.
|
// isn't guaranteed.
|
||||||
string xMethodFullName = LabelName.GenerateFullName(aMethod);
|
//string xMethodFullName = LabelName.GenerateFullName(aMethod);
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < xParams.Length; i++)
|
for (int i = 0; i < xParams.Length; i++)
|
||||||
{
|
{
|
||||||
xParamTypes[i] = xParams[i].ParameterType;
|
xParamTypes[i] = xParams[i].ParameterType;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue