Jump to content
  • Advertisement
Sign in to follow this  

[java] [solved] Need to Optimize: ICONST/BIPUSH TABLESWITCH

This topic is 4395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[EDIT] Damn it! I was inadvertently using a very old version of proguard. In fact, Proguard 3.6 optimizes that kind of code away just fine! D'oh! and there I was, working with Jikes and Jode and Jshrink and all sorts of tools when I was using the right one all the way... Heyas! I found jikes to be somewhat unstable, and I'm looking for a reliable tool or java compiler (preferrably a byte code optimizer, though) that optimizes away the following:
public static final int constant = 123;


  switch (constant)
      case 123:
      case 124:

This is basically for a compile time optimization of Java in order to do away with preprocessors for mobile java. However, javac generates code that does ICONST oder BIPUSH with a constant immediate value, and then TABLESWITCH, and thusly keeps all the otherCode() intact... which is undesirable for a host of reasons, primarily selective use of Profiles/Configurations and size reduction. [Edited by - Thygrrr on September 14, 2006 8:28:21 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!