Some small enhancements

This commit is contained in:
mterwoord_cp 2008-05-09 15:02:58 +00:00
parent 8cab5bc18c
commit b0b7dbdd09
2 changed files with 18 additions and 27 deletions

View file

@ -110,11 +110,14 @@ namespace Indy.IL2CPU.IL.X86 {
} else if (mReturnSize <= 4) {
new CPUx86.Pushd(CPUx86.Registers.EAX);
Assembler.StackContents.Push(new StackContent(mReturnSize, mCurrentMethodInfo.ReturnType));
} else if (mReturnSize <= 8) {
new CPUx86.Pushd(CPUx86.Registers.EBX);
new CPUx86.Pushd(CPUx86.Registers.EAX);
Assembler.StackContents.Push(new StackContent(mReturnSize, mCurrentMethodInfo.ReturnType));
}
}
else if (mReturnSize <= 8)
{
new CPUx86.Pushd(CPUx86.Registers.EBX);
new CPUx86.Pushd(CPUx86.Registers.EAX);
Assembler.StackContents.Push(new StackContent(mReturnSize, mCurrentMethodInfo.ReturnType));
}
else { throw new NotSupportedException(">8 byte return codes not yet supported!"); }
}
}
}

View file

@ -4,43 +4,31 @@ using System.Text;
using Cosmos.Build.Windows;
using System.Collections;
namespace MatthijsTest {
public class Program {
namespace MatthijsTest
{
public class Program
{
#region Cosmos Builder logic
// Most users wont touch this. This will call the Cosmos Build tool
[STAThread]
private static void Main(string[] args) {
private static void Main(string[] args)
{
BuildUI.Run();
}
#endregion
public class MessageContainer : IEnumerable
{
public IEnumerator GetEnumerator() {
yield return "String1";
yield return "String2";
yield return "String3";
yield return "String4";
yield return "String5";
}
}
public static void GetResumeAndResume(ref uint aSuspend)
{
aSuspend = 0;
throw new NotImplementedException();
}
public static void Init() {
var xTest = (IEnumerable)new string[] { "String1", "String2", "String3" };
foreach(string xItem in xTest){
Console.WriteLine(xItem);
}
public static void Init()
{
var xTest = new List<string>() { "String1", "String2", "String3", "String4" };
foreach (string xItem in xTest) { Console.WriteLine(xItem); }
}
}
}