## treecode-transforms.api
#
# This module provides various generic Treecode transformations.
# Basically, we want to support various non built-in enum widths.
# This module handles the translation.
#
# -- Allen Leung
# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.libstipulate
package rkj = registerkinds_junk; # registerkinds_junk is from
src/lib/compiler/back/low/code/registerkinds-junk.pkg package tcp = treecode_pith; # treecode_pith is from
src/lib/compiler/back/low/treecode/treecode-pith.pkgherein
# This api is implemented in:
#
src/lib/compiler/back/low/treecode/treecode-transforms-g.pkg #
api Treecode_Tranforms {
#
package tcf: Treecode_Form; # Treecode_Form is from
src/lib/compiler/back/low/treecode/treecode-form.api package tsz: Treecode_Bitsize # Treecode_Bitsize is from
src/lib/compiler/back/low/treecode/treecode-bitsize.api where # "tsz" == "treecode_size".
tcf == tcf; # "tcf" == "treecode_form".
cond_of: tcf::Flag_Expression -> tcp::Cond;
fcond_of: tcf::Flag_Expression -> tcp::Fcond;
# Perform simplification:
#
compile_int_expression: tcf::Int_Expression -> tcf::Int_Expression;
compile_float_expression: tcf::Float_Expression -> tcf::Float_Expression;
compile_void_expression: tcf::Void_Expression -> List( tcf::Void_Expression );
# Simulate conditional expression:
#
compile_cond:
{ expression: (tcf::Int_Bitsize, tcf::Flag_Expression, tcf::Int_Expression, tcf::Int_Expression),
notes: note::Notes,
rd: rkj::Codetemp_Info
}
->
List( tcf::Void_Expression );
compile_fcond
:
{ expression: ( tcf::Float_Bitsize,
tcf::Flag_Expression,
tcf::Float_Expression,
tcf::Float_Expression
),
notes: note::Notes,
fd: rkj::Codetemp_Info
}
->
List( tcf::Void_Expression );
};
end;