cp-tools-discuss
[Top][All Lists]
Advanced

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

Re: [Cp-tools-discuss] gnu.bytecode


From: Per Bothner
Subject: Re: [Cp-tools-discuss] gnu.bytecode
Date: Sun, 30 Jan 2005 14:23:28 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

Elliott Hughes wrote:
On Jan 29, 2005, at 20:34, C. Brian Jones wrote:

On Thu, 2004-12-30 at 01:36, C. Brian Jones wrote:

>> I've also been pointed to ASM, http://asm.objectweb.org/, which
>> seems like a pretty cool little API for doing something with
bytecode.

Yes, it does look elegant, for reading, modifying, and printing
classfiles.  However, it is missing many of the convenience
features gnu.bytecode for generating classes.   I don't know if
it would be possible to combine them or build something with
the best features of both - it wouldn't be a trivial task, though
many of the CodeAttr convenience methods should not to too
difficult.

On Wed, 2004-12-29 at 22:57, Elliott Hughes wrote:
a) Remove use of Class.forName(), if it exists, and substitute in
something that can search a specified path instead.

No objection, as long as there is a reasonable default.
However, do you really need a path?  Can't you use a
custom ClassLoader instead?

b) Support 1.5

The main thing missing, I believe is annotations.

c) Ensure API provides enough information to output all details of the
class file without using a Writer which may not output in a format you
desire and tends to have special access to internal variables...


i think a better choice is to make the writer methods public and non-final. i fear the other way duplication lies.

I've done that, at least in the obvious places.  Suggestions for
improvements welcome.

i'm not sure we should worry too much about using exactly jasmin format, though. for one thing, it doesn't support everything we need, and for another, it seems offensively over-complicated for such a simple job. (i have a semi-irrational dislike of JavaCC.)

JavaCC also has a licensing problem: The source code is littered
with copyright statements that are *not* Free.  This is in
contrast to the top-level LICENSE, which *is* Free.  I've submitted
a bug report: https://javacc.dev.java.net/issues/show_bug.cgi?id=69
--
        --Per Bothner
address@hidden   http://per.bothner.com/




reply via email to

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