-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David,

On 5/21/2009 1:57 PM, David kerber wrote:
> Interesting.  From that description, depending on how sparse is
> "sparse", there's probably a good chance I'm getting a tableswitch.

If you find that a tableswitch is /not/ being generated, you could add
dummy cases that don't do anything like this:

switch(comeChar) {
  case 'a': /* do something */
            break;
  case 'b': /* do something */
            break;
  case 'c': /* do NOTHING */
            break;
  case 'd': /* do NOTHING */
            break;
  case 'e': /* do something */
            break;
}

You'll complicate your code a bit, but you'll also likely squeeze more
performance out of your code.

> Can you point me to a byte code interpreter so I could look at this?

What you really want is a bytecode disassembler (if that's even the
right term for this thing). I've used 'jad' in the past, but if you just
need to disassemble (instead of decompiling back to Java source),
Chuck's suggestion of using 'javap' is a good one: it's already included
with the JDK and works just fine.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoWm/0ACgkQ9CaO5/Lv0PDo9QCfUWCJ4EfXgiorapcqxDKHReo0
G/MAnRIRBZXnclIbI+iT5gXsUeomB2IW
=TnmT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to