private void generateReturn(ReturnNode node)
            throws IRException {

        if (node.returnExpr != null) {
            Operand value = generate(node.returnExpr);

            if (returnValue == null)
                returnValue =
                    new TmpVariableOperand(value.type(), varTable);

            // code.addStatement(new ReturnStatement(value));
            code.addStatement(new AssignmentStatement(returnValue, value));
            code.addStatement(new GoToStatement(returnLabel));
        } else {
            code.addStatement(new GoToStatement(returnLabel));
            // code.addStatement(new ReturnStatement());
        }
    }