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?


Ville,

I'm running a project to create a new implementation of Common Lisp running on the JVM. Our CL does not have an interpreter, preferring to compile every form other than the most simple. So we have an in- memory compiler that does double duty by being a file compiler as well. We use ASM as the end-stage of the emitter. We chose to use ASM because it's very light-weight, very fast, and it provides a good verification system - very handy when you're creating JVM bytecode. But you should remember that ASM isn't a compiler. It's a smart assembler. You have to figure out all of the byte codes to emit. It looks that you need a real Java compiler that runs in-memory.

  Jerry

On Nov 29, 2006, at 4:01 AM, Ville Oikarinen wrote:

Hello.

My question: Can asm be used (easily) as an in-memory compiler?

Some background:

I am developing a metalanguage, and I thought it would be nice to be able
to generate java classes, not only source.


The problem with javac (and hence ant etc) is that it requires real files
for input and output, and I don't think it's possible to mock files
without some major bootclasspath hacking. So compiling _can_ be done with
javac, but it's awkward and slow (at least when I'm forced to use NTFS...)


What I'd like to do, is to wrap my generated java source objects and
dependency classes as something readable by a compiler (e.g.
SourceProvider and ClassProvider), and then wrap the compiler's output
(e.g. ClassProvider) as java class objects usable in my metalanguage.

So, is this easily achievable with asm, and if so, would some asm guru be
willing to implement it for (or with) me?


Kind regards,
Ville Oikarinen

P.S. I am aware of the compiler API of Java 6, but I don't think
dependency to Java 6 will be a good idea for a long time.


--
You receive this message as a subscriber of the asm@xxxxxxxxxxxxx mailing list.
To unsubscribe: mailto:asm-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws




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

Reply via email to:

Powered by MHonArc.

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