OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | asm List | November 2006 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [asm] asm as a compiler?


>   If your goal to produce a real Java code, and want to compile that 
> stuff without writing it into the disk, then you already been suggested 
> several options: java 6 compiler API (+its AST), Janino (it also has its 
> own AST) and I can add Eclipse's compiler to that list. All of them have 
> AST models, that allows to skip parsing of Java text. They all also have 
> a layers to deal with compiled code without writing it to disk. The 
> simplest one is Janino (but it does not guarantee complete match to the 
> Java spec). If you need a solid compiler, then Eclipse's one would be 
> the best choice, though its in-memory API is somehow obscure and you'll 
> be required to implements several interfaces.

Now that I read the asmifier description more carefully, I realized that 
it takes _classes_, not sources as input.

Had it been the latter, it would have been straightforward to modify it to
a compiler. But now that I found the answer to this question, it is clear
that the asm project doesn't help me much at this stage.

I already looked at the Eclipse compiler and it looked promising at the
first glance. All interfaces mentioned in the Compiler class seemed to
have a direct connection to the task of compiling. Now I only need to find
a good example/tutorial to get started.

Thanks to all, maybe I'll ask other questions (much) later when I start
doing custom bytecode transformations with ngrease.

- Ville Oikarinen



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.