I've started writing some tests for my Generic/ForEach problem. As I don't
have write access to SVN yet, I'm sending the current test here. Anyway,
compiling it inside SharpOS.Kernel.Tests.CS (with VS05) works just fine. The
AOT throws this:
D:\SharpOS\trunk\build>sharpos-aot.exe -cpu:X86 -out Tests.dll -verbose
SharpOS.
Kernel.dll SharpOS.Kernel.Tests.CS.dll SharpOS.Kernel.Tests.IL.dll
SharpOS Ahead-Of-Time Compiler 0.2.0.0 - Copyright C 2007, The SharpOS
Project
AOT compiling for processor `X86'
Loading assembly `SharpOS.Kernel.dll'
Generating IR for assembly types...
Loading assembly `SharpOS.Kernel.Tests.CS.dll'
Generating IR for assembly types...
Loading assembly `SharpOS.Kernel.Tests.IL.dll'
Generating IR for assembly types...
Loading assembly `D:\SharpOS\trunk\build\SharpOS.AOT.Core.dll'
Generating IR for assembly types...
Selected ADC layer `SharpOS.Kernel.ADC.X86' for compilation
Classes: `534'
Methods: `3765'
IL Instructions: `77956'
Processing IR methods...
Error: SharpOS.AOT.IR.EngineException: Class 'Type' not found.
bei SharpOS.AOT.IR.Engine.GetClass(TypeReference type) in D:\My
Projects\Shar
pOS\trunk\AOT\Core\IR\Engine.cs:Zeile 751.
bei SharpOS.AOT.IR.Class.Setup(Int32 step) in D:\My
Projects\SharpOS\trunk\AO
T\Core\IR\Class.cs:Zeile 152.
bei SharpOS.AOT.IR.Class.Setup() in D:\My
Projects\SharpOS\trunk\AOT\Core\IR\
Class.cs:Zeile 55.
bei SharpOS.AOT.IR.Engine.AddSpecialType(TypeReference type) in D:\My
Project
s\SharpOS\trunk\AOT\Core\IR\Engine.cs:Zeile 800.
bei SharpOS.AOT.IR.Engine.GetClass(TypeReference type) in D:\My
Projects\Shar
pOS\trunk\AOT\Core\IR\Engine.cs:Zeile 749.
bei SharpOS.AOT.IR.Class.GetClass(TypeReference type) in D:\My
Projects\Sharp
OS\trunk\AOT\Core\IR\Class.cs:Zeile 500.
bei SharpOS.AOT.IR.Class.Setup(Int32 step) in D:\My
Projects\SharpOS\trunk\AO
T\Core\IR\Class.cs:Zeile 133.
bei SharpOS.AOT.IR.Class.Setup() in D:\My
Projects\SharpOS\trunk\AOT\Core\IR\
Class.cs:Zeile 56.
bei SharpOS.AOT.IR.Engine.AddSpecialType(TypeReference type) in D:\My
Project
s\SharpOS\trunk\AOT\Core\IR\Engine.cs:Zeile 800.
bei SharpOS.AOT.IR.Engine.GetClass(TypeReference type) in D:\My
Projects\Shar
pOS\trunk\AOT\Core\IR\Engine.cs:Zeile 749.
bei SharpOS.AOT.IR.Class.GetClass(TypeReference type) in D:\My
Projects\Sharp
OS\trunk\AOT\Core\IR\Class.cs:Zeile 500.
bei SharpOS.AOT.IR.Method.GetClass(TypeReference type) in D:\My
Projects\Shar
pOS\trunk\AOT\Core\IR\Method.cs:Zeile 1924.
bei SharpOS.AOT.IR.Method.PreProcess() in D:\My
Projects\SharpOS\trunk\AOT\Co
re\IR\Method.cs:Zeile 1967.
bei SharpOS.AOT.IR.Method.Setup() in D:\My
Projects\SharpOS\trunk\AOT\Core\IR
\Method.cs:Zeile 242.
bei SharpOS.AOT.IR.Class.SetupMethods() in D:\My
Projects\SharpOS\trunk\AOT\C
ore\IR\Class.cs:Zeile 217.
bei SharpOS.AOT.IR.Engine.ProcessIRMethods() in D:\My
Projects\SharpOS\trunk\
AOT\Core\IR\Engine.cs:Zeile 1423.
bei SharpOS.AOT.IR.Engine.Run(IAssembly asm) in D:\My
Projects\SharpOS\trunk\
AOT\Core\IR\Engine.cs:Zeile 899.
bei SharpOS.AOT.IR.Engine.Run() in D:\My
Projects\SharpOS\trunk\AOT\Core\IR\E
ngine.cs:Zeile 652.
bei SharpOS.AOT.Compiler.Main(String[] args) in D:\My
Projects\SharpOS\trunk\
AOT\Main\Program.cs:Zeile 195.
While performing IR processing
* Status information is not available.
(Same errors appear if I build SharpOS.Kernel.Core in Visual Studio.)
The test passes NUnit. I'll continue writing this test, once this one is
fixed.
I'm using the latest SVN trunk.
grover
//
// (C) 2006-2008 The SharpOS Project Team (http://www.sharpos.org)
//
// Authors:
// Michael Ruck (aka grover) <[EMAIL PROTECTED]>
//
// Licensed under the terms of the GNU GPL v3,
// with Classpath Linking Exception for Libraries
//
namespace SharpOS.Kernel.Tests.CS {
public class ForEach {
private class List<Type> {
public List(int capacity)
{
_items = new Type[capacity];
_used = 0;
}
public void Add(Type item)
{
if (_used < _items.Length)
_items[_used++] = item;
}
public int Length
{
get
{
return _used;
}
}
private int _used;
private Type[] _items;
};
public static uint CMPGenericForEach()
{
List<int> list = new List<int>(10);
for (int i = 0; i < 10; i++)
list.Add(i);
return 1;
}
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers