fix toString()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1485 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
aa17ea8c7e
commit
1bfe7cb052
|
@ -49,7 +49,20 @@ public class SSASwitchInstruction extends SSAInstruction {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(SymbolTable symbolTable, ValueDecorator d) {
|
public String toString(SymbolTable symbolTable, ValueDecorator d) {
|
||||||
return "switch " + getValueString(symbolTable, d, val) + " " + casesAndLabels;
|
StringBuffer result = new StringBuffer("switch ");
|
||||||
|
result.append(getValueString(symbolTable, d, val));
|
||||||
|
result.append(" [");
|
||||||
|
for (int i = 0; i < casesAndLabels.length - 1; i++) {
|
||||||
|
result.append(casesAndLabels[i]);
|
||||||
|
i++;
|
||||||
|
result.append("->");
|
||||||
|
result.append(casesAndLabels[i]);
|
||||||
|
if (i < casesAndLabels.length - 2) {
|
||||||
|
result.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.append("]");
|
||||||
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue