X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/6c5506c5b97dabd72ba38c1f033dc4fded52cbfd..469e60eb4974bf3fc47cfa5b9a33b14983bec135:/trans/treeutils.sml?ds=inline 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"