[Fb-contrib-commit] SF.net SVN: fb-contrib: [930] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/d
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-10-11 03:21:11
|
Revision: 930 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=930&view=rev Author: dbrosius Date: 2007-10-10 20:21:15 -0700 (Wed, 10 Oct 2007) Log Message: ----------- the branch offset of an ifne conditional may be negative if the 'target' is the loop end. in this case, use the loop end. Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-10-11 02:45:03 UTC (rev 929) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-10-11 03:21:15 UTC (rev 930) @@ -199,11 +199,9 @@ } } } else if (((seen > IFEQ) && (seen <= GOTO)) || (seen == IFNULL) || (seen == IFNONNULL)) { - if (getBranchOffset() > 0) { - LoopInfo loop = findLoop(getPC(), true); - if (loop != null) { - loop.addConditionalRange(getPC(), getBranchTarget()); - } + LoopInfo loop = findLoop(getPC(), true); + if (loop != null) { + loop.addConditionalRange(getPC(), getBranchOffset() > 0 ? getBranchTarget() : loop.end); } } else if (seen == CHECKCAST) { if (stack.getStackDepth() > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |