Re: [Mono-dev] ilasm as a library

2010-05-17 Thread Miguel Garcia
Andreas Nahr classdevelopm...@a-softtech.com wrote in message news:002b01caf54b$a49d3940$edd7ab...@com... Which use case do you see for a temporary solution using .il files? The compiler backend in question currently generates .il but no .dll or .exe files. That's why I was thinking about

Re: [Mono-dev] ilasm as a library

2010-05-17 Thread Andreas Nahr
Now that you mention System.Reflection, I'm not sure how you get to that statement. But I NEVER mentioned System.Reflection. I've been talking about System.Reflection.Emit which is an (entirely) different thing. https://blogs.msdn.com/jmstall/archive/2008/03/15/things-in-metadata-

[Mono-dev] ilasm as a library

2010-05-16 Thread Miguel Garcia
Hi, I wanted to see how gmcs generates assemblies, given that I want to do the same for the Scala.Net compiler [1] (which as of now generates .il files). I started exploring codegen.cs and found a reference to Mono.CompilerServices.SymbolWriter . That may save an intermediate step, but how

Re: [Mono-dev] ilasm as a library

2010-05-16 Thread Robert Jordan
On 16.05.2010 15:22, Miguel Garcia wrote: Hi, I wanted to see how gmcs generates assemblies, given that I want to do the same for the Scala.Net compiler [1] (which as of now generates .il files). It is using System.Reflection.Emit, which means that there is no intermediate IL source code

Re: [Mono-dev] ilasm as a library

2010-05-16 Thread Miguel Garcia
Robert, Actually I did not mention IKVM.Reflection.Emit, nor Mono Cecil (old and new), and so on because for now I'm after a temporary solution, in the form of in-memory IL compilation (none of the CIL-emit libraries address this use case). Given that Microsoft's ilasm can only be invoked as

Re: [Mono-dev] ilasm as a library

2010-05-16 Thread Rodrigo Kumpera
I tried that in the past, to programatically call ilasm. The issue was that the library has some static context so it can't be called multiple times. I tried to hack around using appdomains with no luck at all. Changing it to work as a library should be easy (just peek at Driver::Main for how to

Re: [Mono-dev] ilasm as a library

2010-05-16 Thread Rodrigo Kumpera
Forgot to mention, my problem with using appdomain was the very lacking performance. On Sun, May 16, 2010 at 12:35 PM, Rodrigo Kumpera kump...@gmail.com wrote: I tried that in the past, to programatically call ilasm. The issue was that the library has some static context so it can't be called

Re: [Mono-dev] ilasm as a library

2010-05-16 Thread Robert Jordan
Miguel, On 16.05.2010 17:12, Miguel Garcia wrote: Given that Microsoft's ilasm can only be invoked as a command-line tool, it would be great if Mono ilasm would sport a homepage showing off this capability (I for one would find a code example or two very useful). It doesn't support in-memory

Re: [Mono-dev] ilasm as a library

2010-05-16 Thread Robert Jordan
On 16.05.2010 17:48, Robert Jordan wrote: About JayC, I made some more browsing and found this http://code.google.com/p/jayc/ , which I guess is the version gmcs uses, right? (otherwise, the correct URL would be welcome). http://anonsvn.mono-project.com/viewvc/trunk/mcs/jay/ What I forgot