X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/5c79bb689ab446551bc7ec4497e6c9b75582837e..141a7120aec6ddf3ab097f275498d8e3a1b90401:/trans/treeutils.sml?ds=sidebyside diff --git a/trans/treeutils.sml b/trans/treeutils.sml index b5217b0..ec6be4d 100644 --- a/trans/treeutils.sml +++ b/trans/treeutils.sml @@ -33,7 +33,7 @@ struct | 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 @@ -68,14 +68,14 @@ struct 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) ^ "})" @@ -83,7 +83,7 @@ struct 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) =