cool.
I'll just wait untill darxkies looks at it, since he's the one working
on generics (and the mastermind behind the AOT compiler)
On Sat, Mar 15, 2008 at 2:06 PM, grover <[EMAIL PROTECTED]> wrote:
> I'm looking into it. I've created another small patch, which seems to almost
> work, except for a problem with the register allocation, which I can't fix
> right now.
>
> The line foreach (INode node in _devices), where _devices is a
> InternalSystem.Collections.Generic.List<INode> doesn't pass the AOT. With
> this patch it does pass, but fails later on in the register allocation in
>
> register.Version = ++this.method.RegisterVersions [this.stack.Count];
>
> In SharpOS.AOT.IR.Block::SetRegister.
>
> The method compiled is:
>
> public INode Lookup(string name)
> {
> foreach (DeviceNode device in _devices)
> {
> if (device.Name == name)
> {
> return device;
> }
> }
>
> return null;
> }
>
> Where _devices is a class member of type
> InternalSystem.Collections.Generic.List<INode>. The AOT fails on the
> callvirt for InternalSystem.Collections.Generic.List<INode>::get_Count.
>
> The IL of the method (compiled with VS2005) is:
>
> .maxstack 2
> .locals init (
> [0] int32 i,
> [1] class SharpOS.Kernel.VFS.INode device,
> [2] class SharpOS.Kernel.VFS.INode CS$1$0000,
> [3] bool CS$4$0001)
> L_0000: nop
> L_0001: ldc.i4.0
> L_0002: stloc.0
> L_0003: br.s L_0030
> L_0005: nop
> L_0006: ldarg.0
> L_0007: ldfld class InternalSystem.Collections.Generic.List`1<class
> SharpOS.Kernel.DriverModel.DeviceNode>
> SharpOS.Kernel.DriverModel.DeviceManager::_devices
> L_000c: ldloc.0
> L_000d: callvirt instance !0
> InternalSystem.Collections.Generic.List`1<class
> SharpOS.Kernel.DriverModel.DeviceNode>::get_Item(int32)
> L_0012: stloc.1
> L_0013: ldloc.1
> L_0014: callvirt instance string SharpOS.Kernel.VFS.INode::get_Name()
> L_0019: ldarg.1
> L_001a: call bool [mscorlib]System.String::op_Equality(string, string)
> L_001f: ldc.i4.0
> L_0020: ceq
> L_0022: stloc.3
> L_0023: ldloc.3
> L_0024: brtrue.s L_002b
> L_0026: nop
> L_0027: ldloc.1
> L_0028: stloc.2
> L_0029: br.s L_0046
> L_002b: nop
> L_002c: ldloc.0
> L_002d: ldc.i4.1
> L_002e: add
> L_002f: stloc.0
> L_0030: ldloc.0
> L_0031: ldarg.0
> L_0032: ldfld class InternalSystem.Collections.Generic.List`1<class
> SharpOS.Kernel.DriverModel.DeviceNode>
> SharpOS.Kernel.DriverModel.DeviceManager::_devices
> L_0037: callvirt instance int32
> InternalSystem.Collections.Generic.List`1<class
> SharpOS.Kernel.DriverModel.DeviceNode>::get_Count()
> L_003c: clt
> L_003e: stloc.3
> L_003f: ldloc.3
> L_0040: brtrue.s L_0005
> L_0042: ldnull
> L_0043: stloc.2
> L_0044: br.s L_0046
> L_0046: ldloc.2
> L_0047: ret
>
> The failure is on the CIL instruction on line L_0037. I have no clue how to
> fix this one, I haven't looked into the register allocation.
>
> grover
>
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von
> Sander van Rossen
> Gesendet: Samstag, 15. März 2008 14:04
> An: [email protected]
> Betreff: Re: [SharpOS Developers] AOT issues with generics?
>
> This is a known problem, generics haven't been fully implemented yet.
>
>
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sharpos-developers
>
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sharpos-developers
>
>
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sharpos-developers