classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: japize


From: Per Bothner
Subject: Re: japize
Date: Tue, 01 Oct 2002 14:45:41 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020814

Brian Jones wrote:
Btw, there are entirely too many bytecode libraries out there... Jode,
gnu.bytecode, Apache's version of the same, and on and on... anyone
know what the best GPL and BSD compatible ones are?

It depends what you're trying to do.  gnu.bytecode is optimized for
low-overhead code generation, plus basic slurping of the contents of
.class files, and it is less suited (at least in its
current incarnation) for heavy-duty instruction analysis,
peephole optimization, etc.  Most similar libraries seem to use one
object for each instruction, which is flexible, but expensive.
gnu.bytecode just appends instructions into a byte array, using
a large set of convenience methods that pick the correct instructions.
(Simplified of course.  For example, you can reference undefined
"labels", so you have to be able to back-patch the array.  And
there is limited support for re-ordering code.)  (I would like
change it to use "basic blocks" as the fundamental unit, using the algorithms I wrote for gcc/java/jcf-write.c, but I haven't had time.)

gnu.bytecode is compatible with the GPL.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]