[Fb-contrib-commit] SF.net SVN: fb-contrib: [553] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/de
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-06-06 05:01:30
|
Revision: 553 Author: dbrosius Date: 2006-06-05 22:01:25 -0700 (Mon, 05 Jun 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=553&view=rev Log Message: ----------- add branch targets for TABLESWITCH and LOOKUPSWITCH Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java 2006-06-06 04:55:47 UTC (rev 552) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java 2006-06-06 05:01:25 UTC (rev 553) @@ -77,6 +77,12 @@ if (((seen >= IFEQ) && (seen <= GOTO)) || ((seen >= IFNULL) && (seen <= GOTO_W))) { branchTargets.add(Integer14.valueOf(getBranchTarget())); + } else if ((seen == TABLESWITCH) || (seen == LOOKUPSWITCH)) { + int[] offsets = getSwitchOffsets(); + int pc = getPC(); + for (int offset : offsets) { + branchTargets.add(Integer14.valueOf(offset + pc)); + } } else if ((seen == ASTORE) || ((seen >= ASTORE_0) && (seen <= ASTORE_3))) { localMethodCalls.remove(Integer14.valueOf(RegisterUtils.getAStoreReg(this, seen))); } else if (seen == PUTFIELD) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |