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 do it). The main core issue is fixing the issue I mentioned. I have no idea how hard to fix it because I didn't put much more than an hours looking into it. On Sun, May 16, 2010 at 10:22 AM, Miguel Garcia <miguel.gar...@tuhh.de>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). > > I started exploring codegen.cs and found a reference to > Mono.CompilerServices.SymbolWriter . That may save an intermediate step, but > how about programmatically invoking the Mono IL Assembler [2] passing an > in-memory .il file as input? (and BTW, can Jay generate C#-only parsers?) > > A code snippet on how to use Mono's ilasm as a component would be most > welcome! > > Miguel > > > [1] http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded > > [2] http://anonsvn.mono-project.com/viewvc/trunk/mcs/ilasm/ > > > -- > Miguel Garcia > Swiss Federal Institute of Technology > EPFL - IC - LAMP1 - INR 328 - Station 14 > CH-1015 Lausanne - Switzerland > http://lamp.epfl.ch/~magarcia/ > > _______________________________________________ > 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