[Biojava-l] byte-code generation

Triplett, Terry Terry.Triplett@pfizer.com
Tue, 19 Sep 2000 15:19:15 -0400


This appears to be as complete a resource as any out there, containing what
appears to be intelligent discussion about various java-related issues:
http://www.bearcave.com/software/java/comp_java.html

There is a section listing the available Java Source to Byte Code Compilers
about 3/4 of the way down the page.  I'm not sure if they can do exactly
what you want - it's hard to tell from the descriptions.

Also interesting is Jopt
(http://www-i2.informatik.rwth-aachen.de/~markusj/jopt/index.html), which is
advertised as a class file optimizer that reads a java class file and
generates another that is optimized for size and byte code efficiency.  

That page led me to http://www.inf.fu-berlin.de/~dahm/JavaClass/ which
describes a general purpose framework for Byte Code Engineering, and
contains a bunch of links to related things with names like "Bytecode
Instrumenting Tool".

Cheers,

Terry L. Triplett
Bioinformatics
Pfizer Global Research and Development


> -----Original Message-----
> From: Simon Brocklehurst
> [mailto:simon.brocklehurst@cambridgeantibody.com]
> Sent: Tuesday, September 19, 2000 2:50 PM
> To: Matthew Pocock
> Cc: biojava-l@biojava.org
> Subject: Re: [Biojava-l] byte-code generation
> 
> 
> Matthew Pocock wrote:
> 
> Hi Matthew,
> 
> snip...
> 
> > This involves writing java code. It will work, and will be 
> relatively easy to
> > debug. I would prefer to write the bytecode directly, as it 
> leaves less room
> > for mess (like where to stoor the temporary files etc.). It 
> can be done - most
> > of the java implementations of scripting languages 
> (javascript, tcl, python
> > etc.) generate byte-code on the fly to interpret the 
> scripts. Also, the proxy
> > class in 1.3 generates byte-code to glue the delegates to 
> the interfaces.
> 
> I would agree it's neater and potentially more err... 
> performant, to generate byte
> code directly rather than going through intermediate 
> compilations step(s).  The
> downside is the amount of effort required to get it to work 
> (depending on the
> complexity of what you want to do).  For example, some first 
> generation
> cross-compilers to Java byte-code from other languages took 
> the approach I
> suggested in order to get products out of the door in a 
> reasonable time-scale.
> 
> I guess you've already looked into writing byte-code by hand 
> to come to the
> decision that you really want to do this. But in case you 
> haven't - you will need
> to get hold of a decent Java byte code assembler from 
> somewhere so that at least
> you can test what you're doing makes sense when you're 
> learning/debugging.
> 
> If you haven't got your own preferred byte-code assembler, 
> you could conceivably
> start with Jasmin (http://www.mrl.nyu.edu/meyer/jasmin/),  
> but I have absolutely
> no idea if it's currently the best one around or not.  This 
> kind of thing is
> really more Colin's cup of tea than mine, and he's on holiday 
> at the moment, so I
> can't ask.
> 
> Simon
> --
> Simon M. Brocklehurst, Ph.D.
> Head of Bioinformatics & Advanced IS
> Cambridge Antibody Technology
> The Science Park, Melbourn, Cambridgeshire, UK
> http://www.CambridgeAntibody.com/
> mailto:simon.brocklehurst@CambridgeAntibody.com
> 
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>