[Fb-contrib-commit] SF.net SVN: fb-contrib:[1531] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-04-04 06:57:45
|
Revision: 1531
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1531&view=rev
Author: dbrosius
Date: 2010-04-04 06:57:39 +0000 (Sun, 04 Apr 2010)
Log Message:
-----------
if an allocation is stored in an array, don't report
Modified Paths:
--------------
trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java
Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java
===================================================================
--- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java 2010-04-04 06:53:48 UTC (rev 1530)
+++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java 2010-04-04 06:57:39 UTC (rev 1531)
@@ -159,6 +159,16 @@
}
break;
+ case AASTORE:
+ if (stack.getStackDepth() >= 2) {
+ OpcodeStack.Item item = stack.getStackItem(0);
+ Integer allocation = (Integer)item.getUserValue();
+ if (allocation != null) {
+ allocations.remove(allocation);
+ }
+ }
+ break;
+
case ALOAD:
case ALOAD_0:
case ALOAD_1:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|