Skip to content

Commit

Permalink
Fix debug output in InterpreterContext to not assume presence of cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
subbuss committed Feb 18, 2015
1 parent 952f539 commit b4787ab
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -161,7 +161,16 @@ public String toString() {
buf.append(fileName).append(':').append(lineNumber);
if (name != null) buf.append(' ').append(name);

buf.append("\nCFG:\n").append(cfg.toStringInstrs());
if (cfg != null) {
buf.append("\nCFG:\n").append(cfg.toStringInstrs());
} else {
int i = 0;
for (Instr instr : instructions) {
if (i > 0) buf.append("\n");
buf.append(" ").append(i).append('\t').append(instr);
i++;
}
}

return buf.toString();
}
Expand Down

0 comments on commit b4787ab

Please sign in to comment.