## treecode-bitsize-g.pkg -- does a treecode expression return a 32-bit int, a 64-bit int, or ... ?
# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.lib### "Without music, life would be an error."
###
### -- Friedrich Nietzsche
# We get invoked from;
#
#
src/lib/compiler/back/low/treecode/treecode-transforms-g.pkggeneric package treecode_bitsize_g (
# ==================
#
package tcf: Treecode_Form; # Treecode_Form is from
src/lib/compiler/back/low/treecode/treecode-form.api #
int_bitsize: tcf::Int_Bitsize; # Size-in-bits of vanilla int.
)
: (weak) Treecode_Bitsize # Treecode_Bitsize is from
src/lib/compiler/back/low/treecode/treecode-bitsize.api{
# Export to client packages:
#
package tcf = tcf; # "tcf" == "treecode_form".
int_bitsize = int_bitsize; # Size-in-bits of vanilla int.
fun size (tcf::CODETEMP_INFO (type, _ )) => type;
#
size (tcf::LITERAL _) => int_bitsize;
size (tcf::LABEL _) => int_bitsize;
size (tcf::LATE_CONSTANT _) => int_bitsize;
#
size (tcf::LABEL_EXPRESSION e) => size e;
#
size (tcf::NEG (type, _ )) => type;
size (tcf::ADD (type, _, _ )) => type;
size (tcf::SUB (type, _, _ )) => type;
size (tcf::MULS (type, _, _ )) => type;
#
size (tcf::DIVS (_, type, _, _)) => type;
size (tcf::REMS (_, type, _, _)) => type;
#
size (tcf::MULU (type, _, _ )) => type;
size (tcf::DIVU (type, _, _ )) => type;
size (tcf::REMU (type, _, _ )) => type;
size (tcf::NEG_OR_TRAP (type, _ )) => type;
size (tcf::ADD_OR_TRAP (type, _, _ )) => type;
size (tcf::SUB_OR_TRAP (type, _, _ )) => type;
size (tcf::MULS_OR_TRAP (type, _, _ )) => type;
#
size (tcf::DIVS_OR_TRAP (_, type, _, _)) => type;
#
size (tcf::BITWISE_AND (type, _, _ )) => type;
size (tcf::BITWISE_OR (type, _, _ )) => type;
size (tcf::BITWISE_XOR (type, _, _ )) => type;
size (tcf::BITWISE_EQV (type, _, _ )) => type;
size (tcf::BITWISE_NOT (type, _ )) => type;
size (tcf::RIGHT_SHIFT (type, _, _ )) => type;
size (tcf::RIGHT_SHIFT_U (type, _, _ )) => type;
size (tcf::LEFT_SHIFT (type, _, _ )) => type;
size (tcf::SIGN_EXTEND (type, _, _ )) => type;
size (tcf::ZERO_EXTEND (type, _, _ )) => type;
size (tcf::FLOAT_TO_INT (type, _, _, _)) => type;
size (tcf::CONDITIONAL_LOAD (type, _, _, _)) => type;
size (tcf::LOAD (type, _, _ )) => type;
#
size (tcf::PRED (e, _)) => size e;
size (tcf::LET (_, e)) => size e;
size (tcf::RNOTE (e, _)) => size e;
#
size (tcf::REXT (type, _ )) => type;
size (tcf::OP (type, _, _ )) => type;
size (tcf::ARG (type, _, _ )) => type;
size (tcf::ATATAT (type, _, _ )) => type;
#
size (tcf::PARAM _) => int_bitsize;
size (tcf::QQQ ) => int_bitsize;
#
size (tcf::BITSLICE (type, _, _)) => type;
end;
fun fsize (tcf::CODETEMP_INFO_FLOAT (type, _ )) => type;
#
fsize (tcf::FLOAD (type, _, _ )) => type;
fsize (tcf::FADD (type, _, _ )) => type;
fsize (tcf::FSUB (type, _, _ )) => type;
fsize (tcf::FMUL (type, _, _ )) => type;
fsize (tcf::FDIV (type, _, _ )) => type;
#
fsize (tcf::FABS (type, _ )) => type;
fsize (tcf::FNEG (type, _ )) => type;
fsize (tcf::FSQRT (type, _ )) => type;
fsize (tcf::FCONDITIONAL_LOAD (type, _, _, _)) => type;
fsize (tcf::INT_TO_FLOAT (type, _, _ )) => type;
fsize (tcf::FLOAT_TO_FLOAT (type, _, _ )) => type;
fsize (tcf::COPY_FLOAT_SIGN (type, _, _ )) => type;
fsize (tcf::FEXT (type, _ )) => type;
#
fsize (tcf::FPRED (e, _)) => fsize e;
fsize (tcf::FNOTE (e, _)) => fsize e;
end;
};