/** Generates code for an if statement. */
@Override
public Void visitIfStmt(IfStmt nd) {
Value cond = ExprCodeGenerator.generate(nd.getExpr(), fcg);
NopStmt join = j.newNopStmt();
units.add(j.newIfStmt(j.newEqExpr(cond, IntConstant.v(0)), join));
nd.getThen().accept(this);
if(nd.hasElse()) {
NopStmt els = join;
join = j.newNopStmt();
units.add(j.newGotoStmt(join));
units.add(els);
nd.getElse().accept(this);
}