[Biojava-dev] bytecode 'issue'
Matthew Pocock
matthew_pocock at yahoo.co.uk
Fri Mar 21 17:54:18 EST 2003
Hi,
If you don't care about the bytecode package, look
away now.
Line 289 of
org.biojava.utils.bytecode.GeneratedCodeClass sets the
maximum stack depth for /all/ generated methods to 20.
This causes some generated code to fail - this is a
problem for some HMMs. The options are:
1) up the stack depth to some other constant e.g. 40
2) make it a variable - try to load the class, and if
there's an excepion up it & reload
3) work out the stack depth from the bytecode
4) add stackDepth & stackDelta to ByteInstruction so
that stackDepth can be computed
Option 1 will get us going again, but then in the
future the same problems will appear. Also, if the
stack depth is too deep, we may have suckey
performance in some cases.
Option 2 seems like an uperhack. Eugh.
Option 3 will be realy, realy hard, especialy with
gotos & exception handleing.
Option 4 lets us hopefuly hide nasty jumps &
exceptions inside clever operators. we also get some
other stuff for free - validate that jumps go to
somewhere with the same stack depth for example.
Thoughts, options, warnings?
Matthew
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
More information about the biojava-dev
mailing list