[Mono-dev] Full AOT compilation of generics supported?

mobbe peter.moberg at gmail.com
Wed Feb 25 23:32:16 EST 2009


Hi again,

I got the latest from SVN and recompiled all of my base libraries again
(mscorlib,System and System.Core) as well as my custom assembly. The base
libraries are taken from the mono/2.1 folder so I am compiling with the
Silverlight binaries. 

When I try to run my method I get the following assert... 

** ERROR **: Attempting to JIT compile method '(wrapper static-rgctx-invoke)
System.Collections.Generic.Comparer`1<string>:static_rgctx_invoke_void ()'
while running with --aot-only.

This is the code that I am trying to run... 

using System;
using System.Collections.Generic;

namespace MonoSLLibrary
{
  public class Class1
  {
    /// <summary>
    /// Cretes a generic list, creates a few items descending order, sorts
the list
    /// and returns the first item. The first item should be a "1";
    /// </summary>
    /// <returns></returns>
    public string SortListAndReturnFirstItem()
    {
      List<string> strings = new List<string>();

      strings.Add("3");
      strings.Add("2");
      strings.Add("1");
      strings.Sort();
      return strings[0];

    }
  }
}

I guess it is the call to strings.Sort that is causing some issues with the
comparer. Is still one of those rare cases where Mono doesn't JIT-compile or
should this not be happening? 

Peter





Hi,

  full aot + generics is mostly supported, but it is very hard to
statically determine the
set of generics methods which need to be AOTed so it might not work in
all cases. Try
current SVN HEAD as there were fixes in this area in the past two weeks.

           Zoltan

-- 
View this message in context: http://www.nabble.com/Full-AOT-compilation-of-generics-supported--tp22204268p22217501.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list