| effect (T.NULLPTR) = false
fun effect_stm (T.MOVE (e1,e2)) = effect e1 orelse effect e2
- | effect_stm (T.RETURN (e1,e2)) = effect e1 orelse effect e1
+ | effect_stm (T.RETURN (e1)) = effect e1
| effect_stm (T.EFFECT e) = effect e
| effect_stm (T.JUMPIFN (e,_)) = effect e
| effect_stm _ = false
fun pp_exp (T.CONST(x)) = Word32Signed.toString x
| pp_exp (T.TEMP(t)) = Temp.name t
- | pp_exp (T.ARG(n, sz)) = "arg#"^Int.toString n
+ | pp_exp (T.ARG(n)) = "arg#"^Int.toString n
| pp_exp (T.BINOP (binop, e1, e2)) =
"(" ^ pp_exp e1 ^ " " ^ pp_binop binop ^ " " ^ pp_exp e2 ^ ")"
| pp_exp (T.UNOP (unop, e1)) =
pp_unop unop ^ "(" ^ pp_exp e1 ^ ")"
- | pp_exp (T.CALL (f, l, sz)) =
- Symbol.name f ^ "(" ^ (String.concatWith ", " (List.map (fn (e, _) => pp_exp e) l)) ^ ")"
- | pp_exp (T.MEMORY (exp, sz)) = "M(" ^ Temp.sfx sz ^ ")[" ^ pp_exp exp ^ "]"
+ | pp_exp (T.CALL (f, l)) =
+ Symbol.name f ^ "(" ^ (String.concatWith ", " (List.map (fn e => pp_exp e) l)) ^ ")"
+ | pp_exp (T.MEMORY (exp)) = "M[" ^ pp_exp exp ^ "]"
| pp_exp (T.ALLOC(e)) = "NEW(" ^ pp_exp e ^ ")"
| pp_exp (T.COND(c,e1,e2)) = "(" ^ pp_exp c ^ ") ? (" ^ pp_exp e1 ^ ") : (" ^ pp_exp e2 ^ ")"
| pp_exp (T.STMVAR(sl,v)) = "({" ^ (foldr (fn (st,s) => (pp_stm st) ^ "; " ^ s) "" sl) ^ (pp_exp v) ^ "})"
and pp_stm (T.MOVE (e1,e2)) =
pp_exp e1 ^ " <-- " ^ pp_exp e2
- | pp_stm (T.RETURN (e, sz)) =
+ | pp_stm (T.RETURN (e)) =
"return " ^ pp_exp e
| pp_stm (T.EFFECT e) = pp_exp e
| pp_stm (T.LABEL l) =