public void returnValue(TypeDesc type) {
        int stackAdjust = -1;
        byte op;

        switch (type.getTypeCode()) {
        case TypeDesc.INT_CODE:
        case TypeDesc.BOOLEAN_CODE:
        case TypeDesc.BYTE_CODE:
        case TypeDesc.SHORT_CODE:
        case TypeDesc.CHAR_CODE:
            op = Opcode.IRETURN;
            break;
        case TypeDesc.FLOAT_CODE:
            op = Opcode.FRETURN;
            break;
        case TypeDesc.LONG_CODE:
            stackAdjust = -2;
            op = Opcode.LRETURN;
            break;
        case TypeDesc.DOUBLE_CODE:
            stackAdjust = -2;
            op = Opcode.DRETURN;
            break;
        case TypeDesc.VOID_CODE:
            stackAdjust = 0;
            op = Opcode.RETURN;
            break;
        default:
            op = Opcode.ARETURN;
            break;
        }

        addCode(stackAdjust, op);
    }