[Fb-contrib-commit] SF.net SVN: fb-contrib:[1529] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-04-04 06:30:28
|
Revision: 1529
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1529&view=rev
Author: dbrosius
Date: 2010-04-04 06:30:22 +0000 (Sun, 04 Apr 2010)
Log Message:
-----------
fix some fps
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:26:57 UTC (rev 1528)
+++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossibleConstantAllocationInLoop.java 2010-04-04 06:30:22 UTC (rev 1529)
@@ -22,6 +22,7 @@
import java.util.Map;
import org.apache.bcel.classfile.Code;
+import org.apache.bcel.generic.Type;
import com.mebigfatguy.fbcontrib.utils.RegisterUtils;
@@ -121,6 +122,21 @@
sawAllocationNumber = nextAllocationNumber;
}
}
+ //FALL_THRU
+
+ case INVOKEINTERFACE:
+ case INVOKEVIRTUAL:
+ case INVOKESTATIC:
+ Type[] types = Type.getArgumentTypes(getSigConstantOperand());
+ if (stack.getStackDepth() >= types.length) {
+ for (int i = 0; i < types.length; i++) {
+ OpcodeStack.Item item = stack.getStackItem(i);
+ Integer allocation = (Integer)item.getUserValue();
+ if (allocation != null) {
+ allocations.remove(allocation);
+ }
+ }
+ }
break;
case ASTORE:
@@ -133,7 +149,7 @@
Integer allocation = (Integer)item.getUserValue();
if (allocation != null) {
Integer reg = Integer.valueOf(RegisterUtils.getAStoreReg(this, seen));
- if (storedAllocations.values().contains(reg)) {
+ if (storedAllocations.values().contains(allocation)) {
allocations.remove(allocation);
storedAllocations.remove(reg);
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|