Merge pull request #124 from joana-team/slightly-more-informative-output

display which classes each handler catches when outputting IR
This commit is contained in:
Julian Dolby 2017-03-09 08:51:06 -05:00 committed by GitHub
commit 0784a9da6a

View File

@ -154,7 +154,17 @@ public abstract class IR {
int end = bb.getLastInstructionIndex();
result.append("BB").append(bb.getNumber());
if (bb instanceof ExceptionHandlerBasicBlock) {
result.append("<Handler>");
result.append("<Handler> (");
Iterator<TypeReference> catchIter = ((ExceptionHandlerBasicBlock) bb).getCaughtExceptionTypes();
while (catchIter.hasNext()) {
TypeReference next = catchIter.next();
result.append(next);
if (catchIter.hasNext()) {
result.append(",");
}
}
result.append(")");
}
result.append("\n");
for (Iterator it = bb.iteratePhis(); it.hasNext();) {