X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/2ab9671fde5297fc59583361f152e812e66c2d17..a83f1d602c6f50eb9ab0448a20f0ecb80fefcead:/trans/treeutils.sml diff --git a/trans/treeutils.sml b/trans/treeutils.sml index ec6be4d..a15b1a3 100644 --- a/trans/treeutils.sml +++ b/trans/treeutils.sml @@ -28,6 +28,7 @@ struct | effect (T.UNOP (_, a)) = effect a | effect (T.MEMORY _) = true | effect (T.ALLOC _) = true + | effect (T.STRING _) = false | effect (T.COND (a, b, c)) = (effect a) orelse (effect b) orelse (effect c) | effect (T.STMVAR (sl, e)) = true (* Has to be, to be safe <--- jwise is an assclown, he was too lazy to write a effect_stm *) | effect (T.NULLPTR) = false @@ -77,6 +78,7 @@ struct 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.STRING(s)) = "STRING(" ^ (Stringref.name s) ^ ")" | 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) ^ "})" | pp_exp (T.NULLPTR) = "NULL"