java disassembler/assembler

Jeroen Frijters jeroen@sumatra.nl
Thu Oct 20 20:47:00 GMT 2005


Daniel Reynaud wrote:
> Well, I am defining an updated version of the Jasmin language 
> for that purpose. The new version would offer :
> 
> - edition of the bytecode version
> - support for StackMap attributes
> - branch targets as offsets or labels (currently there are 
> only labels)
> 
> If you have any ideas or features you would like to see 
> included just tell me, because I am actively working on it and
> plan to release a beta version soon.

Thanks. I'd like to see support for emitting the various new 1.5
attributes (e.g. Signature and the annotation stuff). I'm particularly
interested in the ability to create malformed classes this way. For
example an annotation interface that doesn't implement
java.lang.annotation.Annotation, or that has a method with a return type
that is not supported by annotations.

For generics a simple string based solution would suffice, for example
something like this:

.class public Foo
.signature <T::Ljava/lang/Comparable;>Ljava/lang/Object;

Annotations will be a little harder because of the complexity, but it
should be possible to work out a fairly usable syntax for them as well.
I'd be happy to provide more concrete input on the syntax if you want.

It should also be possible to arbitrarily set the ACC_ANNOTATION,
ACC_ENUM and ACC_SYNTHETIC flags. For example:

.class public annotation enum Foo
.field static enum Foo V

Regards,
Jeroen



More information about the Java mailing list