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

2009-02-25 Thread mobbe

Running a two-week old SVN HEAD version of Mono and have been using the full
AOT compilation feature as well as the mono_aot_only mode of running the
system so that I can execute managed code on the iPhone. I have been
successful in doing so and have been instantiating and executing various
managed code methods to verify the functionality.

Last night I fully AOT compiled an assembly that has a method with some
generics code in it. I basically add a few strings to a List
collection. When running this method an assert was triggered and looking at
the stack trace it seemed to have stopped when it tried to compile a
runtime_invoke_void_* method (not sure about the exact name of this
method)... which was created as an "extra" method when previously compiling
the generic code. 

Now, the assert was triggered because I was running with mono_aot_only =
TRUE but the code was trying to invoke a JIT compilation. 

Does this mean that generics isn't supported right now for full AOT
compilation? or does it mean that I haven't initialized the system correctly
(either at compile time or at runtime)?

If it is not supported are there any goals for when this would be available? 

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

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


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

2009-02-25 Thread Zoltan Varga
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

On Wed, Feb 25, 2009 at 3:48 PM, mobbe  wrote:
>
> Running a two-week old SVN HEAD version of Mono and have been using the full
> AOT compilation feature as well as the mono_aot_only mode of running the
> system so that I can execute managed code on the iPhone. I have been
> successful in doing so and have been instantiating and executing various
> managed code methods to verify the functionality.
>
> Last night I fully AOT compiled an assembly that has a method with some
> generics code in it. I basically add a few strings to a List
> collection. When running this method an assert was triggered and looking at
> the stack trace it seemed to have stopped when it tried to compile a
> runtime_invoke_void_* method (not sure about the exact name of this
> method)... which was created as an "extra" method when previously compiling
> the generic code.
>
> Now, the assert was triggered because I was running with mono_aot_only =
> TRUE but the code was trying to invoke a JIT compilation.
>
> Does this mean that generics isn't supported right now for full AOT
> compilation? or does it mean that I haven't initialized the system correctly
> (either at compile time or at runtime)?
>
> If it is not supported are there any goals for when this would be available?
>
> Thanks,
> --
> View this message in context: 
> http://www.nabble.com/Full-AOT-compilation-of-generics-supported--tp22204268p22204268.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
>
> ___
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


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

2009-02-25 Thread Peter Moberg
Thanks, I will update my local repository and try again. Is there a specific
method that I can put a breakpoint in to see if Mono decides to AOT compile
the generic method or not? ...just would like to verify the behavior...



On Wed, Feb 25, 2009 at 9:18 AM, Zoltan Varga  wrote:

> 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
>
> On Wed, Feb 25, 2009 at 3:48 PM, mobbe  wrote:
> >
> > Running a two-week old SVN HEAD version of Mono and have been using the
> full
> > AOT compilation feature as well as the mono_aot_only mode of running the
> > system so that I can execute managed code on the iPhone. I have been
> > successful in doing so and have been instantiating and executing various
> > managed code methods to verify the functionality.
> >
> > Last night I fully AOT compiled an assembly that has a method with some
> > generics code in it. I basically add a few strings to a List
> > collection. When running this method an assert was triggered and looking
> at
> > the stack trace it seemed to have stopped when it tried to compile a
> > runtime_invoke_void_* method (not sure about the exact name of this
> > method)... which was created as an "extra" method when previously
> compiling
> > the generic code.
> >
> > Now, the assert was triggered because I was running with mono_aot_only =
> > TRUE but the code was trying to invoke a JIT compilation.
> >
> > Does this mean that generics isn't supported right now for full AOT
> > compilation? or does it mean that I haven't initialized the system
> correctly
> > (either at compile time or at runtime)?
> >
> > If it is not supported are there any goals for when this would be
> available?
> >
> > Thanks,
> > --
> > View this message in context:
> http://www.nabble.com/Full-AOT-compilation-of-generics-supported--tp22204268p22204268.html
> > Sent from the Mono - Dev mailing list archive at Nabble.com.
> >
> > ___
> > Mono-devel-list mailing list
> > Mono-devel-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


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

2009-02-25 Thread mobbe

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: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
  {
/// 
/// 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";
/// 
/// 
public string SortListAndReturnFirstItem()
{
  List strings = new List();

  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.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


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

2009-02-25 Thread mobbe

Update on this one.. 

If I comment out the line that has strings.Sort(); on it I am successful in
retrieving back the string "3" from the managed world.


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: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
  {
/// 
/// 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";
/// 
/// 
public string SortListAndReturnFirstItem()
{
  List strings = new List();

  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





Zoltan Varga wrote:
> 
> 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--tp22204268p22217671.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list