[Fb-contrib-commit] SF.net SVN: fb-contrib: [711] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-12-08 16:12:03
|
Revision: 711 http://svn.sourceforge.net/fb-contrib/?rev=711&view=rev Author: dbrosius Date: 2006-12-08 08:11:06 -0800 (Fri, 08 Dec 2006) Log Message: ----------- don't push up scope blocks, believing that the block is a complex conditional guard if the block in question already has children Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-04 05:34:26 UTC (rev 710) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-08 16:11:06 UTC (rev 711) @@ -141,10 +141,10 @@ } } else { ScopeBlock sb = findScopeBlockWithTarget(rootScopeBlock, getPC(), target); - if ((sb != null) && (!sb.isLoop)) { + if ((sb != null) && (!sb.isLoop) && !sb.hasChildren()) { sb.pushUpLoadStores(); - sb.startLocation = getPC(); - sb.finishLocation = target; + sb.setStart(getPC()); + sb.setFinish(target); } else { sb = new ScopeBlock(getPC(), target); rootScopeBlock.addChild(sb); @@ -255,7 +255,26 @@ public int getFinish() { return finishLocation; } + + /** + * sets the start pc of the block + * @param start the start pc + */ + public void setStart(int start) { + startLocation = start; + } + + /** + * sets the finish pc of the block + * @param finish the finish pc + */ + public void setFinish(int finish) { + finishLocation = finish; + } + public boolean hasChildren() { + return children != null; + } /** * sets that this block is a loop */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |