This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: java disassembler/assembler
Hello again,
Thank you all for your comments, they have given me a certain number of
ideas.
Here is what I have already implemented in Jasmin :
- use of offsets or labels for branch targets, local variable visibility,
exception handlers...
- you can arbitrarily set the following flags : ACC_ENUM, ACC_ANNOTATION,
ACC_BRIDGE or ACC_VARARGS
- you can now specify the bytecode version. Example :
.bytecode 49.0
- you can now add a SourceDebugExtension attribute to the class with the
following directive :
.debug "all your base"
- same thing for the EnclosingMethod attribute :
.enclosing method "some/package/Foo/someMethod(I)V"
or
.enclosing method "some/package/Foo"
Here is what I am going to implement :
- signatures
- StackMap attributes
- generic attributes, so that you can add your own even if it's not
supported by Jasmin
Here is what I do NOT plan to implement for the moment :
- annotations. Unless someone finds a nice and smart syntax ;)
- constant pool edition. I know it would be great but it's just too much
work for the moment. However, I think it would be possible to explicitly add
some items to the constant pool (but not too sure it's really useful...)
- inner classes. Unless somebody needs it badly.
Each time I implement something in Jasmin, I also implement it in my
disassembler, so it's quite comfortable to edit classes now. Any other idea
?
About the classpath tools, why not. My code is already GPLd and the
copyright agreement is not a problem I think. I have contacted them but
didn't get any answer for the moment. I'm more afraid about rewriting huge
parts of my program...
Regards,
Daniel