[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Jimplification error



Hi Alex,

The following patch should fix your problem, even if it is a gross hack.

pat


Index: 1.2.2.dev.23/src/soot/toolkits/scalar/LocalPacker.java
--- 1.2.2.dev.23/src/soot/toolkits/scalar/LocalPacker.java Fri, 24 Mar
2000 17:59:04 -0500 plam (soot/t/b/22_LocalPacke 1.8 644)
+++ 1.2.2.dev.24/src/soot/toolkits/scalar/LocalPacker.java Sun, 08 Jul
2001 17:05:59 -0400 plam (soot/t/b/22_LocalPacke 1.9 644)
@@ -166,6 +166,17 @@
                 else {
                     newLocal = (Local) original.clone();
                     newLocal.setType((Type) group);
+
+		    // Icky fix.  But I guess it works. -PL
+		    // It is no substitute for really understanding the
+		    // problem, though.  I'll leave that to someone
+		    // who really understands the local naming stuff.
+		    // Does such a person exist?
+
+		    int signIndex = newLocal.getName().indexOf("#");
+
+		    if(signIndex != -1)
+			newLocal.setName(newLocal.getName().substring(0, signIndex));

                     groupIntToLocal.put(pair, newLocal);
                     body.getLocals().add(newLocal);