Lines Matching refs:exp
149 fun flow [] exp = exp
150 | flow (h::t) exp = Tree.ESEQ(h, flow t exp);
163 | mk_PAIR exp =
166 fun analyzeExp exp =
168 if is_let exp then
169 let val (lt, rhs) = dest_let exp;
176 else if is_numeral exp then
177 Tree.NCONST (Arbint.fromNat (dest_numeral exp))
179 else if not (is_comb exp) then
180 if is_var exp then
181 let val (v,ty) = dest_var exp in
187 else if is_cond exp then
188 let val (c,t,f) = dest_cond exp;
203 else if is_pair exp then
204 let val (t1,t2) = dest_pair exp
208 else if is_comb exp then
210 let val (operator, operands) = dest_comb exp in
219 if is_pair operands then (* BINOP of binop * exp * exp *)
223 else Tree.BINOP (convert_binop operator, analyzeExp operands, analyzeExp operands) (* UNIOP of uniop * exp *)
251 | discompose_move exp = [exp]
254 List.foldl (fn (exp, L) => L @ discompose_move exp) [] (linear (stm, []))
298 val ((f_name,args,stms,outs):string * Tree.exp * Tree.stm list * Tree.exp) = ir
355 | one_stm (Tree.EXP exp) =
356 one_exp exp