]> Joshua Wise's Git repositories - snipe.git/blobdiff - trans/treeutils.sml
Add strings to the IR
[snipe.git] / trans / treeutils.sml
index ec6be4d40e3de9e9ee50eed92304ecb0224318a5..a15b1a31f06195dc89f1d646809c2db896d906a9 100644 (file)
@@ -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"
This page took 0.0237849999999999 seconds and 4 git commands to generate.