private String toString(Unit u){
  if (u == null)   return "<last instruction>";
  if (u instanceof GotoStmt) {
    GotoStmt goto_stmt=(GotoStmt)u;
    return String.format("goto %d (line %d)",lnums.get(goto_stmt.getTarget()),lnums.get(u));
  }
 else   if (u instanceof IfStmt) {
    IfStmt if_stmt=(IfStmt)u;
    return String.format("if %s goto %d (line %d)",if_stmt.getCondition(),lnums.get(if_stmt.getTarget()),lnums.get(u));
  }
 else   return String.format("%s (line %d)",u,lnums.get(u));
}

private String toString ( Unit u ) { if ( u == null ) return "<last instruction>" ; if ( u instanceof GotoStmt ) { GotoStmt goto_stmt = ( GotoStmt ) u ; return String . format ( "goto %d (line %d)" , lnums . get ( goto_stmt . getTarget ( ) ) , lnums . get ( u ) ) ; } else if ( u instanceof IfStmt ) { IfStmt if_stmt = ( IfStmt ) u ; return String . format ( "if %s goto %d (line %d)" , if_stmt . getCondition ( ) , lnums . get ( if_stmt . getTarget ( ) ) , lnums . get ( u ) ) ; } else return String . format ( "%s (line %d)" , u , lnums . get ( u ) ) ; }
formats an instruction using lnums to fill in branch destinations and offsets in the current method
