throw new IllegalArgumentException("Unknown operand: " + operand1);
throw new IllegalArgumentException("Unknown operand: " + refs[0]);
    public void generateCodeForUnary(CodeGenerator cg) {        if (operand1 instanceof Variable) {            Location varLoc = ((Variable) operand1).getLocation();            if (varLoc instanceof RegisterLocation) {                RegisterLocation vregLoc = (RegisterLocation) varLoc;                cg.generateCodeFor(this, condition, vregLoc.getRegister());            } else if (varLoc instanceof StackLocation) {                StackLocation stackLoc = (StackLocation) varLoc;                cg.generateCodeFor(this, condition, stackLoc.getDisplacement());            } else {                throw new IllegalArgumentException("Unknown location: " + varLoc);            }        } else if (operand1 instanceof Constant) {            // this probably won't happen, is should be folded earlier            Constant con = (Constant) operand1;            cg.generateCodeFor(this, condition, con);        } else {            throw new IllegalArgumentException("Unknown operand: " + operand1);        }    }