bug fix for local value number
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2718 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
7de7e64f05
commit
355ac58ee3
|
@ -105,8 +105,8 @@ public class ForNameContextInterpreter implements SSAContextInterpreter {
|
|||
|
||||
private SSAInstruction[] makeStatements(JavaTypeContext context) {
|
||||
ArrayList<SSAInstruction> statements = new ArrayList<SSAInstruction>();
|
||||
int nextLocal = 1;
|
||||
int retValue = nextLocal++;
|
||||
// vn1 is the string parameter
|
||||
int retValue = 2;
|
||||
TypeReference tr = context.getType().getTypeReference();
|
||||
if (tr != null) {
|
||||
SSALoadClassInstruction l = new SSALoadClassInstruction(retValue, tr);
|
||||
|
@ -118,10 +118,7 @@ public class ForNameContextInterpreter implements SSAContextInterpreter {
|
|||
statements.add(t);
|
||||
}
|
||||
SSAInstruction[] result = new SSAInstruction[statements.size()];
|
||||
Iterator<SSAInstruction> it = statements.iterator();
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
result[i] = it.next();
|
||||
}
|
||||
statements.toArray(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue