fix special case in which primitive types could not be used as entrypoint parameters
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1099 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
ed509d5910
commit
aef9a11b3d
|
@ -99,8 +99,12 @@ public abstract class Entrypoint implements BytecodeConstants {
|
|||
if (p.length == 0) {
|
||||
return -1;
|
||||
} else if (p.length == 1) {
|
||||
SSANewInstruction n = m.addAllocation(p[0], warnings);
|
||||
return (n == null) ? -1 : n.getDef();
|
||||
if (p[0].isPrimitiveType()) {
|
||||
return m.addLocal();
|
||||
} else {
|
||||
SSANewInstruction n = m.addAllocation(p[0], warnings);
|
||||
return (n == null) ? -1 : n.getDef();
|
||||
}
|
||||
} else {
|
||||
int[] values = new int[p.length];
|
||||
int countErrors = 0;
|
||||
|
|
|
@ -95,6 +95,10 @@ public abstract class AbstractRootMethod extends SyntheticMethod {
|
|||
return new SyntheticIR(this, Everywhere.EVERYWHERE, makeControlFlowGraph(), instrs, options, constants, warnings);
|
||||
}
|
||||
|
||||
public int addLocal() {
|
||||
return nextLocal++;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the invoke instructions added by this operation
|
||||
* @throws IllegalArgumentException if site is null
|
||||
|
|
Loading…
Reference in New Issue